Skip to content

fix(vscode): hide payload-bound commands from the command palette (#8586) - #12017

Merged
EffortlessSteven merged 6 commits into
mainfrom
cursor/8586-palette-when-clauses-8994
Nov 1, 2026
Merged

EffortlessSteven merged 6 commits into
mainfrom
cursor/8586-palette-when-clauses-8994

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Hide the nine CODE_ACTION_ONLY_COMMANDS quick-fix commands from the VS Code command palette using menus.commandPalette entries with when: "false". Those handlers need the diagnostic payload a code action supplies; palette invocation without a target was misleading (#8586).

Disposition: payload-bound commands are hidden from the palette. Remaining palette commands (restart, status, setup, copyTop*, First PR family, ripr.copyContext, etc.) stay visible on purpose because they run without a code-action payload.

ripr.copyContext stays palette-visible: without a payload it still copies context for the active editor and can fall back to CLI.

Source-of-truth Links

Governing issue or accepted claim: #8586
Acceptance delta (one sentence): Payload-bound targeted-test and agent-loop commands no longer appear in the command palette and remain available from ripr code actions only.

Closes #8586

Scope

Proof

cd /workspace/editors/vscode && npm ci && npm run compile
cargo xtask vscode-test -- --grep "Command Menus Manifest"
cargo xtask precommit
  • npm ci + compile: pass
  • command_menus_manifest suite: exercised via vscode-test harness
  • cargo xtask precommit: candidate-local gates through changelog/check-command-catalog pass; final step check-process-policy fails on main (orphaned allowlist entry in crates/ripr/src/output/first_pr/run_chain.rs — not touched by this diff). Treat as inherited main red per task instructions.

Claim Boundary

Establishes: manifest contract that payload-bound commands are palette-hidden; regression tests for the three palette invariants.

Does not establish: runtime palette UX in every VS Code build; full hosted CI matrix green if inherited check-process-policy blocks merge gate.

Rollback

Revert this PR; remove commandPalette entries and tests.

Inherited main note

If hosted CI fails on check-process-policy / unrelated shards without changes in this diff, failure is inherited from main, not introduced here.

Open in Web Open in Cursor 

Add commandPalette when:false entries for CODE_ACTION_ONLY_COMMANDS so
quick-fix commands that need a diagnostic payload no longer appear in
the palette and fail without a target.

Keep ripr.copyContext palette-visible: it still copies context for the
active editor and can fall back to CLI without a code-action payload.

Proof: command_menus_manifest.test.ts palette contract tests.
Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 149 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 423c13b8-ae5a-4ca4-98d5-d8a024be7c5d
Commits

Reviewing files that changed from the base of the PR and between 8139fb6 and 4d6ab25.

Files selected for processing: 1
  • docs/CONFIGURATION.md

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 3c39777c-9a14-4321-997c-642b9e864550
Commits

Reviewing files that changed from the base of the PR and between 338828d and 8139fb6.

Files selected for processing: 1
  • editors/vscode/test/suite/command_menus_manifest.test.ts

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.

Summary by CodeRabbit

  • Changes
    • Targeted-test and agent-handoff quick-fix commands no longer appear in the VS Code Command Palette. They remain available through ripr code actions.
    • The copy-context command remains visible in the Command Palette. Other commands available through activation events are not hidden from the palette.

Walkthrough

The VS Code extension manifest hides ten test-writing and agent-handoff commands from the command palette. The commands remain contributed for other entry points. Tests check palette entries, activation events, and command references.

Changes

VS Code Command Palette Visibility

Layer / File(s) Summary
Hide payload-bound commands
editors/vscode/package.json, changelog.d/8586-palette-when-clauses.md
The manifest adds when: false entries for ten commands. The changelog describes their availability through code actions.
Validate palette entries
editors/vscode/test/suite/command_menus_manifest.test.ts
The test manifest type adds activation-event and command-palette fields. Tests check that code-action-only commands are hidden, activated commands are not hidden, ripr.copyContext is not hidden, and palette entries reference contributed commands.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: Minimal · previous review 8139f

The change hides payload-bound commands from the palette while preserving their intended code-action entry points. No merge-blocking issue is established.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the change, scope, proof, claim boundary, and rollback, but it omits many required template sections, including swarm boundary, candidate relationships, scope classification, … Complete the missing template sections. Mark non-applicable sections as none or n/a, document candidate relationships and scope classification, record support and policy impact, provide traceability, complete engineering and gate checkboxes…
Linked Issues check Warning Issue #8586 requests command-palette when clauses that match the real preconditions of the affected commands and requests hiding internal commands. This PR adds when: "false" for nine payload-boun… Complete the #8586 command inventory. Add a matching commandPalette when clause for each affected command, or hide commands that are not valid palette commands. Add manifest tests that cover the full inventory and verify each condition …
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: hiding payload-bound VS Code commands from the command palette.
Out of Scope Changes check Passed The diff contains only the #8586 changelog entry, VS Code manifest changes, and manifest contract tests. The nine hidden entries and their tests directly support the command-palette objective. No unre…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Out of Scope Changes check

Explanation

The diff contains only the #8586 changelog entry, VS Code manifest changes, and manifest contract tests. The nine hidden entries and their tests directly support the command-palette objective. No unrelated change is shown.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Full details: Description check

Explanation

The description explains the change, scope, proof, claim boundary, and rollback, but it omits many required template sections, including swarm boundary, candidate relationships, scope classification, support-tier impact, policy impact, traceability, static language, CI economics, engineering checks, and gates.

Resolution

Complete the missing template sections. Mark non-applicable sections as none or n/a, document candidate relationships and scope classification, record support and policy impact, provide traceability, complete engineering and gate checkboxes with results, and state CI economics as n/a if unchanged.

Full details: Linked Issues check

Explanation

Issue #8586 requests command-palette when clauses that match the real preconditions of the affected commands and requests hiding internal commands. This PR adds when: "false" for nine payload-bound commands. The manifest still has other contributed commands without commandPalette entries or equivalent precondition clauses, including commands identified in the issue scope. The tests verify the nine-command subset and related negative controls, but they do not verify the broader command inventory or each command's precondition.

Resolution

Complete the #8586 command inventory. Add a matching commandPalette when clause for each affected command, or hide commands that are not valid palette commands. Add manifest tests that cover the full inventory and verify each condition against the command precondition. Preserve the #2081/#2083 activation-event and visibility invariants.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the palette with care,
Ten commands no longer gather there.
Code actions keep their work in view,
Tests check each entry, old and new.
The rabbit hops past rows of green,
And leaves the command list neat and clean.

@cursor

cursor Bot commented Nov 1, 2026

Copy link
Copy Markdown

Hosted qualification note (inherited main red, not candidate regression)

Ripr Rust Small Result failed on frozen head 9287a314e6ab830b0e211abadc4031ebaecd82d0 (run 41265703986).

The authoritative failure is check-process-policy inside GitHub-hosted Rust gates:

crates/ripr/src/output/first_pr/run_chain.rs allowlist entry for `use std::process::Command` is orphaned: max_count=1 but pattern not found in any tracked file; remove the entry

This PR touches only editors/vscode/package.json, command_menus_manifest.test.ts, and a changelog fragment — no Rust/process-policy files. The same gate fails locally on origin/main via cargo xtask check-process-policy.

Per wave instructions: treating as inherited from main; not fixing unrelated policy debt in this lane. Waiting for upstream repair (#12014/#11995-class fixes) before merge-ready success can land on this head.

@EffortlessSteven EffortlessSteven left a comment •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review (fresh-context reviewer, head 9287a31): REVIEW_INCOMPLETE

Inspected:

  • Subject: PR #12017, head 9287a314e6ab830b0e211abadc4031ebaecd82d0, base a69bf0214f7bd7e0537a1cdd07e95608e5a366e8 (current main tip), 3 paths, +98/-0, not a draft. Governed by issue #8586.
  • Contribution measured as the candidate's own delta: git merge-base(head, main tip) is exactly the main tip, so this is a clean delta on current main. The 3-path file list is far below the silent 300-path cap of the compare API and of pulls/<n>/files, so nothing was truncated; I confirmed the paths by recursive git diff.
  • The three paths are editors/vscode/package.json, editors/vscode/test/suite/command_menus_manifest.test.ts and a changelog fragment. No Rust source, no crates/ path and no src/ path is touched.

What the candidate changes:

  • editors/vscode/package.json gains a contributes.menus.commandPalette block with nine entries, each {"command": "<id>", "when": "false"}: ripr.copySuggestedAssertion, ripr.copyTargetedTestBrief, ripr.openRelatedTest, ripr.copyAgentRepairCommand, ripr.copyAgentPacketCommand, ripr.copyAgentBriefCommand, ripr.copyAfterSnapshotCommand, ripr.copyAgentVerifyCommand, ripr.copyAgentReceiptCommand. ripr.copyContext is deliberately left visible, which matches the PR body's reasoning that it can still copy context for the active editor without a code-action payload.
  • editors/vscode/test/suite/command_menus_manifest.test.ts gains the test payload-bound commands are hidden from the command palette (#8586), which requires each of the nine to have exactly one commandPalette entry whose when is exactly false.
  • The mechanism is the documented VS Code one: a menus.commandPalette entry whose when clause never holds removes the command from the palette while leaving the command contributed and reachable from a code action. The change does not remove any command from contributes.commands.

Semantic owner:

  • The set being hidden is CODE_ACTION_ONLY_COMMANDS, and that constant is defined only inside the test file at editors/vscode/test/suite/command_menus_manifest.test.ts:86. I searched the whole editors/vscode tree: the only occurrences are at lines 86, 204 and 215 of that file, so there is no production-side declaration of which commands are payload-bound.
  • The constant is not new: the pre-existing test payload-bound targeted-test and agent-loop commands stay out of editor/context and the submenu already used it for the #2081/#2083 invariants. This candidate follows an established convention in that file rather than inventing one. The gap is that the convention is not derived from the extension's own code-action registration.

The negative controls are real, and I checked that they are not vacuous:

  • The onCommand activation events are not hidden test builds its subject set from manifest.activationEvents filtered to onCommand: prefixes. That set is non-empty at this head, so the control has a subject. All nine newly hidden commands are absent from the onCommand: activation list, and ripr.copyContext is absent too, so nothing this PR hides collides with an activation event.
  • The pre-existing every commandPalette entry references a contributed command test still holds for the nine new entries: every new commandPalette entry names a command that contributes.commands actually declares.

Blocking:

  • None attributable to the candidate. The manifest change is the correct mechanism, the new test is a genuine manifest contract with a discriminating assertion, and the only red lane on this head is the base-side policy preflight described below.

The most important finding - the hosted evidence for this change does not exist:

  • The VS Code suite never ran on this head. The vscode job (124727960774, run 41265703909) is SKIPPED. The gate is .github/workflows/ci.yml:294-299: the vscode job needs source-identity and, for the pull-request path, requires the PR to carry both merge-ready and full-ci labels and the event to be the labeled action on merge-ready. This PR carries neither label, so the job never started.
  • The Rust-only feature lane job is green only because it did nothing. Job 124727959896 reports success, but its step 9, "Test --no-default-features --features lang-rust", is SKIPPED, because step 3 "Detect Rust surface change" concluded that this diff touches no Rust. That skip is correct for this candidate - it changes only editors/vscode/** and a changelog fragment - but it means the green job carries no information about the change.
  • Consequently the new TypeScript test payload-bound commands are hidden from the command palette (#8586) has never executed in hosted CI at this head, and the manifest change has no hosted proof of any kind. The PR body's cargo xtask vscode-test -- --grep "Command Menus Manifest" is a local claim on the author's host that I cannot reproduce here and that hosted CI has not confirmed. This is a missing check, not a failing one.

Non-blocking:

  • The palette contract is test-local on both sides. Because CODE_ACTION_ONLY_COMMANDS exists only in the test file and the manifest lists the same nine ids by hand, the new test compares the manifest against a copy of itself. A later extension change that adds a payload-bound command would not move the constant, and the palette would silently re-expose it. Deriving the palette-hidden set from the commands actually registered as code-action handlers would give the manifest and the test one source.
  • Nothing asserts the converse. The new test requires each of the nine to be hidden; the companion test requires every entry to name a contributed command. Neither asserts that no other contributed command is hidden. A stray when: "false" on a command that should stay visible would pass this suite unless that command is an onCommand: activation event.
  • The claim correctly stops at the manifest. menus.commandPalette with when: false is the documented way to hide a command from the palette, and the end-to-end behaviour is a platform guarantee the repository cannot assert for itself.

Efficiency:

  • Nothing to flag. This is declarative manifest data plus one manifest-parsing test. contributes.menus.commandPalette is read by VS Code from the static manifest at startup, so nine extra manifest entries cost nothing measurable and no extension code path changed: no re-parse, no extra pass, no per-request allocation, no new process spawn. In CI the change is a net reduction: the palette no longer offers commands that cannot work without a diagnostic payload.

Hosted evidence at this exact head:

  • The required status check Ripr Rust Small Result is present and red (run 41265703986, job 124730064274, failing at "Summarize routed result"), and Ripr Rust Small on GitHub Hosted / Rust gates (job 124728133239) fails at step 16, "Repository policy preflight", reporting that the use std::process::Command allowlist entry for crates/ripr/src/output/first_pr/run_chain.rs is orphaned: its max_count=1 pattern is not found in any tracked file.
  • That red is base-attributable. Verified from source: at the main tip a69bf0214, crates/ripr/src/output/first_pr/run_chain.rs contains no std::process::Command (git search exits 1), while policy/process_allowlist.d/11720-first-pr-run-chain.txt:2 still declares that entry. This candidate touches neither file. The identical preflight failure is present on #12014 and #12018 at the same base. Repair carrier #11975.
  • Because the preflight fails first, the job's "Required Rust tests" step is SKIPPED, so no Rust test ran on this head either.

Disposition note: the required check is present and red for a base-attributable reason, and the lane that would carry this candidate's actual proof - the VS Code suite - was skipped and never ran. There is no candidate-attributable defect, so REPAIR_REQUIRED would be wrong; the disposition is REVIEW_INCOMPLETE.

Not run:

  • The Rust toolchain on this host is not on PATH: rustc, cargo and rustup are all absent from PATH. Nothing was built, tested, linted, or cargo xtask-run locally - not cargo xtask vscode-test, not cargo xtask precommit, not cargo fmt --check - and the new TypeScript test could not be executed here. Every Rust-level and manifest-level statement above comes from hosted job logs or from source read at the reviewed SHA 9287a314e.
  • The new manifest test's execution result is unobserved. No hosted lane ran the VS Code suite at this head, so "the palette-hidden set is exactly these nine with when: false" is a statement about the manifest I read, not a test result I saw.
  • Node, npm ci and npm run compile were not run here; the VS Code extension was not built.

Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head 9287a314e6ab830b0e211abadc4031ebaecd82d0. Not an approval.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
@cursor

cursor Bot commented Nov 1, 2026

Copy link
Copy Markdown

Re-qualified after merging current origin/main (7af9f8a8d4, includes green #12030).

Frozen head: 338828d35c7893560b238244835763bdb3dd2427

merge-ready removed and re-applied to request fresh Ripr Rust Small Result on this exact SHA. No further pushes from this lane until qualification completes.

coderabbitai[bot]

This comment was marked as resolved.

@cursor

cursor Bot commented Nov 1, 2026

Copy link
Copy Markdown

Qualification on frozen head 338828d35c7893560b238244835763bdb3dd2427 completed Rust gates and all four test shards successfully (run 41274464708), but Ripr Rust Small Result failed in the late eligibility recheck (ELIGIBILITY_RESULT: failure — not a product/test failure; GitHub-hosted gate + sharded tests were both success).

Re-applied merge-ready (no new push) to request a clean qualification pass on the same head.

cursoragent and others added 2 commits November 1, 2026 06:07
Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
Merge origin/main through 64a582c and pin an explicit commandPalette
visibility check for ripr.copyContext (no onCommand activation event).

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
@cursor

cursor Bot commented Nov 1, 2026

Copy link
Copy Markdown

Admit PR Candidate refusal (run 41279291421, 06:04Z) — exact reason:

PR #12017 has 1 unresolved review thread(s); the final eligibility recheck would fail this run after the tests finish. Reply to and resolve every thread (bot threads included), then remove and re-add the merge-ready label.

This was not stale-base/conflict admission; it was the CodeRabbit thread on command_menus_manifest.test.ts (copyContext palette coverage).

Remediated on head 8139fb6f55:

  • Merged current origin/main (64a582c8e4+) via merge commit 9dcc15816c (no rebase/force-push).
  • Added explicit ripr.copyContext palette-visibility test; replied and resolved the review thread (0 unresolved threads now).
  • Re-ran focused vscode compile + extension tests; pushed once.
  • merge-ready removed and re-applied for qualification on 8139fb6f55.

Stopped at merge-ready; no merge.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Evidence gaps

  • Focused cargo-test execution is scheduled but has no completion receipt in the supplied evidence.
  • The claimed regression coverage has no completed cargo-test receipt or focused base-plus-tests proof yet.
  • Model proof intent was rejected by deterministic validation.

@cursor

cursor Bot commented Nov 1, 2026

Copy link
Copy Markdown

Qualification run 41280154579 (head 8139fb6f55) — not a #8586 product failure

  • Shard 3 of 4: Required Rust tests (shard 3 of 4) timed out after 40 minutes (nextest still running; no failing test name in log).
  • Shard verify / Ripr Rust Small Result: failed as downstream of incomplete shard 3.

This lane only changes editors/vscode/package.json, command_menus_manifest.test.ts, and changelog.d/8586-palette-when-clauses.md. Treating as hosted CI capacity/timeout, not a candidate fix in those files.

Re-requesting merge-ready on the same head for one retry (no push).

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Devin Review

Comment thread editors/vscode/package.json Resolved

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision

  • Needs one verification check before upstream.

Verification questions

  • Confirm the changed manifest tests verify the manifest contract, not VS Code's rendered command-palette UX.

Parked follow-ups

  • The tests verify VS Code manifest semantics but do not observe the rendered command palette in an extension host.

Evidence gaps

  • Focused base-plus-tests proof for command_menus_manifest.test.ts has not completed in the supplied evidence.

Copy link
Copy Markdown
Member Author

Review of record for head 4d6ab25 (REVIEW_READY).

Inspected the full diff (4 files) at this head:

  • editors/vscode/package.json: adds contributes.menus.commandPalette with nine when: "false" entries for the payload-bound commands (copySuggestedAssertion, copyTargetedTestBrief, openRelatedTest and the six agent-loop copy commands). None of the nine is an onCommand: activation event, so hiding them cannot strand activation; ripr.copyContext is deliberately left palette-visible (works from the active editor without a payload).
  • command_menus_manifest.test.ts: stimulus is the real manifest; oracle asserts exactly one when: "false" entry per CODE_ACTION_ONLY_COMMANDS member, that no onCommand: activation command is hidden, that ripr.copyContext stays visible, and that every palette entry references a contributed command. Each has a discriminating negative form (count, when value, set membership).
  • docs/CONFIGURATION.md (added at this head, resolving the Devin docs finding): the Commands note now names the nine hidden commands as code-action-only; the command table is unchanged.
  • changelog.d/8586-palette-when-clauses.md: fragment name carries (ux(vscode): about 48 palette commands lack a commandPalette when clause #8586).
    No Rust, golden or schema surface is touched, so no golden or generated-output parity applies.

Findings: Devin docs finding was valid and fixed (4d6ab25); the Devin "runtime palette untested" note is informational (the extension host exposes no palette enumeration API) and was replied to. Both threads resolved, 0 unresolved.

Proof on this exact head: Ripr Rust Small Result completed/success, shards 1-4 and verify success, mergeable_state clean. The earlier shard 3 timeout on 8139fb6 passed on rerun; the diff is VS Code-only, so that hang was not caused by this PR (a hosted-runner nextest stall, see the linked hang issues #12092/#9272 for the same class).


Generated by Claude Code

@cursor

cursor Bot commented Nov 1, 2026

Copy link
Copy Markdown

merge-ready on frozen qualification head 4d6ab2536543bed5230628740a27f761e2b02604

  • Ripr Rust Small Result: SUCCESS (run 41299422503)
  • merge-ready label: present
  • Merge: intentionally not performed (lane stop)

Candidate is qualified on this exact SHA pending human merge judgment.

@EffortlessSteven
EffortlessSteven merged commit 543ccfb into main Nov 1, 2026
54 checks passed
@EffortlessSteven
EffortlessSteven deleted the cursor/8586-palette-when-clauses-8994 branch November 1, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ux(vscode): about 48 palette commands lack a commandPalette when clause

2 participants