Repository navigation
fix(codex): tell codex to use require_escalated - #290
Conversation
|
✅ Deploy Preview for storybook-mcp-self-host-example canceled.
|
commit: |
There was a problem hiding this comment.
Pull request overview
Updates the Codex Storybook “stories” skill to better align with how Storybook’s AI CLI should be used in sandboxed Codex environments, including guidance around elevated execution and ensuring the preview browser is visible for verification.
Changes:
- Adds an introductory “source of truth” note emphasizing Storybook CLI AI subcommands and a strict workflow.
- Documents rerunning Storybook CLI commands with
require_escalatedin sandboxed environments. - Updates Step 1/2 instructions to emphasize preview browser visibility and
require_escalatedusage.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #290 +/- ##
==========================================
+ Coverage 79.68% 79.78% +0.09%
==========================================
Files 67 67
Lines 2048 2048
Branches 578 578
==========================================
+ Hits 1632 1634 +2
+ Misses 235 234 -1
+ Partials 181 180 -1 ☔ View full report in Codecov by Harness. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughUpdates ChangesStorybook Skill Instruction Updates
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/codex-plugin/plugins/storybook/skills/stories/SKILL.md`:
- Line 104: The instruction on line 104 is ambiguous because it refers to "the
ai subcommand" without specifying which one. Replace the vague phrasing "Run the
ai subcommand with `require_escalated`" with an explicit reference to the
specific subcommand `get-storybook-story-instructions` so readers know exactly
which subcommand to execute. This clarification ensures the documentation
provides unambiguous guidance on fetching story-writing instructions.
🪄 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: e02945cb-c6bb-4183-b74f-d6dd4402cec4
📒 Files selected for processing (1)
packages/codex-plugin/plugins/storybook/skills/stories/SKILL.md
| - Run `STORYBOOK_FEATURE_AI_CLI=1 npx storybook ai --help` with `require_escalated` to get all available subcommands and options. | ||
| - Save the available subcommands and options in your working memory for reference. | ||
| - Run the ai subcommand to get the story-writing instructions. | ||
| - Run the ai subcommand with `require_escalated` to get the story-writing instructions. |
There was a problem hiding this comment.
Specify the exact subcommand for fetching story-writing instructions.
Line 104 says "Run the ai subcommand with require_escalated" without naming the specific subcommand. Based on Storybook documentation, the tool for fetching story-writing instructions is get-storybook-story-instructions. The instruction should explicitly use this name to avoid ambiguity.
📝 Proposed revision for clarity
- Run the ai subcommand with `require_escalated` to get the story-writing instructions.
+ Run `STORYBOOK_FEATURE_AI_CLI=1 npx storybook ai get-storybook-story-instructions` with `require_escalated` to get the story-writing instructions.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/codex-plugin/plugins/storybook/skills/stories/SKILL.md` at line 104,
The instruction on line 104 is ambiguous because it refers to "the ai
subcommand" without specifying which one. Replace the vague phrasing "Run the ai
subcommand with `require_escalated`" with an explicit reference to the specific
subcommand `get-storybook-story-instructions` so readers know exactly which
subcommand to execute. This clarification ensures the documentation provides
unambiguous guidance on fetching story-writing instructions.
| you MUST NOT report the component change as complete until this workflow has | ||
| finished for every component you touched. A component change without | ||
| matching, verified stories is not a deliverable. | ||
| - In sandboxed Codex environments, run any Storybook CLI command with `require_escalated` (sandbox/network permissions may otherwise prevent localhost access). |
| The Storybook preview MUST be running so the story can be verified. | ||
|
|
||
| Run `STORYBOOK_FEATURE_AI_CLI=1 npx storybook ai --help` subcommand to check for running Storybook instances. If there is a running instance, note its port and open the preview URL in the preview browser. | ||
| Run `STORYBOOK_FEATURE_AI_CLI=1 npx storybook ai --help` subcommand with `require_escalated` to check for running Storybook instances. |
| 2. Wait for the terminal to show which port Storybook is running on and use that port to open the preview URL (e.g. `http://localhost:6006`) in the preview browser. | ||
| 3. Save the port being used by Storybook shown in the terminal in your working memory. USE THIS PORT FOR ANY SUBCOMMAND THAT NEEDS TO KNOW THE PORT (e.g. `preview-stories`). | ||
| 3. Make the preview browser visible to the user. | ||
| 4. Save the port being used by Storybook shown in the terminal in your working memory. USE THIS PORT FOR ANY SUBCOMMAND THAT NEEDS TO KNOW THE PORT (e.g. `preview-stories`). | ||
| 5. Open the preview URL in the preview browser. |
Codex has some quirks we have to handle.
Summary by CodeRabbit
require_escalated) for running Storybook CLI commands.npx storybook ai --helpand generating story-writing instructions.