fix: support Cursor's nested transcript directory layout#243
Conversation
Cursor recently changed its transcript storage from a flat layout (agent-transcripts/<uuid>.jsonl) to a nested layout (agent-transcripts/<uuid>/<uuid>.jsonl). The discovery and source file lookup functions only handled the flat layout, causing sessions from newer Cursor versions to be invisible. Update DiscoverCursorSessions and FindCursorSourceFile to handle both layouts. Extract dedup logic into cursorAddSeen helper. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
- Medium: FindCursorSourceFile now checks nested layout before flat, matching the precedence in DiscoverCursorSessions so both agree on which transcript is canonical. - Low: Nested directory scan now only accepts files whose stem matches the parent directory name (e.g. <uuid>/<uuid>.jsonl), preventing auxiliary files from being surfaced as separate sessions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
|
thanks! will merge after CI runs |
Summary
agent-transcripts/<uuid>.jsonl) to a nested layout (agent-transcripts/<uuid>/<uuid>.jsonl). The discovery and source file lookup functions only handled the flat layout, causing sessions from newer Cursor versions to be invisible.DiscoverCursorSessionsandFindCursorSourceFileto handle both flat and nested layouts.cursorAddSeenhelper to avoid repetition between the two code paths.Test plan
FindCursorSourceFilewith nested layout~/.cursor/projects/)