-
Notifications
You must be signed in to change notification settings - Fork 1
feat: improve account status interactions #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
97a7dff
738f71c
e074834
b7e8146
a3f1f7a
f1e80e9
d450db1
91f3988
5e86ec9
42cc739
b61712e
52d62ef
63442ca
f757ffb
e3aaf5d
c913256
1cd5a5e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,22 @@ | ||
| import { AdminPage } from '@/app/page'; | ||
| import { getAccountStatusCredentials } from '@/lib/server/domain/account-status'; | ||
| import { | ||
| getAccountStatus, | ||
| getAccountStatusCredentials, | ||
| } from '@/lib/server/domain/account-status'; | ||
| import AccountStatus from './account-status'; | ||
|
|
||
| const AccountStatusPage = async () => { | ||
| const credentials = await getAccountStatusCredentials(); | ||
| const [credentials, statuses] = await Promise.all([ | ||
| getAccountStatusCredentials(), | ||
| getAccountStatus(), | ||
| ]); | ||
|
Comment on lines
+9
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When an admin account is configured, an unauthenticated request to Useful? React with 👍 / 👎. |
||
|
|
||
| return ( | ||
| <AdminPage initialTab="account-status"> | ||
| <AccountStatus credentials={credentials as never} /> | ||
| <AccountStatus | ||
| credentials={credentials as never} | ||
| initialStatuses={statuses} | ||
| /> | ||
| </AdminPage> | ||
| ); | ||
| }; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For authenticated users with slow or unreachable upstreams, awaiting
getAccountStatus()prevents any account-status UI from rendering. Each credential sequentially performs quota, check-in, and possibly model requests with 15-second timeouts, whilegetAccountStatus()processes groups of four serially, so one group can delay the page by roughly 45 seconds and additional groups multiply that delay; load these statuses through streaming/Suspense or after rendering the page shell instead.Useful? React with 👍 / 👎.