Skip to content

feat: improve account status interactions - #94

Merged
orangeboyChen merged 17 commits into
mainfrom
codex/feat-account-status
Sep 3, 2026
Merged

feat: improve account status interactions#94
orangeboyChen merged 17 commits into
mainfrom
codex/feat-account-status

Conversation

@orangeboyChen

Copy link
Copy Markdown
Owner

Summary\n- improve account status presentation and quota visibility\n- add SSR account status hydration and model copy interactions\n- synchronize branch with latest main\n\n## Validation\n- lint, format, typecheck, and unit coverage pass\n- local patch-branch coverage gate reports 55.29% and was bypassed for push as requested

@orangeboyChen
orangeboyChen merged commit 8d594f2 into main Sep 3, 2026
2 of 3 checks passed
@orangeboyChen
orangeboyChen deleted the codex/feat-account-status branch September 3, 2026 12:05
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.26316% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.46%. Comparing base (7fdc735) to head (1cd5a5e).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

❌ Your patch status has failed because the patch coverage (80.26%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #94      +/-   ##
==========================================
- Coverage   94.73%   94.46%   -0.28%     
==========================================
  Files          21       21              
  Lines        4178     4242      +64     
  Branches     1206     1232      +26     
==========================================
+ Hits         3958     4007      +49     
- Misses        220      235      +15     
Flag Coverage Δ
unittests 94.46% <80.26%> (-0.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1cd5a5efe7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +9 to +12
const [credentials, statuses] = await Promise.all([
getAccountStatusCredentials(),
getAccountStatus(),
]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Authenticate before querying account statuses

When an admin account is configured, an unauthenticated request to /account-status executes this query before <AdminPage> checks the session and redirects in app/page.tsx. getAccountStatus() then sends eligible stored bearer tokens to the upstream quota, check-in, and model endpoints, allowing unauthenticated callers to trigger authenticated upstream traffic and consume server resources; move this loading behind the session check or into an authenticated loader.

Useful? React with 👍 / 👎.

const credentials = await getAccountStatusCredentials();
const [credentials, statuses] = await Promise.all([
getAccountStatusCredentials(),
getAccountStatus(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid blocking page rendering on every upstream status fetch

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, while getAccountStatus() 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 👍 / 👎.

Comment thread app/settings/settings.tsx
Comment on lines +217 to +220
const response = await fetch('/admin-api/credentials/models', {
body: JSON.stringify({ filename, models: models.join(', ') }),
headers: { 'Content-Type': 'application/json' },
method: 'PUT',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Serialize model saves per credential

When a user continues editing or blurs the field while an earlier save is still pending, the debounce and blur paths can now issue overlapping PUTs for the same filename because the input is no longer disabled. Each request overwrites supported_models, so network or storage latency can let the older request finish last and silently restore stale text; queue or version saves per filename while keeping the field editable.

Useful? React with 👍 / 👎.

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