Skip to content

fix: preserve cached usage when deleting accounts - #142

Merged
Lampese merged 4 commits into
Lampese:mainfrom
Bl0ck154:fix/preserve-usage-on-delete
Sep 30, 2026
Merged

Lampese merged 4 commits 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
@Lampese Lampese added this to the Backlog: product improvements milestone Sep 30, 2026
@Lampese Lampese added bug Something isn't working priority:P2 Normal maintenance or useful improvement after the P1 queue. area:usage Quota, statistics, cache, warm-up, reset credits and automation. status:needs-review Maintainer review required; this label is not merge approval. status:needs-ci No check rollup is visible for the current PR head; validate before landing. labels Sep 30, 2026
@Lampese
Lampese merged commit 1db1683 into Lampese:main Sep 30, 2026
6 checks passed
@Lampese Lampese removed status:needs-review Maintainer review required; this label is not merge approval. status:needs-ci No check rollup is visible for the current PR head; validate before landing. labels Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:usage Quota, statistics, cache, warm-up, reset credits and automation. bug Something isn't working priority:P2 Normal maintenance or useful improvement after the P1 queue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants