Storybook story conventions for renderer components. A repository rule for apps/ui/src/renderer/**/*.stories.tsx, apps/ui/.storybook/**; read it before editing a file there.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Rule Renderer Stories?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/geniro-io-rule-renderer-stories)
---
name: rule-renderer-stories
description: "Storybook story conventions for renderer components. A repository rule for apps/ui/src/renderer/**/*.stories.tsx, apps/ui/.storybook/**; read it before editing a file there."
---
<!-- GENERATED by scripts/sync-agent-rules.mjs from .claude/rules/renderer-stories.md. DO NOT EDIT: edit the source, then run `pnpm sync:agent-rules`. -->
# Component stories
- `components/catalog-coverage.spec.ts` fails when a component has no story, a story outlives its component, or either is filed outside its namespace (`Primitives/` for `components/ui/`, `Components/` for `components/`, `Foundations/` for `components/foundations/`, the colour, surface, type, size, radius and motion demos).
- A shared component's main story shows every state of the design-system sheet (`docs/redesign/shots/step-13/`) in both themes at once: `ThemePair` from `renderer/__stories__/sheet.tsx`, its states laid out with `StateGrid`, and `PhoneWidth` where the phone draws it differently. Hover, press and focus are held with `data-preview="hover|active|focus"` on the control (`is-hover:`, `is-active:`, `focus-outline`, `focus-field` match it). A surface portalled to the body (a dialog, a bottom sheet) follows the toolbar's theme instead, and its story says so.
- `renderer/__stories__/` holds catalog-only helpers: Tailwind scans it for the catalog (`.storybook/catalog.css`) and never for the app (`global.css`).
- Run the catalog with `pnpm storybook`. It is dev-only and never packaged.
- A story with open/close state drives it from a stateful wrapper in `render`, or opens by default — never only "closed".
- A story that opens a modal gives its wrapper a height: `decorators: [(story) => <div className="h-[420px]">{story()}</div>]`. `parameters.docs.story.inline = false` does not fix it.
- `.storybook/catalog.css` re-enables document scrolling that `global.css` clips for the Electron shell; keep it, and override anything else the app's base layer does to the document.
- `renderer/__fixtures__/preload-stub.ts` is the one `window.geniro` double: it answers empty state, and populated data comes through props. Specs pass `overrides` to it.
- The stub is typed as `GeniroApi`; never reach `window.geniro` through `as unknown as Partial<GeniroApi>`.