refactor(web-ui): migrate Search, Input, Badge, Select, Card, and Tabs to @bitfun/ui - #2599
Merged
Conversation
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.
…ton outside flow chat
… TabGroup and Card
…, TextStrokeEffect, CubeLogo
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Move Web UI call sites from the legacy
@/component-libraryonto@bitfun/uiwhere 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 runtimeMotivation / 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:
@bitfun/ui(SearchField,Input/Field,StatusPill, nativeSelect,IconButton,Card,TabGroup).Search,Input,Badge,StreamText,FilterPill,TextStrokeEffect, andCubeLogoare removed with their appearance registrations and preview demos.Fieldgains a validationerrorslot;StatusPillgains anaccenttone;SearchFieldgains atrailingslot for match counts and busy indicators.ssh.remote(showPassword/hidePassword) in en-US, zh-CN, and zh-TW.inputsurface, which previously failed package validation and left the app unstyled.Intentionally unchanged in this PR:
Select(multi-select, search, icons, custom render).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/appearanceAlso 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): passdesign-system:check: passManual:
pnpm run desktop:dev— after the builtininputsurface was dropped, theme tokens inject again; a full window reload is needed if Vite/Tauri restarted mid-edit.RemoteConnectDialogand dependents return 200). If a stale webview still showsFailed to fetch dynamically imported module, hard-refresh (Ctrl+R) or restartdesktop: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):
feat(design-system): add Field validation error slotfeat(design-system): add StatusPill accent tonerefactor(web-ui): migrate legacy Search to SearchField(and delete old Search)refactor(web-ui): migrate legacy Input to Input/Fieldrefactor(web-ui): migrate legacy Badge to StatusPillrefactor(web-ui): migrate simple Select usagesrefactor(web-ui): replace PopupCloseButton with IconButton(outside FlowChat)refactor(web-ui): move gallery/review tabs and cards to TabGroup and Cardchore(web-ui): remove unused StreamText, FilterPill, TextStrokeEffect, CubeLogofix(appearance): repair contract audit(review-platform tab parts, InputDialogerrorpart, MiniAppGalleryScene part attributes)fix(appearance): restore builtin theme activation(drop dead builtininputsurface)Compatibility:
components.inputwill fail validation the same way the builtin package did. That is existing validator behavior (UNKNOWN_SURFACEis hard-fail), not a silent fallback. Rollback is reverting this branch; no user-data migration is required.1.0.0-explore, upstreamdata-bf-product-component/data-bf-product-partcontracts 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-libraryimports as missed work. The leftover majority is Tooltip / Textarea / Checkbox / NumberInput / rich Select / FlowChat.Checklist