Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ Write each change in both `### English` and `### 中文` under `## Unreleased`.

### English

- Avoid refreshing every account during console initialization, preventing credential payload timeouts when the account list is large

### 中文

- 控制台初始化不再刷新全部账号,账号较多时不会因排队读取 credential payload 而超时
## 0.3.5 - 2026-09-08

### English
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hooks/useOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function OverviewProvider({ children }: { children: ReactNode }) {
setError(null)
return
}
void refresh().catch(() => undefined)
void refresh(undefined, { refreshQuota: false }).catch(() => undefined)
}, [apiKey, refresh])

const value = useMemo(
Expand Down
4 changes: 2 additions & 2 deletions internal/api/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ func (s *Server) handleProviders(w http.ResponseWriter, r *http.Request) {
func (s *Server) handleAccounts(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case http.MethodGet:
if r.URL.Query().Get("refresh") != "0" {
_ = s.manager.RefreshAll(r.Context(), r.URL.Query().Get("refresh") == "1")
if r.URL.Query().Get("refresh") == "1" {
_ = s.manager.RefreshAll(r.Context(), true)
}
items, err := s.manager.Accounts(r.Context())
if err != nil {
Expand Down
8 changes: 5 additions & 3 deletions internal/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,11 @@ func (s *Server) handleHealth(w http.ResponseWriter, r *http.Request) {
}

func (s *Server) handleOverview(w http.ResponseWriter, r *http.Request) {
refreshCtx, refreshCancel := context.WithTimeout(context.Background(), 5*time.Second)
_ = s.manager.RefreshAll(refreshCtx, r.URL.Query().Get("refresh") == "1")
refreshCancel()
if r.URL.Query().Get("refresh") == "1" {
refreshCtx, refreshCancel := context.WithTimeout(context.Background(), 5*time.Second)
_ = s.manager.RefreshAll(refreshCtx, true)
refreshCancel()
}
accountViews, err := s.manager.Accounts(r.Context())
if err != nil {
writeErr(w, http.StatusInternalServerError, "account_list_failed", err.Error())
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internal/webui/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Outfit:wght@400;500;600;700&display=swap" rel="stylesheet" />
<script type="module" crossorigin src="/assets/index-BYdP7vBD.js"></script>
<script type="module" crossorigin src="/assets/index-DujGA_7u.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-LfAEBqQI.css">
</head>
<body>
Expand Down
Loading