Skip to content

fix(settings): refine model provider editing, testing, and deletion - #2766

Merged
kev1n77 merged 3 commits into
GCWing:1.0.0-explorefrom
kev1n77:fmy/bugfix
Sep 3, 2026
Merged

fix(settings): refine model provider editing, testing, and deletion#2766
kev1n77 merged 3 commits into
GCWing:1.0.0-explorefrom
kev1n77:fmy/bugfix

Conversation

@kev1n77

@kev1n77 kev1n77 commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Preserve unsaved model/provider editor changes as a retained draft when the dialog is closed through Cancel, the close button, or Escape.
  • Prompt users to keep, discard, or continue editing a draft, and restore retained drafts when reopening the same provider.
  • Limit automatic post-save connection tests to representative, newly added, or probe-relevant models instead of testing every model under a provider.
  • Prevent stale asynchronous connection-test results from overwriting newer results.
  • Add provider-level deletion that removes all models belonging to the selected provider, with model/reference counts in the confirmation dialog.
  • Restore the intrinsic size and clickability of switches under Advanced Settings.
  • Align custom-header and custom-request-body mode actions to the right edge of their rows.
  • Add and update English, Simplified Chinese, and Traditional Chinese copy.

Fixes: N/A

Type and Areas

Type:

Bug fix / regression fix / UI/UX / test

Areas:

Web UI — model settings, configuration state, Peer Device capability handling, and i18n.

Motivation / Impact

The model provider configuration workflow had several related usability and efficiency issues:

  • Closing an edited provider discarded the in-progress form state.
  • Saving provider-level changes could trigger connection tests for every configured model.
  • Providers could not be deleted directly and had to be removed model by model.
  • Advanced Settings switches could collapse to zero width because page-level layout styles overrode their design-system dimensions.
  • Mode actions for custom headers and request bodies were constrained to the label column instead of aligning with the right edge of the row.

This PR makes provider editing recoverable, reduces unnecessary model requests, adds direct provider deletion, and repairs the advanced-settings layout.

Verification

  • pnpm run check:web
    • Passed Web UI type checking, appearance contracts, typography checks, theme color audits, and visual governance checks.
  • pnpm --dir src/web-ui run test:run src/infrastructure/config/components/modelConnectionTestPlan.test.ts src/infrastructure/config/services/modelConfigs.test.ts src/infrastructure/config/components/ModelSettingsDialog.presentation.test.ts src/infrastructure/config/components/ModelSettingsPage.presentation.test.ts src/infrastructure/config/components/ModelServiceCollapse.presentation.test.ts
    • 5 test files passed.
    • 27 tests passed.
  • pnpm run i18n:audit
    • Passed with 0 warnings.
  • Manually reproduced the collapsed Advanced Settings control and confirmed the corrected control layout after the fix.

Reviewer Notes

  • No persisted configuration shape, Rust API, or Tauri command contract was changed.
  • Provider deletion reuses the existing ai.models update path and removes every model associated with the selected provider group.
  • Connection testing is explicitly disabled when the active Peer Device host is a CLI host that does not support the operation; there is no silent local fallback.
  • The shared Web UI path was verified locally. Remote workspace, remote control, Peer Device end-to-end, and Detached Dispatch scenarios were not separately exercised.
  • Temporary runtime instrumentation and debug-agent.log were removed before submission.

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.

@kev1n77
kev1n77 merged commit a28180d into GCWing:1.0.0-explore Sep 3, 2026
8 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