Skip to content

refactor(gui): react-doctor cleanup for Models#472

Merged
Wibias merged 1 commit into
lidge-jun:devfrom
Wibias:fix/react-doctor-models
Jul 26, 2026
Merged

refactor(gui): react-doctor cleanup for Models#472
Wibias merged 1 commit into
lidge-jun:devfrom
Wibias:fix/react-doctor-models

Conversation

@Wibias

@Wibias Wibias commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fix impure localStorage state updaters and version storage keys (:v1).
  • Status-check all Models fetches via fetch-json helpers.
  • Extract models-shared / provider hints to shrink the page module.

Stack

Test plan

  • bun x tsc -b in gui/
  • Models page: collapse/expand persistence, enable/disable model, caps, custom model modal

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Wibias, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b0201293-3e6f-4f1b-8624-c6add1a907db

📥 Commits

Reviewing files that changed from the base of the PR and between 803807a and d0e7512.

📒 Files selected for processing (4)
  • gui/src/pages/Models.tsx
  • gui/src/pages/models-provider-hints.tsx
  • gui/src/pages/models-shared.ts
  • gui/tests/models-empty-provider.test.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@github-actions github-actions Bot added the chore label Jul 25, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@Wibias
Wibias force-pushed the fix/react-doctor-models branch from bf7a2b6 to d0e7512 Compare July 26, 2026 01:54
@Wibias

Wibias commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator Author

Rebased onto upstream/dev (clears foundations/client-resource _deps + slow-poll findings already fixed in #466).

Fixed (Models-scoped)

  • Mutating call sites (setMultiAgentMode, putV2Threads, addCustomModel, updateCustomModel) now use readJsonOrThrow, so JSON error bodies from non-2xx responses surface instead of a generic save-failed message via readJsonIfOk.
  • Rebase merge kept upstream model-visibility / load-generation behavior while retaining the Models react-doctor split (models-shared, models-provider-hints) and fetch-json helpers.

Skipped / N/A

Verify

  • bun x tsc --noEmit -p gui
  • bun run lint:gui
  • bun test ./gui/tests/models-empty-provider.test.tsx ./gui/tests/model-visibility.test.tsx ✅ (14 pass)

SHA: d0e75125

@Wibias

Wibias commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator Author

Re-review (merge-ready)

Re-checked at d0e75125 vs upstream/dev (no code changes).

Diff verdict: No reproducible bugs, edge-case regressions, or credential/privacy leaks in the Models split. Behavior-preserving refactor (models-shared / models-provider-hints extract, readJsonOrThrow/readJsonIfOk on mutating paths, storage key v1 with legacy read fallback). Prior Codex notes on non-2xx JSON error surfacing are addressed; client-resource findings are out of this PR's file set.

Local checks

  • Models-focused GUI tests: 30 pass / 0 fail (models-empty-provider, models-provider-head, provider-model-custom-add, model-visibility, api-access-models)
  • GUI tsc -b: pass
  • gui React Doctor (bun run doctor): exit 0 (remaining diagnostics are repo-wide / non-blocking style warnings; Models-scoped critical fetch/status issues not present)

CI (gh pr checks 472): all green — ubuntu/macos/windows, npm-global x3, react-doctor, label, CodeRabbit.

Merge-ready from this re-review.

@Wibias
Wibias merged commit 4980410 into lidge-jun:dev Jul 26, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant