Repository navigation
Review forge PRs in one ranked queue with the board's questions - #5
Merged
Merged
Conversation
A 422 only said "Unprocessable Entity"; the reason (e.g. "Can not approve your own pull request") is in the errors array, and it is what a refused review needs to show. Generated-by: AI
Search answers carry their own x-ratelimit-* headers (30 a minute), so reading the forge's PRs made the meta line flip between the two budgets and could trigger the low-budget backoff for the wrong one. Generated-by: AI
The board's "Needs cgwalters" view is Needs human and Draft: Draft items are forge PRs and gists ready for his review, and the app is meant to be his one inbox. Also keep each item's created_at, to rank by how long it has been waiting. Generated-by: AI
Prep for the PR review pane: cgwalters wants the bot's forge PRs in the same inbox as its questions, reviewed without going to github.com. The review is what bot-pr promote keys on, so the verdict mirrors its rule: his latest approving, change-requesting or dismissing review, read against the current head, or conversation comment with a /promote line. bot-pr dates a /promote against the fork's push log, which the app can't read, so such a PR shows as promoted and stays in the queue until bot-pr acts. A submitted review always names the head he was shown, after re-reading the PR to make sure it didn't move, and the detail read flags a commit list that doesn't end at the head yet (GitHub lags a push), so the pane can refuse to approve a stale diff. His text may not carry a line bot-pr would act on; the only command the app writes is the /draft line of an approval he asked for. The forge search has no ETags and a small budget, so verdicts are re-read only for PRs whose updated_at moved, with heads from one conditional open-PR list per repository. Generated-by: AI
…iew pane cgwalters wants one "things you need me for" inbox that beats GitHub's own UI, so the queue now lists the bot's forge draft PRs waiting on his review next to the board's Needs human and Draft items, ranked P0 first and then oldest first. A PR takes its board item's priority, and that Draft item isn't listed a second time; a Draft item whose forge PRs are all gone (promoted or closed) is dropped as stale, once the forge has been read. A PR opens a review pane: the description without bot-pr's meta section, CI, each commit's full message, and a per-file diff that folds (large files start folded and are rendered only when opened). Approve, request changes and comment submit reviews of the head shown. Approve is disabled while GitHub's commit list doesn't end at the head yet, and its confirmation names files he never expanded. The form appears only for the bot's own PRs in cgwalters-forge and cgwalters-bot, so a crafted link can't make the page a one-click approval elsewhere. The queue and the pane share one view model because the queue's order and labels depend on the verdicts the pane changes. It is keyboard driven (j/k, o, u, r; a to approve after a confirmation, x to fold a file, ? for the list), and usable at phone width. The board shows first; forge PRs and their verdicts fill in as they arrive. Generated-by: AI
The page follows the system's color scheme; the switch lets him pick one for this browser (kept in localStorage, a convenience that may be blocked). The dark palette now applies when chosen or when the system prefers it and light wasn't chosen. Generated-by: AI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stages 3 and 4: one ranked queue of forge PRs, board questions and chores, and a PR review pane.
commit_id= the head shown, after re-reading the PR (a moved head sends nothing). Approve is disabled while GitHub's commit list doesn't end at the head, its confirm names unexpanded files, and an optional/draftline is the only command the app writes. The form is offered only for cgwalters-bot's PRs in cgwalters-forge and cgwalters-bot.VERDICT_JQ, including/promotecomments (shown as "bot-pr decides", kept in the queue).updated_atmoved; polling only while visible. Keyboard: j/k, o, u, r, a, x, c, ?. Phone width and light/dark/auto themes.Testing:
npm ci && npm run check(tsc, unit tests, build) innode:24on devspace cgwalters-devspace-36238960068, at every commit; 325 tests at the tip of this PR.{"event":"APPROVE","commit_id":<head from the API>}to a mocked endpoint, and writes elsewhere were blocked. Real writes went only to the throwaway Throwaway PR for review app tests cgwalters-bot/review-sandbox#1: a Comment review posted, and GitHub's refusal of an own-PR approval was shown. No horizontal scroll at 390px, dark theme applied.Generated-by: AI