Skip to content

Add /feedback slash command with confirmation flow#3381

Open
lezama wants to merge 8 commits into
trunkfrom
add-feedback-command
Open

Add /feedback slash command with confirmation flow#3381
lezama wants to merge 8 commits into
trunkfrom
add-feedback-command

Conversation

@lezama
Copy link
Copy Markdown
Contributor

@lezama lezama commented May 7, 2026

Related issues

  • None — small standalone addition inspired by Claude Code's /feedback.

How AI was used in this PR

Claude (Opus 4.7) drafted the code, tests, and this description. I drove the design (matching Claude Code's two-step "describe → confirm" flow shown in the screenshots that motivated the PR) and reviewed the diff.

Proposed Changes

Bring Studio AI's bug-report flow up to par with Claude Code's /feedback. Type /feedback in the chat and:

  1. Describe: a free-form prompt asks "Describe the issue or feedback".
  2. Review: Studio shows a "Submit Feedback / Bug Report" summary listing what will be pre-filled — your description plus environment info (platform/arch, Node version, Studio CLI version, current AI provider/model).
  3. Confirm: a Submit / Cancel picker. Cancel exits cleanly. Submit opens GitHub's bug report form with summary and logs already filled in — you finish and submit on github.com.

No telemetry, no hidden submission — the user always reviews on GitHub before sending.

Files

  • apps/cli/ai/slash-commands.ts — new runFeedbackSlashCommand, environment collector, URL builder, confirmation picker, and registration.
  • apps/cli/ai/tests/slash-commands.test.ts — 4 new tests covering registration, the happy path (Submit), explicit Cancel, empty description, and Esc-aborts.
  • apps/cli/vitest.config.ts — defines __STUDIO_CLI_VERSION__ for tests so the env block can read it under Vitest (mirrors how __IS_PACKAGED_FOR_NPM__ is handled today).

Testing Instructions

  1. npm run cli:build && node apps/cli/dist/cli/main.mjs ai
  2. Type /feedback and walk the flow:
    • Submit a non-empty description → confirm → browser opens GitHub's bug report with summary and logs pre-filled.
    • Submit empty description (or just whitespace) → command exits with "Feedback canceled."
    • Pick Cancel at the confirmation step → no browser, "Feedback canceled."
    • Press Esc on the description prompt → "Feedback canceled."
  3. npm test -- apps/cli/ai/tests/slash-commands.test.ts — 33/33 green locally.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@lezama lezama marked this pull request as ready for review May 8, 2026 16:45
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