tui: make the modeline construct wordmark open the minibuffer - #1253
Merged
Conversation
The minibuffer is the fleet's command surface, but its only discoverable entry points were a keybinding you had to already know and a title in the matrix-rain panel that isn't always visible. The wordmark at the head of the modeline is present in every layout, window size and view mode, which makes it the stable place to anchor a permanent affordance for it. Hovering the wordmark shows a tooltip naming the minibuffer and the keybinding, so the pointer route teaches the keyboard one instead of competing with it. Clicking toggles the panel rather than opening it: `open_prompt_for_command` rebuilds the prompt from scratch, so binding the click straight to the open path would let a second click silently discard input already typed into an open panel. The wordmark is peeled out of the modeline's left group so it can carry its own hover styling, matching the model indicator's existing treatment. Its painted position and its hit rect both derive from one shared constant, so the clickable region can't drift off the word it labels. Spec 0200.
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.
The minibuffer is the fleet's command surface, but its only discoverable entry points were a keybinding you have to already know (
C-x x/M-x/:) and a title in the matrix-rain panel that isn't always visible. Theconstructwordmark at the head of the modeline is present in every layout, window size and view mode — which makes it the stable place to anchor a permanent affordance for it.What changes
Hover, rendered
No video: vhs tapes are keyboard-driven and can't move the pointer, so a hover affordance isn't recordable with the standard recipe. The frame above is the real
TestBackendrender, captured from a throwaway test and reproduced bymodeline_wordmark_hovers_a_tooltip_and_toggles_the_minibuffer.Two judgment calls
Toggle, not open.
open_prompt_for_commandrebuilds the prompt from scratch (input: String::new(), scrollback reset). Binding the click straight toKeyAction::OpenCommandPalettewould mean a second click on an already-open panel silently discards whatever you'd typed. Toggling also matches the existing matrix-panel title click, so the two minibuffer pointer controls agree. The test covers this case explicitly.A dedicated hit rect, not a
HintZone. AHintZonewould have given click dispatch for free, but only the open path — and the tooltip needs the region's exact geometry to anchor to. This mirrorsmodeline_theme_hit/modeline_model_hit.The wordmark's painted text and its hit rect both derive from one
MODELINE_BRANDconstant, so the clickable region can't drift off the word it labels; a test asserts the rect starts on the painted word and covers exactly it.Notes
specs/0200-modeline-wordmark-opens-minibuffer.md.ui.rsstill holds for anything added later.crates/cliis touched → the relevant binary isconstruct:.claude/worktrees/modeline-brand-opens-minibuffer/target/debug/constructcargo test --workspace --exclude construct-e2egreen (1400 CLI tests + the rest); clippy clean; new code is rustfmt-clean (the repo's 61 pre-existing fmt diffs onmainare untouched — no blanketcargo fmt).