Skip to content

fix(web): correct account analytics and sync behavior - #288

Open
NeerajCodz wants to merge 3 commits into
mainfrom
fix/web-finance-issues
Open

NeerajCodz wants to merge 3 commits into
mainfrom
fix/web-finance-issues

Conversation

@NeerajCodz

Copy link
Copy Markdown
Owner

Changes

  • Correct account-aware finance calculations, profile/settings routes, and browser sync behavior.

Issues

Fixes #196
Fixes #198
Fixes #203
Fixes #267
Fixes #268
Fixes #269
Fixes #270
Fixes #279
Fixes #280
Fixes #283

- Correct account-aware finance totals, profile routes, and sync settings behavior.
- Fixes #196, #198, #203, #267, #268, #269, #270, #279, #280, and #283.
@vercel

vercel Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
finapp Ready Ready Preview Nov 27, 2026 2:53am UTC

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-27T02:36:27.428797Z
We couldn’t complete this review. Comment @codex review to try again.
a16a861 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@NeerajCodz

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0a431b8665

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +116 to +117
await clearLocalData(userId);
await signOut();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Stop active sync before clearing sign-out data

When the user signs out while BrowserSyncProvider is syncing, clearLocalData can finish before an in-flight bootstrap or pull writes its response to IndexedDB. Signing out does not cancel those operations, which retain the user ID they started with, so they can repopulate finance records after this deletion and leave private data in the browser despite the sign-out guarantee. Coordinate shutdown of active sync before clearing, or perform a final clear after synchronization can no longer write.

Useful? React with 👍 / 👎.

Comment on lines +152 to +156
<Button
size="sm"
variant="outline"
disabled={resolvingConflict !== null}
onPress={() => void chooseConflict(conflict.id, 'local')}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Disable local conflict resolution during active sync

If “Keep this device” is pressed while a background sync is already running, conflict resolution creates a pending outbox entry and then calls flush(), but flush() immediately returns because its running guard is set. When the current sync has already passed syncOutbox, the chosen local version can remain pending until another sync trigger, and a subsequent pull in the current run can recreate the conflict. The existing sync sheet avoids this race by disabling these actions while isSyncing; this page should do the same.

Useful? React with 👍 / 👎.

Comment on lines +116 to +117
await clearLocalData(userId);
await signOut();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Complete sign-out when local cleanup fails

If IndexedDB is unavailable, blocked, or fails while clearLocalData opens or commits its transaction, the exception jumps to this function’s catch before signOut() runs. The user therefore cannot terminate their authenticated session from this button precisely when browser storage is unhealthy, which is particularly risky on a shared browser. Local cleanup failure should be reported, but it must not prevent the authentication sign-out from being attempted.

Useful? React with 👍 / 👎.

Comment on lines +147 to +150
<div key={conflict.id} style={{ display: 'grid', gap: 8, paddingBlock: 8 }}>
<p style={{ margin: 0 }}>
{conflict.entityType} {conflict.recordId} has a local and cloud version. Choose which to keep.
</p>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Show both versions before resolving a conflict

For every sync conflict, this page displays only the entity type and record ID before offering destructive “Keep this device” and “Keep cloud” actions. Since conflict.localRecord and conflict.cloudRecord are available but never rendered, users cannot tell which name, amount, or other value each action will preserve and may overwrite the desired edit. Present the differing values, as the existing local sync sheet does, before allowing either resolution.

Useful? React with 👍 / 👎.

- Restore the account-filter condition and sync status title expression.
@NeerajCodz

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

- Apply the repository formatter to files flagged by CI.

This branch was successfully deployed

1 active deployment
Preview — aa3e59f4 Deployed Nov 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment