feat: refresh a single account from its card - #68
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /api/accounts/{id}/refresh, which re-probes one account's health, quota, and model catalog and returns just that account's view.refreshas an unknown action for non-Qoder providers.Test plan
go test ./...go vet ./...cd worker && npm testcd frontend && npm run build && npm run lint(0 errors; 14 warnings are pre-existing in untouched files)Notes
internal/accountssaw one flaky failure during a fullgo test ./...run:sql: database is closedfrom 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.