程序员阿江(Relakkes) 6e6829ac79 refactor(desktop): adopt the component library in market, plugins, tasks
Native buttons across the five directories: 37 -> 14. This is where the
badges and empty states were densest.

`ConfirmPopover` moves in from `shared/` to `tasks/` — one caller.

- `InstallStateBadge` and `SecurityBadge` become their status maps and
  nothing else, which is what `Badge` exists for. Both also had
  `success` text on a `success-container` fill; the tone pair fixes a
  contrast failure neither had noticed.
- Long-content badges (hook matchers, package specifiers, file paths)
  needed `wrap` — badges are single-line by default and these overflowed.
- `TaskRow`'s hand-rolled `mousedown` becomes two `useDismissable` calls,
  one per overlay. Escape now closes them, which it did not before.
- `MarketHome`'s error banner keeps its layout but drops
  `border-[…]/35` + `bg-[…]/25` for solid tokens and gains `role="alert"`.
  Those alpha modifiers meant the banner had no panel at all on Safari 15.

One real regression fixed: `FilterBar`'s filter chips were dead. When
`Dropdown` started cloning its trigger to attach ref, aria state and its
own `onClick`, `FilterTrigger` — a plain function component forwarding
none of it — silently swallowed them, and clicking a chip did nothing.
It now forwards. `FilterBar.test.tsx` is the regression anchor; verified
it fails with the spread removed.

Left native (14): `role="tab"` and `role="option"` elements, whole-card
and whole-row click targets, and `DayOfWeekPicker`'s circular day
toggles.
2026-07-26 18:31:34 +08:00
..