Skip to content

fix: preserve cached usage when deleting accounts - #142

Open
Bl0ck154 wants to merge 1 commit into
Lampese:mainfrom
Bl0ck154:fix/preserve-usage-on-delete
Open

Bl0ck154 wants to merge 1 commit into
Lampese:mainfrom
Bl0ck154:fix/preserve-usage-on-delete

Conversation

@Bl0ck154

Copy link
Copy Markdown
Contributor

Deleting an account currently calls loadAccounts() without preserving usage, which clears cached usage for every remaining account and makes all cards temporarily fall back to Fetching usage....\n\nThis changes the delete flow so that:\n- deleting an inactive account removes only that account from local state and leaves every other account's cached usage untouched;\n- deleting the active account still reloads account metadata because the backend may promote another account to active, but does so with preserveUsage=true;\n- no global usage refetch is triggered by account deletion.\n\nValidation:\n- frontend production build passes (tsc && vite build).\n- branch is one commit directly on top of current upstream main; only src/hooks/useAccounts.ts is changed.

@Bl0ck154
Bl0ck154 force-pushed the fix/preserve-usage-on-delete branch from 3e3eecc to 30ee8d3 Compare September 7, 2026 08:05
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.

1 participant