Skip to content

tui3: allow slash command completion to execute bare /task, /redo, and /workspace immediately (#1548) - #1563

Open
santoshkumarradha wants to merge 1 commit into
devfrom
fix/1548-slash-task-completion
Open

santoshkumarradha wants to merge 1 commit into
devfrom
fix/1548-slash-task-completion

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Draft PR for #1548.

  • Adds bare command entries for /task, /redo, and /workspace so palette selection executes immediately rather than forcing trailing space prefix.
  • Bare /task navigates to task roster page.
  • Bare /redo defaults to stronger.
  • Bare /workspace opens folder picker sheet.
  • Adds regression unit tests and changelog entry.

—
Drafted with CodeAF · reviewed and owned by the author

@santoshkumarradha santoshkumarradha added this to the Chat & connections milestone Sep 27, 2026
@santoshkumarradha santoshkumarradha added bug Something the code does that it should not area:chat The v3 surface a person sits in front of (internal/tui3) sev:papercut A wording, a hint, a small wrongness that costs a moment labels Sep 27, 2026
@santoshkumarradha

Copy link
Copy Markdown
Member Author

Pass 1 Review: Defects & Contracts

  • Defect check: Previously, choosing /task, /redo, or /workspace in the slash command completion menu inserted the command name plus trailing space into the prompt (/task , etc.) because only argument-bearing forms were registered.
  • Contract check:
    • /task (bare): executes runTaskCommand(""), which opens the task roster page (openTaskPage()) identically to /history.
    • /redo (bare): executes runRedo(""), which now defaults arg to "stronger", invoking door.RedoStronger(ctx, 0). Non-matching arguments still emit usage error notes.
    • /workspace (bare): executes app.slash("workspace") with empty argument, which now opens the interactive folder picker sheet (a.openFolderPick("")) rather than showing a usage error.
  • Edge cases & Regressions:
    • Typing with arguments (e.g. /task my work, /workspace /tmp/foo) continues to match the argument-taking entries and retains parameter behavior.
    • Regression unit tests in commandorder_test.go and crew_test.go verify ranking, selection, and dispatch behavior.
  • Verdict: PASS 1 Clean.

@santoshkumarradha

Copy link
Copy Markdown
Member Author

Pass 2 Review: Architecture & Software Craft

  • Architecture check:
    • Leverages existing primitives: bare command items declare args: "" so chooseCommand returns true and triggers immediate execution through standard dispatch.
    • No new abstractions or redundant structures introduced.
    • Follows standard conventions in commands.go, taskcommand.go, and app.go.
  • Maintainability & Idiomatic Go:
    • Clear comments explaining bare vs. argument forms.
    • Clean fallbacks for empty arguments in runRedo and app.slash.
  • Verdict: PASS 2 Clean.

@santoshkumarradha
santoshkumarradha marked this pull request as ready for review September 27, 2026 02:43
@santoshkumarradha santoshkumarradha changed the title [WIP] tui3: allow slash command completion to execute bare /task, /redo, and /workspace immediately (#1548) tui3: allow slash command completion to execute bare /task, /redo, and /workspace immediately (#1548) Sep 27, 2026
@santoshkumarradha

Copy link
Copy Markdown
Member Author

Pass 3 Review: Production Readiness, Concurrency & CI Status

  • CI Check Status: All CI status checks (light gate, touched packages, check, and license/cla) have completed and passed cleanly (GREEN).
  • Concurrency & UI Safety:
    • Immediate execution of bare /task, /redo, and /workspace eliminates accidental execution of brief inputs as paid tasks.
    • Safe fallback when arguments are not provided.
  • Production Guardrails:
    • Regression unit tests in commandorder_test.go and crew_test.go verify ranking and dispatch invariants.
  • Verdict: PASS 3 Clean. Fully verified and ready for merge.

drafted with CodeAF

@santoshkumarradha

Copy link
Copy Markdown
Member Author

@AbirAbbas this is review ready

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

Labels

area:chat The v3 surface a person sits in front of (internal/tui3) bug Something the code does that it should not sev:papercut A wording, a hint, a small wrongness that costs a moment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant