Repository navigation
List what's up for review on a project's page in the cloud - #109
Conversation
selfie-bot
left a comment
There was a problem hiding this comment.
This PR commits two Playwright session dumps: .playwright-cli/console-2026-11-30T00-32-15-024Z.log and .playwright-cli/page-2026-11-30T00-32-15-672Z.yml. They're scratch output from looking at the live page, and nothing reads them. Please drop them, and consider adding .playwright-cli/ to .gitignore so the next session's dumps stay out too. I can push that commit if you'd like.
cloud.md now says the Worker must "give up on GitHub after 5 seconds", but AbortSignal.timeout(PULL_REQUESTS_TIMEOUT_MS) only covers the /pulls request. Before that request, await tokenFor(repository) runs, and on a cold or expired token (once an hour per repository) it makes two GitHub calls with no timeout: /repos/{owner}/{repo}/installation and /app/installations/{id}/access_tokens. If GitHub is slow during those calls, the home page waits as long as GitHub does, and so does everyone sharing the in-flight promise. To fix it, create the signal once at the top of openPullRequests and pass it through tokenFor into its two ask calls. That's outside this diff's lines, so I haven't made it an inline suggestion. Or change the spec sentence to say only the list request is bounded.
|
Thanks, both fixed in 7a1ecb9:
|
In place of the local checklist, a project's page on app.selfie.dev lists its default branch, then each open pull request with its number, title, and branch, each with its branch's newest batch and what that commit's status says. The statuses come from the rule publish uses, now statusOfBatch in hosted.ts, which asks for a branch's base only when the status would be yellow. Pull requests come from GitHub through a new GET /api/reviews that only that page asks for, kept a minute, a refusal 15 seconds, one request shared, and given up on after 5 seconds. The GitHub App needs pull requests: read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…playwright-cli/ A cold token asks GitHub twice before the list itself, so the 5 seconds cloud.md promises now covers all three. .playwright-cli/ is a browser session's scratch output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7a1ecb9 to
073318c
Compare
In the cloud, a batch's context has the open pull request from its branch, from the cached list, and "Every image has a decision" links there, as does the batch page's "Nothing in its images", since that's where it's merged or talked about. With no pull request, or on someone's own machine, it's back to the list as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On app.selfie.dev, a project's home page showed the local checklist ("At commit … / 150 of 150 rendered / Review the newest batch"). That's for someone rendering on their own machine. Now it lists what's up for review:
selfiestatus.How:
statusOfBatchinhosted.tsis the status rule moved out of the Worker'spublish, so the page and GitHub's status can't disagree. It only runs the base comparison when the status would be yellow, since that's the only time the base changes the text. That also saves work inpublish.GET /api/reviews/ReviewSource.reviews()is fetched only by the home page. The left-hand list is re-read on every story page and after every decision, so the review list doesn't ride along with it. It returns null locally.openPullRequestsingithub.tshas a 5-second timeout. The Worker keeps the list for a minute and a refusal for 15 seconds, and shares one request in flight.ChecklistRow).Needs: the GitHub App gets Pull requests: Read-only, and the diffplug installation must accept it. Until then the page shows only
main, with a note saying GitHub didn't list pull requests.access.mdandOPERATIONS.mdare updated to match.Not done here: each row's status is still worked out on every look, about four D1 calls per row. Saving each status as it's posted would make it one query, but that changes the store's schema.
cloud.rationale.mdnotes it as the next step if the list grows.Checked:
/api/reviewsis null on your own machine.Pages/Every story/In the cloud…). I looked at light and dark.pnpm testpasses.🤖 Generated with Claude Code