Skip to content

fix(settings): refine fallback channel routing layout in model editor - #3965

Merged
bobleer merged 1 commit into
openBitFun:mainfrom
bobleer:bob/fallback-channel-routing-ui
Nov 17, 2026
Merged

bobleer merged 1 commit into
openBitFun:mainfrom
bobleer:bob/fallback-channel-routing-ui

Conversation

@bobleer

@bobleer bobleer commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Refine the Fallback channels (备用渠道) and Routing mode (使用方式) presentation inside the single-model settings editor dialog so added fallback routes render in a clean, full-width ordered list instead of a cramped, zero-padding nested FieldGroup column.

Type and Areas

Type: UI/UX bug fix

Areas: Web UI (src/web-ui — AI model settings editor)

Motivation / Impact

Previously, adding one or more fallback channels inside renderChannelRoutingRows caused two visual defects:

  1. Adding a second child alongside <Select> invalidated the single-control :only-child column rule on ConfigPageRow, shrinking the right-hand control column back to 150px (narrower than the adjacent Routing mode select).
  2. Rendering bare .openbitfun-model-settings__account-pool-item rows (flex-wrap: wrap) inside a default appearance="subtle" <FieldGroup> produced a zero-padding dark surface where the step number, truncated Provider · Model label, and reorder/remove buttons wrapped onto three separate lines per item.

With this change:

  • The Fallback channels header row keeps the + Add fallback channel Select aligned at --openbitfun-overlay-menu-inline-size on the right (matching Routing mode and sibling fields), and disables it cleanly in place once all eligible candidates are added.
  • Added fallback channels render below the header across the full row width (grid-column: 1 / -1) as single-line ordered items with tabular step badges, separated provider/model typography (OverflowText marquee + tooltip on overflow, warning pill for deleted models), and tooltipped reorder/remove actions (hiding redundant up/down buttons when only one fallback channel is present).
  • Both routing Select menus use popupWidth="content" so long Provider · Model labels remain readable when expanded, and read-only isBackupOf notices use full-row description layout instead of wrapping inside a narrow control column.

Verification

  • pnpm --dir src/web-ui run test:run src/app/scenes/settings/pages/ai/ModelSettingsPage.presentation.test.ts src/infrastructure/config/components/ModelSettingsDialog.presentation.test.ts src/infrastructure/config/components/common/SettingsControlSizing.test.ts src/app/scenes/settings/pages/ai/ModelSettingsPage.loading.test.tsx (82/82 passed)
  • pnpm run check:web (passed: typography audit, Appearance contract audit, 27-surface frontend color audit, visual contract, and Web UI tsc --noEmit)
  • pnpm --dir src/web-ui exec eslint src/app/scenes/settings/pages/ai/ModelSettingsPage.tsx (0 errors)
  • pnpm run check:repo-hygiene && node scripts/check-git-object-sizes.mjs --base upstream/main --head HEAD (passed)

Reviewer Notes

  • AI-assisted change; testing level: fully tested for local DOM, presentation, sizing, and theme/color governance contracts.
  • Remote scenarios: presentation-only frontend update preserving the existing canEditChannelRoutingOnSurface capability gate and persisted channel_routing payload shape; verified via local DOM/contract fixtures rather than live SSH workspace, Remote Control, Peer Device Mode, or Detached Dispatch hosts.

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 605a000 into openBitFun:main Nov 17, 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