Skip to content

[WIP] Add Storybook and Playwright setup for Copilot cloud agent#8

Merged
L03TJ3 merged 22 commits into
mainfrom
copilot/sub-pr-6
May 4, 2026
Merged

[WIP] Add Storybook and Playwright setup for Copilot cloud agent#8
L03TJ3 merged 22 commits into
mainfrom
copilot/sub-pr-6

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 24, 2026

Original PR: #6
Triggering comment (#6 (comment)):

@copilot Goal:
Convert the current route-based demo lab iteration into a Storybook-based demo system for GoodWidget.
Update and make the changes in a new pull-request branched out from copilot/feat-route-based-demo-lab-playwright-setup.

Context:
This PR proved that the repo can support:

  • local browser demo execution
  • Playwright in Copilot cloud agent
  • deterministic widget demos
  • mock wallet/provider setup
  • screenshots, traces, and video artifacts
  • stable selectors for automated validation

Do not treat the existing route-based examples/react-web approach as something that must be preserved.
It was a useful test iteration. The new target is Storybook-first.

GoodWidget needs a demo/docs environment because it is:

  • a component library
  • a design system
  • a widget framework
  • an ecosystem widget platform where integrators can choose protocol features to expose

The environment should let developers and external contributors:

  • browse primitives
  • inspect widgets
  • play with args/controls
  • test token overrides
  • test component theme overrides
  • test host/integrator themeOverrides
  • understand the design-system contract through clear examples
  • use generated docs instead of relying only on README guidance
  • run visual and interaction checks consistently

Task:
Refactor PR #6 toward Storybook.

Implementation direction:

  1. Add Storybook for React + Vite.
  2. Prefer a dedicated Storybook package/location, for example:
    • examples/storybook
      or another clean monorepo package if better.
  3. Move the useful demo concepts from examples/react-web into Storybook stories.
  4. Do not maintain duplicate route-based demo pages.
  5. Keep Playwright/cloud-agent compatibility, but point it at Storybook instead of the route app where practical.

Storybook must support:

  • component stories
  • widget stories
  • args/controls
  • autodocs
  • interaction tests with play functions
  • visual/screenshot testing through Playwright or Storybook-compatible test tooling
  • deterministic mock wallet/provider stories
  • theme/token/brand-kit override exploration

Initial representative stories:

  • Card
  • GlowCard
  • Drawer
  • TokenAmount
  • ClaimWidget
  • Theme override / brand-kit playground

Theme playground requirements:
Create at least one Storybook story or story group where users can switch or experiment with:

  • default GoodWalletV2 preset
  • token overrides
  • component theme overrides
  • host themeOverrides-style runtime overrides

The story/docs copy must clearly explain:

  • token overrides are broad design-system inputs
  • component themes are targeted visual overrides
  • host themeOverrides are runtime integrator overrides
  • named component parts are API-like and should not be exposed accidentally

Playwright/cloud-agent requirements:

  • Update Playwright config so automated tests can target Storybook.
  • Keep screenshots enabled.
  • Keep traces enabled.
  • Keep video-on-failure or equivalent.
  • Ensure tests run in Copilot cloud agent.
  • Update .github/workflows/copilot-setup-steps.yml if needed.
  • Ensure Storybook can run on localhost in the cloud-agent environment.
  • Add or update scripts so an agent can run:
    • install/build
    • start Storybook
    • run Storybook smoke/interaction/visual checks

Suggested scripts:

  • pnpm storybook
  • pnpm build-storybook
  • pnpm test:storybook
  • optionally keep pnpm test:demo only if still meaningful

Repository cleanup:

  • If examples/react-web is no longer the canonical demo surface, update docs to say so.
  • Remove route-demo documentation that no longer applies.
  • Do not leave misleading docs that describe examples/react-web as the canonical demo lab.
  • Reuse mock wallet/provider utilities from PR feat: route-based demo lab + Playwright setup for Copilot cloud agent #6 if useful, but move them to a shared demo/test fixture location so that Storybook can use it.

Documentation requirements:
Update or create docs explaining:

  • Storybook is the canonical GoodWidget demo/docs environment
  • how to run Storybook locally
  • how to run it in Copilot cloud agent
  • how to add a new primitive story
  • how to add a new widget story
  • how to write args/controls
  • how to add theme override examples
  • how to add interaction tests
  • how to generate screenshots/traces/videos
  • expectations for outside contributors adding demos

Acceptance criteria:

  • Storybook runs locally.
  • Storybook builds successfully.
  • Representative stories exist.
  • Autodocs are enabled and visible.
  • Args/controls are useful for at least the representative primitives.
  • Theme/brand-kit override playground exists.
  • ClaimWidget renders in Storybook with deterministic mock wallet/provider state.
  • At least one interaction test exists.
  • Automated tests target Storybook and produce useful artifacts.
  • Copilot cloud-agent setup works with the new Storybook flow.
  • Documentation reflects Storybook as the primary demo system.
  • The previous route-based app is removed.

Validation commands:
Run the relevant commands and report results:

  • pnpm install
  • pnpm build
  • pnpm build-storybook
  • pnpm test:storybook
  • any remaining demo/test commands if kept
  • Run playwright and recreate screenshots.

Important:
This should be a Storybook-first conversion of PR #6, not an additive “support both” setup.
Only document if there is a concrete technical reason that Storybook cannot cover a specific flow and why its not included (yet).

Agent-Logs-Url: https://github.com/GoodDollar/GoodWidget/sessions/672e1324-9e1e-44e5-b66d-b011835e4eed

Co-authored-by: L03TJ3 <6606028+L03TJ3@users.noreply.github.com>
Copilot stopped work on behalf of L03TJ3 due to an error April 24, 2026 10:29
Copilot AI requested a review from L03TJ3 April 24, 2026 10:29
@L03TJ3 L03TJ3 changed the base branch from copilot/feat-route-based-demo-lab-playwright-setup to main April 27, 2026 04:45
@L03TJ3 L03TJ3 changed the title [WIP] Add route-based demo lab and Playwright setup for Copilot cloud agent [WIP] Add Storybook and Playwright setup for Copilot cloud agent Apr 28, 2026
Copilot AI mentioned this pull request Apr 28, 2026
@L03TJ3 L03TJ3 moved this from Ready-For-Assignment to In Review in GoodBounties Apr 29, 2026
@L03TJ3 L03TJ3 marked this pull request as ready for review April 29, 2026 12:28
@L03TJ3 L03TJ3 linked an issue Apr 29, 2026 that may be closed by this pull request
11 tasks
@L03TJ3 L03TJ3 merged commit 82dfa3b into main May 4, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from In Review to Deploy and Verify in GoodBounties May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Deploy and Verify

Development

Successfully merging this pull request may close these issues.

feat: route-based demo lab + Playwright setup for Copilot cloud agent

2 participants