Repository navigation
fix(dashboard): read management health and link the account-mode badge - #8535
Conversation
Home and the sidebar polled /healthz, which a Remote Hub's management ingress answers with 404, so a healthy hub read as "The proxy is not answering" / "Proxy Offline" (#8506). Home and the self-update reload check now read the authenticated /api/system/health; the sidebar keeps /healthz only for a connected Child's machine listener (which admits nothing else) and treats a 401/403 as reachable. The Codex Auth Pool/Direct badge is now a button that opens #providers?provider=openai&focus=account-mode, which selects OpenAI, opens Settings and focuses the Codex account mode control (#8501). Changing the mode stays the control's confirmed choice. Closes #8506 Closes #8501
|
✅ Deterministic PR hygiene checks passed. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Maintainer judgmentValue: #8506 is a false outage on every hub opened through its management origin: Home says "The proxy is not answering", the sidebar "Proxy Offline", while the proxy serves traffic. #8501 removes a dead end: the mode badge now goes straight to the one control that changes it. UX change scope: Home/sidebar status now reflects the authenticated management health route; the Codex Auth Pool/Direct badge becomes a button (chevron, same badge look) that opens Providers → OpenAI → Settings with the account mode control focused. Mode switching itself is unchanged (still the Select's confirmed dialog). Regression evidence for existing users:
Windows impact: none specific; browser-side only, no path or process change. Verification: failing-first GUI tests (12 failing on dev, 0 at head), gui lint / lint:i18n / build, root typecheck, privacy:scan, structure:check, layout and ratchet guards; real hub with separate data ( NOT RUN: a connected Child browser session; full root |
Summary
#8506 — a healthy hub read as offline on its management origin. Home and the sidebar polled
/healthz, which a Remote Hub's management ingress deliberately answers with 404, so Home said "The proxy is not answering" and the sidebar "Proxy Offline" while every other panel loaded./api/system/health(same body: status, version, uptime, pid) — the routefetchDashboardOverviewand the restart reconnect already use.machineHealthPathingui/src/lib/proxy-health.ts): a connected Child's machine listener admits only/healthz, so it keeps that (targets.connected || isConnectedRuntime(), which also covers failed discovery); everywhere else machine and shared are one management origin and get/api/system/health.readManagementHealthtreats a 401/403 as "the process answered, version unknown", so a public standalone before its token prompt or a hub before pairing does not flip to Offline.stop-proxy.tsandremote-link-api.tskeep reading/healthzon purpose (identity without a session);gui/classicis a frozen snapshot.#8501 — the Direct badge did not lead to the setting that changes it. The Codex Auth Pool/Direct badge is now a button (chevron affordance,
aria-label"Direct mode — Change account mode") that opens#providers?provider=openai&focus=account-mode. That deep link selects OpenAI, opens Settings and focuses the Codex account mode Select (pws-codex-account-mode; the field when the trigger is disabled during a save). The badge only navigates — switching to Pool stays the Select's confirmed choice.tab=accountswins overfocus, and choosing another provider drops the whole query. The Direct help text link now reads "Change account mode" and goes to the same place; the non-canonical row's link opens OpenAI's settings.Closes #8506
Closes #8501
Screenshots
Hub with separate data (
:18100) and management (:18101) listeners, dashboard opened on the management origin (management/healthz→ 404,/api/system/health→ 401 without a session, 200 with one).Codex Auth badge, before and after (cropped to the banner; the account card is omitted):
After clicking the badge in a real browser:
location.hash=#providers?provider=openai&focus=account-mode,document.activeElement.id=pws-codex-account-mode(valuedirect).Verification
management-health-probemissing exports;home-management-health2 fail;codex-account-mode-badge4 fail;protocol-deep-linksmissing exports;providers-deep-link2 fail;dashboard-contracts1 fail;provider-settings-account-modefocus case fail).cd gui && bun run lint✅,bun run lint:i18n✅ (new keycodexAuth.changeAccountModein all 11 locales),bun run build✅.cd gui && bun test tests: 4379 pass / 43 fail. The same command on a pristineorigin/devexport on this host: 4340 pass / 47 fail, same failing files (models-visibility-queue,kiro-device-login,codex-auto-switch-controller, …); each of those files passes alone. No new failure.bun run typecheck✅,bun run privacy:scan✅,bun run structure:check✅ (structure/dashboard-and-usage.mdupdated for the probe rule and thefocusdeep link), test-layout + file-size ratchet guards ✅.NOT RUN: a connected Child (Remote Link) browser session — covered by the plane rule and its unit tests; full root
bun run test(GUI-only change; CI runstest changed).Checklist
Summary by CodeRabbit