fix(ui): compact menu labels before review titles - #1094
Open
benvinegar wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.