TerminalPaneHeader: keep minimize/close visible as the header narrows#148
Merged
Conversation
Make the minimize and close controls the highest-priority elements of the terminal pane header so they stay visible no matter how narrow it gets. - Add `overflow-hidden` to the leading title/bell region so it clips cleanly instead of overflowing onto the controls. - Hide the mouse-override icon at the `minimal` tier, matching how split/zoom drop below `full` and the TODO pill drops at `minimal`. Add Storybook stories that confirm the invariant with a self-checking play function (`assertControlsVisible`) that reads live layout geometry and throws if either control is missing, zero-size, or clipped outside the header bounds. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deploying mouseterm with
|
| Latest commit: |
95d99bc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://39b0f269.mouseterm.pages.dev |
| Branch Preview URL: | https://x-positioning.mouseterm.pages.dev |
dormouse-bot
approved these changes
Jun 18, 2026
dormouse-bot
added a commit
that referenced
this pull request
Jun 19, 2026
…ment list and tiers The pane-header spec omitted the mouse-reporting override icon from both the element list and the responsive-tier breakdown. #148 made its tier behavior concrete (hidden at the minimal tier) without updating the spec. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 19, 2026
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.
What
Make the minimize and close controls the highest-priority elements of the terminal pane header, so they stay visible no matter how narrow the header gets.
The problem
The header is a flex row:
[title + bell + todo (flex-1)] [mouse icon] [split/zoom] [minimize + close]. Two things meant the controls were not actually the last to go when space ran out:min-w-0but nooverflow-hidden, so the fixed-width bell could overflow and overlap the controls.shrink-0sibling sitting to the left of minimize/close. Because a flex row clips from its right edge, the rightmost group (minimize/close) was the first to be pushed off — backwards from the requirement.The fix (
lib/src/components/wall/TerminalPaneHeader.tsx)overflow-hiddento the leading title/bell region so it clips cleanly instead of overflowing onto the controls.minimaltier, consistent with how split/zoom drop below thefulltier and the TODO pill drops atminimal.Net effect: every other element yields before the controls, which now stay fully visible down to the physical floor (~65px — just the two buttons + padding).
Stories (
lib/src/stories/TerminalPaneHeader.stories.tsx)Added a self-verifying
assertControlsVisibleplay function that reads live layout geometry and throws (surfacing in Storybook's Interactions panel) if either control is missing, zero-size, or clipped outside the header bounds. It polls until the primed state + ResizeObserver-driven tier settle, rather than using a fixed delay. Four new stories exercise it:NarrowControlsVisible(110px)ExtremelyNarrowControlsVisible(76px, alert ringing + todo)NarrowWithMouseCaptureControlsVisible(120px, simulated TUI mouse capture)NarrowLongTitleControlsVisible(130px, very long title + alert ringing)A
mouseCapturedstory arg was added to surface the mouse-override icon.Testing
tsc -bpasses.pnpm --filter dormouse-lib storybook).🤖 Generated with Claude Code