Repository navigation
fix(vscode): hide payload-bound commands from the command palette (#8586) - #12017
Conversation
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>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
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. View limit details
No actionable comments were generated in the recent review.
|
| 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: 
3 · 
2
-
Failed checks: 2 warnings Passed checks: 3 passed-
Full details: Out of Scope Changes check
-
Explanation
The diff contains only the
#8586changelog 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
#8586requests command-palettewhenclauses that match the real preconditions of the affected commands and requests hiding internal commands. This PR addswhen: "false"for nine payload-bound commands. The manifest still has other contributed commands withoutcommandPaletteentries 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
#8586command inventory. Add a matchingcommandPalettewhenclause 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.
|
Hosted qualification note (inherited main red, not candidate regression)
The authoritative failure is This PR touches only 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. |
There was a problem hiding this comment.
Independent review (fresh-context reviewer, head 9287a31): REVIEW_INCOMPLETE
Inspected:
- Subject: PR #12017, head
9287a314e6ab830b0e211abadc4031ebaecd82d0, basea69bf0214f7bd7e0537a1cdd07e95608e5a366e8(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 ofpulls/<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.tsand a changelog fragment. No Rust source, nocrates/path and nosrc/path is touched.
What the candidate changes:
editors/vscode/package.jsongains acontributes.menus.commandPaletteblock 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.copyContextis 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.tsgains the testpayload-bound commands are hidden from the command palette (#8586), which requires each of the nine to have exactly onecommandPaletteentry whosewhenis exactlyfalse.- The mechanism is the documented VS Code one: a
menus.commandPaletteentry whosewhenclause 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 fromcontributes.commands.
Semantic owner:
- The set being hidden is
CODE_ACTION_ONLY_COMMANDS, and that constant is defined only inside the test file ateditors/vscode/test/suite/command_menus_manifest.test.ts:86. I searched the wholeeditors/vscodetree: 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 submenualready 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 hiddentest builds its subject set frommanifest.activationEventsfiltered toonCommand:prefixes. That set is non-empty at this head, so the control has a subject. All nine newly hidden commands are absent from theonCommand:activation list, andripr.copyContextis absent too, so nothing this PR hides collides with an activation event. - The pre-existing
every commandPalette entry references a contributed commandtest still holds for the nine new entries: every newcommandPaletteentry names a command thatcontributes.commandsactually 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
vscodejob (124727960774, run 41265703909) isSKIPPED. The gate is.github/workflows/ci.yml:294-299: thevscodejob needssource-identityand, for the pull-request path, requires the PR to carry bothmerge-readyandfull-cilabels and the event to be thelabeledaction onmerge-ready. This PR carries neither label, so the job never started. - The
Rust-only feature lanejob is green only because it did nothing. Job 124727959896 reportssuccess, but its step 9, "Test --no-default-features --features lang-rust", isSKIPPED, because step 3 "Detect Rust surface change" concluded that this diff touches no Rust. That skip is correct for this candidate - it changes onlyeditors/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'scargo 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_COMMANDSexists 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 anonCommand:activation event. - The claim correctly stops at the manifest.
menus.commandPalettewithwhen: falseis 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.commandPaletteis 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 Resultis present and red (run 41265703986, job 124730064274, failing at "Summarize routed result"), andRipr Rust Small on GitHub Hosted / Rust gates(job 124728133239) fails at step 16, "Repository policy preflight", reporting that theuse std::process::Commandallowlist entry forcrates/ripr/src/output/first_pr/run_chain.rsis orphaned: itsmax_count=1pattern 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.rscontains nostd::process::Command(git search exits 1), whilepolicy/process_allowlist.d/11720-first-pr-run-chain.txt:2still 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,cargoandrustupare all absent fromPATH. Nothing was built, tested, linted, orcargo xtask-run locally - notcargo xtask vscode-test, notcargo xtask precommit, notcargo 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 SHA9287a314e. - 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 ciandnpm run compilewere 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>
|
Re-qualified after merging current Frozen head:
|
|
Qualification on frozen head Re-applied |
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>
|
Admit PR Candidate refusal (run
This was not stale-base/conflict admission; it was the CodeRabbit thread on Remediated on head
Stopped at merge-ready; no merge. |
There was a problem hiding this comment.
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.
|
Qualification run
This lane only changes Re-requesting |
…lette (#8586) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG
There was a problem hiding this comment.
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.
|
Review of record for head 4d6ab25 (REVIEW_READY). Inspected the full diff (4 files) at this head:
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: Generated by Claude Code |
|
merge-ready on frozen qualification head
Candidate is qualified on this exact SHA pending human merge judgment. |
Summary
Hide the nine
CODE_ACTION_ONLY_COMMANDSquick-fix commands from the VS Code command palette usingmenus.commandPaletteentries withwhen: "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.copyContextstays 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
editors/vscode/package.json: addcommandPalettehide entries forCODE_ACTION_ONLY_COMMANDSeditors/vscode/test/suite/command_menus_manifest.test.ts: palette contract tests (ux(vscode): about 48 palette commands lack a commandPalette when clause #8586, ux(vscode): 33 commands are palette-only — no keybindings, no editor/context menus, no command grouping #2081/ux(vscode): six agent-loop commands all dispatch to the same handler — running any from the palette without a target is a no-op #2083 negative control)changelog.d/8586-palette-when-clauses.mdProof
npm ci+ compile: passcommand_menus_manifestsuite: exercised via vscode-test harnesscargo xtask precommit: candidate-local gates through changelog/check-command-catalog pass; final stepcheck-process-policyfails on main (orphaned allowlist entry incrates/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-policyblocks merge gate.Rollback
Revert this PR; remove
commandPaletteentries and tests.Inherited main note
If hosted CI fails on
check-process-policy/ unrelated shards without changes in this diff, failure is inherited frommain, not introduced here.