Repository navigation
feat(web): add a review bar with progress, next unviewed, key hints, and copy notes - #1337
Conversation
[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. FindingsFix 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.SummaryAdds a bottom review bar with viewed progress, next-unviewed navigation, key hints, a notes count, and Markdown copying.
Reviews (1) · Last reviewed commit: "feat(web): add a review bar with progres..." · Reviewed by Greptile |
| .bar-copy { | ||
| display: inline-flex; | ||
| flex: none; | ||
| transform: rotate(-90deg); | ||
| align-items: center; | ||
| gap: 6px; | ||
| height: 24px; | ||
| padding: 0 9px; | ||
| font-size: 12px; |
There was a problem hiding this 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.
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!
| export function reviewBarHints( | ||
| firstChord: (commandId: ReviewBarCommandId) => string | undefined, | ||
| ): ReviewBarHint[] { |
There was a problem hiding this 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)
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.bc0b026 to
6ab11af
Compare
…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>
c8ae4e8 to
d7ef8f2
Compare
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/nextUnviewed.ts). The button has no shortcut and adds no command.app/reviewBarHints.tslists 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 isaria-hidden; the help overlay stays the accessible list.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.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.tsstarts 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 ashunk.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.mdsays the page reads the same table, which is not true for these ids. That case is a second test markedtest.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
reviewBarHints.test.ts,nextUnviewed.test.ts,notesMarkdown.test.ts.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-defaultandgithub-light-defaultat 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.
mainMerge 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