Skip to content

refactor(web-ui): migrate Search, Input, Badge, Select, Card, and Tabs to @bitfun/ui - #2599

Merged
kev1n77 merged 11 commits into
GCWing:1.0.0-explorefrom
kev1n77:fmy/ui-sys
Aug 28, 2026
Merged

refactor(web-ui): migrate Search, Input, Badge, Select, Card, and Tabs to @bitfun/ui#2599
kev1n77 merged 11 commits into
GCWing:1.0.0-explorefrom
kev1n77:fmy/ui-sys

Conversation

@kev1n77

@kev1n77 kev1n77 commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Move Web UI call sites from the legacy @/component-library onto @bitfun/ui where the new library already covers the contract, then delete unused legacy components and keep appearance activation working after those removals.

This is the product-surface follow-up to the design-system foundation already merged in #2590.

Fixes #

Type and Areas

Type:

refactor / UI/UX / bug fix

Areas:

web UI, design system (@bitfun/ui), appearance runtime

Motivation / Impact

The new component library existed, but most product screens still used the old library (or one-off custom markup). That split kept two visual contracts in play and blocked deleting leftover primitives.

What changes:

  • Search, Input, Badge, simple Select, PopupCloseButton (outside FlowChat), and Card/Tabs now use @bitfun/ui (SearchField, Input/Field, StatusPill, native Select, IconButton, Card, TabGroup).
  • Unused legacy Search, Input, Badge, StreamText, FilterPill, TextStrokeEffect, and CubeLogo are removed with their appearance registrations and preview demos.
  • Field gains a validation error slot; StatusPill gains an accent tone; SearchField gains a trailing slot for match counts and busy indicators.
  • Password-toggle labels are added under ssh.remote (showPassword / hidePassword) in en-US, zh-CN, and zh-TW.
  • Builtin appearance no longer references the deleted legacy input surface, which previously failed package validation and left the app unstyled.

Intentionally unchanged in this PR:

  • FlowChat internals (except appearance-contract cleanup needed for audit).
  • Complex legacy Select (multi-select, search, icons, custom render).
  • Surfaces with no new-library equivalent yet (Tooltip, Textarea, Checkbox, NumberInput, loaders, markdown, etc.).

Verification

pnpm run check:web
pnpm run design-system:check
pnpm --dir src/web-ui exec vitest run src/infrastructure/appearance

Also re-ran focused Web UI suites after rebase (Search/Input/Badge/Card/Tabs/appearance consumers), including canvas SDK, AppearanceContracts, AgentsScene, and UserMessageItem.

Outcomes:

  • check:web (appearance contract audit, theme color audit, visual contract, type-check): pass
  • design-system:check: pass
  • appearance suite: 96 passed
  • focused Web UI files after rebase: 30 passed

Manual:

  • pnpm run desktop:dev — after the builtin input surface was dropped, theme tokens inject again; a full window reload is needed if Vite/Tauri restarted mid-edit.
  • Devices & Connections lazy-load: module graph is healthy (RemoteConnectDialog and dependents return 200). If a stale webview still shows Failed to fetch dynamically imported module, hard-refresh (Ctrl+R) or restart desktop:dev.

Remote scenarios: local desktop only. No remote-workspace, remote-control, peer-device, or detached-dispatch behavior was exercised.

Reviewer Notes

Commit series (keep as-is; each step is one component family plus a follow-up fix):

  1. feat(design-system): add Field validation error slot
  2. feat(design-system): add StatusPill accent tone
  3. refactor(web-ui): migrate legacy Search to SearchField (and delete old Search)
  4. refactor(web-ui): migrate legacy Input to Input/Field
  5. refactor(web-ui): migrate legacy Badge to StatusPill
  6. refactor(web-ui): migrate simple Select usages
  7. refactor(web-ui): replace PopupCloseButton with IconButton (outside FlowChat)
  8. refactor(web-ui): move gallery/review tabs and cards to TabGroup and Card
  9. chore(web-ui): remove unused StreamText, FilterPill, TextStrokeEffect, CubeLogo
  10. fix(appearance): repair contract audit (review-platform tab parts, InputDialog error part, MiniAppGalleryScene part attributes)
  11. fix(appearance): restore builtin theme activation (drop dead builtin input surface)

Compatibility:

  • Persisted appearance packages that still style components.input will fail validation the same way the builtin package did. That is existing validator behavior (UNKNOWN_SURFACE is hard-fail), not a silent fallback. Rollback is reverting this branch; no user-data migration is required.
  • After rebase onto current 1.0.0-explore, upstream data-bf-product-component / data-bf-product-part contracts for confirm-dialog, device-overview, and user-message-edit-composer are kept. Web light accent stays navy (color.action.primary.background), matching upstream rather than the earlier cyan experiment.

Scope guard: do not treat remaining @/component-library imports as missed work. The leftover majority is Tooltip / Textarea / Checkbox / NumberInput / rich Select / FlowChat.

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 added 11 commits August 28, 2026 17:43
Add a trailing slot to SearchField for match counts and busy indicators,
move all twelve legacy Search call sites to SearchField, and delete the
legacy Search component together with its appearance descriptor, preview
demo, and stale per-page style overrides.
Register review-platform tab parts and input-dialog error part, drop unregistered part attributes from MiniAppGalleryScene, and delete stale confirm-dialog, device-overview, and user-message-edit-composer descriptors whose DOM contracts were replaced by design system components.
…removal

The builtin appearance package still styled the removed legacy input surface, so package validation failed and no theme tokens were injected, leaving the app unstyled. Drop the dead input block, derive light structural borders from the navy action ink instead of the now-cyan accent so monochrome stays neutral, sync preset test expectations, and regenerate startup bootstrap manifests.
@kev1n77
kev1n77 merged commit e1b4fe4 into GCWing:1.0.0-explore Aug 28, 2026
7 of 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