Skip to content

feat(web): summarize the changeset above the stream and start the side panel closed - #1336

Merged
benvinegar merged 1 commit into
mainfrom
claude/web-ui-08-summary-strip
Nov 17, 2026
Merged

benvinegar merged 1 commit into
mainfrom
claude/web-ui-08-summary-strip

Conversation

@benvinegar

@benvinegar benvinegar commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Problem

On a wide window the browser review page opens its side panel by default, on the Overview tab, and gives it about 342px beside the diff. The tab lists rows that are zero (Tests 0, Generated 0, Untracked 0) and shows "All changes" beside "Meaningful" without saying what "meaningful" leaves out. The first thing a reviewer wants to know, how big this is and what most of it is, takes a panel to say.

Approach

  • Summary strip (overview/SummaryStrip.tsx), one 40px line above the stream:
    • the size badge the Overview already computes, with its explanatory title;
    • one sentence from overview/summarySentence.ts, a pure helper over data the overview already has. If one file holds at least 80% of the changed lines: "Mostly data/huge.json (+24,999 −1). Without it: 46 files, +49 −46." Else if one top-level directory holds at least 60% of the files: "Mostly in images/: 7 of 9 files." Else no sentence. The "without it" clause is dropped when any count is a lower bound, since subtracting from one would print a wrong figure;
    • chips for the non-zero file roles. They are list items, not buttons, and do not filter: the file filter is shared with the terminal;
    • an Overview button that opens the side panel on its Overview tab through the same state change as the existing page command. Its title carries that command's chord from the page keymap, if it has one.
      With the shared filter active the strip counts the filtered files, as the Overview tab does, and starts with "Filtered: N of M files." At 900px and below the chips drop and the sentence truncates.
  • Placement. The strip is a non-scrolling row above the stream and minimap, not inside the scroll content. The minimap, reveals, and section lookup all assume the first file starts at the stream's top; a leading block would have put an offset into that geometry.
  • Side panel starts closed at every width when the browser has no stored choice. Opened with no tab ever chosen, it shows Notes if the review has notes, else Overview. A stored choice and the tab-specific commands behave as before.
  • Overview tab. Zero rows are omitted from "By role" and "Change kinds", and a line under the summary says what Meaningful leaves out, worded from REVIEW_MEANINGFUL_FILE_ROLES.

core/ is unchanged. docs/web-review-client.md is updated for the panel default.

Trade-off

The strip costs 40px of height at all times; closing the panel by default returns about 342px of width.

Tests

  • Unit: summarySentence.test.ts, panelPreferences.test.ts.
  • New test/web/review-summary.e2e.ts (10 tests): both sentence rules and the no-sentence case, exact "without it" figures, the filter prefix, chips that do not change the filter, the Overview button, and the 800px layout.
  • review-tools: "starts closed at every width" and Notes-versus-Overview on first open. Tests that need the panel open seed the stored preference through a new harness helper; no assertion was weakened.
  • bun run typecheck, bun run lint, bun run format:check, bun run deps:check: pass.
  • bun test packages/hunk/src/web: 291 pass, 0 fail.
  • bun run test:web: 137 passed, 8 skipped (the opt-in capture specs), 0 failed, run after the last edit. The measurement, large-review, and minimap specs pass unchanged.

Checked in github-dark-default and github-light-default at 1440px and 800px, panel closed and open. Platform: macOS only.

Stack

8 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 ← this PR 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 experience, but stay within that workflow.

Meet the naming and unused-code requirements before merging; the two summary display issues are non-blocking.

Findings

  1. P2 Incomplete counts misidentify dominant files ▶
  2. P2 Overview button gets clipped ▶
  3. P2 New filenames break repository rules ▶
  4. P2 Unused panel helper remains ▶
Fix with agent prompt
### Issue 1
packages/hunk/src/web/overview/summarySentence.ts:47-49
**Incomplete counts misidentify dominant files.** `totalChurn` can be a lower bound, so this comparison does not establish an 80% share. A file with 9,000 counted lines beats another file counted only to 1,000 lines, even when that second file actually contains far more changes. Dropping `rest` does not prevent the false “Mostly” claim. Skip the file rule when other files have incomplete counts, or use bounds that actually establish the share.

### Issue 2
packages/hunk/src/web/styles.css:2766-2770
**Overview button gets clipped.** This rule measures the whole window, not the space left for the strip. At a 1,000px window with both panels open, the strip has roughly 360px. Five role chips, the badge, and the Overview button cannot shrink, so the strip’s `overflow: hidden` cuts off the trailing button. Hide chips based on the column’s width, or let them yield space before the button.

### Issue 3
packages/hunk/src/web/overview/SummaryStrip.tsx:1
**New filenames break repository rules.** The naming directive requires dash-case for `.ts` and `.tsx` files. Rename `SummaryStrip.tsx` and update its imports. `sizeBadge.ts` and `summarySentence.ts` have the same problem; the pattern also appears in the new unit test filename.

### Issue 4
test/web/webTestHarness.ts:374-380
**Unused panel helper remains.** `openTestSidePanel` is exported but has no callers. The repository directive says not to introduce dead code, including unused functions. Remove this helper until a test needs it, or use it in the tests it was added for.

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

Adds a fixed summary strip above the review stream and makes the side panel start closed unless the browser saved another choice.

  • Reviewers see a short changeset summary above the diff.
  • The side panel stays closed until a reviewer opens it.
  • The Overview panel hides empty rows and explains what “Meaningful” leaves out.

The strip can hide its Overview button in narrow columns and can name the wrong dominant file when counts are incomplete. New filenames and an unused helper also need to meet the repository’s rules.

Reviews (1) · Last reviewed commit: "feat(web): summarize the changeset above..." · Reviewed by Greptile

Comment on lines +47 to +49
if (largest && totals.files > 1 && totalChurn > 0) {
const largestChurn = largest.additions + largest.deletions;
if (largestChurn >= totalChurn * DOMINANT_FILE_SHARE) {

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 Incomplete counts misidentify dominant files. totalChurn can be a lower bound, so this comparison does not establish an 80% share. A file with 9,000 counted lines beats another file counted only to 1,000 lines, even when that second file actually contains far more changes. Dropping rest does not prevent the false “Mostly” claim. Skip the file rule when other files have incomplete counts, or use bounds that actually establish the share.

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/hunk/src/web/overview/summarySentence.ts
Line: 47-49

Comment:
**Incomplete counts misidentify dominant files.** `totalChurn` can be a lower bound, so this comparison does not establish an 80% share. A file with 9,000 counted lines beats another file counted only to 1,000 lines, even when that second file actually contains far more changes. Dropping `rest` does not prevent the false “Mostly” claim. Skip the file rule when other files have incomplete counts, or use bounds that actually establish the share.

---

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

Comment on lines +2766 to +2770
/* Role counts go first when the strip runs short; the sentence then truncates. */
@media (max-width: 900px) {
.summary-roles {
display: none;
}

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 Overview button gets clipped. This rule measures the whole window, not the space left for the strip. At a 1,000px window with both panels open, the strip has roughly 360px. Five role chips, the badge, and the Overview button cannot shrink, so the strip’s overflow: hidden cuts off the trailing button. Hide chips based on the column’s width, or let them yield space before the button.

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

Comment:
**Overview button gets clipped.** This rule measures the whole window, not the space left for the strip. At a 1,000px window with both panels open, the strip has roughly 360px. Five role chips, the badge, and the Overview button cannot shrink, so the strip’s `overflow: hidden` cuts off the trailing button. Hide chips based on the column’s width, or let them yield space before the button.

---

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

@@ -0,0 +1,151 @@
/** @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 repository rules. The naming directive requires dash-case for .ts and .tsx files. Rename SummaryStrip.tsx and update its imports. sizeBadge.ts and summarySentence.ts have the same problem; the pattern also appears in the new unit test filename.

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

Comment:
**New filenames break repository rules.** The naming directive requires dash-case for `.ts` and `.tsx` files. Rename `SummaryStrip.tsx` and update its imports. `sizeBadge.ts` and `summarySentence.ts` have the same problem; the pattern also appears in the new unit test filename.

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

Comment on lines +374 to +380
/** Open the side panel through the toolbar's toggle, unless it is already open. */
export async function openTestSidePanel(page: Page) {
const panel = page.getByTestId("side-panel");
if (await panel.isVisible()) return;
await page.getByTestId("toggle-side-panel").click();
await expect(panel).toBeVisible();
}

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 Unused panel helper remains. openTestSidePanel is exported but has no callers. The repository directive says not to introduce dead code, including unused functions. Remove this helper until a test needs it, or use it in the tests it was added for.

Context Used: guidelines.mdc Cursor rule (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: test/web/webTestHarness.ts
Line: 374-380

Comment:
**Unused panel helper remains.** `openTestSidePanel` is exported but has no callers. The repository directive says not to introduce dead code, including unused functions. Remove this helper until a test needs it, or use it in the tests it was added for.

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

…e panel closed

The browser review page opened its side panel by default to say how big
a changeset is. A one-line strip above the stream now carries the size
badge, a sentence naming what most of the change is ("Mostly
data/huge.json (+24,999 −1). Without it: 46 files, +49 −46."), the
non-zero file roles, and a button to the Overview. The side panel starts
closed at every width and opens on Notes when the review has any. The
Overview tab drops zero rows and says what "Meaningful" leaves out.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@benvinegar
benvinegar force-pushed the claude/web-ui-08-summary-strip branch from bc0b026 to 6ab11af Compare November 17, 2026 15:55
@benvinegar
benvinegar changed the base branch from claude/web-ui-07-sidebar to main November 17, 2026 15:55
@benvinegar
benvinegar merged commit de281ef into main Nov 17, 2026
15 of 26 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