Repository navigation
fix(ui): compact menu labels before review titles - #1094
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR updates the shared terminal menu bar to compact selected labels before truncating review or history titles.
Confidence Score: 5/5The PR appears safe to merge; responsive menu rendering and dropdown placement remain internally consistent and are covered by focused regression tests. No actionable failures remain: menu and title widths use consistent geometry, compact and overflow states preserve menu identity, and dropdowns derive their anchors from the same responsive layout rendered by the menu bar. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Build full menu specifications] --> B{Full menus and title fit?}
B -->|Yes| C[Render full labels]
B -->|No| D[Reflow with compact labels]
D --> E{All compact menus fit?}
E -->|Yes| F[Render compact labels]
E -->|No| G[Render fitting labels plus overflow control]
C --> H[Fit title into remaining width]
F --> H
G --> H
H --> I[Anchor active dropdown to visible label or overflow control]
Reviews (1): Last reviewed commit: "fix(ui): compact menu labels before revi..." | Re-trigger Greptile |
|
Rebased onto current Validation: This comment was generated by Pi using GPT-6.1-sol |
d49c93c to
906eae7
Compare
Problem
The top menu keeps every label at full width until menus no longer fit. As menus such as Extensions are added, they consume space from the current review or history title, hiding useful revision and diff-stat context on narrower terminals.
Approach
Navigate,Extensions, andHelptoNav,Ext, and?when full labels would truncate the titleThis stays in the shared terminal chrome rather than introducing surface-specific breakpoints. It does not add special semantic truncation for long SHAs; titles still use the existing text fitting after menu compaction.
Visual Evidence
70-column review, GitHub Dark Default, Linux/OpenTUI PTY:
Before:
After:
At wider widths, the full labels remain unchanged. Sessions with extension commands also compact
ExtensionstoExtonly when the title needs the space.Verification
bun run typecheckbun run lintbun run format:checkbun run deps:checkbun run testbun test packages/hunk/src/ui/lib/ui-lib.test.ts packages/hunk/src/ui/AppHost.responsive.test.tsx packages/hunk/src/ui/components/ui-components.test.tsx packages/hunk/src/ui/log test/session/broker-e2e.test.tsbun test test/pty/layout.test.ts --test-name-pattern "narrow terminals preserve stats"bun run test:tty-smokeTested on Linux. macOS and Windows were not tested locally.