Skip to content

On a phone, the dashboard opens on an Inbox of decisions: Inbox, Runs, PRs, Chat and Menu - #545

Merged
nambok merged 3 commits into
mainfrom
phone-inbox
Dec 5, 2026
Merged

nambok merged 3 commits into
mainfrom
phone-inbox

Conversation

@nambok

@nambok nambok commented Dec 5, 2026

Copy link
Copy Markdown
Collaborator

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).

Inbox Inbox, empty Menu with search
Inbox Inbox, empty Menu with search
Answer a question Approve or merge Run
Answer Merge sheet Run

Screenshots are 375 wide with invented data (the bookstore's acme/web, acme/api, acme/docs; octocat).

Changes

What changed versus #543

  • Bar: PHONE_BAR_KEYS is inbox, 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 /prs is not in this build its slot is left out, never filled with another destination.
  • Menu: no count on the Menu button. The sheet starts with a search over every page and Settings page, keeps the desktop sidebar's groups and order, rows are 54px, Close is visible, and Back closes it (opening adds a history entry at the same address; Close, Escape and the backdrop take it off; a row first takes it off, then navigates, so Back from the new page returns to the page under the sheet).

Inbox (/inbox, lib/inbox.ts)

  • One row per decision, ranked by what blocks work: CoderHelm's questions, tool calls waiting for approval, plans that need you, plans waiting to be approved, runs handed to a person (the typed hand-off: a held draft, a merge standing that needs a person, or the run's named wait), pull requests where it is your turn (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.
  • Each row says the ask ("Answer: …", "Merge: …", "Fix or dismiss: …") and opens the exact item.
  • Snooze is a visible button on every row; a swipe to the left does the same. Snoozing is per device (browser storage) and only hides the row for 4 hours. There is no swipe-only action and no swipe merge.
  • States: loading placeholders, empty, error (every source failed, with Try again), partial (names the source that failed), an older backend without /api/prs (the run rows stand in and a line says why), and a backend with none of the sources.
  • Only existing endpoints: runs, run detail, approvals, plans, /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

  • Answer (/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 own RunQuestions). Sending carries the run on and returns to the Inbox.
  • Approve or merge (/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.
  • Fix with CoderHelm: a sheet naming the failing checks, one tap starts it (the run's existing Retry, POST /api/runs/:id/retry), and the row then says "CoderHelm is fixing it".
  • Check a run: Runs tab, then the run page, unchanged.

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)

  • Light theme and following the system theme.
  • PWA install (iOS Add to Home Screen guide, beforeinstallprompt) and web push for blocking and completion events, with presence suppression and quiet hours.
  • Approve and merge from the dashboard: there is no approve or merge endpoint, so both open GitHub (re-arming a stopped CoderHelm auto-merge is done in place).
  • A note with the fix hand-off ("don't touch the snapshot files"): POST /api/runs/:id/retry takes no note.
  • The first error lines of a failing check in the fix sheet: no endpoint returns check logs.
  • An in-app unified diff with a wrap toggle, a file jumper and summarized sections; the diff link opens GitHub today.
  • Inbox snooze synced across devices (today it is per browser).

Verification

  • npm run lint (UI lint, hosted links, fixture words), npm run typecheck, node scripts/ui-lint.mjs: pass.
  • Full Playwright suite on the static build (4 workers): 2215 passed, 29 skipped, 3 failed; the 3 were re-run alone and pass (close-runs needed the same "visit has begun" line as the other phone specs, now added; the skills and update-states ones compare "N min ago" against a time taken when the spec file loaded, so they slip by a minute in a 44-minute run).
  • New 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 with wcag2a/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-palette and close-runs updated for the new bar and the Inbox landing; no-sideways-scroll.spec.ts covers the three new pages with the wide data.
  • Docs: a new page, CoderHelm on a phone (docs/content/docs/concepts/phone.mdx), with these screenshots, and a release note. Docs test:unit, typecheck, build, check:links, check:output and its Playwright suite (167 passed) pass.
  • Text guard on the title, body and commit messages: pass.

…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.
@nambok nambok added the ch-review CoderHelm reviews this pull request label Dec 5, 2026

@coderhelm coderhelm Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved with notes 5e91d68 (merged)

onAnswered={() => {
inboxChanged();
setSent(true);
window.setTimeout(() => router.push("/inbox"), 2500);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 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() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 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.

@coderhelm

coderhelm Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Auto-merge
Merged by hand. Nothing left to do.
Commit into main. Merges on its own once every item is done.

@nambok
nambok merged commit 03795d7 into main Dec 5, 2026
18 checks passed
@nambok
nambok deleted the phone-inbox branch December 5, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ch-review CoderHelm reviews this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant