Fix cursor project parsing#599
Merged
Merged
Conversation
Recent Cursor builds renamed the per-workspace composer list from
ItemTable['composer.composerData'] to 'composer.composerHeaders' (identical
{ allComposers: [{ composerId }] } shape). loadWorkspaceMap only read the old
key, so on these builds the composer->workspace map came back empty and every
composer fell through to the 'cursor' orphan bucket, losing per-project
attribution.
Read both keys and merge their allComposers lists (backward compatible with
older installs). Add a regression test covering the new composer.composerHeaders
key and the legacy composer.composerData key.
Verified against a real workspace state.vscdb: composer.composerData absent,
composer.composerHeaders present with composerIds matching the bubbleId/
composerData rows; 21/22 calls now attribute to the real workspace instead of
the 'cursor' orphan bucket.
AI-Origin: human
ozymandiashh
approved these changes
Jul 3, 2026
ozymandiashh
left a comment
Collaborator
There was a problem hiding this comment.
Looks good and safe to merge. The fix is minimal, preserves the legacy composer.composerData path, and correctly reads the newer composer.composerHeaders key so project attribution works across Cursor versions.
Non-blocking suggestions:
- Update the workspace mapping comment in
src/providers/cursor.tsto mention bothcomposer.composerDataandcomposer.composerHeaders. - Consider adding one regression test for the transition case where both keys are present in the same workspace DB, to lock in the intended merge behavior.
I ran the cursor provider tests and build locally. The broader suite has unrelated pre-existing failures on the same files when checked against origin/main, so I do not consider those a regression from this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cursorproject instead of the real workspace. Recent Cursor builds renamed the per-workspace composer list key fromcomposer.composerDatatocomposer.composerHeaders(identical{ allComposers: [{ composerId }] }shape);loadWorkspaceMaponly read the old key, so every composer orphaned into thecursorcatch-all.loadWorkspaceMapnow reads both keys and merges theirallComposerslists — restoring per-project attribution on current Cursor while staying backward-compatible with older installs.composer.composerHeaderskey and the legacycomposer.composerDatakey.Testing
npm testpasses *(cursor suite 13/13; build clean.npm run buildsucceedsFor new providers only:
Before (old
composer.composerData-only query): all usage orphanedprojects: [ 'cursor' ] [cursor] calls=22 cost=$0.2506
After (this PR): usage attributed to the real workspace
discovered projects: [ '-Users-me-projects-superzoom', 'cursor' ] [-Users-me-projects-superzoom] calls=21 in=67472 out=7284 cost=$0.1653 [cursor] calls=1 in=545 out=5572 cost=$0.0852