fix(provider-cursor): advertise manual compaction#31203

open1
main
GitHub fork: fix/cursor-compact-capability
opened6d agobyDdefyrlt
View on GitHubTwo-way sync enabledPR last imported 18h ago

Summary

Cursor supports native manual compaction, but its provider snapshots omit /compact, hiding the slash-menu entry and disabling the context-meter action. Advertise the existing shared command in enabled initial and probed snapshots, following other providers.

diff
1 Cursor provider snapshots
2- slashCommands: []
3+ slashCommands: [COMPACT_SLASH_COMMAND]

This is a small fix for an existing capability. The native agent.summarize() path from #29398, automatic compaction, MCP configuration, and defaults are unchanged.

Evidence

  • Before: vp test run packages/provider-cursor/src/server/status.test.ts failed three assertions because enabled initial, successful, and empty-model snapshots returned no commands. Disabled startup passed.
  • After: All 16 status tests pass. Coverage includes enabled and disabled startup, successful discovery, and empty-model discovery.
  • vp run check:changed passes formatting, lint, knip, affected-package typechecks (10 packages), and 18 tests across two files.
  • Live UI was not tested; this change only updates provider capability advertisement.

Merge Danger

Door: Two-way. Reverting restores the previous advertisement.

Blast Radius: Cursor. Only snapshot commands change; compaction execution is untouched.

Implemented with GPT-6.1 Sol via T3 Code.

Checks

24 successful · 7 skipped
All checks passed
3c837e3

Added 1 commit

  • fix(provider-cursor): advertise manual compaction3c837e3
Synced from GitHub

Approvability

Verdict: Approved at 3c837e3

Macroscope's review found this PR approvable — Cursor now advertises its existing manual compaction capability in provider snapshots, making it discoverable in command controls. Compaction remains user-invoked; automatic behavior and product defaults are unchanged.

You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Cursor provider snapshots now include COMPACT_SLASH_COMMAND when enabled. Tests verify the initial snapshot for enabled and disabled states, and update expectations for probe-result and API-key snapshots.

Changes: Cursor compact command

Layer / File(s)Summary
Add compact command to Cursor snapshots
packages/provider-cursor/src/server/status.ts, packages/provider-cursor/src/server/status.test.ts
The initial enabled and probe-result snapshots include COMPACT_SLASH_COMMAND. Tests check enabled and disabled initial snapshots and update expectations for snapshots with no discovered models and API-key status.

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

Change: Bug fix

Possibly related issues

  • Issue 22205: The issue concerns a provider advertising compact without native compaction. This PR adds the compact command to Cursor snapshots, but the diff does not show whether Cursor performs native compaction.
  • Issue 16663: The issue concerns compact-command advertisement enabling a dispatch path that may not support compaction. This PR adds that advertisement to Cursor snapshots, but the diff does not show whether Cursor supports the dispatch path.

Suggested labels: bugfix

Suggested reviewers: only21mil

Merge Risk: External image Minimal · up to 3c837

No actionable merge-blocking risk remains; the change correctly enables the compact command for Cursor.

Pre-merge checks: Passed 4
Check nameStatusExplanation
Title checkPassedThe title clearly and concisely describes the main change: advertising manual compaction for the Cursor provider.
Description checkPassedThe description explains the problem, change, scope, verification results, untested live UI, and implementation details. It uses alternative headings instead of the template headings, but it provides …
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the problem, change, scope, verification results, untested live UI, and implementation details. It uses alternative headings instead of the template headings, but it provides the required information and clearly identifies this as a small fix for an existing capability.

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

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

External image Recent review info
External image Run configuration
External image Commits

Reviewing files that changed from the base of the PR and between a21d788752695764028e6d26ba924f3963e05806 and 3c837e3e477d8d8ff94dfd51b1ede87b7b3b15e3.

External image Files selected for processing: 2
  • packages/provider-cursor/src/server/status.test.ts
  • packages/provider-cursor/src/server/status.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.