Skip to content

Refactor conversation ID filtering logic - #166

Open
MaddipatlaChetan24 wants to merge 1 commit into
uber:mainfrom
MaddipatlaChetan24:patch-7
Open

MaddipatlaChetan24 wants to merge 1 commit into
uber:mainfrom
MaddipatlaChetan24:patch-7

Conversation

@MaddipatlaChetan24

@MaddipatlaChetan24 MaddipatlaChetan24 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Related issue: N/A

What changed?
CursorParser.parse_conversations_from_bubbles built recent_conv_ids by iterating only composer_metadata.items(), so any conv_id with no composerData entry (missing, failed to decode, or lacking both timestamp fields) was never added and got silently filtered out by if conv_id not in recent_conv_ids: continue. Replaced it with old_conv_ids, populated only when a conv_id has a parsable timestamp that’s actually past the cutoff, and skip with if conv_id in old_conv_ids: continue instead.

Why?
Conversations lacking composer metadata were being dropped entirely regardless of age, even though the intended behavior (and the existing per-entry fallback for missing timestamps) is to include a conversation unless it’s positively confirmed old.

How did you test it?
Traced both code paths by hand: a conv_id absent from composer_metadata, or present but with no parsable timestamp, now falls through to inclusion by default instead of being excluded; a conv_id with a timestamp older than the cutoff is still correctly skipped.

Potential risks
Low — only changes which previously-dropped conversations now get included; conversations already correctly classified as old or recent are unaffected.

Refactor conversation ID handling to track old conversation IDs separately. Update logic to ensure only confirmed old conversations are skipped.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant