WIP: Demo run of docs-review skill to update Stories docs section#34452
WIP: Demo run of docs-review skill to update Stories docs section#34452
Conversation
|
📝 WalkthroughWalkthroughThis PR restructures Storybook's "writing-stories" documentation with a multi-phase plan, reorganizes sidebar navigation order across twelve pages, trims Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/writing-stories/loaders.mdx (1)
35-42:⚠️ Potential issue | 🟡 MinorClarify loader concurrency semantics to match runtime behavior.
Line 37 currently says all loaders run in parallel, but execution is parallel within each level and sequential across levels (global → component → story). The current phrasing can mislead readers about override behavior.
Suggested patch
-- All loaders run in parallel +- Loaders at the same level run in parallel +- Loader levels run sequentially: global, then component, then story - All results are merged into the `loaded` field in the story context - If there are keys that overlap, "later" loaders take precedence (from lowest to highest):🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/writing-stories/loaders.mdx` around lines 35 - 42, The docs incorrectly state "All loaders run in parallel"; update the text around the `loaders` and `loaded` field to clarify that loaders run in parallel only within each level but are executed sequentially across levels (global → component → story), with results merged into the `loaded` field and later levels overriding earlier ones; also keep that within each level loaders run in the order they are defined (and that within-level parallelism means simultaneous execution of that level's loaders).
🧹 Nitpick comments (2)
docs/writing-stories/mocking-data-and-modules/mocking-modules.mdx (1)
12-16: Consider removing nearby duplicate wording for renderer applicability.This callout is helpful, but the same point is repeated again in Line 38. Keeping one canonical mention would tighten the page.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/writing-stories/mocking-data-and-modules/mocking-modules.mdx` around lines 12 - 16, The Callout component paragraph ("The examples on this page use React, but the mocking techniques apply to all renderers.") is duplicated later (around Line 38); remove or consolidate the duplicate so there is a single canonical mention — either keep the existing Callout text and delete the repeated sentence at Line 38, or replace both with one consolidated Callout to the same effect; update surrounding copy if necessary to avoid changing page meaning.docs/writing-stories/PLAN.md (1)
29-43: Clarify that this ordering table is pre–Phase 4 (or update it to final).Given the new page at order 8, these values now differ from implemented sidebar orders in this PR. A short note here would prevent confusion for future readers.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/writing-stories/PLAN.md` around lines 29 - 43, Update the ordering table in PLAN.md to either mark it explicitly as "pre–Phase 4" or adjust the "New order" numbers to match the final sidebar order; mention the new page play-function.mdx (order 8) and any shifted entries (e.g., typing/typescript.mdx, parameters.mdx, decorators.mdx) so readers won't be confused. Add a one-line clarifying note immediately above or below the table stating "This table shows pre–Phase 4 ordering" (or replace the numbers with the final implemented order), and ensure the note references the table entries like index.mdx, args.mdx, play-function.mdx, and the mocking-data-and-modules/ section so it's clear which pages are affected.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/writing-stories/phase-0.md`:
- Around line 28-49: The unlabeled fenced code block that begins with the list
("1. Opening..." through "5. Next steps...") must be labeled to satisfy
markdownlint MD040; change the opening fence from ``` to ```text (and leave the
closing ``` unchanged) so the block is explicit; target the fenced block
containing the lines starting with "1. Opening (2 sentences)" and ending with
"5. Next steps (replace current inlined summaries)" and update only the opening
backticks to include the "text" language tag.
---
Outside diff comments:
In `@docs/writing-stories/loaders.mdx`:
- Around line 35-42: The docs incorrectly state "All loaders run in parallel";
update the text around the `loaders` and `loaded` field to clarify that loaders
run in parallel only within each level but are executed sequentially across
levels (global → component → story), with results merged into the `loaded` field
and later levels overriding earlier ones; also keep that within each level
loaders run in the order they are defined (and that within-level parallelism
means simultaneous execution of that level's loaders).
---
Nitpick comments:
In `@docs/writing-stories/mocking-data-and-modules/mocking-modules.mdx`:
- Around line 12-16: The Callout component paragraph ("The examples on this page
use React, but the mocking techniques apply to all renderers.") is duplicated
later (around Line 38); remove or consolidate the duplicate so there is a single
canonical mention — either keep the existing Callout text and delete the
repeated sentence at Line 38, or replace both with one consolidated Callout to
the same effect; update surrounding copy if necessary to avoid changing page
meaning.
In `@docs/writing-stories/PLAN.md`:
- Around line 29-43: Update the ordering table in PLAN.md to either mark it
explicitly as "pre–Phase 4" or adjust the "New order" numbers to match the final
sidebar order; mention the new page play-function.mdx (order 8) and any shifted
entries (e.g., typing/typescript.mdx, parameters.mdx, decorators.mdx) so readers
won't be confused. Add a one-line clarifying note immediately above or below the
table stating "This table shows pre–Phase 4 ordering" (or replace the numbers
with the final implemented order), and ensure the note references the table
entries like index.mdx, args.mdx, play-function.mdx, and the
mocking-data-and-modules/ section so it's clear which pages are affected.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 97b1298c-71e2-4413-8a44-fd3bf7caba89
📒 Files selected for processing (18)
docs/writing-stories/PLAN.mddocs/writing-stories/args.mdxdocs/writing-stories/build-pages-with-storybook.mdxdocs/writing-stories/choosing-the-right-api.mdxdocs/writing-stories/decorators.mdxdocs/writing-stories/index.mdxdocs/writing-stories/loaders.mdxdocs/writing-stories/mocking-data-and-modules/index.mdxdocs/writing-stories/mocking-data-and-modules/mocking-modules.mdxdocs/writing-stories/mocking-data-and-modules/mocking-network-requests.mdxdocs/writing-stories/mocking-data-and-modules/mocking-providers.mdxdocs/writing-stories/naming-components-and-hierarchy.mdxdocs/writing-stories/parameters.mdxdocs/writing-stories/phase-0.mddocs/writing-stories/play-function.mdxdocs/writing-stories/stories-for-multiple-components.mdxdocs/writing-stories/tags.mdxdocs/writing-stories/typescript.mdx
| ``` | ||
| 1. Opening (2 sentences) | ||
| - What a story is and why it matters | ||
| - "Args" terminology note (keep existing) | ||
|
|
||
| 2. Where to put stories (keep as-is) | ||
| - File colocation pattern | ||
|
|
||
| 3. Component Story Format (streamlined) | ||
| - What CSF is, link to API reference | ||
| - Meta (default export) — brief explanation + one example | ||
| - Named exports — brief explanation + one example | ||
| - Renaming stories (keep, it's short) | ||
|
|
||
| 4. Writing stories with args (streamlined from "How to write stories") | ||
| - Multiple stories building on each other (Secondary, Tertiary) | ||
| - Reusing args across components (ButtonGroup example) | ||
| - Live editing with Controls (keep videos) | ||
|
|
||
| 5. Next steps (replace current inlined summaries) | ||
| - Links to: args, parameters, decorators, play function, custom rendering, multi-component stories | ||
| ``` |
There was a problem hiding this comment.
Add a language tag to the fenced block to satisfy markdownlint.
Line 28 opens an unlabeled fenced block, which triggers MD040.
Suggested patch
-```
+```text
1. Opening (2 sentences)
- What a story is and why it matters
- "Args" terminology note (keep existing)
@@
5. Next steps (replace current inlined summaries)
- Links to: args, parameters, decorators, play function, custom rendering, multi-component stories
-```
+```📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ``` | |
| 1. Opening (2 sentences) | |
| - What a story is and why it matters | |
| - "Args" terminology note (keep existing) | |
| 2. Where to put stories (keep as-is) | |
| - File colocation pattern | |
| 3. Component Story Format (streamlined) | |
| - What CSF is, link to API reference | |
| - Meta (default export) — brief explanation + one example | |
| - Named exports — brief explanation + one example | |
| - Renaming stories (keep, it's short) | |
| 4. Writing stories with args (streamlined from "How to write stories") | |
| - Multiple stories building on each other (Secondary, Tertiary) | |
| - Reusing args across components (ButtonGroup example) | |
| - Live editing with Controls (keep videos) | |
| 5. Next steps (replace current inlined summaries) | |
| - Links to: args, parameters, decorators, play function, custom rendering, multi-component stories | |
| ``` |
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 28-28: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/writing-stories/phase-0.md` around lines 28 - 49, The unlabeled fenced
code block that begins with the list ("1. Opening..." through "5. Next
steps...") must be labeled to satisfy markdownlint MD040; change the opening
fence from ``` to ```text (and leave the closing ``` unchanged) so the block is
explicit; target the fenced block containing the lines starting with "1. Opening
(2 sentences)" and ending with "5. Next steps (replace current inlined
summaries)" and update only the opening backticks to include the "text" language
tag.
73cf935 to
d82faaa
Compare
Pages still have one primary doc type, but well-structured secondary sections (e.g., a reference table at the end of a task page) are now recognized and evaluated by their own type's criteria instead of being flagged as an antipattern or triggering a split recommendation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs-skill: Extend doc types to support section-level classification
- Ran with updated skill that considers types of sections, not just whole pages
e81f86c to
89965f9
Compare
Note
This is a demo run of the skill introduced in #34451.
Run
#1(using this skill)Prompt
Plan generated
Also viewable here, with formatting.
PLAN.md
Phase 0 strategy result
Also viewable here, with formatting.
phase-0.md
Opening (2 sentences)
Where to put stories (keep as-is)
Component Story Format (streamlined)
Writing stories with args (streamlined from "How to write stories")
Next steps (replace current inlined summaries)
Output summary
Run
#2(using this skill)Prompt
Plan generated
Also viewable here, with formatting.
PLAN-2.md
Output summary