Skip to content

feat(tui): expand command palette with daemon controls and fuzzy matching #678

@bug-ops

Description

@bug-ops

Parent

Part of #581

Summary

Expand the existing TUI command palette with daemon/remote-mode commands, fuzzy matching, keybinding hints, and action commands (quit, help, theme).

Current State

Command palette exists (crates/zeph-tui/src/command.rs, widgets/command_palette.rs) with 7 view-only commands and substring filtering.

Scope

Files: crates/zeph-tui/src/command.rs, crates/zeph-tui/src/widgets/command_palette.rs, crates/zeph-tui/src/app.rs

New commands

Add to TuiCommand enum and command_registry():

id label category
daemon:connect Connect to remote daemon daemon
daemon:disconnect Disconnect from daemon daemon
daemon:status Show connection status daemon
session:new Start new conversation session
app:quit Quit application app
app:help Show keybindings help app
app:theme Toggle theme (dark/light) app

Daemon commands gated behind #[cfg(feature = "a2a")].

Fuzzy matching

Replace substring filter with fuzzy scoring (character-level match with gap penalty). No new deps — implement inline scorer in filter_commands(). Sort results by score descending.

Keybinding hints

Show bound shortcut (if any) right-aligned in each palette row. Source from Keybindings config in App.

Execute on select

Wire TuiCommand dispatch in App::handle_command() for action commands (Quit, Help, NewSession). Current view commands already dispatch — add the new action variants.

Acceptance Criteria

  • Command palette shows 14+ commands (7 existing + 7 new)
  • Daemon commands visible only with a2a feature enabled
  • Fuzzy matching ranks "sl"skill:list above mcp:list
  • Keybinding hints displayed for commands with shortcuts
  • app:quit and app:help execute correctly from palette
  • All existing command palette tests pass, new tests for fuzzy matching and new commands

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew functionalitytuiTUI dashboard

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions