-
-
Notifications
You must be signed in to change notification settings - Fork 257
Implement board synchronization functionality #2097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this names are confusing me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have any suggestion?
| continue; | ||
| } | ||
|
|
||
| if (moment(remote.lastEdited).isAfter(local.lastEdited)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happen if local is newer ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the local board is newer will be pushed to the api as it gonna have the syncStatus: pending state
| applyRemoteChangesToState( | ||
| newRemoteBoards, | ||
| remoteNewerBoards, | ||
| remoteDeletedBoardIds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think would be great to use a object for params of this function. same for classifyRemoteBoards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats a good idea
…ved clarity and functionality
…and enhance applyRemoteChangesToState tests for better coverage
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