GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor(gui): split ClaudeCode and ApiKeys for react-doctor by Wibias · Pull Request #470 · lidge-jun/opencodex

Conversation

@Wibias

@Wibias Wibias commented Jul 25, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

  • Split ClaudeCode and ApiKeys into focused section/panel modules.
  • Apply react-doctor 0.9.1 fetch/status and maintainability cleanup on those pages.

Stack

  • Depends on fix(gui): react-doctor shared foundations #466 (foundations).

Test plan

  • bun x tsc -b in gui/
  • Smoke Claude Code and API Keys pages (load/save)

Summary by CodeRabbit

  • New Features

    • Added API key management panels for endpoints, authentication, key creation/deletion, models, and usage examples.
    • Added Claude Code settings for sidecar backends, model mappings, aliases, auto-connect, and quickstart guidance.
    • Added localized labels and error messages across supported languages.
  • Bug Fixes

    • Preserved previously loaded API key data when refreshes fail.
    • Improved error reporting for API key and Claude Code operations.
    • Improved date, currency, and compact-number formatting.
    • Invalid JSON responses are now handled safely.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@Wibias
Wibias requested review from Ingwannu and lidge-jun as code owners July 25, 2026 23:36
@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Jul 25, 2026
@coderabbitai

coderabbitai Bot commented Jul 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR decomposes API key and Claude Code pages into reusable panels and sections, adds shared endpoint, sidecar, state, and JSON-response helpers, improves API failure handling and state preservation, expands localization, and adds focused UI, unit, and timing tests.

Changes

API key management

Layer / File(s) Summary
Shared API key contracts and panels
gui/src/pages/api-keys-utils.ts, gui/src/pages/api-keys-panels.tsx
Adds endpoint/key types, endpoint derivation, localized date formatting, and composed endpoint, auth, management, models, and usage panels.
API key loading and actions
gui/src/pages/ApiKeys.tsx
Preserves last-good data after failed refreshes, validates creation responses, prevents concurrent creation, reports action failures, and wires page state into the panels.
API key validation and localization
gui/tests/apikeys-*, gui/src/i18n/{de,en,ja,ko,ru,zh}.ts
Updates layout assertions, covers failed refreshes after create/delete, and adds localized API key failure messages.

Claude Code configuration

Layer / File(s) Summary
Claude Code contracts and controls
gui/src/pages/claude-code-types.ts, gui/src/pages/claude-code-settings.tsx, gui/src/pages/claude-code-sidecar.ts
Adds shared state/types, compact-window formatting, reusable settings controls, and sidecar selection/serialization helpers.
Claude Code sections
gui/src/pages/claude-code-sections.tsx
Adds settings, quickstart, model-map, and provider-grouped alias sections, including sidecar override controls.
Claude Code page integration
gui/src/pages/ClaudeCode.tsx
Uses shared JSON handling and sidecar serialization, localizes compact-window labels, handles load/save failures, and renders the extracted sections.
Claude Code validation and localization
gui/tests/claude-code-*, gui/tests/claudecode-*, gui/src/i18n/{de,en,ja,ko,ru,zh}.ts
Adds coverage for formatting, sidecar drafts and serialization, fetch errors, section order, and the “Other” provider label.

Shared helpers and test stability

Layer / File(s) Summary
JSON response handling
gui/src/fetch-json.ts, gui/tests/fetch-json.test.ts
Treats malformed successful JSON as an unusable payload and tests empty-body and server-error behavior.
Date and currency formatting
gui/src/intl-formatters.ts
Handles invalid dates and formats estimated USD values through Intl.NumberFormat.
Runtime timing coverage
tests/codex-v2-gate.test.ts, tests/web-search-progress-stream.test.ts
Extends the Codex transition timeout and replaces jitter-sensitive stream timing with gated byte delivery.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

  • lidge-jun/opencodex#392: Provides the API Access endpoint and external model catalog behavior used by this refactor.
  • lidge-jun/opencodex#444: Also modifies API key creation flow and related ApiKeys state wiring.
  • lidge-jun/opencodex#466: Introduces the shared JSON fetch helpers consumed by the updated pages.

Suggested labels: bug

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 0.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 change: splitting ClaudeCode and ApiKeys into focused modules for react-doctor cleanup.
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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

coderabbitai[bot]

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai coderabbitai Bot mentioned this pull request Jul 26, 2026
fix(gui): react-doctor shared foundations #466
Merged
1 of 2 tasks
@Wibias
fix(gui): re-split ClaudeCode and ApiKeys after foundations rebase
d0d03be
Rebase onto upstream/dev and re-apply the react-doctor module split against current stacked pages, including API key load/create/delete failure UI state.
@coderabbitai coderabbitai Bot mentioned this pull request Jul 26, 2026
refactor(gui): react-doctor cleanup for App, Logs, Subagents #471
Merged
1 of 2 tasks
@Wibias

Wibias commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto upstream/dev (foundations from #466). Old pre-#392 split was obsolete after API Access landed, so re-applied the ClaudeCode/ApiKeys module split against current stacked pages.

Fixed

  • API key load/create/delete failures now surface in UI state (no empty-keys-as-success on 401/500)
  • Curl sample input stays on localized api.usageSampleInput
  • Simplified Claude aliases provider-grouping Map lookup

Skipped (already in #466 / not in this PR diff): CodeRabbit notes on client-resource.ts, fetch-json.ts, intl-formatters.ts

Commit: d0d03bed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai coderabbitai Bot mentioned this pull request Jul 26, 2026
refactor(gui): react-doctor cleanup for Codex accounts #475
Merged
1 of 2 tasks
Wibias added 2 commits July 26, 2026 04:09
@Wibias
test: raise Windows timeout for multi-agent boolean/inline migration
68b8c69
atomicWriteFile runs icacls on win32; two transitions under CI load exceeded bun's 5s default.
@Wibias
fix(gui): preserve last-good API keys when refresh fails
aafe67b
Keep keys, endpoints, and Claude setting on non-OK /api/keys responses so a create/delete follow-up refresh cannot wipe the visible list.
@Wibias

Wibias commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Fix: preserve last-good API keys on refresh failure

fetchKeys() no longer clears keys/endpoints/Claude setting when /api/keys returns non-2xx, malformed JSON, or a network error. It sets keysLoadFailed and keeps the prior list visible (manage panel prefers showing keys when any remain).

Verification

  • bun test ./gui/tests/apikeys-refresh-preserve.test.tsx ./gui/tests/apikeys-layout.test.ts — pass
  • bun test ./gui/tests — 171 pass
  • bun x tsc -b (gui/) — pass
  • bun run typecheck — pass
  • bun run privacy:scan — pass

Commit: aafe67bf

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

coderabbitai[bot]

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Wibias
fix(ci): harden web-search byte-liveness timing and address #470 revi…
e90379b
…ew notes

Gate raw-byte pacing in the progress-stream test so Windows CI scheduler jitter cannot invent a false inactivity stall. Also surface ClaudeCode server errors, localize the alias Other bucket, label compact windows above 1M correctly, and restore navigator.language in API-keys tests.
coderabbitai[bot]

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Wibias added 2 commits July 26, 2026 05:06
@Wibias
fix(gui): resolve ClaudeCode eslint and sidecar Auto persist gap
b2f76a2
Allow the M unit for compact-window labels, keep off-ladder values from colliding with 1M, and collapse empty Auto sidecar overrides to inherit so they match management API persistence.
@Wibias
fix(gui): keep Claude sidecar Auto as a selectable draft
e404398
Empty Auto was collapsing to Inherit before a model could be entered.
Keep Auto in memory with an enabled model input, and only persist
{ backend: null, model } when the trimmed model is non-empty.
coderabbitai[bot]

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Wibias
fix(gui): address remaining CodeRabbit nits on #470
372877e
Harden JSON helpers and sidecar serialize/trimming, localize compact million labels via Intl, and add fetch/save regression coverage.
coderabbitai[bot]
coderabbitai Bot reviewed Jul 26, 2026
View reviewed changes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
gui/src/intl-formatters.ts (1)

30-30: ⚠️ Potential issue | 🟡 Minor

Keep display markers in the i18n layer.

The hardcoded em dash and ~ bypass the selected locale when rendered by CodexAccountPool.tsx and Logs.tsx. Provide localized fallback/approximation text or a locale-aware wrapper instead of embedding these user-visible markers in the formatter. This also leaves the earlier formatEstimatedUsdValue localization finding unresolved.

As per path instructions, files under gui/** must route user-visible strings through i18n locale files rather than hardcoded text.

Also applies to: 36-43

🤖 Prompt for 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.

In `@gui/src/intl-formatters.ts` at line 30, The date formatter and
formatEstimatedUsdValue still hardcode user-visible fallback and approximation
markers, bypassing localization in CodexAccountPool.tsx and Logs.tsx. Update
these formatter APIs to use the selected locale’s i18n messages for invalid-date
fallback and estimated-value text, and route the localized values through the
existing callers instead of embedding em dash or tilde characters. Preserve the
current formatting behavior for valid, non-estimated values.

Source: Path instructions

🤖 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.

Duplicate comments:
In `@gui/src/intl-formatters.ts`:
- Line 30: The date formatter and formatEstimatedUsdValue still hardcode
user-visible fallback and approximation markers, bypassing localization in
CodexAccountPool.tsx and Logs.tsx. Update these formatter APIs to use the
selected locale’s i18n messages for invalid-date fallback and estimated-value
text, and route the localized values through the existing callers instead of
embedding em dash or tilde characters. Preserve the current formatting behavior
for valid, non-estimated values.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d1792cc2-7e05-409d-bd7e-a6aad33e741c

📥 Commits

Reviewing files that changed from the base of the PR and between e404398 and 372877e.

📒 Files selected for processing (10)
  • gui/src/fetch-json.ts
  • gui/src/intl-formatters.ts
  • gui/src/pages/ClaudeCode.tsx
  • gui/src/pages/claude-code-sidecar.ts
  • gui/src/pages/claude-code-types.ts
  • gui/tests/claude-code-sidecar-draft.test.tsx
  • gui/tests/claude-code-sidecar.test.ts
  • gui/tests/claude-code-types.test.ts
  • gui/tests/claudecode-fetch-errors.test.tsx
  • gui/tests/fetch-json.test.ts

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Wibias
Wibias merged commit 62cc39d into lidge-jun:dev Jul 26, 2026
11 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Wibias
Wibias deleted the fix/react-doctor-claude-apikeys branch July 27, 2026 03:53
This was referenced Jul 28, 2026
Add Traditional Chinese (zh-TW) localization for GUI, README, and docs #581
Closed
feat(gui): show reset credit expiration time #613
Merged
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
@Wibias
fix(ci): harden web-search byte-liveness timing and address lidge-jun…
e510fb9
…#470 review notes

Gate raw-byte pacing in the progress-stream test so Windows CI scheduler jitter cannot invent a false inactivity stall. Also surface ClaudeCode server errors, localize the alias Other bucket, label compact windows above 1M correctly, and restore navigator.language in API-keys tests.
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
@Wibias
fix(gui): address remaining CodeRabbit nits on lidge-jun#470
7ceb74e
Harden JSON helpers and sidecar serialize/trimming, localize compact million labels via Intl, and add fetch/save regression coverage.
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
@Wibias
Merge pull request lidge-jun#470 from Wibias/fix/react-doctor-claude-…
28aa7c3
…apikeys

refactor(gui): split ClaudeCode and ApiKeys for react-doctor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] left review comments
@lidge-jun lidge-jun Awaiting requested review from lidge-jun lidge-jun is a code owner
@Ingwannu Ingwannu Awaiting requested review from Ingwannu Ingwannu is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Wibias
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.