Skip to content

Feat/unify sync status in a context manager#274

Merged
egalvis27 merged 9 commits intomainfrom
feat/unify-sync-status-in-a-context-manager
Mar 25, 2026
Merged

Feat/unify sync status in a context manager#274
egalvis27 merged 9 commits intomainfrom
feat/unify-sync-status-in-a-context-manager

Conversation

@egalvis27
Copy link

@egalvis27 egalvis27 commented Mar 16, 2026

What is Changed / Added


Synchronization state management has been consolidated into a context manager to improve communication among all the components involved.

A new button has been added to manually start the sync process

@egalvis27 egalvis27 requested a review from AlexisMora March 16, 2026 18:43
Copy link

@AlexisMora AlexisMora left a comment

Choose a reason for hiding this comment

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

Also, check the sonarcloud issues


const SyncContext = createContext<SyncContextValue>({ syncStatus: 'STANDBY' });

export function SyncProvider({ children }: { children: ReactNode }) {

Choose a reason for hiding this comment

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

Suggested change
export function SyncProvider({ children }: { children: ReactNode }) {
export function SyncProvider({ children }: { readonly children: ReactNode }) {

Choose a reason for hiding this comment

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

Done


function onSyncStatusChanged(value: SyncStatus) {
if (value === 'RUNNING') {
useEffect(() => {

Choose a reason for hiding this comment

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

Why not use useOnSyncRunning?
I would either scrap the useOnSyncRunning if you are not going to use it, because as far as we can see, its a super thin wrapper inside a useEffect

Choose a reason for hiding this comment

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

Done

@sonarqubecloud
Copy link

@egalvis27 egalvis27 requested a review from AlexisMora March 23, 2026 20:52
@egalvis27 egalvis27 merged commit 7d322f5 into main Mar 25, 2026
9 checks passed
@egalvis27 egalvis27 deleted the feat/unify-sync-status-in-a-context-manager branch March 25, 2026 01:59
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.

3 participants