refactor: apply review feedback for bookmarks broadcast implementation#3128
Draft
Copilot wants to merge 7 commits intoQF-4694-bookmarks-cross-tabsfrom
Draft
refactor: apply review feedback for bookmarks broadcast implementation#3128Copilot wants to merge 7 commits intoQF-4694-bookmarks-cross-tabsfrom
Copilot wants to merge 7 commits intoQF-4694-bookmarks-cross-tabsfrom
Conversation
Co-authored-by: rrrokhtar <39674365+rrrokhtar@users.noreply.github.com>
…mance Co-authored-by: rrrokhtar <39674365+rrrokhtar@users.noreply.github.com>
Co-authored-by: rrrokhtar <39674365+rrrokhtar@users.noreply.github.com>
Co-authored-by: rrrokhtar <39674365+rrrokhtar@users.noreply.github.com>
Co-authored-by: rrrokhtar <39674365+rrrokhtar@users.noreply.github.com>
Co-authored-by: rrrokhtar <39674365+rrrokhtar@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add bookmarks broadcast functionality across components
refactor: apply review feedback for bookmarks broadcast implementation
Feb 15, 2026
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
Addresses performance and code quality issues identified in PR #3082 review feedback.
Type of Change
If Breaking Change
N/A
Scope Confirmation
Environment Variables
N/A
Rollback Safety
Test Plan
Testing steps:
Edge Cases Verified
Pre-Review Checklist
Code Quality
anytypes used (or justified if unavoidable)Testing & Validation
yarn test)yarn lint)yarn build)Documentation
Localization (if UI changes)
N/A
Accessibility (if UI changes)
N/A
Screenshots/Videos
N/A
Related PRs
Reviewer Notes
All changes are surgical and minimal, addressing only the specific review feedback. No functional changes to behavior.
Changes:
Eliminated duplication - Merged
broadcastCollectionCreatedandbroadcastCollectionUpdatedinto singlebroadcastCollectionUpsertedhelper (identical payloads)Performance: cache key computation - Compute keys once in
applyPayloadSync, pass to all helpers instead of recomputing per function:Performance: surah updates - Create
existingKeysSet once outsideforEachinapplySurahBookmarkUpdatesinstead of rebuilding per entryFix: duplicate delivery -
postWithStorageFallbacknow uses early return after successful BroadcastChannel post; localStorage only used as fallback to prevent duplicate cross-tab messagesPerformance: bulk operations - Convert
deletedIdsto Set before filtering (O(n) vs O(n*m)):Fix: test types - Use numeric bookmark keys
1instead of string'1'to match production typesFix: test construction - Use
Object.assigninstead of StorageEvent constructor arguments per browser API conventionsAI Assistance Disclosure
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.