Date: 2026-06-10
Branch: lowkey-styleguide-and-fixes (continues styleguide-lowkey; based on fix/lowkey-rollout-bugfixes + master merge). One PR carries the styleguide and any component fixes we decide to make as sections get reviewed.
An AI-generated reference doc (__drops/lowkey-components.html) attempted to catalog all
lowkeyui components, but it hand-copies styles and invents class names (lkf-btn-* instead of
the real kp-button-*), and several values are hallucinated (e.g. it claims primary button
hover is stone-800; the real style is hover:bg-sky-950, app/src/app.css:283). Any doc that
copies styles drifts and teaches AI sessions the wrong vocabulary.
app/src/app.css .lowkey/.lowkey-forms
blocks, app/src/ui/*.jsx, app/src/ui/shadcn/*, tailwind.config.js) instead of copying
from any reference doc./styleguide, registered top-level in app/src/routes.jsx, lazy-loaded,
dev-only (import.meta.env.DEV) so it never ships in production builds.app/src/pages-builder/styleguide/ (page + one small Section helper).https://local.kualibuild.com:<4000+index>/styleguide (e.g. :4001 for
container a1). No proxy changes needed — caddy's final catch-all already forwards unmatched
paths to builder-ui, and the dev server serves the SPA for unknown paths.app/src/ui/... / app/src/ui/shadcn/..., or real
kp-* markup inside .lowkey / .lowkey-forms wrappers — never copied CSS;app.css:282 (.lowkey .kp-button-primary), ui/checkbox.jsx.scripts/export-styleguide.mjs. Loads /styleguide in headless Chromium
(Playwright), inlines the compiled stylesheets, and writes a self-contained
lowkey-components.html to __drops/ (path configurable via CLI arg).node scripts/export-styleguide.mjs". Replaces the hallucinated file.CLAUDE.md / AGENTS.md: where the styleguide route is,
what it's for, and that app.css + ui/ are the source of truth for lowkey styles.The 44 sections of the old HTML doc (buttons ×12, inputs, textarea, select, input group, checkbox, radio, label, field view, rich text view, section card, table, badges, chip, tabs, tooltip, popover/menu, modal, side panel, sticky header, action bar, compare-changes popup, spinner, skeleton, alert, toast, banner, avatar, workflow step pill, pulse badge, drag handle, datepicker, document list row).
Before the 1-by-1 build starts, run a systematic sweep for lowkey components that never made it into the HTML doc, and append findings to the inventory:
kp-* class styled under .lowkey / .lowkey-forms in app/src/app.css;app/src/ui/ and app/src/ui/shadcn/ (known so far: toggle,
segmented-control, lookup, info-box, config-box, pop-up, indeterminate-checkbox,
shadcn sheet, sidebar, skeleton, separator, dropdown-menu, popover);lowkey Tailwind variant (lowkey: prefix) and .lowkey-scoped classNames in
JSX, to catch components styled inline rather than via app.css.The styleguide also documents the platform's page-level layout patterns — at minimum the 1-panel, 2-panel, and 3-panel layouts used across builder/runner screens — rendered as scaled-down live examples with the real layout components/classes and source pointers, so new screens start from the right skeleton.
Beyond single components, include common compositions assembled from the real atoms:
The inventory is finalized during the build: each candidate is checked against the codebase; pure hallucinations are dropped, real components missing from the seed are added.
Phase 0 is the discovery sweep above, which finalizes the candidate inventory. Then, for each component, in order, starting with buttons:
app.css rule / ui/*.jsx) and at least one real usage in the
app.https://local.kualibuild.com:4001/styleguide and approves.The snapshot script is built early (after the first 2–3 sections exist) so export stays verified throughout, then re-run at the end.
.lowkey scoping: the page wraps content in .lowkey / .lowkey-forms (and
formbot-gadget / formbot-config wrappers where the cascade requires them — several rules
only match inside those, e.g. .lowkey-forms .formbot-gadget .kp-input).__tests__ suites) asserting the
styleguide page mounts without error, so refactors that break imports fail fast.lowkeyui-redesign-guidelines.mdx beyond a pointer to the new page.