open-design/apps/web
Bryan b426f614f5
fix(web): scope design-systems surface chip counts to active style filter (#2141)
On the Design systems page the built-in library surface chips (All / Web /
Image / …) counted the whole catalog, so applying a style category left
them showing stale totals while the grid shrank. Clicking a chip also
called setCategory('All'), discarding the user's style filter instead of
refining within it.

Surface chip counts and the grid now derive from a query-scoped set
(style category + search) over librarySystems; the chip click only
switches surface. An unscoped surfaceTotals count still backs the
"surface is empty" effect guard so it reacts to the catalog, not a
transient filter. The chip row always keeps "all" and the active surface
chip rendered, so a transient search can never hide the active filter.

Re-applied onto the DesignSystemsTab restructure from #2187. Adds 4 tests
covering scoped counts, category preservation on chip click, empty-chip
hiding, and active-chip persistence under a zero-result search.

Fixes #2062

Co-authored-by: DevForgeAI CI/CD Engineer <devforge-ai@development.ai>
2026-05-19 23:42:45 +08:00
..
app [codex] Add pet task center and desktop pet (#1833) 2026-05-19 15:38:39 +08:00
public feat(daemon): add Grok Build (xAI's first-party CLI) as an agent runtime (#2200) 2026-05-19 14:55:28 +08:00
sidecar Enable LAN web dev access (#1947) 2026-05-19 17:50:50 +08:00
src fix(web): scope design-systems surface chip counts to active style filter (#2141) 2026-05-19 23:42:45 +08:00
tests fix(web): scope design-systems surface chip counts to active style filter (#2141) 2026-05-19 23:42:45 +08:00
next-env.d.ts feat(media): port generation workflow onto main (#12) 2026-04-30 22:44:00 +08:00
next.config.ts Enable LAN web dev access (#1947) 2026-05-19 17:50:50 +08:00
package.json refactor desktop host bridge (#2246) 2026-05-19 18:27:05 +08:00
postcss.config.mjs feat(web): Add Tailwind foundation (#1388) 2026-05-12 21:48:16 +08:00
tsconfig.json chore: enforce test directory conventions (#496) 2026-05-05 15:34:22 +08:00
tsconfig.sidecar.json Add mac packaged runtime and beta release flow (#170) 2026-04-30 20:25:49 +08:00
vitest.config.ts test(e2e): gate beta packaged runtime (#637) 2026-05-06 17:44:29 +08:00