fluentui-react-native / storybook
AGENTS.md1.4k starsChanged 6 months agoMITView on GitHub
These instructions apply to apps/storybook and its descendants. Read agent-map.yaml first for the compact architecture, lookup, and interaction map. Read this file, README.md, package.json, and storybook.config.mts before changing the Storybook application or its native projects. - Generate the platform manifest with yarn storybook manifest --<platform> instead of guessing IDs or searching the sidebar. - Query and run stories through yarn desktop-driver against the listener started by yarn storybook driver --<platform>. - Use screenshots only for visual evidence. Use WebSocket events…
Trending
Quiet since March.about the whole repository
Who's talking about microsoft/fluentui-react-native
- microsoft/rushstack“[rush] Why does many Microsoft open-source projects not use rush.”GitHub · Oct 31, 2021 · 3 reactions
- microsoft/react-native-macos“chore: migrate to changesets”GitHub · Feb 25, 2026 · 1 reactions
- @migueldv90.bsky.social“Microsoft is developing a UI library, but it’s still in Alpha.”Bluesky · Dec 21, 2024 · 1 likes
- microsoft/react-native-macos“docs: add explainer for gotchas with NSView based native components”GitHub · Aug 11, 2023 · 1 reactions
- microsoft/.github“ci: Add 2 bots to CLA policies”GitHub · Mar 5, 2026
The biggest 5 of 24 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 24
Talked about on GitHub and Bluesky (24 times).
On GitHub · 23
- Oct 31, 2021[rush] Why does many Microsoft open-source projects not use rush. — microsoft/rushstack3 reactions · 6 comments
- Feb 25, 2026chore: migrate to changesets — microsoft/react-native-macos1 reaction · 1 comment
- Aug 11, 2023docs: add explainer for gotchas with NSView based native components — microsoft/react-native-macos1 reaction · 1 comment
- Mar 5, 2026ci: Add 2 bots to CLA policies — microsoft/.github0 reactions · 1 comment
- Sep 16, 2025Update Fabric branch to main — chrisglein/artificial-chat0 reactions
18 more on GitHub
- Dec 18, 2024Update to 0.76 — chrisglein/artificial-chat0 reactions
- Apr 24, 2024Add FURN (fluent-ui-react-native) to Gallery — microsoft/react-native-gallery0 reactions · 2 comments
- Aug 11, 2023bug: Cannot install drivers when using workspace:* with yarn 3 — appium/appium0 reactions · 5 comments
- Aug 8, 2023Files are generated under the wrong folder if no `node_modules` folder exists — microsoft/react-native-test-app0 reactions
- May 9, 2023Retarget Community Module's TargetPlatformMinVersion — microsoft/react-native-gallery0 reactions · 1 comment
- May 3, 2023Change the UI library to TUI or another — ZOPH3/WhatsThat_TS0 reactions
- May 2, 2023Move react-native-svg from dependencies to peerDependencies — microsoft/fluentui-system-icons0 reactions · 3 comments
- Apr 3, 2023Add fluent-ui-react-native controls and update various visual styles — chrisglein/artificial-chat0 reactions · 2 comments
- Mar 31, 2023Use fluent-ui-react-native controls — chrisglein/artificial-chat0 reactions · 2 comments
- Dec 31, 2022keyUpEvents/keyDownEvents check `code`, not `key` — microsoft/react-native-windows0 reactions · 8 comments
- Dec 14, 2022Setting the testID on the view does not prevent it from being removed from the view hierarchy — microsoft/react-native-windows0 reactions
- Dec 14, 2022Setting the testID on the view does not prevent it from being removed from the view hierarchy — microsoft/react-native-macos0 reactions · 1 comment
- Nov 15, 2022Remove faulty logic in ScrollView — microsoft/react-native-macos0 reactions · 2 comments
- Oct 31, 2022Aligning Avatar color hash color algorithm with web — microsoft/fluentui-apple0 reactions · 6 comments
- Oct 25, 2022fix(jest-preset): `@office-iss/react-native-win32` needs to be transformed — microsoft/rnx-kit0 reactions
- Oct 14, 2022Pressable unnecessarily re-renders if `disabled` prop is true — react/react-native0 reactions · 4 comments
- Aug 5, 2021Bumping Lage from 0.31.0 to 0.32.0 broke our monorepo's pipeline — microsoft/lage0 reactions · 3 comments
- May 14, 2020Setup E2ETest for React Native Win32/NetUI — microsoft/react-native-windows0 reactions · 4 comments
On Bluesky · 1
- Dec 21, 2024Microsoft is developing a UI library, but it’s still in Alpha. — @migueldv90.bsky.social1 likes and repost
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- packages/agentic/components/AGENTS.mdAGENTS.md
- packages/agentic/components/src/AGENTS.mdAGENTS.md
- packages/agentic/components/src/components/AGENTS.mdAGENTS.md
- packages/agentic/components/src/primitives/AGENTS.mdAGENTS.md
- packages/agentic/desktop-driver/AGENTS.mdAGENTS.md
- packages/deprecated/foundation-compose/AGENTS.mdAGENTS.md
- packages/framework-base/AGENTS.mdAGENTS.md
- packages/framework-base/src/accessibility/AGENTS.mdAGENTS.md
- packages/framework/framework/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- agentic-component-authoringSkill
- agentic-component-contract-authoringSkill
- agentic-component-optimizationSkill
- agentic-storybook-developmentSkill
- fix-security-issuesSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
30 rules. About 0 are common, 8 are distinctive, and 22 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
22
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 5
Read agent-map.yaml first for the compact architecture, lookup, and interaction map.
- Distinctive: line 14
Use screenshots only for visual evidence.
- Very specific: line 15
Treat src/storybook.requires.ts as generated output.
- Very specific: line 17
Keep agent-map.yaml synchronized when stable paths, scripts, services, or interaction contracts change.
- Distinctive: line 25
Use declared scripts rather than invoking Metro, CocoaPods, Xcode, Jest, or TypeScript through guessed commands.
- Very specific: line 26
Run yarn from the repository root only after dependency manifests change or when a declared command fails because a dependency is missing.
- Very specific: line 29
Keep only native command exceptions and ownership-specific smoke settings in storybook.config.mts.
- Very specific: line 38
Use yarn storybook manifest --<platform> to validate static story-plan extraction.
- Very specific: line 40
Use yarn storybook build-driver --<platform> for an isolated native helper build.
- Very specific: line 42
Use yarn storybook driver --<platform> to start Metro, the Storybook channel/MCP listener, and the WebDriver listener under one owned …
- Very specific: line 44
Use the app's yarn desktop-driver script for JSON story-run and agent commands against that listener.
- Very specific: line 52
Run executable tests with yarn storybook test --<platform> and optionally --test <name-glob>.
- Very specific: line 59
Keep storybook-desktop.generated, reports, trees, screenshots, and run manifests ignored.
- Distinctive: line 66
Treat the exact-platform and portable-plan digests as contracts.
- Very specific: line 81
Run yarn storybook prep --macos for project generation and Pod installation.
- Very specific: line 83
Run yarn storybook bundle --macos for the JavaScript bundle, yarn storybook build --macos for a non-launching native build, and yarn …
- Very specific: line 88
Only macos/Podfile is hand-authored.
- Distinctive: line 93
Avoid patching generated pod source.
- Distinctive: line 94
When removing it, reinstall the affected pod and perform a clean build so stale generated source cannot mask the result.
- Very specific: line 105
Use yarn storybook prep --windows, bundle --windows, build --windows, and run --windows for individual stages.
- Very specific: line 109
Keep the Windows story-pattern overrides in storybook.config.mts.
- Distinctive: line 118
Keep generated solutions, packages, registrations, and build outputs uncommitted.
- Very specific: line 129
Run yarn storybook bundle --win32 before yarn storybook run --win32.
- Very specific: line 131
Keep package discovery and platform-specific story inclusion in storybook.config.mts.
- Very specific: line 133
Keep shared Storybook source platform-neutral.
- Distinctive: line 151
Keep macOS and Windows on upstream LiteUI.
- Very specific: line 154
Keep the Win32 story-pattern override in storybook.config.mts.
- Distinctive: line 156
Keep the Win32 window title distinct from the Windows Fabric title so automation never attaches to the wrong endpoint.
- Very specific: line 158
Use yarn storybook smoke --win32 --mode stories for the package-owned bundle, launch, native desktop-chrome checks, full story traversal, …
- Very specific: line 165
Run the smallest command that reproduces the issue first.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agentic Components Storybook development
These instructions apply to apps/storybook and its descendants.
Read agent-map.yaml first for the compact architecture, lookup, and interaction map. Read this file,
README.md, package.json, and storybook.config.mts before changing the Storybook application or its native projects.
Agent-efficient discovery and interaction
- Generate the platform manifest with
yarn storybook manifest --<platform>instead of guessing IDs or searching the sidebar. - Query and run stories through
yarn desktop-driveragainst the listener started byyarn storybook driver --<platform>. - Use screenshots only for visual evidence. Use WebSocket events and accessibility bounds for lookup and interaction.
- Treat
src/storybook.requires.tsas generated output; usestorybook.config.mtsfor story package discovery andsrc/main.tsonly as the shared config adapter. - Keep
agent-map.yamlsynchronized when stable paths, scripts, services, or interaction contracts change. Do not list individual stories there; the runtime index is authoritative.
Command and dependency discipline
- From the repository root, invoke scripts with
yarn workspace @fluentui-react-native/agentic-components-storybook <script>. From this directory, useyarn <script>. - Use declared scripts rather than invoking Metro, CocoaPods, Xcode, Jest, or TypeScript through guessed commands.
- Run
yarnfrom the repository root only after dependency manifests change or when a declared command fails because a dependency is missing. - Preserve unrelated manifest and lockfile edits already present in the worktree.
- Keep only native command exceptions and ownership-specific smoke settings in
storybook.config.mts. Standard macOS and Windows prep, bundle, build, and run commands come from the shared config, derive identity fromapp.json, and route throughrnx-cli. Useyarn storybook <command> --<platform>; do not add platform aliases or app-local lifecycle scripts. app.jsonowns the customstorybook.testIDPrefix. Do not create another app identity file or duplicate the prefix in runtime source.
Desktop Driver workflow
- Use
yarn storybook manifest --<platform>to validate static story-plan extraction. - Use
yarn storybook build-driver --<platform>for an isolated native helper build.prepensures the same verified helper before app preparation. - Use
yarn storybook driver --<platform>to start Metro, the Storybook channel/MCP listener, and the WebDriver listener under one owned supervisor. - Use the app's
yarn desktop-driverscript for JSON story-run and agent commands against that listener. - macOS, Windows, and Win32 use their source-built native helpers. Keep the deterministic fake provider limited to package contract tests.
- Author new tests as component story
wdiofunctions or named function collections, not app-local test scripts. All catalog tests use WDIO; legacyparameters.desktopDriversupport is retained for runner compatibility. The app owns identity, package discovery, platform exclusions, and manifests. - Run executable tests with
yarn storybook test --<platform>and optionally--test <name-glob>. Callbacks receive the target endpoint asplatform; each named case gets an isolated worker/session and fresh preview. Defaults belong instorybook.config.mtsunderwdio; the shared Babel config removes callbacks from native bundles.stories-and-testssmoke mode runs configured callbacks together with static plans, grouped by story. Always navigate to the requested story and await correlated readiness before executing tests. - Keep
storybook-desktop.generated, reports, trees, screenshots, and run manifests ignored. Never patch generated runtime identity or story manifests. - Shared command logs merge stdout/stderr in write order under
artifacts/storybook-commands. Failed commands replay the complete log;--verbosealso replays successful commands. Preserve labeled stderr diagnostics and nested failure causes rather than replacing them with exit-code-only summaries. - Treat the exact-platform and portable-plan digests as contracts. A dynamic or invalid plan must fail generation rather than disappear from the manifest.
- Preserve nonce-authenticated runtime hello/readiness/error messages and native story-root verification; do not fall back to uncorrelated channel events.
macOS native workflow
- In CI, use
.github/actions/setup-desktop-driverto create the job-local cache, build and diagnose the helper, and pin later resolution to the verified artifact. GitHub-hosted runners use an ad hoc signature because changing certificate trust requires interactive authorization, and disable physical clicks because the hosted desktop is not the input qualification environment. Managed self-hosted runners pass a pre-provisioned stable signing identity and leave physical input enabled. - Run
yarn storybook prep --macosfor project generation and Pod installation. Do not run CocoaPods from the repository root because subprocess dependency resolution must start in this workspace. - Run
yarn storybook bundle --macosfor the JavaScript bundle,yarn storybook build --macosfor a non-launching native build, andyarn storybook smoke --macosfor the complete owned lifecycle. - Preserve the shared smoke instance context: its canonical-root hash coordinates the macOS bundle identifier, Storybook port, Metro port, generated runtime polyfill, and exact app shutdown. Do not replace those values with process-name matching or fixed smoke ports.
- Only
macos/Podfileis hand-authored. The workspace, Pods, Podfile.lock, build directory, and DerivedData are generated and ignored;storybook-desktop.generatedandmacos/.storybook-desktopare generated instance state. Never patch or commit these outputs. - Diagnose the first actionable CocoaPods or compiler error before editing configuration. If autolinking claims a listed dependency is missing, verify resolution from this app directory before adding another dependency.
- Avoid patching generated pod source. If a temporary source patch is unavoidable, document its exact version boundary. When removing it, reinstall the affected pod and perform a clean build so stale generated source cannot mask the result.
Windows native workflow
- In CI, use
.github/actions/setup-desktop-driverto run the shared Windows native contract, build and diagnose the helper in a job-local cache, and pin later resolution to the verified artifact beforepreporsmoke. - GitHub-hosted Windows is not the physical-input qualification environment.
Disable keyboard, physical-click, and wheel through
FURN_DESKTOP_DRIVER_DISABLED_INPUT_FEATURES; leave them enabled on the interactive self-hosted runner. - Use
yarn storybook prep --windows,bundle --windows,build --windows, andrun --windowsfor individual stages. Useyarn storybook smoke --windows --mode storiesfor the package-owned generation, channel server, native build and registration, Metro launch, full indexed-story traversal, and ownership-safe cleanup. Use--mode stories-and-teststo run the component-authored desktop-e2e plans after the complete traversal. - Keep the Windows story-pattern overrides in
storybook.config.mts; the current Accordion and Callout Fabric stories still fail-fast the RNW 0.81 host during traversal. - WinAppDriver screenshots are not a reliable capture path for WinAppSDK Composition content. After selecting a story through the Storybook control channel, use the agent host's desktop screenshot tool when visual evidence is required.
- Build logs, automation evidence, visual trees, screenshots, and session manifests belong under ignored
artifacts/windows. - Stable native automation selectors use explicit
testIDprops. Do not select by visible text, layout order, or generated native class name. - Keep generated solutions, packages, registrations, and build outputs uncommitted.
Win32 native workflow
- In CI, use
.github/actions/setup-desktop-driverto build and diagnose thewin32endpoint in a job-local cache and pin later resolution before smoke. The separate Windows Storybook job owns the shared provider's opt-in native contract. - Win32 is the
@office-iss/react-native-win32Paper endpoint hosted by@office-iss/rex-win32; do not treat it as the React Native Windows Fabric endpoint or generate areact-native-test-appproject for it. - Run
yarn storybook bundle --win32beforeyarn storybook run --win32. The bundle is the native dependency source for the prebuilt REX host. - Keep package discovery and platform-specific story inclusion in
storybook.config.mts; keepsrc/main.tsas the shared config adapter. - Keep shared Storybook source platform-neutral. Win32-specific source belongs
in
.win32.tsor.win32.tsxfiles, and Metro platform resolution belongs inmetro.config.js. - REX 0.81.1's V8 cannot parse the Unicode-property regular expressions bundled by the current Storybook release. Keep the shared desktop package's compatibility transform scoped to Win32; remove it when the REX engine supports Unicode property escapes.
- Win32 uses desktop-only chrome in
../../packages/agentic/storybook-desktop-runtime/src/StorybookUI.win32.tsxbecause react-native-win32 omits window dimensions and Storybook's mobile LiteUI drawer crashes the Paper host. Keep its default layout conceptually aligned with desktop LiteUI: persistent resizable Sidebar, story preview, and resizable bottom addon panel. UseWin32CalloutPortalonly for optional pop-outs: native Paper Callout owns the separate window while public Storybook exports supply sidebar and addon content. Do not reintroduce@gorhom/portal, window dimension hooks, or animated mobile drawers. Keep the pop-out toolbar contextual: it is mounted only while the inline Sidebar is hidden. - Keep macOS and Windows on upstream LiteUI. Replacing it with the reduced Win32 chrome would regress addon controls and responsive behavior while increasing local maintenance.
- Keep the Win32 story-pattern override in
storybook.config.mts. It intentionally excludes ListItem and Accordion because their Paper implementations fail-fast crash REX 0.81.1. - Keep the Win32 window title distinct from the Windows Fabric title so automation never attaches to the wrong endpoint.
- Use
yarn storybook smoke --win32 --mode storiesfor the package-owned bundle, launch, native desktop-chrome checks, full story traversal, and cleanup. Use--mode stories-and-teststo run the component-authored desktop-e2e plans afterward. Logs belong under ignoredartifacts/win32. Keepbuild --win32unsupported because the endpoint uses a prebuilt host rather than an app-owned native project.
Validation
Run the smallest command that reproduces the issue first. For native or dependency changes, finish with the relevant
bundle and native build, Storybook format/lint, and the root yarn build when manifests changed. Review generated output
only to diagnose problems; validate persistence from the hand-authored files and declared scripts.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

