Repository navigation
Refactor conversation ID filtering logic - #166
Open
MaddipatlaChetan24 wants to merge 1 commit into
Open
MaddipatlaChetan24 wants to merge 1 commit into
MaddipatlaChetan24 wants to merge 1 commit into
Conversation
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
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.
What type of PR is this? (check all applicable)
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.