Skip to content

fix(web): replace native select dropdowns with a design-system listbox - #2231

Open
PBnicad wants to merge 1 commit into
MoonshotAI:mainfrom
PBnicad:fix/web-select-dropdown
Open

fix(web): replace native select dropdowns with a design-system listbox#2231
PBnicad wants to merge 1 commit into
MoonshotAI:mainfrom
PBnicad:fix/web-select-dropdown

Conversation

@PBnicad

@PBnicad PBnicad commented Jul 27, 2026

Copy link
Copy Markdown

Related Issue

Resolve #2229

Problem

The settings dialogs and the KAP debug panel use native HTML <select> elements. The closed control is styled to match the design system, but the opened option list is rendered by the browser/OS and ignores it: in dark mode the popup stays a light native list, and it shares none of the surface/radius/shadow/hover tokens used by the app's other popups (Menu/MenuItem).

What changed

  • Rewrote ui/Select.vue as a fully custom dropdown: the trigger keeps the Input sizing/surface/focus ring, and the popup reuses the Menu surface + MenuItem row styling, so the open state follows the design system in both themes. Options are data-driven (flat list with an optional group header), and the selected option is marked with an accent check.
  • Full keyboard support (arrows / Home / End / Enter / Escape, focus stays on the trigger via aria-activedescendant). Escape stops propagation so it cannot close an enclosing dialog; the popup closes on outside click, scroll, and resize, and flips above the trigger when the viewport bottom doesn't fit.
  • Migrated every native <select>: the Agent-settings default model (keeping the provider grouping from feat(web): group default model dropdown by provider in settings #861 as group headers), the Archived-sessions workspace filter, the provider type in the provider manager, and the two KAP debug-panel filters. The design-system specimen now renders the real component, and its dead .p-select CSS is removed.
  • Heads-up: PR feat(web): add UI font family preference to appearance settings #1803 adds new <Select> call sites using the old slot-based <option> API — whichever PR lands second should migrate those call sites to the data-driven options prop.
  • Opened per the discussion in [web] Settings dropdowns render as OS-native option lists, breaking dark mode and design-system consistency #2229; happy to adjust the approach based on maintainer feedback.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • Tests: kimi-web has no component-test harness (pure-logic vitest only); verified with typecheck, check:style, test, build, and manual light/dark browser checks (open state, option groups, keyboard navigation, Escape behavior).
  • Ran gen-changesets skill (patch, web: entry).
  • gen-docs not needed — no user-facing docs describe these controls.

@changeset-bot

changeset-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 32b3cb0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

[web] Settings dropdowns render as OS-native option lists, breaking dark mode and design-system consistency

1 participant