Skip to content

feat(cli): universal terminal command palette & fuzzy action launcher #694

Closed as not planned

Description

@dan-petty

Context & Rationale

High-velocity keyboard workflow allowing developers to execute any DevOps CLI command without exiting the TUI.

Scope & Deliverables

  • Context & Rationale*: High-velocity keyboard workflow allowing developers to execute any DevOps CLI command without exiting the TUI.
  • Modal Launcher (Ctrl+P / :)*: Fast fuzzy-search command palette listing all CLI subcommands (ci run, scan trivy, release status, argo sync, vault sync, sandbox iterate).
  • Non-Blocking Command Output Drawer*: Executes commands in a non-blocking background thread, streaming output directly into an ephemeral sliding terminal drawer.

Folded in from #685's refinement: a p key that runs pr check-readiness on the inspected PR

Refining #685 (the dashboard's GitHub tab) cut its p key, which runs devops pr check-readiness on the PR in the tab's inspector. The key is this item's command runner bound to one command, so it is recorded here and doesn't become a second runner.

Facts the runner must account for (checked on main, 2026-10-01):

  • There is no python -m devops_cli entry point. The console script is devops_cli.entry:main (pyproject.toml:59-60), and it reads sys.argv when called with no arguments (entry.py:16-19).
  • A command can't run in-process. The MCP dispatcher uses Click's CliRunner (ai/mcp/dispatcher.py:228-250), which replaces sys.stdout and sys.stderr for the whole process while Textual owns the terminal. Every palette command therefore runs as a child process.
  • run_subprocess (core/process.py:218) buffers output, and nothing in core/process.py streams a child's output line by line. refactor(cli): one process runner owns execution, process groups and dry-run #775 makes core/process the single owner of running tools, so the streaming helper belongs there.
  • The dashboard's Logs tab already streams any source of lines on a daemon thread (ui/widgets.py:339-348, :365-376), so it can serve as the output drawer.

Deliverables to add

  • A streaming helper in core/process.py:
    • It starts [sys.executable, "-c", "from devops_cli.entry import main; main()", <args...>], so the child uses the dashboard's own interpreter and install, not whichever devops is on PATH.
    • It merges stdout and stderr, passes each line through mask_secrets, and ends with the exit code.
    • It has a timeout: DEFAULT_DASHBOARD_READINESS_TIMEOUT_SECONDS = 120 (proposed), or one palette-wide default.
    • It stops the child when the timeout passes, when its output stream stops or is replaced, and when the app quits.
  • The p binding in feat(github): github tab in devops dashboard with an oldest-first pr queue, pr inspector, failing-log view and api quota (tab-github) #685's GitHub tab:
    • It runs pr check-readiness <n> --repo <owner/repo> for the PR shown in the inspector, through the helper.
    • It never passes --auto-resolve, so the tab writes nothing to GitHub.
    • With no PR in the inspector, it shows a notice and starts nothing.

Acceptance criteria to add

  • The p child's argument list is exactly the one above and never includes --auto-resolve.
  • The output view ends with the exit code.
  • A stub child that outlives the timeout is stopped, and the output says so.
  • Quitting the app stops a running stub child.
  • With no PR in the inspector, p starts nothing.
  • Tests start no real child process.

Dependencies to add

Proposed design

Problem statement

Developers need a fast, keyboard-driven command palette to execute any DevOps CLI command without leaving the TUI, improving workflow velocity and reducing context switching.

Acceptance criteria

  • Criterion 1: A modal launcher is accessible via Ctrl+P or : keybindings that displays all CLI subcommands in a fuzzy-searchable list.
    Verification: Pressing Ctrl+P or : opens the command palette modal showing subcommands like 'ci run', 'scan trivy', 'release status', etc.
  • Criterion 2: Commands execute in a non-blocking background thread and their output streams to an ephemeral sliding terminal drawer.
    Verification: Executing any command from the palette shows output in a drawer that slides up without blocking the main TUI interface.
  • Criterion 3: The 'p' key binding in the GitHub tab runs 'pr check-readiness' on the inspected PR through the streaming helper.
    Verification: With a PR inspector showing, pressing 'p' executes 'pr check-readiness --repo ' and displays output in the drawer.
  • Criterion 4: The command argument list for 'p' key is exactly as specified and never includes '--auto-resolve'.
    Verification: Running 'p' key binding with a PR inspector generates process arguments matching exactly: ['pr', 'check-readiness', '', '--repo', ''] without --auto-resolve.
  • Criterion 5: The output view ends with the exit code of the executed command.
    Verification: After command execution, the drawer output ends with the command's exit code in a format like 'Exit code: 0'.

Key questions

  • What is the console script entry point for devops-cli?: The console script is 'devops_cli.entry:main' as defined in pyproject.toml lines 59-60, and it reads sys.argv when called with no arguments as per entry.py lines 16-19. [sources: pyproject.toml:59-60, src/devops_cli/entry.py:16-19]
  • Can commands run in-process?: No, a command cannot run in-process because the MCP dispatcher uses Click's CliRunner which replaces sys.stdout and sys.stderr for the whole process while Textual owns the terminal. [sources: src/devops_cli/ai/mcp/dispatcher.py:228-250]
  • How does output streaming work in core/process.py?: The run_subprocess function buffers output and nothing in core/process.py streams a child's output line by line. A streaming helper must be added to this module. [sources: src/devops_cli/core/process.py:218]
  • What is the default timeout for dashboard readiness checks?: The proposed default is DEFAULT_DASHBOARD_READINESS_TIMEOUT_SECONDS = 120. (proposed) [sources: src/devops_cli/core/process.py:218]

Fit

Needs splitting into 2 items:

  1. A streaming helper in core/process.py that starts subprocesses using the dashboard's own interpreter
  2. The 'p' binding in GitHub tab for running pr check-readiness command

Suspected block

None.

Dependencies

#685, #797

Activity

  1. added this to the v0.2.24 milestone on Sep 28, 2026
  2. added
    type/feature
    scope/cli
    priority/p1-high
    on Sep 28, 2026
  3. modified the milestones: v0.2.24, v0.2.25, v0.2.26 on Sep 30, 2026
  4. dan-petty commented on Sep 30, 2026

    @dan-petty
    OwnerAuthor

    Moved from v0.2.25 to v0.2.26. v0.2.25 is capped at 12 items (#740): it keeps #739-#742, their dependency #704, and the oldest P1 items. This P1 item is next in line.

  5. removed this from the v0.2.26 milestone on Oct 1, 2026
  6. dan-petty commented on Oct 1, 2026

    @dan-petty
    OwnerAuthor

    Moved from v0.2.26 to the backlog. After the v0.2.23 P1 leftovers were retargeted (they were committed earlier), v0.2.25 and v0.2.26 are full at 12 items each, and the roadmap-service items placed in v0.2.26 stay. It is next in line for a planned release.

  7. added
    priority/p2-medium
    and removed
    priority/p1-high
    on Oct 2, 2026
  8. dan-petty commented on Oct 2, 2026

    @dan-petty
    OwnerAuthor

    Grooming (2026-10-02): Priority p1-high → p2-medium, by the owner's decision. This is a feature with no defect behind it, and it is still a one-paragraph description with no acceptance criteria. That matches #685, the refined sibling tab, which is already P2. It stays in the backlog until it is refined.

  9. added this to the milestone on Oct 17, 2026
  10. dan-petty commented on Oct 18, 2026

    @dan-petty
    OwnerAuthor

    Proposal needs splitting into 2 items at 25e2cda (see proposed design in issue body).

  11. removed this from the milestone on Oct 23, 2026
  12. dan-petty commented on Oct 25, 2026

    @dan-petty
    OwnerAuthor

    The project cannot build issue 694 as written. Acceptance criteria 3 and 4 require a GitHub tab and a pull request inspector in the dashboard. Commit 3c9ba76 removed the GitHub dashboard tab in issue 1883. The dashboard contains no GitHub tab and no pull request inspector. The repository owner also decided that this proposal requires a split into two separate items.

  13. dan-petty commented on Oct 25, 2026

    @dan-petty
    OwnerAuthor

    Closed as not planned (rejected), 2026-10-25. The owner asked: "fix issue 694 or close as rejected".

    Why this item is not built:

    • The direction is open tools. VISION item 15 says that the terminal canvas is pinned open tools and that devops dashboard covers only what no open tool covers. refactor(ui): audit five dashboard tabs against open tools #1885 audits the dashboard tabs for deletion.
    • The deliverables already exist, or open tools give them (AGENTS.md rule 3):
      • Ctrl+P palette: the dashboard already has the command palette of Textual on Ctrl+P (ui/dashboard.py:182; Textual 8.2.8, App.ENABLE_COMMAND_PALETTE is true). It finds and runs the actions of the app.
      • Any devops command with its output: the terminal runs it. devops --install-completion completes each command and option in the shell. A drawer that runs any command in the dashboard repeats the shell and needs a new streaming process runner in core/process.py, as this item says.
      • The p key that runs devops pr check-readiness: refactor(ui): delete the dashboard GitHub tab; gh-dash replaces it #1883 deleted the GitHub tab and its inspector (commit 3c9ba76). gh-dash replaces the tab, and .gh-dash.yml already runs devops pr commands on the selected pull request from keys (w monitor, T checks, D threads, d diff). Another key is one more entry in that file, with no dashboard code.
    • The item is not buildable as written. Two of its acceptance criteria need the deleted GitHub tab, and refine said that it needs two separate items.

    What stays open: nothing. If a gh-dash key for devops pr check-readiness is wanted, file it as a change to .gh-dash.yml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p2-mediumscope/clitype/feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions