Skip to content

tui: make the modeline construct wordmark open the minibuffer - #1253

Merged
edwin-zvs merged 1 commit into
mainfrom
worktree-modeline-brand-opens-minibuffer
Aug 16, 2026
Merged

tui: make the modeline construct wordmark open the minibuffer#1253
edwin-zvs merged 1 commit into
mainfrom
worktree-modeline-brand-opens-minibuffer

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

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. The construct 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.

What changes

  • Hover the wordmark → tooltip naming the minibuffer and the keybinding.
  • Click → toggles the minibuffer panel.
  • The wordmark gets the same accent/underline hover styling the model indicator already uses, so it doesn't read as inert text.

Hover, rendered

   ┌────────────────────────────────────┐
 ─⏸│ Minibuffer — click to open (C-x x) │
   └────────────────────────────────────┘
 construct  focus:view  "s1"  -        theme:matrix | ○ remote | 0.17.5+…
C-x C-f new   C-x b switch   C-x f fork   help

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 TestBackend render, captured from a throwaway test and reproduced by modeline_wordmark_hovers_a_tooltip_and_toggles_the_minibuffer.

Two judgment calls

Toggle, not open. open_prompt_for_command rebuilds the prompt from scratch (input: String::new(), scrollback reset). Binding the click straight to KeyAction::OpenCommandPalette would 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. A HintZone would have given click dispatch for free, but only the open path — and the tooltip needs the region's exact geometry to anchor to. This mirrors modeline_theme_hit / modeline_model_hit.

The wordmark's painted text and its hit rect both derive from one MODELINE_BRAND constant, 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

  • Adds specs/0200-modeline-wordmark-opens-minibuffer.md.
  • The modeline row now has clickable regions at both ends. They don't overlap, and the pre-existing first-match-wins warning at ui.rs still holds for anything added later.
  • Only crates/cli is touched → the relevant binary is construct: .claude/worktrees/modeline-brand-opens-minibuffer/target/debug/construct
  • cargo test --workspace --exclude construct-e2e green (1400 CLI tests + the rest); clippy clean; new code is rustfmt-clean (the repo's 61 pre-existing fmt diffs on main are untouched — no blanket cargo fmt).

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.
@edwin-zvs
edwin-zvs merged commit d9d24d2 into main Aug 16, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the worktree-modeline-brand-opens-minibuffer branch August 16, 2026 18:39
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.

1 participant