Skip to content

Conversation

@Jon-edge
Copy link
Collaborator

@Jon-edge Jon-edge commented Jan 13, 2026

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Note

  • Light account banner reliability: Always reset and show lightAccountReminder on login for light accounts; auto-complete/hide when upgrading to full accounts.
  • Race-condition mitigation: Consolidate notification updates into a single awaited effect and merge notifState writes to avoid concurrent overwrites; remove duplicate effect; watch username instead of account.username.
  • Settings cache correctness: Add resetLocalAccountSettingsCache() on logout and prefer cached settings after first read to prevent stale disk reads overwriting newer in-memory data.
  • Changelog: Note fix for missing light account/backup reminder banner on login.

Written by Cursor Bugbot for commit 1781a5c. This will update automatically on new commits. Configure here.


Copy link

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

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: 178ffd38c9

ℹ️ 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 +264 to +268
// If we've already read from disk, return the cached settings.
// This prevents stale disk reads from overwriting newer in-memory writes
// that may not have been persisted to disk yet.
if (readSettingsFromDisk) {
return localAccountSettings

Choose a reason for hiding this comment

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

P2 Badge Reset cached settings per account

The new short-circuit in readLocalAccountSettings returns the module‑level localAccountSettings whenever readSettingsFromDisk is true, but that flag is global and never reset on logout/account switch. If a user logs out and logs into a different account without restarting the app, this will reuse the previous account’s settings instead of reading the new account’s Settings.json, so notification state, reminders, and other local settings can be wrong for the new account. This regression is introduced by the unconditional cache return here.

Useful? React with 👍 / 👎.

Copy link
Contributor

Choose a reason for hiding this comment

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

What the AI said. It's a super-easy bug to miss, and we've made this same mistake several times in the past.

We generally avoid reading settings async, but instead just grab them from redux. With Sam's new login optimizations, the local settings should be loaded before we show any UI, so you can just rely on that.

Copy link
Contributor

@swansontec swansontec left a comment

Choose a reason for hiding this comment

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

Basically what the AI said.

Comment on lines +264 to +268
// If we've already read from disk, return the cached settings.
// This prevents stale disk reads from overwriting newer in-memory writes
// that may not have been persisted to disk yet.
if (readSettingsFromDisk) {
return localAccountSettings
Copy link
Contributor

Choose a reason for hiding this comment

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

What the AI said. It's a super-easy bug to miss, and we've made this same mistake several times in the past.

We generally avoid reading settings async, but instead just grab them from redux. With Sam's new login optimizations, the local settings should be loaded before we show any UI, so you can just rely on that.

"The new short-circuit in readLocalAccountSettings returns the module‑level
localAccountSettings whenever readSettingsFromDisk is true, but that flag is
global and never reset on logout/account switch. If a user logs out and logs
into a different account without restarting the app, this will reuse the
previous account's settings instead of reading the new account's Settings.json"
- chatgpt-codex-connector, swansontec

Adds resetLocalAccountSettingsCache() and calls it on logout to properly reset
the cache between account sessions.
@Jon-edge Jon-edge force-pushed the jon/fix/light-account-banner branch from 9a75826 to a6fe962 Compare January 13, 2026 21:37
@Jon-edge Jon-edge force-pushed the jon/fix/light-account-banner branch from a6fe962 to 0dfef44 Compare January 13, 2026 21:57
@Jon-edge Jon-edge force-pushed the jon/fix/light-account-banner branch 2 times, most recently from 0dfef44 to 4a1aeef Compare January 13, 2026 23:00
"The lightAccountReminder notification is no longer properly cleaned up when a
user upgrades from a light account to a full account. Previously, the call to
updateNotificationInfo(account, 'lightAccountReminder', isLightAccountReminder)
would set isCompleted: true and isBannerHidden: true when isLightAccountReminder
became false. With that call removed... the notification is never marked
complete after upgrade."
- cursor

Updates the effect to mark lightAccountReminder complete when user upgrades
from a light account.
@Jon-edge Jon-edge force-pushed the jon/fix/light-account-banner branch from 4a1aeef to 1781a5c Compare January 13, 2026 23:22
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