Skip to content

Remove the Ctrl+O palette and the bare ? binding - #422

Merged
TheGreatAxios merged 4 commits into
mainfrom
cl-5735-5736-remove-ctrlo-overlay
Aug 9, 2026
Merged

Remove the Ctrl+O palette and the bare ? binding#422
TheGreatAxios merged 4 commits into
mainfrom
cl-5735-5736-remove-ctrlo-overlay

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

CL-5735 — Delete src/tui-opentui/palette.ts. Ctrl+O opened a separate command palette that mixed real registry slash commands with a handful of shell-owned demo actions (fake permissions/operator/model-picker overlays with hardcoded data, chrome-zone toggles nothing else triggered). / already narrowed the same catalog to registry commands, so the palette module's pure catalog/filter/format helpers move into command-catalog.ts, which now backs / on its own. The Ctrl+O binding, its SHELL_SHORTCUTS row, and the dead residual-action dispatch are gone.

CL-5736 — Drop the bare ? binding (the only unmodified punctuation chord anywhere in the shell, shadowing a character an operator might type). The shortcut list stays reachable as /help. The build version moves out of the landing screen's hero block into its own row pinned to the terminal's last line, right-aligned — reserved only while landing is showing, and hidden on a narrow/short terminal before any other actionable chrome would need to shrink.

Disposition of the five session actions named in CL-5735

  • panel toggles (toggle_task/toggle_agents) — no chord or command anywhere else in the product triggers them; genuinely homeless. setChromeZones stays exported for a future host trigger.
  • copy active message — already bound, Alt+C, unaffected.
  • mouse capture toggle — already bound, Alt+M, unaffected.
  • file mention — already bound, @, unaffected.
  • observe subagent — no chord or command anywhere else triggers it either; homeless. enterSubagentObserve and the onObserveRequest host-injection point stay exported/wired for a future trigger (proven directly in observe-live.test.ts rather than through a key chord).

permissions/operator/model_picker were demo stubs with hardcoded fake data and no real caller outside the deleted palette — they're gone, not relocated.

Other findings

  • The slash-command registry's entries were never the source of the "operator" leak — that lived entirely in palette.ts's hardcoded residual list, which is now deleted. No registry schema change was needed.
  • Grepped for other bare shifted-punctuation bindings after removing ?: none found (@ and / are the only other punctuation chords, both already documented plainly in SHELL_SHORTCUTS).
  • The internal overlay kind name "palette" (shell.ts's PrimaryOverlayKind) stays as-is — it's an implementation-only tag with no user-facing effect, and renaming it added no value for the size of the diff it would cost.

Test plan

  • bun run typecheck
  • bun run build
  • bun run test — 4181 pass, 1 pre-existing/unrelated failure (lsp-availability.test.ts, environment-dependent, untouched by this branch)

@linear-code

linear-code Bot commented Aug 8, 2026

Copy link
Copy Markdown

CL-5735

Ctrl+O opened a separate command palette that mixed real registry slash
commands with a handful of demo-only shell actions (fake permissions/
operator/model-picker overlays with hardcoded data, chrome-zone toggles
with no other trigger). That leaked internal vocabulary into the product
surface and duplicated the `/` command list, which already narrowed the
same catalog to registry commands.

Delete palette.ts and consolidate its pure catalog/filter/format helpers
into command-catalog.ts, which now backs `/` on its own. Drop the Ctrl+O
binding, its SHELL_SHORTCUTS row, and the dead residual-action switch in
shell.ts. Point the landing screen's command hint at `/` instead of
Ctrl+O.

permissions/operator/model_picker were demo stubs with no real callers
outside the deleted palette and stay gone. copy_active, toggle_mouse, and
mentions already have their own bindings (Alt+C, Alt+M, @) and are
unaffected. toggle_task/toggle_agents and the subagent-observe action have
no trigger left anywhere in the product; their underlying functions
(setChromeZones, enterSubagentObserve) remain reachable through the shell
API for a host to wire up, just not from any key or command today.
? was the only bare, unmodified punctuation key bound anywhere in the
shell, and it shadowed a character an operator might genuinely want to
type at the prompt. Remove the binding and its SHELL_SHORTCUTS row; the
shortcut list itself stays reachable as /help, which the command registry
already exposed.

Move the running build version out of the landing screen's hero block
(where it sat beside the mark and the two doors) into its own row pinned
to the terminal's last line, right-aligned, distinct from landing.ts's
composition. It only borrows that row while the landing screen is
showing — a session's transcript content gets it back — and hides itself
on a narrow or short terminal well before any other actionable chrome
would need to shrink.
The palette was the toggle's only entry point, so removing it would have
taken the panel's visibility control with it. Alt+T sits alongside the
other panel and mode chords, and the keymap row is exercised by the
shortcut suite, so a binding that stops working fails rather than being
read by an operator who then finds it does nothing.
@TheGreatAxios
TheGreatAxios force-pushed the cl-5735-5736-remove-ctrlo-overlay branch from b29f864 to 427a5b6 Compare August 8, 2026 23:55
… document the version badge's real cost, bind observe to Alt+O

palette.ts survived the earlier rebase byte-identical to main with zero
importers left — command-catalog.ts already reimplemented everything it
exported. Delete it and correct the two docs that still listed it as a
live module.

Ctrl+O/command-palette wording was left behind in gate-wire.ts,
command-display.ts, tool-formatter.ts, demo.ts, docs/TUI.md, and
docs/PRODUCT.md — all either described a chord that no longer exists or
attributed a reveal to Ctrl+O when the real chord is Alt+E.

The version badge's row reservation subtracts from the terminal size
before the geometry resolver runs, so it sits outside COLLAPSE_ORDER and
never yields its row back under prompt-growth pressure — PROMPT_CAP_FRACTION
computes one row short of the real terminal whenever the badge is
showing. Keep that behavior (rewiring it into collapse order is a bigger,
riskier change than this fix warrants) but stop the code comment and
docs/TUI.md from claiming it costs nothing; both now say plainly that it
is a real, accepted cost while the landing screen is up, and a regression
test locks in the exact reduced cap at 18/20/23 rows. Also corrected the
threshold comment's false claim that 16 sits above the 24-row bottom
margin constant — it does not; that constant just does not do anything in
practice right now (BOTTOM_MARGIN_ROWS is 0).

Added test coverage for the task panel and version badge painting
together on a still-mounted landing screen (a resumed session with tasks
visible hits this) without clipping the prompt.

observe-subagent's only production caller lived inside the deleted
palette dispatcher, which would have silently dropped the feature. Bound
it to Alt+O instead, alongside Alt+T for the task panel — same rationale,
same pattern, proven live in keybindings.test.ts.
@TheGreatAxios
TheGreatAxios merged commit 093284f into main Aug 9, 2026
2 checks passed
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