Repository navigation
feat(dashboard): Codex CLI update tab over the existing plan/apply/jobs API - #8540
Conversation
…bs API Adds Codex -> Codex CLI (#2811): a read-only Check shows who installed the Codex CLI, whether OpenCodex manages it, installed and available versions, running sessions and the refusal reason; Update stays disabled until the plan is applicable and the operator confirms that only this installation changes. The tab posts exactly the planId on screen with one requestId, reused only for job_store_busy, admission_failed or a network failure, and follows the job until its status is final with no active owner. A 403 shows the local pairing form and the CLI apply command; an ambiguous result is never retried. A connected Child shows a notice and makes no request. No server change; docs and structure/codex-cli-update.md describe the dashboard consumer. Closes #2811
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. |
|
✅ Deterministic PR hygiene checks passed. |
Pre-merge checks:
|
… apply refusals Review follow-ups on the Codex CLI update tab: a poll stopped by job_not_found or repeated unreadable reads no longer leaves Check disabled; a refusal the tab has no words for says the update could not start instead of claiming a request conflict; drop the unused retryAfterMs; align structure/codex-cli-update.md with when the requestId is resent and what a session change clears.
…nd wording Final-review follow-ups on the Codex CLI update tab: mint the apply request id through getRandomValues when crypto.randomUUID is unavailable (plain-http LAN), refuse to send without one; describe resends as idempotent rather than as admitting nothing; owner_state_unknown copy no longer claims a restart.
Maintainer judgmentValue: #2811 asked for a dashboard surface over the Codex CLI update engine that already ships (plan / confirmed apply / durable job). Operators can now check provenance, managed status, versions, session blockers and the refusal reason, and apply one reviewed plan without leaving the dashboard, separately from OpenCodex's own updates. UX change scope: a new fourth tab on the Codex page ( Security review (update path): PASS at 13f6626. The UI adds no authority: apply still requires the server's paired human session on trusted loopback, Origin/CSRF and Regression evidence for existing users: no server change; routing adds one hash ( Windows impact: the tab renders the two Windows refusals ( Verification: failing-first (new test files fail on NOT RUN: a real end-to-end apply against a published-launcher npm-global install with a paired session (engine apply suites cover the install); Windows dashboard run. |
Summary
Adds the dashboard surface #2811 asked for over the Codex CLI update engine that already ships (
GET /api/codex/cli-update/plan,POST …/apply,GET …/jobs/<id>). No server change.New tab Codex → Codex CLI (
#codex-set/cli), separate from OpenCodex's own updates:planIdand stays disabled until the operator ticks "I understand this changes only this Codex CLI installation. OpenCodex and the desktop app are not updated or restarted."planIdwithconfirmed: trueand onerequestId. That id is reused only forjob_store_busy,admission_failedor a network failure;idempotency_conflictand store refusals (store_full,unsupported_store,unsafe_store) are final for that attempt.job_not_foundstops with "result unknown, check the installation"; five consecutive unreadable reads stop with theocx system codex-cli-update status <job> --jsoncommand. An ambiguous result is never retried or rolled back;owner_state_unknownis explained.local_dashboard_confirmation_required(the normal automatic local session) shows the existing local pairing form and the equivalentocx system codex-cli-update apply --plan-id <id> --yes./api/codex/*and its shared base is the Home, i.e. the wrong machine.Copy lives in one table (
gui/src/i18n/codex-cli-update-copy.ts, 11 locales). Docs:guides/web-dashboard.md(the section that said "no dashboard job UI" now describes the tab) andreference/cli.md;structure/codex-cli-update.mdrecords the dashboard consumer contract.Closes #2811
Screenshots
Real server started from source (no trusted published-launcher candidate, so the engine fails closed with
not_managed, as documented):Applicable plan, rendered from the same tab with only the plan response substituted in the browser (an npm-global managed install with a published launcher was not available here); confirmation ticked, Apply not clicked:
Verification
origin/devexport,codex-cli-update-api.test.tsandcodex-cli-update-panel.test.tsxfail (module absent) andcodex-set-shell.test.tsxfails its new#codex-set/clicase.canApply/isTerminalJobtruth tables, Apply gating, re-Check resetting the confirmation, polling to a final state, terminal 202 without polling, 404 stop, 403 copy with the CLI command, 409 finality, same requestId on a busy-store retry, and connected mode making no request.cd gui && bun run lint✅ ·bun run lint:i18n✅ ·bun run build✅ ·bun test tests= only the same pre-existing cross-file failures a pristinedevexport shows on this host (models-visibility-queue,kiro-device-login, …; each passes alone).bun run typecheck✅ ·bun run privacy:scan✅ ·bun run structure:check✅ · test-layout + file-size ratchet ✅ · docs-site build ✅ (665 pages, 96,054 internal links).NOT RUN: a real end-to-end apply (needs a published-launcher npm-global Codex install and a paired session; the engine's own apply suites already cover it); Windows dashboard run.
Checklist