Implement board synchronization functionality#2097
Conversation
…hronization with remote boards
… boards and streamline dispatch logic
…s to reflect changes in board identification logic
…adLocalOnlyBoards to pass user data
…ation (#2098) * Add UPDATE_BOARDS_AFTER_RECONCILE action and handle in boardReducer * Add UPDATE_BOARDS_AFTER_RECONCILE action and update syncBoardsSuccess logic * Rename functions to better reflect their purpose and update related tests * Refactor syncBoardsSuccess test to remove unnecessary boards assignment
…RECONCILE action and updating reconcileAndMergeBoards to return detailed board states.
… test cases accordingly
…ards and updating tests accordingly
…andling and soft delete functionality in the reducer
|
I use Claude Code to review the changes and I get:
Important Issues (Should Fix)
What's Done Well
Recommendations
|
| */ | ||
| export function applyRemoteChangesToState( | ||
| newRemoteBoards, | ||
| remoteNewerBoards, |
There was a problem hiding this comment.
this names are confusing me
There was a problem hiding this comment.
Do you have any suggestion?
…ved clarity and functionality
…and enhance applyRemoteChangesToState tests for better coverage
…ove deletion criteria
…tracked boards and enhance filtering criteria for user ownership
Sync Follow-Up IssuesIssues to address in future PRs after the initial 1. Handle 409 errors to prevent infinite retry loopProblem: When a board push fails with 409 (server validation error), the board stays Affected code:
Expected behavior:
2. Boards created while logged out get syncStatus: PENDINGProblem: Affected code:
Possible solutions:
3. Tile operations don't mark the parent board as PENDINGProblem: Affected code:
Related to: Issue #2 and #4 — part of the broader unlogged user modifications problem. 4. Identity boundary on loginProblem: When a user with an existing account logs in on a device that has local modifications, those changes could conflict with their server state. Expected behavior:
Possible solutions:
|
Enhance board synchronization by implementing the
syncBoardsaction, updating the reducer to manage sync status, and refining board identification logic. This update improves the handling of locally created boards and integrates detailed synchronization states. Tests have been adjusted to ensure accuracy in board classification and synchronization processes.NOTE: The original descriptionwas EDITED
Close #2096