mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
The two UI packages are adapters over different headless primitive libraries: base-ui wraps @base-ui/react, radix-ui wraps @radix-ui/*. They are meant to be alternatives. Every app here had been pulling from both. Each package builds its own React contexts, so a provider from one is invisible to a consumer from the other. insights-docs, pulsar-docs and zen-docs mounted RootProvider and the CSS preset from base-ui but took DocsLayout and the MDX map from radix-ui, so the layout's search trigger read radix's SearchContext default -- enabled:false, setOpenSearch a no-op. SearchTrigger returns null when disabled, so the control was not dead -- it was ABSENT. Measured on a built insights-docs: [data-search] 0 -> 1, the mobile header gaining a 34x34 search button. The keyboard path still worked, because base-ui's SearchProvider was mounted and registers its own keydown listener: Meta+K opened the dialog at base. So the defect was an undiscoverable search with no affordance and no kbd hint (hotKey: []), not a search that could not be reached. apps/docs was consistent in its app code (layout, provider, MDX map, CSS all base-ui) but 28 hand-written MDX pages and the two resolveAlias entries reached for radix Callout, Card, Files and Tabs, which loaded the whole second library alongside the first. Tabs draws ONE frame before this and one after, and the earlier claim that it drew two was wrong. quickstart.mdx already imported base-ui tabs, and base-ui's tabs.tsx already carried the collapse logic -- a file this change does not touch. The alias repoint removes a latent trap for the next upstream sync; it fixes no observed defect. Callout, Card and Files are byte-identical across the two packages, so this moves no pixels. Nothing in apps/ imports docs-ui now, and its dependency entry goes with it. The registry generator still names both -- it publishes both.