Skip to content

fix timeline dup keys#1911

Merged
Tlaster merged 1 commit intomasterfrom
bugfix/timeline-crash
Mar 21, 2026
Merged

fix timeline dup keys#1911
Tlaster merged 1 commit intomasterfrom
bugfix/timeline-crash

Conversation

@Tlaster
Copy link
Contributor

@Tlaster Tlaster commented Mar 20, 2026

No description provided.

@Tlaster Tlaster requested a review from Copilot March 20, 2026 16:46
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses duplicate Compose lazy item keys in mixed timelines by making UiTimelineV2.itemKey account-scoped and by deduplicating mixed-timeline results before they are returned/saved.

Changes:

  • Add accountType to UiTimelineV2.itemKey generation to avoid key collisions across accounts.
  • Deduplicate MixedRemoteMediator merged results with distinctBy(itemKey) after sorting.
  • Add regression tests covering deduplication across sub-timelines and preserving same-status items from different accounts.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
shared/src/commonTest/kotlin/dev/dimension/flare/data/datasource/microblog/MixedRemoteMediatorTest.kt Adds tests to validate mixed refresh deduplication behavior and cross-account uniqueness.
shared/src/commonMain/kotlin/dev/dimension/flare/ui/model/UiTimelineV2.kt Updates itemKey to include accountType, preventing collisions between different accounts.
shared/src/commonMain/kotlin/dev/dimension/flare/data/datasource/microblog/MixedRemoteMediator.kt Deduplicates merged timeline items by itemKey to prevent duplicate lazy keys in mixed timelines.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Tlaster Tlaster merged commit 7a02773 into master Mar 21, 2026
13 checks passed
@Tlaster Tlaster deleted the bugfix/timeline-crash branch March 21, 2026 00:53
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.

2 participants