Skip to content

feat(tui): list /mouse in the command palette - #1593

Merged
ace331 merged 1 commit into
mainfrom
feat/tui-palette-mouse
Nov 12, 2026
Merged

ace331 merged 1 commit into
mainfrom
feat/tui-palette-mouse

Conversation

@ace331

@ace331 ace331 commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

Why

/mouse was typed-only. The palette did not offer the one verb a reader needs exactly when their pointer can no longer select text, and its other door (the 鼠标捕获 row) sits three keystrokes inside ctrl+q — the moment a switch hidden in a menu does not get found.

What

  • Move /mouse from TYPED_ONLY to COMMANDS (in name order, between /fusion-settings and /pin), so / and ctrl+p list it and typing mouse filters to its row.
  • Both lists and the palette-rule prose say why this preferences-row verb is the single one also listed: the reader who needs native selection is the one who cannot reach for a hidden menu.
  • Update docs/guide/tui.md and docs/guide/tui.zh-CN.md (palette rule, command table, /mouse row).
  • New test: typing mouse in the palette selects the row, and enter yields Command("/mouse"); existing handler/order/no-overlap tests still cover the moved entry.

Behaviour is unchanged: /mouse toggles mouse capture, no argument, persisted as mouseCapture in ~/.future/tui/settings.json, enabled by default.

Test plan

  • cargo test -p future-tui --lib — 1835 passed, 0 failed, 4 ignored.
  • rustfmt --edition 2021 --check tui/src/workbench/mod.rs.
  • Palette tests specifically: the_palette_offers_exactly_its_list_and_no_typed_only_verb, the_palette_offers_mouse_capture_and_runs_it, the_command_column_is_alphabetical, every_palette_entry_has_a_handler.

@ace331
ace331 enabled auto-merge (squash) November 12, 2026 08:51
`/mouse` was typed-only: the palette did not offer the one verb a reader
needs exactly when their pointer can no longer select text, and its other
door (the 鼠标捕获 row) is three keystrokes inside ctrl+q.

Move it from TYPED_ONLY to COMMANDS, in name order, and say in both lists
why this preferences-row verb is the one the palette also lists. The docs
and the palette-rule paragraph follow. Add a test that typing `mouse` in
the palette selects the row and `enter` yields Command("/mouse").
@ace331
ace331 force-pushed the feat/tui-palette-mouse branch from f0cea14 to e3c77c9 Compare November 12, 2026 09:08
@ace331
ace331 merged commit 815aa39 into main Nov 12, 2026
10 checks passed
@huichen
huichen deleted the feat/tui-palette-mouse branch November 20, 2026 01:09
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