Skip to content

feat(web): one-row toolbar with icon controls and a View menu - #1330

Merged
benvinegar merged 2 commits into
mainfrom
claude/web-ui-02-toolbar
Nov 17, 2026
Merged

benvinegar merged 2 commits into
mainfrom
claude/web-ui-02-toolbar

Conversation

@benvinegar

@benvinegar benvinegar commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Problem

The browser review page's toolbar is two rows and about 76px tall. Nine text buttons (Refresh, Copy link, Hide viewed, Auto, Split, Unified, Wrap, Line numbers, the theme name) sit at the same weight as the review title. At 800px wide, the half-screen width this page is often used at, it wraps to three rows and takes 115px before any diff appears.

Approach

  • One 44px row. Left: sidebar toggle, title, file count, +A −D, connection status. Right: filter, viewed progress, layout, View menu, refresh, copy link, Commands, side-panel toggle.
  • Icon module at packages/hunk/src/web/icons/: an Icon component over inline SVG paths, currentColor, aria-hidden, no dependency. It replaces the ☰ and ◨ glyphs, and later PRs in the stack add to it.
  • Layout stays a radiogroup with the same roles, test ids, arrow keys, and names; the three radios are icons.
  • View menu (ViewMenu.tsx) holds Wrap long lines, Line numbers, Agent notes, Hide viewed files, and the theme row. Rows are menuitemcheckbox and show their shortcut from the keymap. Agent notes calls the same path as the a key and is labelled "shared", like the filter, because it changes the terminal too. Menu semantics follow the existing ThemeMenu.
  • Refresh and Copy link are icon buttons that keep their accessible names and their busy / copied / failed feedback (visible label in an aria-live region).
  • Connection status is a dot with a hidden "Connected" label; loading, reconnecting, and failed keep their words. data-state and role="status" are unchanged.
  • Viewed progress is a ring plus 2/47 viewed; the old sentence stays as the accessible text under the same test id.
  • Commands button opens the existing palette and shows its shortcut.
  • Narrow widths drop labels before controls: at 800px the row keeps every control, with the filter and its "shared" hint still visible.

Every icon-only control has an accessible name and a title with its shortcut, using the existing hinted() pattern.

Non-goals

No "Unchanged context" toggle: the only implemented command expands one hunk, and a page-wide switch would be new state. No changes below the toolbar.

Tests

  • New in test/web/review-shell.e2e.ts: the toolbar is one row (under 50px, nothing past its edges) at 1440px and at 800px; the View menu's arrow keys, Escape and focus return, outside click, Agent notes reaching the session's shared state; the Commands button opens the palette.
  • Updated to reach controls through the View menu: review-keyboard, review-notes, review-accessibility, review-viewed, review-shell, and webTestHarness.ts (chooseTestTheme now opens the menu). Wrap, line numbers, and hide viewed are asserted through aria-checked.
  • bun run typecheck, bun run lint, bun run format:check, bun run deps:check: pass.
  • bun test packages/hunk/src/web: 262 pass, 0 fail.
  • bun run test:web: 115 passed, 7 skipped (the opt-in capture specs), 0 failed, including the axe suite.

Checked at 1440px and 800px in github-dark-default and github-light-default with the opt-in capture suites, which gain captures of the open View menu. Platform: macOS only.

A second commit reads the Commands button's shortcut from the page command table instead of naming the key, so no control in the toolbar states a key of its own.

Stack

2 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 ← this PR 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 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 affect the browser review page's toolbar and its view-setting workflow.

Satisfy the filename requirement before merging; no blocking behavior defect was established.

Findings

  1. P2 New filenames break naming rule ▶
Fix with agent prompt
### Issue 1
packages/hunk/src/web/app/ViewMenu.tsx:1
**New filenames break naming rule.** The repository guide requires dash-case for `.ts` and `.tsx` filenames. Rename `ViewMenu.tsx` to `view-menu.tsx` and update its imports. `ViewedProgress.tsx` and `Icon.tsx` also break this rule; the pattern appears elsewhere in this change.

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!

---

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

Summary

The browser review toolbar becomes a single row with icon controls and a View menu.

  • The review toolbar fits its controls into one compact row.
  • The View menu groups review display choices and themes.
  • Viewed files show a ring and compact count in the toolbar.

The new filenames need to follow the repository’s naming rule before merging.

Reviews (1) · Last reviewed commit: "feat(web): one-row toolbar with icon con..." · Reviewed by Greptile

@@ -0,0 +1,290 @@
/** @jsxImportSource react */

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 repository guide requires dash-case for .ts and .tsx filenames. Rename ViewMenu.tsx to view-menu.tsx and update its imports. ViewedProgress.tsx and Icon.tsx also break this rule; the pattern appears elsewhere in this change.

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/ViewMenu.tsx
Line: 1

Comment:
**New filenames break naming rule.** The repository guide requires dash-case for `.ts` and `.tsx` filenames. Rename `ViewMenu.tsx` to `view-menu.tsx` and update its imports. `ViewedProgress.tsx` and `Icon.tsx` also break this rule; the pattern appears elsewhere in this change.

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

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!

benvinegar and others added 2 commits November 17, 2026 09:51
The browser review page's toolbar was two rows of text buttons and
wrapped to three at 800px. It is now one 44px row: layout, refresh,
copy link, and the pane toggles are icon buttons, viewed progress is a
ring, and the line and review toggles plus the theme picker live in a
View menu that shows each shortcut. Adds the inline SVG icon module the
rest of the page builds on.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…able

The toolbar's Commands button named its key with a literal. It now reads
the palette command's chord from the page's command table, the same
source the help overlay and the palette use, so no control states a key
of its own.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@benvinegar
benvinegar force-pushed the claude/web-ui-02-toolbar branch from 465b2cc to 21ffd50 Compare November 17, 2026 14:52
@benvinegar
benvinegar changed the base branch from claude/web-ui-01-accent to main November 17, 2026 14:52
@benvinegar
benvinegar merged commit 673bb93 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