Skip to content

[codex] Add Storybook deeplink visual check workflow#63

Draft
muukii wants to merge 1 commit into
mainfrom
codex/storybook-deeplink-agent-skill
Draft

[codex] Add Storybook deeplink visual check workflow#63
muukii wants to merge 1 commit into
mainfrom
codex/storybook-deeplink-agent-skill

Conversation

@muukii

@muukii muukii commented May 21, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds deep link support for opening specific Storybook pages from a host app URL scheme, then documents the workflow an agent can use to verify UI changes in Simulator.

Changes

  • Adds stable page IDs based on source location (fileID:line) while preserving legacy index-based history lookup.
  • Adds StorybookDeepLink URL generation/parsing for scheme://page?id=<page-stable-id>.
  • Wires Storybook page opening through URL handling and adds deep-link copy affordances on page screens.
  • Registers the demo app's storybook URL scheme through a manual Info.plist.
  • Expands README documentation with host app setup, page ID inference, Simulator opening, UIKit host app guidance, and the agent verification flow.
  • Adds the .agents/skills/swift-storybook-visual-check Codex skill for opening Storybook pages and capturing screenshots during UI validation.

Why

The intended workflow is for an AI agent to implement UI, launch the host app, open the relevant Storybook page directly, and capture a screenshot to verify the rendered result. The page ID can be discovered from a manifest in the future, copied from Storybook, or inferred from a #Preview declaration as <Module>/<File>.swift:<line>.

Validation

  • git diff --cached --check
  • Built and launched SwiftUIDemoApp with XcodeBuildMCP on iPhone 17 Pro simulator, iOS 26.5.
  • Verified storybook://page?id=SwiftUIDemoApp/Component.swift:24 opens the Circle page.
  • During development, also verified a newly added #Preview could be targeted by its inferred fileID:line ID, then removed that temporary preview from the final diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant