Skip to content

feat(web): add a review bar with progress, next unviewed, key hints, and copy notes - #1337

Merged
benvinegar merged 1 commit into
mainfrom
claude/web-ui-09-review-bar
Nov 17, 2026
Merged

benvinegar merged 1 commit into
mainfrom
claude/web-ui-09-review-bar

Conversation

@benvinegar

@benvinegar benvinegar commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Problem

Nothing on the browser review page says what to look at next, or shows progress in a place you can act on, and the shortcuts that make Hunk fast are only in the help overlay. The terminal shows key hints in its chrome; the page does not.

Approach

One 34px bar along the bottom (app/ReviewBar.tsx). It adds no key handlers.

  • Viewed progress moves here from the toolbar: a thin track and "2 of 47 viewed", same source, wording, test id, and live region.
  • Next unviewed. A button and the path of the first file after the selected one, wrapping, that is not marked viewed; a file changed since viewed counts as unviewed. It selects and reveals the file through the sidebar's path and opens it if collapsed. With everything viewed it reads "All files viewed". The rule is a pure helper (viewed/nextUnviewed.ts). The button has no shortcut and adds no command.
  • Key hints for previous / next hunk, file, and annotated hunk, add note, and toggle viewed, plus a Shortcuts button that opens the help overlay. app/reviewBarHints.ts lists them by command id; every key shown is the first chord for that id in the page's resolved keymap. An unbound command is omitted, and half of a pair shows alone if only it is bound. The hint group is aria-hidden; the help overlay stays the accessible list.
  • Notes count opens the side panel's Notes tab; hidden when the review has none.
  • Copy notes for agent copies the review's notes as Markdown (notes/notesMarkdown.ts): grouped by file in review order, each with its author, location in words, body, and replies; stale notes marked. Hidden agent notes are left out and the title says so. Disabled when there are no notes.
  • Narrow widths: hints drop first, then the path, then the word "notes". The bar never wraps.

No binding, command table, or key grammar is touched, and no key label is written as a literal.

Keybindings reach the browser, with one gap

New test/web/review-keybindings.e2e.ts starts a review with a [keybindings] table and checks that remaps of catalog commands show and work in the page: the bar's hunk hint and the key itself, the View menu's wrap row and its key, and the note card's "Reply (…)" label all follow the config, and the old defaults stop working.

Gap, present on main: a remap of a page-only command (hunk.web.*, such as hunk.web.toggleViewed) does not reach the browser. The host resolves [keybindings] against the command catalog only (core/run/keymap.ts), and the keymap in the shared state carries catalog ids only, so the entry is dropped and the page falls back to its default. docs/keybindings.md says the page reads the same table, which is not true for these ids. That case is a second test marked test.fail() with the cause in a comment, so it flags itself once the host carries those ids. The fix is a host and shared-state change and is not in this stack.

Non-goals

No hand-off or "done reviewing" signal to the session, no resolved notes, no new commands or shortcuts.

Tests

  • Unit: reviewBarHints.test.ts, nextUnviewed.test.ts, notesMarkdown.test.ts.
  • New test/web/review-bar.e2e.ts: progress in the bar and not the toolbar; next unviewed follows review order, opens a folded file, skips viewed files, and ends at "All files viewed"; the notes count opens Notes; the copied text; hidden agent notes drop out; the empty state; behavior after the session ends; axe on the bar.
  • review-shell: the one-row check now covers the bar at 1440px and 800px.
  • bun run typecheck, bun run lint, bun run format:check, bun run deps:check: pass.
  • bun test packages/hunk/src/web scripts/quality: 417 pass, 0 fail.
  • bun run test:web: 143 passed, 9 skipped (the opt-in capture specs and the expected-failure case above), 0 failed, run on the restacked tip.

Checked in github-dark-default and github-light-default at 1440px and 800px with zero and several notes, and with nothing, some, and everything viewed. Platform: macOS only.

Stack

9 of 9. Each PR is based on the one above it in this table and contains only its own change.

# PR Change Base
1 modem-dev/hunk#1329 Accent only for selection and focus main
2 modem-dev/hunk#1330 One-row toolbar, icon controls, View menu #1329
3 modem-dev/hunk#1331 Digit grouping, palette sections, one gap row, icons #1330
4 modem-dev/hunk#1332 Quieter minimap #1331
5 modem-dev/hunk#1333 Note threads with authors and icon actions #1332
6 modem-dev/hunk#1334 File headers: state chips, collapse, copy path #1333
7 modem-dev/hunk#1335 Sidebar review state #1334
8 modem-dev/hunk#1336 Summary strip; side panel starts closed #1335
9 modem-dev/hunk#1337 ← this PR Review bar: progress, next unviewed, key hints, copy notes #1336

Merge order: 1 to 9, from the top of the table. After a PR merges, the next one's base becomes main (GitHub retargets it when the merged branch is deleted; otherwise change the base by hand) and its diff still shows only its own change.

This PR description was generated by Claude Code using Claude Fable 5.2

@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes stay within the browser review workflow and its note-copy action.

The naming requirement must be satisfied before merging; the narrow-window layout also needs improvement.

Findings

  1. P2 Copy button gets clipped ▶
  2. P2 New filenames break naming rule ▶
Fix with agent prompt
### Issue 1
packages/hunk/src/web/styles.css:2870-2877
**Copy button gets clipped.** At phone-sized widths, such as 400px, the fixed-width progress group, notes count, gaps, and full copy label cannot fit. The all-viewed message cannot shrink either. Since `.review-bar` hides overflow, the trailing copy button is cut off even after the narrow-width rules apply. Hide the progress track or shorten the copy control at smaller widths, and extend the fit test below 800px.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

### Issue 2
packages/hunk/src/web/app/reviewBarHints.ts:42-44
**New filenames break naming rule.** The guide requires dash-case for `.ts` and `.tsx` filenames. Rename `reviewBarHints.ts` and its test to dash-case and update their imports. The same issue appears in `notesMarkdown.ts` and `nextUnviewed.ts`, including their tests.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Adds a bottom review bar with viewed progress, next-unviewed navigation, key hints, a notes count, and Markdown copying.

  • Viewed progress now sits in a slim bar along the bottom.
  • The review bar points to the next file not marked viewed.
  • The review bar shows shortcut hints from the page keymap.
  • The review bar counts notes and copies them as Markdown.

Reviews (1) · Last reviewed commit: "feat(web): add a review bar with progres..." · Reviewed by Greptile

Comment on lines +2870 to +2877
.bar-copy {
display: inline-flex;
flex: none;
transform: rotate(-90deg);
align-items: center;
gap: 6px;
height: 24px;
padding: 0 9px;
font-size: 12px;

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.

P2 Copy button gets clipped. At phone-sized widths, such as 400px, the fixed-width progress group, notes count, gaps, and full copy label cannot fit. The all-viewed message cannot shrink either. Since .review-bar hides overflow, the trailing copy button is cut off even after the narrow-width rules apply. Hide the progress track or shorten the copy control at smaller widths, and extend the fit test below 800px.

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/hunk/src/web/styles.css
Line: 2870-2877

Comment:
**Copy button gets clipped.** At phone-sized widths, such as 400px, the fixed-width progress group, notes count, gaps, and full copy label cannot fit. The all-viewed message cannot shrink either. Since `.review-bar` hides overflow, the trailing copy button is cut off even after the narrow-width rules apply. Hide the progress track or shorten the copy control at smaller widths, and extend the fit test below 800px.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +42 to +44
export function reviewBarHints(
firstChord: (commandId: ReviewBarCommandId) => string | undefined,
): ReviewBarHint[] {

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.

P2 New filenames break naming rule. The guide requires dash-case for .ts and .tsx filenames. Rename reviewBarHints.ts and its test to dash-case and update their imports. The same issue appears in notesMarkdown.ts and nextUnviewed.ts, including their tests.

Context Used: guidelines.mdc Cursor rule (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/hunk/src/web/app/reviewBarHints.ts
Line: 42-44

Comment:
**New filenames break naming rule.** The guide requires dash-case for `.ts` and `.tsx` filenames. Rename `reviewBarHints.ts` and its test to dash-case and update their imports. The same issue appears in `notesMarkdown.ts` and `nextUnviewed.ts`, including their tests.

**Context Used:** guidelines.mdc Cursor rule ([source](https://github.com/modem-dev/modem/blob/main/.cursor/rules/guidelines.mdc))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

…and copy notes

The browser review page gains a bar along the bottom: viewed progress
(moved from the toolbar), a button to the next unviewed file, the keys a
reviewer uses most, the note count, and a button that copies the
review's notes as Markdown. Every key shown is read from the resolved
keymap by command id, so a remap in the user's config shows here as it
does in the terminal, and an unbound command shows no hint.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@benvinegar
benvinegar force-pushed the claude/web-ui-09-review-bar branch from c8ae4e8 to d7ef8f2 Compare November 17, 2026 16:03
@benvinegar
benvinegar changed the base branch from claude/web-ui-08-summary-strip to main November 17, 2026 16:03
@benvinegar
benvinegar merged commit 57a90b4 into main Nov 17, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant