Skip to content

feat(build): move the component library from Ladle to Storybook #281

Description

@sydevs-bot

Summary

This repo's component library moves off Ladle onto Storybook 10.6.1 (@storybook/react-vite), and all 50 story files are rebuilt into the goal's layout as they move rather than ported as they are. The library keeps its address, design.sahajatlas.com, and keeps its light, dark and per-brand colour switches. This is large but coherent — one branch, one PR, built in ## Phases, never split: the config, the examples, the descriptions and the Ladle removal are one reviewable change, and a half-moved library publishes nothing.

Goal context

Child 3 of sydevs/SahajCloud#902 — both web component libraries move to Storybook in one shared layout people can browse and Claude can read. This child delivers the Sahaj Atlas half: the reference pages, the offline fixed-date examples, the generated Foundations and rulebook pages, and the one thing the other library has no need for — containment, because this library is built to put exactly one widget on a page. It provides the storybook script name sydevs/SahajCloud#902's agent-connector child starts.

Approach

The containment problem is this repo's alone

This library documents a widget that owns the page. Three singletons say so:

  • src/hooks/use-theme.ts:37 holds one module-level themeRoot, read through getThemeRoot() at :42. BrandTheme's palette paint and every useTheme caller share it.
  • src/lib/overlay.ts holds one frame reference — setFrame() at :51, frameElement() at :65, overlayContainer() at :110. Every portal in the app resolves through it.
  • src/Widget.tsx:454 keeps let owner: AtlasElement | null, enforcing that exactly one <sahaj-atlas> runs, "because a second one would run on instance A's key and steal its theme root, in silence".

Storybook's autodocs page puts every example for a component on one page. The goal's decision (antontcymbal, 2026-10-10; confirmed Ardnived) is that the containment this repo already built for embedding is tried first, and it exists:

  • src/views/MapFrame.tsx:119 — [contain:layout] plus data-sy-frame="" on one div. Its docblock at :19-35 records why: contain: layout makes the element the containing block for every fixed descendant, so "the canvas div, the drawers, and the strips are byte-identical in both modes", with --sy-frame-h and vaul's own container prop as the two load-bearing corrections. :35 carries ⚠ contain: layout belongs here, and NOWHERE up the tree.
  • src/views/story-harness.tsx:133 — height?: 'screen' | 'container', already written for exactly this, with a ⚠ at :120-131 about why screen is wrong inside anything that is not the viewport.

The live hazard this phase settles. .ladle/components.tsx:36 adds WIDGET_SCOPE_CLASS to document.documentElement at module scope, and its own comment at :22-34 explains it has to: <html> is the theme root in this build, and an effect would paint one unstyled frame. On Storybook that same class styles the reference page itself — the settings table, the description, Storybook's own chrome. The obvious fix, a per-story wrapper, collides with themeRoot: two elements would claim it. Settle it with containment — one [contain:layout] frame per example, carrying the scope class, with getThemeRoot() pointed at that frame — and prove the reference page's own chrome is unstyled by it. scripts/postcss-scope-widget.test.ts:302 asserts the class is on <html> for "the two builds with no widget wrapper" and reads .ladle/components.tsx by path; that assertion moves with the file.

A window of its own (docs.story.inline: false) stays a fallback chosen component by component, never for all views at once, and each one is noted on its own page, because an example in its own window can no longer be adjusted there.

Defaults come from tv(), not retyped

react-docgen-typescript cannot see a default that lives in a tailwind-variants recipe, and this repo keeps every one of them there. Measured 2026-10-11: 31 defaultVariants keys across 13 files (src/components/atoms/{Alert,Button,Checkbox,Chip,Drawer,Dropdown,Link,Select,Spinner,ToggleGroup}, src/components/molecules/{ActionRow,EventFacts,ShareContent}; Checkbox.tsx has two tv() blocks). Button.tsx alone carries five — color, variant, size, radius, isIconOnly.

Write the ~15-line helper that lifts a recipe's defaultVariants into argTypes[key].table.defaultValue, and call it from each component's meta. Never retype a default into a story and never add an @default tag: the goal requires the page and the code cannot disagree, and @default is also one of the @ tags that must not leak onto the page as visible text.

Offline and fixed-date

Concern State today Work
Story data already seeded with no server — story-harness.tsx:294-297 seeds the feed, the region tree, the host-client record and the IP guess for every view none
Media 5 picsum.photos references: ImageCarousel.stories.tsx:11,16,21 and src/mocks/events.ts:49,53. No audio, no video in this repo 5 refs onto our own photographs, served from a Storybook-only staticDirs — never public/, which Cloudflare copies into the build output
API one door, src/config/api/client.ts:56 interceptFetch — every fetcher goes through it, BrandTheme's palette fetch included mock it
Turnstile src/hooks/use-turnstile.ts:54 if (window.turnstile) return Promise.resolve() — a stub on window short-circuits the script load stub it, and verify RegistrationForm actually reaches its solved state; the goal records this as unverified
Clock src/mocks/events.ts:20 const now = DateTime.now().setZone(ZONE) runs at import patch Date at the top of .storybook/preview.ts, before any fixture import

A fixed starting point, never a stopped clock. src/lib/shape/event.ts:276 resolves display state from options.now ?? DateTime.now(), and src/hooks/use-event-display.ts:124 buckets Date.now() by the minute on purpose — its comment: "A stable event identity … would otherwise freeze 'Today' and open-versus-closed for as long as a surface stays mounted." A frozen clock freezes exactly that. And src/mocks/events.ts:15-17 records the other half: the weekly class is "four days out, so it is reliably NOT today and the resolver lands on running rather than today" — written-in dates are what once made those two states unreachable. So: one fixed starting date, dates still derived from it, the clock still running.

⚠ There is no Countdown component in this repo. sydevs/SahajCloud#902's notes cite Countdown.tsx:48-49; that is the other library's. The two clock readers above are this repo's equivalents.

Make the patch lazy so the six unit specs that read src/mocks/events.ts keep their own starting point — the goal's decision (2026-10-10) excludes changing what those specs see.

The two Mapbox examples stay as they are, key-gated. src/components/organisms/Mapbox/Mapbox.stories.tsx:19 reads import.meta.env.VITE_MAPBOX_ACCESSTOKEN and shows a needs-a-key notice without one; src/views/CompactEmbedView/CompactEmbedView.stories.tsx:127 defaults map: true, which is the second. Both are named on the exceptions page.

Folder-driven titles need two real folders

Autotitle derives a title from the path, so the two sub-grouped sections need folders that exist. Measured 2026-10-11:

  • title: 'Atoms / Inputs' — 8 files: Checkbox, Combobox, Input, RadioGroup, Select, Slider, Textarea, ToggleGroup. Moving them costs 18 direct-path importers (Select 7, the rest 0–2) plus src/components/atoms/index.ts.
  • title: 'Molecules / List' — 3 files: EventListItem, List, ListItem, plus src/components/molecules/index.ts.

The other 39 land from their existing folders: Atoms 9, Molecules 14, Organisms 6, Views 10. Do the folder moves; the barrels are the public import surface and absorb most of the churn (atoms/index.ts documents that components inside src/components import by direct path, not through the barrel, to avoid cycles — so the 18 are real edits).

Descriptions, and the check that keeps them

A description belongs on the component and on each prop, never on the examples file's default export, which silently replaces the component's own. Baselines measured in this repo on 2026-10-11:

Measured here sydevs/SahajCloud#902's docgen figure
Props in a *Props type 334 369
With a leading JSDoc 153 179
Matching the exempt list 93 96
Undescribed, off the exempt list 110 ~99
Components with no leading JSDoc docgen can read 30 of 50 28 of 50

The two differ because mine is a text scan of *Props members and the goal's is docgen output over the resolved prop set. Record the check's own printed number in the PR body on the day it first runs, and correct this ticket's figure to it — the goal's success line asks for that number, not for an estimate.

The exempt list is exactly the goal's five: className, children, disabled, value, and the on[A-Z]… handlers. Nothing else — aria-label is deliberately not exempt (goal decision, 2026-10-10).

Warn-only needs a real mechanism, because package.json:16 is eslint . --max-warnings 0: a warning fails this repo's gate. Either lint only the files a branch changed, or commit a baseline the check subtracts. Prose alone will not do it.

Generated pages

  • Foundations. Colours are computed at runtime here: src/config/theme/palette.ts:140 buildScale() derives a 12-step ramp from a seed, and :61 DEFAULT_SEEDS holds the three brand roles. The generator runs that computation and the page shows the default brand, so the page cannot drift from the widget. Type and spacing come from the @theme block in src/styles/globals.css — there is no tailwind.config.js. Icons come from the existing usage rule: Icons.usage.test.tsx already pins that an icon earns a row only when non-story code imports it.
  • The tier rulebook and "how to add a component" are generated from rulebook:start / rulebook:end fences in the rule files already here: DESIGN_SYSTEM.md (277 lines, 11 headings) and src/components/AGENTS.md (563 lines, 11 headings). Every one of those 22 headings is marked in or marked deliberately out; a section that is neither fails the check, and a marked section changed without regenerating fails the staleness check. scripts/sync-translations.mjs with src/config/translations.test.ts is the precedent for a generated artefact pinned by a spec.

⚠ Do not create a new file under docs/rules/. A new rule needs a symlink under .claude/rules/, and .claude/ is a protected path no unattended run can write. The fences go in the two files above.

Cutover

Thing Where
Scripts package.json:22-23 — ladle and ladle:build. Keep the assert:maps ../build guarantee, and emit Storybook into build/
CI .github/workflows/ci.yml:44 — - run: pnpm ladle:build # fail the gate on broken component stories, inside job gate
Config .ladle/ (4 files), @ladle/react in package.json:97, eslint.config.js:19
Story helpers src/components/ladle/ — 5 files, 288 lines
Docs STORYBOOK.md (191 lines, opens "Component Storybook with Ladle"), AGENTS.md:65,100,101,107,236,275,276,294,296,404
Prose elsewhere 52 further files outside .ladle/ and .claude/ name Ladle — src/config/responsive.ts:20,169, src/styles/globals.css, scripts/postcss-scope-widget.{mjs,test.ts}, scripts/assert-no-sourcemaps.mjs:37-46,67, scripts/get-cloudflare-preview-url.{mjs,test.ts}, .github/workflows/production-smoke.yml:30, .env:26, docs/{architecture,environment,testing}.md, docs/rules/{code-comments,i18n-and-state}.md, README.md, src/App.tsx, src/lib/{overlay,scope,embed-announce}.ts, src/hooks/use-expansion.tsx, src/views/story-harness.tsx and others

⚠ src/config/responsive.test.ts:47 carries the reason string "a Ladle story is the whole page, so the viewport genuinely is its container" inside a closed list the spec enforces (:91, :150, :158). Edit responsive.ts and that string together, or the spec fails.

⚠ src/components/ladle/SeedSearchParams.tsx is not a frame. It seeds search params onto the decorator's router and is load-bearing — it moves and is renamed, while StorySection.tsx, StoryGrid.tsx and StoryWrapper.tsx are the hand-made framing the goal removes.

public/robots.txt and public/_headers serve both Cloudflare projects today, and robots.txt:1-6 says so explicitly, naming pnpm ladle:build copying public/ into build/; its runbook at :28-31 warns that relaxing the file opens the design site too. Give Storybook its own robots.txt, keep Disallow: / and the link-preview allow group, and keep the X-Robots-Tag and the #91/#106/#148 header behaviour — then check it live after the move, which is what the goal requires and what no local gate can prove.

AGENTS.md gains the instruction that a coding agent looks a component up in the library before using it, and never uses a setting the library does not document.

The writing-rules exception

docs/rules/code-comments.md has canonical:start at :7 and canonical:end at :31. The goal's exception — a description on a component or a setting is allowed when it says what the thing is for or when to use it, and refused when it only repeats the name — goes below :31, in this repo's own "Carve-outs for this repo". Above the fence is synced from claude-workflow, and workflow/lib/comment-rule-sync.mjs must still report ok for all four repos, unchanged.

Interfaces

Consumes

Provides

Siblings (sydevs/SahajCloud#902's five children)

  1. chore(loop): protect Storybook's descriptions, and pin its version claude-workflow#180 — the protection and the version pin.
  2. feat(stories): rebuild the component library in Storybook, drop Ladle WeMeditateWeb#183 — the We Meditate library, filed alongside this one. The two libraries share the layout and the writing rules but do not block each other: the reviewer approves one library at a time (goal decision, 2026-10-09).
  3. This ticket.
  4. The claude-workflow agent connector plus three loop skills — being filed alongside these, so named by role.
  5. docs(components): write do-and-don't guidance for both web libraries SahajCloud#924 — Anton's do-and-don't writing task. It depends on phase 3's two //-to-JSDoc conversions; see ## Notes.

Phases

Ordered, each independently pushable on the one branch.

  1. Storybook config. .storybook/main.ts on exactly loop-config.json → storybook.version: folder-driven autotitle via stories: [{ directory, titlePrefix }] with no title: anywhere, react-docgen-typescript with the propFilter that drops node_modules props (a precondition — 12 DOM-prop intersections here), the Source block at source.type: 'dynamic', addon-a11y, and an empty Proposals section kept out of both the sidebar and the component manifest. Output into build/.

  2. Containment and scope. Settle the .ladle/components.tsx:36 hazard with one [contain:layout] frame per example rather than a per-story wrapper, decide docs.story.inline: false component by component, and note each such component on its own page.

  3. Rebuild the 50 examples into the layout: adjustable example first, one named example per distinct situation, at most six in the sidebar, an all-variants sheet out of the sidebar showing no code, the 8 Default.meta = { width: 'xsmall' } framings and the hand-made sections gone, and ~28–30 new component descriptions.

    Two of those descriptions already exist as prose and only need converting — // line comments, which react-docgen-typescript cannot read, so today's pages would show neither. Use them as the worked examples of the conversion. Verified at c4b6b8a:

    • src/components/atoms/Modal/Modal.tsx:16-19 — "This is deliberately NOT part of the URL-driven drawer stack (src/views/). A modal is ephemeral local state … Reach for the Drawer for anything that IS a navigable place." That is a when-to-use-it description of exactly the kind the writing rules allow.
    • src/components/atoms/Select/Select.tsx:29-33 — "A select built on @radix-ui/react-select … For a type-to-filter picker, with search in the field itself, use the Combobox atom instead."

    ⚠ Converting in place would attach it to the wrong symbol. In both files the // block is a file header that sits above the props type, not the component: Modal.tsx:16-19 precedes export type ModalProps at :45 while the component is export function Modal at :52, and Select.tsx:29-33 precedes export type SelectProps at :34 while the component is export function Select at :53. docgen reads the JSDoc leading the component declaration, so the prose has to move down to :52 and :53 as a /** … */. A JSDoc left on the props type describes nothing the page shows. Keep each file's remaining // header prose where it is — only the component description moves.

  4. Defaults the settings table can show — the tv().defaultVariants helper, 31 keys across 13 files.

  5. Offline and fixed-date — 5 media refs, the Turnstile stub verified to a solved state, the one API door mocked, the clock patched before any fixture import and lazy for the six unit specs, and the two Mapbox exceptions named on a page.

  6. The blocking description check, with the five-name exempt list and a real warn-only mechanism under --max-warnings 0. It prints how many settings still lack a description.

  7. Generated pages — Foundations from buildScale() and the @theme block, and the rulebook plus "how to add a component" from rulebook: fences in DESIGN_SYSTEM.md and src/components/AGENTS.md, with the partition and staleness checks.

  8. Cut over and remove Ladle — scripts, ci.yml:44, .ladle/, src/components/ladle/, the dependency, STORYBOOK.md, the 52 further files, and Storybook's own robots.txt and headers.

  9. The writing-rules exception, below canonical:end in docs/rules/code-comments.md.

Acceptance criteria

Config and layout

  • pnpm storybook serves the library, and pnpm storybook:build writes a whole (non---docs) build into build/.
  • The installed storybook version equals loop-config.json → storybook.version exactly, with no range operator in package.json.
  • No *.stories.tsx file declares a title:. Every component's sidebar position is derived from its folder.
  • The sidebar's top level is exactly: Foundations, Atoms, Molecules, Organisms, Views.
  • src/components/atoms/Inputs/ and src/components/molecules/List/ exist and hold the 8 and 3 components listed above; both tier barrels still export every name they exported on main.
  • A Proposals section exists, is absent from the sidebar unless switched on, and is absent from manifests/components.json.
  • Each example renders an accessibility panel.

Reference pages

  • Each of the 50 components' pages shows: a description that says what it is for rather than repeating its name, an adjustable example first, one named example per distinct situation, and an all-variants sheet.
  • No component lists more than six examples in the sidebar.
  • The all-variants sheet shows no code. Every other example shows its own code with its given settings filled in — including any example in a window of its own.
  • No page shows visible text beginning with @.
  • Opening Button shows a starting value against size, variant and color, and that value is read from Button.tsx's tv() recipe, not restated in a story or an @default tag.
  • No description lives on an examples file's default export.

Containment and switches

  • The light, dark and brand-colour switches change every example on a page, and no example loses its styling when a drawer or menu opens inside it.
  • A view's example is drawn at a sensible size and covers neither the page's prose nor its settings table.
  • The reference page's own chrome — description, settings table, sidebar — is not restyled by the widget's scope class.
  • Every component given a window of its own is named on its own page, with the reason that its settings can no longer be changed there.

Offline and fixed-date

  • With the network off, every example draws fully: no broken image, no spinner that never settles, no error notice. One page names every exception, and the only exceptions are Mapbox and CompactEmbedView's map example.
  • No example loads an image, sound or video from another company's host. grep -rn 'picsum' src/ returns nothing.
  • No example reaches a third-party service: the brand palettes and the forms' spam guard work from shipped files alone.
  • Opening the same example on two different days shows the same dates and times, and the today, running and upcoming examples each still show their own state.
  • The calendar example opens on a month that has classes in it.
  • src/lib/shape/event.ts's resolver still advances with the clock from the fixed starting point — the examples derive their dates and are not given written-in ones.
  • RegistrationForm's example reaches its solved, submitted state with the Turnstile stub.
  • The six unit specs that read src/mocks/events.ts are unchanged and still pass.

The description check

  • Removing the description from one ordinary prop fails the check, and the message names the prop and its file. Removing it from one of className, children, disabled, value or an on[A-Z]… handler does not.
  • A prop React or the DOM defines, which we do not, is never asked for a description.
  • Today's gaps warn rather than fail, and pnpm lint still passes under --max-warnings 0.
  • The check prints the number of settings still lacking a description, and that number is recorded in the PR body and in this ticket.
  • The diff adds no description that only repeats the thing's name.

Generated pages

  • The colours page is produced by running buildScale() over DEFAULT_SEEDS, and two swatches picked from it match the live site.
  • The type and spacing pages are produced from src/styles/globals.css's @theme block.
  • The tier rulebook and "how to add a component" are generated from rulebook: fences in DESIGN_SYSTEM.md and src/components/AGENTS.md, and hold only rules about components.
  • All 22 headings in those two files are marked in or marked deliberately out; a heading that is neither fails the check and the message names it.
  • Changing a fenced section without regenerating fails the check.
  • No new file was added under docs/rules/, and no new symlink under .claude/rules/.

Cutover

  • grep -rni ladle . --exclude-dir=node_modules --exclude-dir=.git returns nothing outside pnpm-lock.yaml and .claude/hooks/unit-test.mjs.
  • @ladle/react is gone from package.json, and .ladle/ and src/components/ladle/ no longer exist. SeedSearchParams's behaviour survives under its new name.
  • package.json has no ladle or ladle:build script, and the new build script still runs assert:maps ../build.
  • .github/workflows/ci.yml runs the Storybook build in place of pnpm ladle:build, and the gate job's name: is byte-identical to main.
  • Storybook's build output carries its own robots.txt with Disallow: / and the link-preview allow group, and the X-Robots-Tag and cache headers the app's public/_headers sets today.
  • public/_redirects, public/_headers and public/robots.txt no longer claim pnpm ladle:build copies them into a second output.
  • STORYBOOK.md describes Storybook, and AGENTS.md tells a coding agent to look a component up in the library before using it and never to use an undocumented setting.
  • docs/rules/code-comments.md carries the writing exception below canonical:end (:31), and every line at or above :31 is byte-identical to main.
  • src/config/responsive.test.ts's closed list still passes, with its reason string rewritten rather than dropped.
  • No ⚠ line, #NNN breadcrumb or cross-repo pointer was deleted by the sweep.
  • The diff touches no file under .claude/.

Verification checklist

Run from a clean checkout of this repo on the branch.

  • pnpm install && .claude/skills/pr-prep/check.sh — the lean gate (pnpm lint && pnpm typecheck && pnpm test:run) passes.
  • .claude/skills/pr-prep/check.sh --full — adds pnpm build and pnpm size; both pass, so neither assert:css nor assert:maps regressed.
  • pnpm storybook — opens the library; the sidebar's top level is Foundations, Atoms, Molecules, Organisms, Views, with 50 components under the four tiers and no Proposals entry.
  • pnpm storybook:build && test -f build/index.html && test -f build/manifests/components.json — exits 0.
  • node -e "const m=require('./build/manifests/components.json');console.log(Object.keys(m).length)" — prints the component count, and grep -ci proposal build/manifests/components.json prints 0.
  • npx storybook --version prints exactly the version in loop-config.json → storybook.version.
  • Open Atoms / Button — its page shows a description, an adjustable first example, named examples, an all-variants sheet with no code, and a settings table whose size, variant and color rows each carry a starting value.
  • Open Atoms / Modal and Atoms / Inputs / Select — each page's description carries the guidance named in phase 3 ("reach for the Drawer…", "use the Combobox atom instead"). If either page shows no description, the JSDoc landed on the props type rather than the component.
  • grep -rn "defaultValue" src/components/atoms/Button/Button.stories.tsx — returns nothing: the value comes from the tv() helper.
  • grep -rn "title:" src/ --include='*.stories.tsx' — returns nothing.
  • grep -rn 'picsum' src/ — returns nothing.
  • Switch the machine's network off, reload pnpm storybook, and open every page: nothing shows a broken image, a never-settling spinner or an error notice, except Organisms / Mapbox and the map: true compact-embed example, both of which show their needs-a-key notice. The exceptions page names exactly those two.
  • On the Views / Event page, flip light → dark → each brand preset: the example re-themes each time, and opening its drawer leaves it styled.
  • On any component page, confirm the settings table and the description are rendered in Storybook's own typography, not the widget's.
  • Open a dated example, note the dates, set the machine's clock a week forward, reload: the dates are unchanged, and the today, running and upcoming examples still differ from one another.
  • Open Organisms / Registration Form, submit it, and confirm the thank-you state appears.
  • Delete the JSDoc from aria-label on one component and run the check: it fails, naming that prop and file. Restore it. Delete the JSDoc from a className prop: the check does not fail. Restore it.
  • Move one component's description from its own file onto the examples file's default export and run the check: it fails.
  • Run the check on main's state and record the printed count of still-undescribed settings. Measured here on 2026-10-11 by a text scan: 110.
  • Add an unmarked ## heading to DESIGN_SYSTEM.md and run the partition check: it fails, naming that heading. Remove it.
  • Edit a rulebook:-fenced section without regenerating and run the staleness check: it fails.
  • grep -rni ladle . --exclude-dir=node_modules --exclude-dir=.git — every remaining hit is in pnpm-lock.yaml or .claude/hooks/unit-test.mjs.
  • git diff --name-only origin/main | grep '^\.claude/' — prints nothing.
  • git diff origin/main -- docs/rules/code-comments.md | grep -E '^[-+]' | head -40 — every change is below line 31.
  • node workflow/lib/comment-rule-sync.mjs .. from a sibling claude-workflow checkout — prints ok for all four repos and All four copies match, and all four load.
  • git diff origin/main | grep -E '^-.*(⚠|#[0-9]{2,3})' — every hit is a line reflowed or rewritten, confirmed one by one against the + side of the same hunk.
  • After the deploy, on the live site: curl -sI https://design.sahajatlas.com/ | grep -i x-robots-tag returns noindex; curl -s https://design.sahajatlas.com/robots.txt returns Disallow: / with the link-preview group; and curl -sI https://design.sahajatlas.com/assets/<a hashed asset> | grep -iE 'cache-control|access-control-allow-origin' matches what the app's public/_headers sets today. A green deploy alone does not prove this — read it.

Notes

Blocked by: sydevs/claude-workflow#180 — the loop's comment sweep deletes a description that restates a name, so the protection and the version pin land first
Blocked by: sydevs/SahajCloud#903 — in each repo this library ticket merges after that repo's sydevs/SahajCloud#903 ticket, because both change the same CI checks and the same preview discovery

The second blocker names the goal, not the real child. sydevs/SahajCloud#903's per-repo children do not exist yet. Whoever rechecks this ticket should narrow that line to this repo's own sydevs/SahajCloud#903 child once it is filed, rather than waiting on the whole goal.

Attended maintainer steps — none of these is an acceptance criterion

1. One protected path, and it is a comment only. .claude/ is never auto-approved: the write is prompted, and an unattended run waits out its lease having written nothing. The only file this ticket would otherwise touch there is .claude/hooks/unit-test.mjs:28-29, whose comment reads "Skip Ladle stories (not covered by the unit lane)". The hook's behaviour is correct unchanged: the test at :30 is /\.stories\.(ts|tsx)$/, an extension match, and Storybook stories keep that suffix — so nothing but the word "Ladle" is stale, and the hand-off is a one-word comment edit a maintainer makes attended. .claude/workflow.json needs nothing from this ticket: it names Ladle nowhere, and its deployTarget at :25 is already owned by #266's last child. One acceptance criterion above asserts the diff touches nothing under .claude/.

2. The required check name. .github/workflows/ci.yml's job id is gate and its display name is Lint, Typecheck & Build — that is the string a branch ruleset requires, and the two other checks are Dependency Review / review and Smoke. Replacing the pnpm ladle:build step at :44 inside that job does not rename the check, so keep the job's name: byte-identical and no ruleset edit is needed. The maintainer's step is to read the ruleset's required-checks list in the same window and confirm Lint, Typecheck & Build is still the name it requires. If a reviewer insists the job be renamed, the ruleset must be edited in the same window or every PR in the repo blocks on a check nobody posts.

3. Hosting is not this ticket's. Moving the design site from Cloudflare Pages to Workers is #279, under #266; publishing previews from GitHub is sydevs/SahajCloud#903. This ticket only stops building Ladle and starts building Storybook. The one attended consequence: the project's build command lives in the Cloudflare dashboard, not in this repo, and it reads pnpm ladle:build today. A maintainer changes it to the new script name at the same time the PR merges, or the published library stays Ladle's last build.

Related

Rejected

  • Dropping the Atoms / Inputs and Molecules / List sub-groups instead of creating the folders. It would satisfy the goal's menu line literally — only tier sections are required — and cost nothing. Rejected because it throws away grouping information 11 components already carry, and the folder move is bounded: 18 direct-path importers and two barrels, measured above.
  • Retyping each tv() default into its story, or into an @default tag. The goal requires the page and the code cannot disagree, and @default is one of the @ tags that must not surface as visible page text.
  • Porting the 50 stories first and rebuilding them later. The We Meditate and Sahaj Atlas components live in Storybook, in one layout Claude can read SahajCloud#902's decision of 2026-10-09 is that they are rebuilt as part of the move, so the menu and the reference pages are right from the first day.
  • Splitting this into a config ticket and a stories ticket. A Storybook config with no rebuilt stories publishes a library worse than today's, and rebuilt stories with no config do not run. Per format-ticket's split rule, a large but coherent ticket stays one ticket and is built in ## Phases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposal

    Fields

    Priority

    Medium

    Hold Until

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions