Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: final consolidated codex multi-auth overhaul (runtime + tui + docs) - #4

Merged
ndycode merged 10 commits into
mainfrom
feat/final-single-overhaul-pr
Feb 27, 2026
Merged

ndycode merged 10 commits into
mainfrom
feat/final-single-overhaul-pr

Conversation

@ndycode

@ndycode ndycode commented Feb 27, 2026

Copy link
Copy Markdown
Owner

Overview

This PR is the single consolidated reset PR for the full Codex multi-auth overhaul.
It includes runtime/backend features, TUI UX refactor, Codex CLI integration updates, storage/config migration work, and complete documentation rewrite aligned to the current codebase.

Complete Detailed Summary

1) CLI and command routing

  • Added/expanded codex auth ... command surface for multi-account workflows:
    • login menu/dashboard
    • list/status/switch
    • check/verify-flagged
    • forecast
    • fix/doctor/report
    • import/export and utility flows
  • Added wrapper scripts:
    • scripts/codex.js
    • scripts/codex-multi-auth.js
  • Improved forwarding behavior to official @openai/codex when command is outside auth scope.
  • Added robust codex binary resolution and environment overrides.

2) TUI and UX refactor

  • Reworked auth dashboard/menu flows in lib/codex-manager.ts and lib/ui/*:
    • beginner-first labels
    • consistent keymap behavior
    • improved action routing and menu state transitions
  • Added richer settings UIs:
    • account list customization
    • summary field customization
    • behavior controls
    • theme controls
    • advanced backend controls
  • Added live preview patterns and compact/details layout options.
  • Improved focus/highlight behavior and render consistency.
  • Added/centralized UI copy and theme palette logic.

3) Runtime resilience and backend logic

  • Added capability and entitlement policy systems:
    • lib/capability-policy.ts
    • lib/entitlement-cache.ts
  • Added forecast/quota systems:
    • lib/forecast.ts
    • lib/quota-probe.ts
    • lib/quota-cache.ts
    • lib/preemptive-quota-scheduler.ts
  • Added session/recovery/sync systems:
    • lib/session-affinity.ts
    • lib/live-account-sync.ts
    • lib/refresh-guardian.ts
    • lib/refresh-lease.ts
  • Added failure and stream handling systems:
    • lib/request/failure-policy.ts
    • lib/request/stream-failover.ts
  • Updated refresh queue and rotation logic to use the new policy/reliability behavior.

4) Storage, paths, and unified settings

  • Added canonical runtime path resolver:
    • lib/runtime-paths.ts
  • Added unified settings management:
    • lib/unified-settings.ts
    • lib/dashboard-settings.ts
  • Updated storage internals and safety behavior (backup/WAL/recovery pathways) and pathing.
  • Updated schema/config parsing (lib/schemas.ts, lib/config.ts) to support expanded settings and runtime controls.

5) Codex CLI state sync improvements

  • Extended Codex state and sync behavior:
    • lib/codex-cli/state.ts
    • lib/codex-cli/sync.ts
    • lib/codex-cli/writer.ts
  • Improved active-account synchronization behavior and related metadata handling.

6) OAuth and auth flow support

  • Updated auth browser/server flow components:
    • lib/auth/browser.ts
    • lib/auth/server.ts
  • Improved callback and auth input handling for the new menu-first flow.

7) Request/prompt/runtime integration updates

  • Updated core integration and helper modules:
    • index.ts
    • lib/request/fetch-helpers.ts
    • lib/prompts/codex.ts
    • lib/prompts/opencode-codex.ts
    • lib/auto-update-checker.ts
    • lib/logger.ts
    • lib/audit.ts

8) Documentation overhaul (fully aligned to actual codebase)

  • Rewrote top-level and docs portal flows:
    • README.md
    • docs/README.md
    • docs/index.md
  • Added/rewrote user guides and references:
    • docs/features.md
    • docs/configuration.md
    • docs/troubleshooting.md
    • docs/privacy.md
    • docs/upgrade.md
    • docs/reference/commands.md
    • docs/reference/settings.md
    • docs/reference/storage-paths.md
  • Reworked maintainer docs:
    • docs/DOCUMENTATION.md
    • docs/development/ARCHITECTURE.md
    • docs/development/CONFIG_FIELDS.md
    • docs/development/CONFIG_FLOW.md
    • docs/development/REPOSITORY_SCOPE.md
    • docs/development/TESTING.md
    • docs/development/TUI_PARITY_CHECKLIST.md
  • Added docs style standards:
    • docs/STYLE_GUIDE.md
  • Removed obsolete proposal doc:
    • docs/OPENCODE_PR_PROPOSAL.md

9) Test coverage expansion

  • Added broad new suites for new modules and flows, including:
    • auth menu hotkeys
    • codex manager CLI
    • capability/entitlement/failure policy
    • live sync, session affinity, refresh guardian/lease
    • forecast/quota cache/scheduler
    • stream failover
    • unified settings/dashboard settings
    • storage recovery paths
  • Updated existing tests for new routing/path/config/runtime behavior.

File/Change Scale

  • 1 consolidated commit
  • 113 files changed
  • 17,334 insertions / 5,651 deletions

Validation

  • npm run lint
  • npm run typecheck
  • npm test ✅ (72 files, 1790 tests)

Reset Note

  • This PR is intended to be the only active consolidated PR after reset.
  • Previous open PRs were closed as superseded.

Loading
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