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

merged2
main
GitHub fork: fix/cursor-compact-capability
opened10d agobyDdefyrlt
View on GitHubTwo-way sync enabledPR last imported 2h 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

23 successful · 18 skipped
All checks passed
7a60833

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 initial snapshots 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
Enabled initial 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

Suggested reviewers: stienswout

Merge Risk: External image Minimal · up to 7a608

Cursor providers will now show the /compact command when enabled. The change is small and reversible, and no concrete merge risk was found.

Pre-merge checks: Passed 4

Check nameStatusExplanation
Title checkPassedThe title names the main change: Cursor provider snapshots now advertise the manual compaction command (/compact). It uses the conventional commit form and matches the status.ts and status.test.ts cha…
Description checkPassedThe description follows the template. It gives a problem summary, the change with a diff, scope (a small fix for an existing capability, no issue link), and verification with before and after test res…
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: Title check

Explanation

The title names the main change: Cursor provider snapshots now advertise the manual compaction command (/compact). It uses the conventional commit form and matches the status.ts and status.test.ts changes, which add COMPACT_SLASH_COMMAND to enabled initial and probed snapshots.

Full details: Description check

Explanation

The description follows the template. It gives a problem summary, the change with a diff, scope (a small fix for an existing capability, no issue link), and verification with before and after test results. It also states what was not tested (live UI). The Scope section does not link an issue or explain why none is needed beyond calling it a small fix of an obvious gap, and it has no explicit Problem heading. Those gaps are minor. Model attribution is present.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
External image Recent review info

External image Run configuration

External image Commits

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

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.

Added 1 commit

  • Merge remote-tracking branch 'origin/main' into fix/cursor-compact-capability7a60833

Evidence

Real Chromium web client, 1280×800, light theme, separate fresh databases, authenticated real Cursor provider. On both commits, start Composer 2.5 with “Reply with just the word hello. Do not use any tools.”, wait for its completed hello reply, open the thread and type /comp.

The scenario failed on base because the compact entry was absent and passed on head because it was visible.

Scenario source

Not shown:

  • The context-meter compaction action was not exercised; the captured flow proves slash-menu discovery.
  • Native compaction execution was not invoked; the scenario checks availability after a completed real Cursor turn.
  • Provider addition through Settings and the Codex comparison were not repeated; the scenario enabled Cursor through settings and created its real completed thread through the application CLI.