Repository navigation
On a phone, the dashboard opens on an Inbox of decisions: Inbox, Runs, PRs, Chat and Menu - #545
Conversation
…Runs, PRs, Chat and Menu in the bar - Inbox (/inbox): one row per decision only a person can make, what blocks work first: CoderHelm's questions, tool approvals, plans, runs handed to a person, pull requests where it is your turn, security findings that need a call. Each row says the ask and opens the item; Snooze by button or a swipe left. Loading, empty, error, partial and older-backend states. - Bar: Inbox (landing on a phone, the only count), Runs, PRs (/prs, left out until that page exists), Chat, Menu. Security and Code review move into the Menu sheet. - Menu sheet: search first, the desktop's groups, 54px rows, Close, closes on Back, no count. - One-screen flows: answer a question (/inbox/answer), approve or merge with the summary, checks and verdict before the diff and a merge sheet (/inbox/pr), Fix with CoderHelm. - Docs: a "CoderHelm on a phone" page with screenshots, and a release note. - Tests: phone-inbox.spec.ts with axe WCAG 2.2 AA (target size), reflow at 320 and 375.
…e; link the release note
| onAnswered={() => { | ||
| inboxChanged(); | ||
| setSent(true); | ||
| window.setTimeout(() => router.push("/inbox"), 2500); |
There was a problem hiding this comment.
💬 FYI: Delayed redirect to the Inbox is never cancelled (bug, not verified)
window.setTimeout(() => router.push("/inbox"), 2500) in onAnswered keeps no handle and has no cleanup. After sending, the screen shows "CoderHelm is continuing". If the person taps "Open the whole run", Runs or the Menu within those 2.5 s, the timer still fires and pulls them back to /inbox. The same happens after leaving the page and returning. RunQuestions also calls onAnswered on a 409 (already answered), which starts the same timer. Keep the timer in a ref and clear it in an effect cleanup, or navigate only when the person taps the button.
FYI, not a block: on the whole picture this is not a named correctness, security or data-loss problem to hold the merge on.
| base: null, | ||
| author: "CoderHelm", | ||
| summary: s?.text?.trim() || null, | ||
| next: r.waiting_line?.trim() || s?.next?.trim() || null, |
There was a problem hiding this comment.
💬 Suggestion: Older-backend path shows approvals as 0 of N (correctness, not verified)
In fromRun, approvals: s?.approvals ? { have: 0, need: s.approvals } : null hard-codes have: 0. RunMergeStanding.approvals is documented as the number of approving people reviews the rule requires, not how many exist. On an older backend the Checks and review blocks would therefore read "0 of N approvals", and blockers() would add "It needs N more approvals", even when some approvals already exist. The standing codes that carry approvals (needs_person_approval and repo_requires_person_review) mean the requirement is unmet, so the blocker is usually right. The "0 of N" count may still be wrong. Consider showing only "N approvals needed" on this path instead of a count of how many exist.
This blocks: Hard-coded have:0 shows a wrong approval count on the older-backend path, a shown correctness defect at this location
| comment: { words: "Commented", tone: "text-zinc-200" }, | ||
| }; | ||
|
|
||
| export default function PrDecisionPage() { |
There was a problem hiding this comment.
💬 FYI: Near-identical helpers added together (scope, not verified)
dashboard/src/app/inbox/pr/page.tsx adds PrDecisionPage next to AnswerPage (in dashboard/src/app/inbox/answer/page.tsx), added in the same change. Keep one helper with the shared logic (a parameter for what differs) and call it from both places. If the ticket truly needs it, say why on a line Wider than the ticket: dashboard/src/app/inbox/pr/page.tsx: <why>.
FYI, not a block: on the whole picture this is not a named correctness, security or data-loss problem to hold the merge on.
|
Auto-merge |
Summary
On a phone the dashboard now opens on an Inbox of decisions only a person can make, and the bottom bar is Inbox, Runs, PRs, Chat, Menu. The four phone jobs (answer CoderHelm's question, approve or merge, hand a failing check to CoderHelm, check a run) each finish on one screen. The Menu sheet gets a search field, a visible Close and Back-to-close. Builds on #543 (bar, sheet, 44px targets).
Screenshots are 375 wide with invented data (the bookstore's acme/web, acme/api, acme/docs; octocat).
Changes
What changed versus #543
PHONE_BAR_KEYSisinbox, runs, prs, chat. Inbox is slot one, the landing screen on a phone (the first page of a visit at/), and carries the only count in the bar. Security and Code review moved into the Menu sheet. Review is replaced by PRs (/prs, from A Pull requests page: every open pull request, grouped by whose turn it is #544, shown as "PRs"). While/prsis not in this build its slot is left out, never filled with another destination.Inbox (
/inbox,lib/inbox.ts)GET /api/prs?turn=you), security findings that need a decision (no fixed version, or urgent with no fix under way). Within a kind, the longest wait first. A run and a pull request about the same PR are one row./api/prs(the run rows stand in and a line says why), and a backend with none of the sources./api/prs(platform #985), security findings. No new platform endpoint. The Inbox count is read on phones only, at most every 30 seconds, and again after an answer or hand-off.One-screen flows
/inbox/answer?run=): the question and why, what CoderHelm did last, its suggested answers as 44px buttons and the reply box (the run page's ownRunQuestions). Sending carries the run on and returns to the Inbox./inbox/pr?repo=&number=): what it does, checks, CoderHelm's verdict and approvals, then the diff. Approve and Merge sit in a bar at the bottom. Merge opens a bottom sheet naming the target branch and what still blocks it. With a red check it offers Fix with CoderHelm instead. Reads/api/prs/detail, or the run that opened the PR on an older backend.POST /api/runs/:id/retry), and the row then says "CoderHelm is fixing it".Accessibility fixes found by axe: the bar's counted item is named "Inbox, 8 decisions wait on you" and its visible words start that name; the team switcher's initial is decorative.
Docs: a new page, CoderHelm on a phone (the Inbox and what lands in it, the bar, answering, approving and merging, handing a failing check to CoderHelm), with the screenshots above, and a release note.
Follow-ups (not in this PR)
beforeinstallprompt) and web push for blocking and completion events, with presence suppression and quiet hours.POST /api/runs/:id/retrytakes no note.Verification
npm run lint(UI lint, hosted links, fixture words),npm run typecheck,node scripts/ui-lint.mjs: pass.e2e/phone-inbox.spec.ts(mocked API, 375px): bar order and the single count; landing on Inbox; every row kind, its order, ask, link and de-duplication; Snooze by button and by swipe, kept over a reload; loading, empty, error, partial and older-backend states; answering a question (the POST body checked); approve or merge with the summary, checks and verdict before the diff and the merge sheet at the bottom; re-arming a stopped auto-merge; Fix with CoderHelm from a row and from the merge sheet (the retry POST checked); the older backend's PR screen; checking a run from Runs; Menu search, Back closing the sheet, Back after a search result, Close. No sideways scroll at 320 and 375, and axe withwcag2a/wcag2aa/wcag21a/wcag21aa/wcag22a/wcag22aa(target size included) on/inbox,/inbox/answer,/inbox/pr, the Menu sheet with search and the merge sheet.e2e/phone-nav.spec.ts,shell-menu,setup,select,list-and-paletteandclose-runsupdated for the new bar and the Inbox landing;no-sideways-scroll.spec.tscovers the three new pages with the wide data.docs/content/docs/concepts/phone.mdx), with these screenshots, and a release note. Docstest:unit,typecheck,build,check:links,check:outputand its Playwright suite (167 passed) pass.