Skip to content

fix(gui): providers overview quota/auth, Claude pool toggle, combos/models layout, dev session bootstrap - #988

Merged
lidge-jun merged 7 commits into
lidge-jun:devfrom
Wibias:codex/providers-copy-doctor
Aug 4, 2026
Merged

fix(gui): providers overview quota/auth, Claude pool toggle, combos/models layout, dev session bootstrap#988
lidge-jun merged 7 commits into
lidge-jun:devfrom
Wibias:codex/providers-copy-doctor

Conversation

@Wibias

@Wibias Wibias commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Providers workspace: "Copy ocx doctor" is gone from the embedded account surfaces; the standalone Codex Auth page keeps the affordance. The full account panel now lives on the Accounts tab, and the Overview shows a compact auth summary that correctly reads as logged in for OAuth providers without an email (Cursor/Kimi).
  • Provider Overview now shows the quota/rate-limit bars and drops the duplicated "Available accounts" section.
  • The Claude account pool toggle is a real on/off knob instead of a text button, and the yellow warning banner got proper inset padding.
  • Models/Combos no longer shift the page while loading: v2/sub-agent and combos states reserve silent height struts, the "Loading combos..." status line is removed (revalidation is announced via aria-busy), combo typography moves onto design tokens, and long helper copy wraps.
  • Dashboard polish: the providers table gets a top inset without breaking the sticky header, and the capacity-warning text now meets WCAG AA contrast on both themes.
  • Dev GUI: loopback session bootstrap runs through a dedicated /opencodex-session path proxied with changeOrigin:false, so the Vite dev server keeps the original host and the backend still mints origin-bound sessions (no admin-token prompt on localhost dev).

Validation

  • bun run typecheck — pass
  • bun run lint:gui — pass
  • bun run build:gui — pass
  • bun test tests (GUI suite) — 583 pass / 0 fail
  • bun test tests/provider-workspace-auth.test.ts tests/server-management-auth.test.ts — 34 pass / 0 fail (with OPENCODEX_ACL_TIMEOUT_MS=15000)
  • bun run test (root suite) — 8142 pass / 7 skip / 21 fail; the 21 failures reproduce identically on a clean upstream/dev checkout on this machine (Windows symlink/ACL and temp-lock EBUSY suites), so they are not introduced by this diff.

Review notes

  • The page-loading contract test was updated because Combos intentionally dropped its visible status line; silent revalidation is preserved and announced via aria-busy on the workspace body.
  • The dev-session bootstrap changes touch GUI auth memory and the Vite proxy; the server-side session contract is covered by tests/server-management-auth.test.ts.

Limitations

  • No browser screenshot pass was run in this change set; GUI behavior is covered by the GUI suite and build.

Summary by CodeRabbit

  • New Features

    • Provider overviews now show authentication status and quota information.
    • Account management remains available in the dedicated Accounts view.
    • Anthropic account pools now use accessible toggle controls.
  • Bug Fixes

    • Improved session bootstrapping and local development connectivity.
    • Loading states preserve layout while models and workspaces load.
    • Long helper and About text wraps correctly.
  • Style & Accessibility

    • Refined spacing, typography, theme colors, sticky tables, and loading announcements.
    • Doctor-copy controls are hidden in embedded provider views while remaining available on standalone account pages.

Wibias added 3 commits August 4, 2026 10:03
…v session bootstrap

Removes the doctor-copy affordance from embedded Providers account surfaces, adds quota bars plus a compact logged-in summary to the provider Overview, converts the Claude pool Off/On text toggle into a real knob, and tightens warning-banner padding.

Models/Combos: reserve silent height struts so late /api/combos and v2 status cannot shift the page, drop the bordered loading placeholder and status row, normalize combo typography onto design tokens, and wrap long helper copy.

Dashboard: give .tbl a top inset without breaking the sticky header, and raise .pws-capacity-incomplete contrast to WCAG AA on both themes.

Dev GUI: bootstrap loopback sessions through a dedicated /opencodex-session path proxied with changeOrigin:false so Vite keeps the original host while the backend still mints origin-bound sessions.
The removed loading status line was a page-loading-contract surface. Combos now revalidates over existing content without a visible spinner, keeps the failure notice path, and announces the in-flight refresh to assistive tech via aria-busy on the workspace body.
@github-actions github-actions Bot added the bug Something isn't working label Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1bc0e38b-a46e-401f-93a1-bd80c579d786

📥 Commits

Reviewing files that changed from the base of the PR and between d1f3871 and e2d8ca4.

📒 Files selected for processing (9)
  • gui/src/components/provider-workspace/AnthropicAccountPoolSettings.tsx
  • gui/src/pages/Combos.tsx
  • gui/src/pages/Models.tsx
  • gui/src/styles-combos-workspace.css
  • gui/src/styles-models-workspace.css
  • gui/src/styles/provider-overview-dashboard.css
  • gui/tests/page-loading-contract.test.tsx
  • src/server/gui-static.ts
  • tests/server-management-auth.test.ts

📝 Walkthrough

Walkthrough

The GUI now uses /opencodex-session for session renewal and proxying. Provider overview and account surfaces have separate responsibilities. Loading states preserve layout and accessibility semantics. Combo and dashboard workspaces use updated spacing, typography, wrapping, and theme colors.

Changes

GUI workspace and authentication

Layer / File(s) Summary
Session bootstrap routing
gui/src/api.ts, gui/vite.config.ts, src/server/gui-static.ts, src/server/index.ts, gui/tests/api-auth-memory.test.ts, tests/server-management-auth.test.ts
Session renewal and proxy requests use /opencodex-session. The server returns escaped session metadata in a no-store bootstrap document. Tests cover the endpoint and session fixtures.
Provider authentication surfaces
gui/src/components/provider-workspace/*, gui/src/components/CodexAccountPool.tsx, tests/provider-workspace-auth.test.ts, gui/tests/codex-account-pool-controller.test.ts
ProviderOverview renders quota bars and OAuth login summaries. Full account management remains on the Accounts tab. Doctor-copy controls are removed from embedded provider views and retained for standalone Codex account views. Anthropic pool settings use an accessible button toggle.
Workspace loading states
gui/src/pages/Combos.tsx, gui/src/pages/Models.tsx, gui/src/styles-models-workspace.css, gui/tests/page-loading-contract.test.tsx
Combos exposes refresh state with aria-busy and a live announcement. Models keeps v2 controls and Combos layout present while data loads.
Workspace presentation and form layout
gui/src/components/combo-workspace-add-modal.tsx, gui/src/components/combo-workspace-detail-panel.tsx, gui/src/styles-combos-workspace.css, gui/src/styles-dashboard-workspace.css, gui/src/styles-models-workspace.css, gui/src/styles/provider-overview-dashboard.css
Combo hints use consistent spacing and wrapping. Workspace typography uses shared tokens. Dashboard tables receive top spacing, pending cards reserve height, and incomplete-capacity colors use explicit theme values.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested reviewers: ingwannu, lidge-jun

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main GUI, provider, layout, and session-bootstrap changes in a concise and specific form.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@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: f83413da76

ℹ️ 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 thread gui/src/pages/Models.tsx Outdated
Comment thread gui/src/components/provider-workspace/ProviderOverview.tsx Outdated
Comment thread gui/src/api.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@gui/src/pages/Combos.tsx`:
- Around line 250-252: Update Combos.tsx to memoize the cache read with useMemo,
pass cached ?? undefined as initialData to useDataSurface, and remove the cached
fallback from the data assignment so it uses state.data directly. Follow the
existing pattern in Models.tsx and preserve refresh state propagation through
state.refreshing.

In `@gui/tests/page-loading-contract.test.tsx`:
- Line 69: Add a focused Bun regression test in page-loading-contract.test.tsx
for Combos that renders cached data, verifies the relevant loading container
exposes aria-busy="true" during refresh, then awaits request completion and
verifies the attribute is cleared. Keep the existing failure-notice assertion
unchanged, and target the loading behavior implemented by Combos.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8b99fccf-e87d-4a25-9828-0c8b3f2c4fb0

📥 Commits

Reviewing files that changed from the base of the PR and between 7343f0b and f83413d.

📒 Files selected for processing (20)
  • gui/src/api.ts
  • gui/src/components/CodexAccountPool.tsx
  • gui/src/components/combo-workspace-add-modal.tsx
  • gui/src/components/combo-workspace-detail-panel.tsx
  • gui/src/components/provider-workspace/AnthropicAccountPoolSettings.tsx
  • gui/src/components/provider-workspace/ProviderAuthPanel.tsx
  • gui/src/components/provider-workspace/ProviderDetails.tsx
  • gui/src/components/provider-workspace/ProviderOverview.tsx
  • gui/src/pages/Combos.tsx
  • gui/src/pages/Models.tsx
  • gui/src/styles-combos-workspace.css
  • gui/src/styles-dashboard-workspace.css
  • gui/src/styles-models-workspace.css
  • gui/src/styles/provider-overview-dashboard.css
  • gui/tests/api-auth-memory.test.ts
  • gui/tests/codex-account-pool-controller.test.ts
  • gui/tests/page-loading-contract.test.tsx
  • gui/vite.config.ts
  • tests/provider-workspace-auth.test.ts
  • tests/server-management-auth.test.ts
💤 Files with no reviewable changes (1)
  • gui/src/components/provider-workspace/ProviderAuthPanel.tsx

Comment thread gui/src/pages/Combos.tsx
Comment thread gui/tests/page-loading-contract.test.tsx
…n bootstrap

- Models: reserve only the sub-agent mode row while /api/v2 loads; the conditional threads row no longer reserves height that vanishes on the default disabled install.
- Provider overview: reuse ProviderCapacityQuota (shared with the aggregate dashboard) so pooled Codex capacity keeps estimate, recovery, current-account, and incomplete-window warnings instead of collapsing to a plain rate-limit bar.
- Dev session bootstrap: serve /opencodex-session from a dedicated minimal document independent of gui/dist, so a fresh Vite checkout mints an origin-bound loopback session without a packaged GUI build.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/server/gui-static.ts`:
- Around line 84-98: Refactor serveSessionBootstrap and htmlResponse to reuse
shared helpers for session bootstrap metadata and response headers. Extract the
duplicated metadata construction and header configuration into focused helpers,
then have both response paths call them while preserving the existing HTML,
caching, and browser security-header behavior.
- Around line 84-90: Update serveSessionBootstrap to HTML-attribute-escape
session.token, session.csrfToken, and session.origin before interpolating them
into the meta tags. Add one shared encoder for &, ", <, and >, and apply it
consistently to all three fields while preserving the existing response
structure.
- Around line 84-90: Update serveSessionBootstrap so it no longer embeds
session.token or session.csrfToken in HTML. Generate a one-time bootstrap
handle, expose only that handle to the GUI, and add the server-side exchange
that atomically consumes it to set an HttpOnly, SameSite session cookie; retain
CSRF protection through server-side validation rather than client-readable
credentials.

In `@tests/server-management-auth.test.ts`:
- Around line 384-390: Add a new integration test that uses startServer(0) to
fetch GET /opencodex-session from a live server instance instead of calling
serveSessionBootstrap directly as a unit test. In this integration test, assert
the HTTP response has status 200, Content-Type header is text/html,
Cache-Control is no-store, Pragma is no-cache, X-Frame-Options is DENY,
Content-Security-Policy contains frame-ancestors 'none', and the response body
contains all three metadata fields: opencodex-session-token,
opencodex-session-csrf, and opencodex-session-origin. Keep the existing unit
test that calls serveSessionBootstrap directly as a separate test to maintain
focused regression coverage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7683646b-696b-4f6b-adfa-73683b2ab0c8

📥 Commits

Reviewing files that changed from the base of the PR and between f83413d and d1f3871.

📒 Files selected for processing (7)
  • gui/src/components/provider-workspace/ProviderCapacityQuota.tsx
  • gui/src/components/provider-workspace/ProviderOverview.tsx
  • gui/src/components/provider-workspace/ProviderOverviewDashboard.tsx
  • gui/src/pages/Models.tsx
  • src/server/gui-static.ts
  • src/server/index.ts
  • tests/server-management-auth.test.ts

Comment thread src/server/gui-static.ts
Comment thread src/server/gui-static.ts Outdated
Comment thread tests/server-management-auth.test.ts
Wibias added 2 commits August 4, 2026 11:29
Combos now passes the session-cache seed into useDataSurface as initialData (the Models pattern), so a cold load over cached content reports refreshing=true and the workspace body keeps aria-busy announced while revalidating. Adds a focused regression test asserting aria-busy=true during the gated refresh and false after it settles.
… route with an integration test

htmlResponse and serveSessionBootstrap now use one escaped meta-tag builder and one HTML document response, so token/csrf/origin cannot become attribute markup and the two paths cannot drift. Adds a live-server test that GETs /opencodex-session and asserts status, cache/security headers, and all three session meta fields.
@Wibias

Wibias commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

Ready to merge @lidge-jun

…ble toggle name, token cleanup

- Combos/Models: aria-busy alone does not announce; add an sr-only
  role=status live region carrying common.loading in both shells, and pin
  the contract in page-loading-contract.test.tsx
- Claude pool toggle: stable accessible name (anthropicPool.title);
  aria-pressed carries state
- provider-overview capacity warning uses var(--amber) (6.26:1/9.65:1);
  72ch -> var(--prose-measure); 48px -> var(--space-12); refresh stale
  status-strip comment
@lidge-jun
lidge-jun merged commit 6ed4c78 into lidge-jun:dev Aug 4, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants