Skip to content

Add hover tooltips to diff toolbar buttons - #5829

Merged
brsbl merged 9 commits into
mainfrom
bb/add-tooltips-to-diff-toolbar-thr_jhxbj8dvuh
Oct 20, 2026
Merged

brsbl merged 9 commits into
mainfrom
bb/add-tooltips-to-diff-toolbar-thr_jhxbj8dvuh

Conversation

@brsbl

@brsbl brsbl commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Diff toolbar icon buttons exposed accessible labels but no visible hover text, making their actions hard to identify.

What changed

  • Added bottom tooltips to the five diff toolbar controls, with one 300ms provider and shared skip-delay behavior.
  • All four wrap controls use the shared constant Wrap lines: diff toolbar, FilePreview header, Markdown code block and compact File actions checkbox. Buttons retain aria-pressed; the checkbox retains aria-checked. Markdown now also has a bottom tooltip with a 300ms provider.
  • The filter button stays Filter files when open or closed, with aria-pressed indicating state. View labels are Unified view / Split view.
  • Disabled expand/collapse keeps its actual button disabled while a wrapper receives hover and keyboard focus. The parent passes a typed empty-state reason: No changes or No files match filter. The tooltip and wrapper accessible name explain that reason; while loading they retain the normal Collapse all files action name. Loading remains conveyed by the toolbar and card skeletons. The wrapper enters the tab order only when disabled; enabled actions keep Collapse all files / Expand all files.

How you verified

  • Final loading-label follow-up PASS on 5cfa5e69aa5b554f0130a08a709e47e2ff702036: full remote CI passed. Bounded real-flow QA held the actual diff-files GET; while loading, the disabled button, focusable wrapper accessible name and bottom hover/focus tooltip all said Collapse all files, with toolbar and three card skeletons visible. Pointer click, Enter and Space were inert; continuing the same request loaded the three fixture files, and enabled collapse/expand worked. Console/page errors: none.

  • Remote CI passed on 0ea5f7209 after retrying a packages dependency-install timeout; no code changes were needed. Bounded disabled-reason QA PASS: all three real reasons showed matching wrapper names and bottom tooltips on hover and keyboard focus; pointer click, Enter and Space were inert. The real held diff-files GET resumed unchanged to three files, and enabled collapse/expand still worked.

  • Remote CI passed on prior head 85b3625e0: lint, typecheck, all test shards and SDK guard (18 successful checks, 10 skipped). Coverage includes fixed wrap labels and pressed/checked states, plus both disabled expand/collapse tooltip labels.

  • Original full Slop Cop and real-flow QA passed on 0c8e9c5, with no P0/P1 findings. Convention QA on 8e89a6a5c verified bottom placement and provider delay/skip-delay. Later copy checks on b2ccdcef2 and compact checkbox P1 validation on aad63b1d8 are retained as history; no new full review was run for this copy follow-up.

  • Disabled-state QA passed on 38ec3b127: zero-filter hover/keyboard tooltip, inert disabled click/Enter/Space, and enabled collapse/expand across three files.

  • Bounded real-flow QA PASS on 85b3625e0 in isolated dev bb, Chrome for Testing 155.0.8059.79: all four Wrap lines controls keep their names through off/on, with matching pressed/checked states and visibly working wrapping. Filter files remains constant through closed/open/closed with pressed false/true/false.

  • The real Markdown Preview code block shows the new bottom Wrap lines tooltip in both states; aria-pressed false/true and pre/pre-wrap agree. Console/page errors: none. Synthetic fixture restored after capture.

Final labels

Control Labels / state
File filter Filter files · pressed when open
All files Expand all files / Collapse all files; empty states: No changes / No files match filter; loading retains Collapse all files
Wrap buttons — diff, Markdown, FilePreview header Wrap lines · pressed when wrapping
Compact File actions checkbox Wrap lines · checked when wrapping
Diff view Unified view / Split view

Diff toolbar hover states

Before: 7e4232ef241b5cdfb7d272cee044fe6f82702c70. After: wrap and active-filter rows 85b3625e04c56dca53d3e7f3fe01ada2c33b2ae7; unchanged rows retain actual captures from 8e89a6a5c20d56e31916937cf2e969a860f18b21.
Same fixture, route, light theme and 1440×900 viewport at 2× (2880×1800 PNGs). Original baseline has no diff hover tooltip.

Screen / state Viewport Before After
Filter files Desktop · 1440×900 Before Filter files After Filter files
Filter files · active Desktop · 1440×900 Before Close file filter After Filter files · active
Collapse all files Desktop · 1440×900 Before Collapse all files After Collapse all files
Expand all files Desktop · 1440×900 Before Expand all files After Expand all files
Wrap lines · off Desktop · 1440×900 Before Turn on line wrap After Wrap lines · off
Wrap lines · on Desktop · 1440×900 Before Turn off line wrap After Wrap lines · on
Unified view · selected Desktop · 1440×900 Before Unified view · selected After Unified view · selected
Split view · unselected Desktop · 1440×900 Before Split view · unselected After Split view · unselected
Split view · selected Desktop · 1440×900 Before Split view · selected After Split view · selected
Unified view · unselected Desktop · 1440×900 Before Unified view · unselected After Unified view · unselected

FilePreview wrap states

Before: original 7e4232ef baseline. After: header and compact checkbox 85b3625e04c56dca53d3e7f3fe01ada2c33b2ae7; same 2× viewport as above. Header uses the maximized 1120px pane; File actions uses the actual compact layout in a 560px pane. Each pair matches pane size and wrap state.

Screen / state Viewport Before After
Header · wrap off Desktop · 1440×900 Before Header · wrap off After Header · wrap off
Header · wrap on Desktop · 1440×900 Before Header · wrap on After Header · wrap on
Compact File actions · wrap off Desktop · 1440×900 Before Compact File actions · wrap off After Compact File actions · wrap off
Compact File actions · wrap on Desktop · 1440×900 Before Compact File actions · wrap on After Compact File actions · wrap on

Disabled collapse tooltip

Before: 7e4232ef241b5cdfb7d272cee044fe6f82702c70 · After: 38ec3b127307920b84d1a96bc08acc02f7af3c03. Same synthetic fixture, route, filter (no-match-5828), light theme and 1440×900 viewport at 2×. Zero matches naturally displays Collapse all files. Keyboard comparison uses Tab from the filter button: baseline skips the disabled button to line wrap; final head focuses the tooltip wrapper.

Screen / state Viewport Before After
Disabled collapse · hover Desktop · 1440×900 Before disabled hover After disabled hover
Disabled collapse · keyboard navigation Desktop · 1440×900 Before keyboard skips disabled control After keyboard focuses disabled tooltip wrapper

Markdown code-block wrap tooltip

Before: 7e4232ef241b5cdfb7d272cee044fe6f82702c70 · After: 85b3625e04c56dca53d3e7f3fe01ada2c33b2ae7. Same beta.md fenced-code fixture, route, 560px pane and 1440×900 viewport at 2×. Baseline has no hover tooltip.

Screen / state Viewport Before After
Markdown · wrap off Desktop · 1440×900 Before Markdown wrap off After Markdown wrap off
Markdown · wrap on Desktop · 1440×900 Before Markdown wrap on After Markdown wrap on

Collapse all: every state

Rows 1–6 and 6b remain captures from 85b3625e04c56dca53d3e7f3fe01ada2c33b2ae7; rows 7 and 9 remain captures from 0ea5f7209d174879f0bb3a57525bbf71d87e5b78; row 8 was refreshed on 5cfa5e69aa5b554f0130a08a709e47e2ff702036. Real diff panel at the retained synthetic thread route, light theme, 1440×900 CSS / 2880×1800 PNG (2×). State-specific repository contents below were invented in the isolated fixture; all UI states were reached with ordinary pointer/keyboard controls. No product files changed. Collapse all/Expand all labels and enabled state, visible card counts, and outcome are recorded per row.

State Observed toolbar, cards, and expected result Screenshot
1 · Three changed files, default Collapse all files · enabled · 3/3 expanded. Expected all expanded initially; matched. Three files expanded by default; Collapse all files enabled
2 · Mixed state, one header collapsed Collapse all files · enabled · 2/3 expanded, 1/3 collapsed. Expected label remains Collapse all files; matched. Mixed files, two expanded; Collapse all files enabled
3 · Toolbar collapsed three files Expand all files · enabled · 0/3 expanded, 3/3 collapsed. Expected Expand all files; matched. Three files collapsed; Expand all files enabled
4 · Twelve changed files, fresh page state Expand all files · enabled · 0/12 expanded, 12/12 auto-collapsed. Expected automatic collapse above ten; matched. Twelve files auto-collapsed; Expand all files enabled
5 · Three deleted files only Expand all files · enabled · 0/3 expanded, 3/3 auto-collapsed; fixture Git status contained only three deletions. Expected deleted files to start collapsed; matched. Three deleted files auto-collapsed; Expand all files enabled
6 · Filter to beta.md, then collapse visible result Expand all files · enabled · filtered view is 1 of 3 files, 0/1 expanded. Expected toolbar action affects only the visible file; matched. After clearing the filter, beta.md stays collapsed while alpha.ts and gamma.json remain expanded (2/3). One filtered file collapsed; Expand all files enabled
6b · Filter cleared proof Collapse all files · enabled · all 3 shown: 2 expanded, 1 collapsed. Expected hidden files unchanged by the filtered action; matched. After clearing filter, the two hidden files remain expanded
7 · Zero filter matches Collapse all files · disabled · 0 of 3 visible, 0 file cards. Wrapper accessible name and hover/keyboard tooltip: No files match filter; pointer click, Enter and Space are inert. Expected disabled control with this reason; matched. · captured on 0ea5f7209d174879f0bb3a57525bbf71d87e5b78 Zero filter matches; disabled Collapse all files with No files match filter tooltip
8 · Diff loading Collapse all files · disabled · 0 file cards, with toolbar status and 3 card skeletons visible. Button name, focusable wrapper accessible name, and bottom hover/focus tooltip all say Collapse all files. Pointer click, Enter and Space are inert. Held the real GET /api/v1/environments/env_diff5828/diff/files?target=all&mergeBaseBranch=main before response and continued it unchanged; all three real fixture files loaded afterward, and enabled collapse/expand worked. Expected disabled action label during loading; matched. · captured on 5cfa5e69aa5b554f0130a08a709e47e2ff702036 Diff loading; disabled Collapse all files with matching wrapper name and tooltip
9 · Clean repository, no changes Collapse all files · disabled · 0 changed files; summary No changes. Wrapper accessible name and hover/keyboard tooltip: No changes; pointer click, Enter and Space are inert. Expected disabled control; matched. · captured on 0ea5f7209d174879f0bb3a57525bbf71d87e5b78 Clean repository; disabled Collapse all files with No changes tooltip

Fixes #5828

BB-Thread-ID: thr_mjt6n8jguk

AGENT GENERATED

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-20T01:55:32.158099Z 0c8e9c5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@brsbl
brsbl force-pushed the bb/add-tooltips-to-diff-toolbar-thr_jhxbj8dvuh branch from 5cfa5e6 to 2ab6679 Compare October 20, 2026 22:26
@brsbl
brsbl merged commit ef6b2b7 into main Oct 20, 2026
28 checks passed
@brsbl
brsbl deleted the bb/add-tooltips-to-diff-toolbar-thr_jhxbj8dvuh branch October 20, 2026 22:29
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.

Diff view: add hover tooltips to the toolbar icon buttons

1 participant