Skip to content

fix(settings): show resolved model in Local CLI tests - #6386

Open
MumuTW wants to merge 2 commits into
nexu-io:mainfrom
MumuTW:agent/show-resolved-cli-model
Open

fix(settings): show resolved model in Local CLI tests#6386
MumuTW wants to merge 2 commits into
nexu-io:mainfrom
MumuTW:agent/show-resolved-cli-model

Conversation

@MumuTW

@MumuTW MumuTW commented Aug 3, 2026

Copy link
Copy Markdown

Re-submission of #6183

This is a re-submission of #6183 (closed by the repo's stale-PR queue bot on Aug 3 after 5 days without human activity — "queue-management step, not a rejection"). GitHub does not allow reopening a PR whose head branch was force-pushed after it closed, so I'm opening fresh from the same branch.

Since the original: the branch was rebased onto current main (was 34 commits behind). The change itself is untouched — still a single commit (54da9104a), 121 insertions / 4 deletions across the same 5 files.

Note on the previous CI run (30378493238): the failures there were infrastructure, not this diff — jobs were canceled by @AmyShang-alt and several others (Validate workspace, Runtime summary, …) timed out after 24h awaiting a runner. The change already has:

  • ✅ Code review approval from @mrcfps (Looper/codex reviewer, Jul 28)
  • ✅ QA + product approval from @AmyShang-alt with the validated label (Jul 29) — daemon/web regressions, typechecks, and related web tests all passed

Nothing about the diff changed since those approvals. @lefarcen @AmyShang-alt @mrcfps — could you merge when CI is green? Thanks!


Why

When I selected a rolling Claude Code alias such as opus in Settings and clicked Test, Open Design only reported that Claude Code replied successfully. That proved connectivity, but not which concrete model actually handled the request.

Claude Code already includes the concrete model in its system/init stream event, and Open Design already parses that value. The connection-test sink discarded the status event, however, so the response preserved only the requested slot (opus or default) and the UI could not show what the alias resolved to.

This addresses the resolved-model transparency portion of #6180. The stale Claude fallback catalog is intentionally not changed here because #6095 already refreshes that list and includes Fable 5/current-generation coverage.

What users will see

A successful Local CLI connection test now appends the concrete model reported by the agent when it differs from the selected alias/default slot. For example:

Claude Code replied in 42 ms — 'ok' Model: claude-opus-5

Exact pinned selections are not repeated when the reported model equals the selected model.

Surface area

  • UI — the existing Settings → Local CLI test-result message shows the resolved model
  • Keyboard shortcut — new or changed
  • CLI / env var — new od subcommand or flag, new tools-dev / tools-pack / tools-pr flag, or new OD_* env var
  • API / contract — adds the optional, backwards-compatible ConnectionTestResponse.resolvedModel field
  • Extension point — new entry under skills/, design-systems/, design-templates/, or craft/, or change to the skills protocol
  • i18n keys — no new key; the message reuses the existing localized settings.model label
  • New top-level dependency
  • Default behavior change — successful alias/default tests show one additional model detail
  • None

CLI parity

This does not add a new connection-test capability or endpoint; it preserves metadata in an existing Settings-only test flow. There is currently no od connection-test command to extend. Adding a new CLI command would be a separate user-facing capability and outside this focused bug fix. Any future CLI consumer of /api/test/connection will receive the same optional resolvedModel field from the shared contract.

Screenshots

The visible change is a single appended detail in the existing Local CLI test status row:

Before: Claude Code replied in 42 ms — 'ok'
After:  Claude Code replied in 42 ms — 'ok' Model: claude-opus-5

The rendered behavior is covered by apps/web/tests/components/SettingsDialog.execution.test.tsx.

Bug fix verification

  • Daemon red spec: apps/daemon/tests/connection-test.test.tsreports the concrete model resolved from a Claude alias
  • UI red spec: apps/web/tests/components/SettingsDialog.execution.test.tsxshows the concrete model reported by a Local CLI connection test
  • Red on main, green on this branch? Yes. On main, the daemon result lacks resolvedModel, and Settings omits the model from the success message. Both focused specs pass after the fix.

Validation

Passed:

  • pnpm guard
  • pnpm typecheck (full workspace)
  • pnpm --filter @open-design/contracts typecheck
  • pnpm --filter @open-design/daemon typecheck
  • pnpm --filter @open-design/web typecheck
  • Focused daemon regression: 1 passed
  • Focused web regression: 1 passed
  • Full web suite: 441 files passed; 4,866 tests passed, 7 skipped

Full daemon suite result on this machine:

  • 480 files passed; 6,098 tests passed
  • 4 files / 12 tests failed in unrelated environment-sensitive areas: AMR session-resume integration (8), Langfuse/Vela endpoint selection (2), and xAI no-credential expectations (2)
  • The two Langfuse failures are the same main-baseline failures already documented on fix(daemon): refresh Claude Code fallback model list to the current generation #6095. The AMR/xAI failures do not import or exercise the changed contract, Claude connection-test sink, or Settings result rendering. The directly affected connection-test regression is green.

Implementation

  • Capture the existing Claude status / initializing model in the connection-test sink.
  • Preserve both meanings in the response: model remains the requested alias/default slot; resolvedModel contains the concrete model reported by the CLI.
  • Render the concrete model only for successful Local CLI tests and avoid duplicate output for exact pinned IDs.
  • Keep the shared contract additive and optional for backwards compatibility.

@lefarcen

lefarcen commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Thanks @MumuTW — appreciate the clean resubmission and the explicit regression coverage around the Local CLI test path. I’m routing this now so the remaining review and validation steps can pick it up.

@lefarcen
lefarcen requested a review from nettee August 3, 2026 18:27
@lefarcen lefarcen added size/M PR changes 100-300 lines risk/high High risk: apps/desktop, daemon, auth, migration, workflows, package deps type/bugfix Bug fix labels Aug 3, 2026
@lefarcen lefarcen added the needs-validation Runtime change detected; needs human or /explore agent validation. label Aug 3, 2026
@lefarcen

lefarcen commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🧪 This PR has changes that need a manual QA pass before merge — please hold off self-merging for now; we’ll loop QA in once it’s merge-ready (and any required design/product sign-off is in place).

@nettee nettee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@MumuTW I reviewed all five changed ranges and verified that Claude’s system/init model is captured through the connection-test sink, returned as the additive resolvedModel field, and rendered only for Local CLI successes when it differs from the selected slot. The alias/default semantics and existing Codex path details remain intact.

Validation completed locally: pnpm guard; contracts, daemon, and web typechecks; the daemon connection-test suite (157 tests); and the full Settings execution suite (150 tests).

This is a focused, well-tested fix—nice job keeping the contract backward-compatible and the UI output scoped to the intended case.

🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.

@lefarcen
lefarcen requested a review from AmyShang-alt August 3, 2026 18:43
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Visual regression review

Head: baebf16 · Base: f180969

0 changed · 53 unchanged · 0 new without baseline · 0 failed

Unchanged cases
Case Main PR Diff
visual-avatar-local-agent-list
0 px (0.00%)
main pr diff
visual-avatar-local-agent-list-panel
0 px (0.00%)
main pr diff
visual-avatar-menu
0 px (0.00%)
main pr diff
visual-avatar-menu-panel
0 px (0.00%)
main pr diff
visual-avatar-open-design-account
0 px (0.00%)
main pr diff
visual-critical-settings
0 px (0.00%)
main pr diff
visual-critical-workspace
0 px (0.00%)
main pr diff
visual-critical-workspace-preview
0 px (0.00%)
main pr diff
visual-design-system-detail
0 px (0.00%)
main pr diff
visual-design-systems
0 px (0.00%)
main pr diff
visual-home
0 px (0.00%)
main pr diff
visual-home-catalog
0 px (0.00%)
main pr diff
visual-home-context-picker
0 px (0.00%)
main pr diff
visual-home-context-picker-popover
0 px (0.00%)
main pr diff
visual-home-plugin-filter
0 px (0.00%)
main pr diff
visual-home-plugin-use-staged
0 px (0.00%)
main pr diff
visual-home-plugin-use-with-query
0 px (0.00%)
main pr diff
visual-home-staged-attachment
0 px (0.00%)
main pr diff
visual-integrations
0 px (0.00%)
main pr diff
visual-integrations-mcp
0 px (0.00%)
main pr diff

Visual diff is advisory only and does not block merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-validation Runtime change detected; needs human or /explore agent validation. risk/high High risk: apps/desktop, daemon, auth, migration, workflows, package deps size/M PR changes 100-300 lines type/bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants