Skip to content

fix(models): correct provider editor defaults, drafts, and navigation - #3617

Merged
bobleer merged 3 commits into
GCWing:mainfrom
bobleer:bob/model-settings-editor
Oct 30, 2026
Merged

bobleer merged 3 commits into
GCWing:mainfrom
bobleer:bob/model-settings-editor

Conversation

@bobleer

@bobleer bobleer commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Custom provider setup now opens with an empty API URL and a stable custom-configuration title. New editors compare editable values against their initial state, so cancelling an untouched or reverted form does not prompt to keep a draft. Cancelling or discarding new API provider setup returns to provider selection with its search and expansion state preserved and keyboard focus restored to the original provider.

The editor sizes to its content, places connection labels above their controls, and uses filled fields with standard thin borders. Model-detail actions use the existing localized Save label, and draft-confirmation actions fit in English, Simplified Chinese, and Traditional Chinese.

Type and Areas

Bug fix / UI/UX. Web UI model settings and shared design-system field surfaces.

Motivation / Impact

  • Custom setup no longer unexpectedly identifies itself as Zhipu or prepopulates that provider's endpoint.
  • Real edits retain the existing keep/discard workflow. Opening disclosures, reselecting default request modes, or reverting them does not create a draft, including for older saved configurations with omitted defaults.
  • Existing provider cancellation returns to the model overview. New provider cancellation returns one level to provider selection.
  • Compact spacing and full-width labels leave enough room for request-format options and translated actions.

Verification

  • node scripts/run-vitest.mjs run src/app/scenes/settings/pages/ai/ModelSettingsPage.loading.test.tsx src/infrastructure/config/components/ModelSettingsDialog.presentation.test.ts src/app/scenes/settings/pages/ai/ModelSettingsPage.presentation.test.ts src/infrastructure/config/components/modelEditorRequestSettings.test.ts src/infrastructure/config/components/modelConnectionTestPlan.test.ts (from src/web-ui) — 70 tests passed.
  • node --test design-system/packages/ui/tests/field-group.test.mjs design-system/packages/ui/tests/select.test.mjs design-system/packages/ui/tests/registry.test.mjs — 11 tests passed.
  • pnpm run check:web — passed, including type checking and Appearance/theme audits.
  • pnpm run i18n:audit — passed.
  • Native desktop checks covered Chinese/English editor layout, pristine cancellation, real-edit draft prompts, and scrolling in a compact window.

Reviewer Notes

Latest upstream main and relevant open PRs were inspected before fixing these paths; neither covered these scenarios. No persisted shape, host API, or remote protocol changes. SSH workspaces, relay/mobile control, Peer Device Mode, and Detached Dispatch were not exercised live.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@bobleer
bobleer merged commit 7ab754f into GCWing:main Oct 30, 2026
9 checks passed
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