Skip to content

feat: refresh a single account from its card - #68

Merged
caigee-cmd merged 1 commit into
mainfrom
feat/account-refresh
Sep 1, 2026
Merged

feat: refresh a single account from its card#68
caigee-cmd merged 1 commit into
mainfrom
feat/account-refresh

Conversation

@caigee-cmd

Copy link
Copy Markdown
Owner

Summary

  • Accounts had no per-account refresh: the only way to update one card was "Refresh credits", which re-probed every account in the pool.
  • Adds POST /api/accounts/{id}/refresh, which re-probes one account's health, quota, and model catalog and returns just that account's view.
  • The card swaps to a skeleton while the refresh runs, so stale quota and status are never left on screen (matching how the list behaves on a full refresh).
  • The page then re-reads the pool so header counts and provider tallies stay in sync with the refreshed card.
  • The route dispatches before the provider-native action block, which would otherwise reject refresh as an unknown action for non-Qoder providers.

Test plan

  • go test ./...
  • go vet ./...
  • cd worker && npm test
  • cd frontend && npm run build && npm run lint (0 errors; 14 warnings are pre-existing in untouched files)
  • No tokens, auth blobs, raw captures, or host details in the diff

Notes

  • internal/accounts saw one flaky failure during a full go test ./... run: sql: database is closed from the background cooldown-persistence goroutine at shutdown, not an assertion failure. It did not reproduce in 14 consecutive runs (including 6 on a clean tree without these changes), so it looks pre-existing and unrelated, but flagging it rather than hiding it.

Refreshing an account previously meant reloading the whole overview, which
re-probed every account and left stale quota on screen during the fetch.

Add POST /api/accounts/{id}/refresh, which re-probes one account's health,
quota, and model catalog and returns just that account's view. The card
swaps to a skeleton while it runs so no stale state is shown, then the page
re-reads the pool so header counts stay in sync.

The route dispatches before the provider-native action block, which would
otherwise reject it as an unknown action for non-Qoder providers.
@caigee-cmd
caigee-cmd merged commit b672789 into main Sep 1, 2026
6 checks passed
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