Governance widget: onboarding skip banner, showcase/QA split, mocked live flow - #173
Draft
goodbounties-nanoclaw-agent[bot] wants to merge 11 commits into
Conversation
goodbounties-nanoclaw-agent
Bot
force-pushed
the
feat/governance-followup-172
branch
from
August 17, 2026 14:48
42b5e44 to
0df906a
Compare
…ase/QA split, mocked live flow - Add a session-only onboarding skip with a persistent "Sign up and stake" banner; resets on reload or wallet reconnect since it's a view-only choice, not membership state. - Split GovernanceWidgetShowcase (real wallet, real dev-celo contract, no mocks) from GovernanceWidgetQA (deterministic fixtures for screenshots/ automation), and add a self-contained "live mocked-data flow" QA story so a human can drive the real runtime end-to-end in Storybook without a live contract or Playwright. - Add GovernanceWidgetThemeOverrides story and a GovernanceWidget.mdx docs page tying the showcase, theme overrides, and QA stories together. - Extract shared story helpers into stories/helpers/governanceWidgetStories, matching the staking-migration-widget convention. - Restore the RealAdapterMockedRuntime QA story (dropped when GovernanceRuntime.stories.tsx was replaced), which 15 existing Playwright tests depend on, and add coverage for the new mocked-data-flow story. Co-Authored-By: Claude <noreply@anthropic.com> On-Behalf-Of: gdpatchagent[onecli] (yaskkeryodtdijpv)
…ase/QA split, mocked live flow - Add a session-only onboarding skip with a persistent "Sign up and stake" banner; resets on reload or wallet reconnect since it's a view-only choice, not membership state. - Split GovernanceWidgetShowcase (real wallet, real dev-celo contract, no mocks) from GovernanceWidgetQA (deterministic fixtures for screenshots/ automation), and add a self-contained "live mocked-data flow" QA story so a human can drive the real runtime end-to-end in Storybook without a live contract or Playwright. - Add GovernanceWidgetThemeOverrides story and a GovernanceWidget.mdx docs page tying the showcase, theme overrides, and QA stories together. - Extract shared story helpers into stories/helpers/governanceWidgetStories, matching the staking-migration-widget convention. - Restore the RealAdapterMockedRuntime QA story (dropped when GovernanceRuntime.stories.tsx was replaced), which 15 existing Playwright tests depend on, and add coverage for the new mocked-data-flow story. Co-Authored-By: Claude <noreply@anthropic.com> On-Behalf-Of: gdpatchagent[onecli] (yaskkeryodtdijpv)
…ase/QA split, mocked live flow - Add a session-only onboarding skip with a persistent "Sign up and stake" banner; resets on reload or wallet reconnect since it's a view-only choice, not membership state. - Split GovernanceWidgetShowcase (real wallet, real dev-celo contract, no mocks) from GovernanceWidgetQA (deterministic fixtures for screenshots/ automation), and add a self-contained "live mocked-data flow" QA story so a human can drive the real runtime end-to-end in Storybook without a live contract or Playwright. - Add GovernanceWidgetThemeOverrides story and a GovernanceWidget.mdx docs page tying the showcase, theme overrides, and QA stories together. - Extract shared story helpers into stories/helpers/governanceWidgetStories, matching the staking-migration-widget convention. - Restore the RealAdapterMockedRuntime QA story (dropped when GovernanceRuntime.stories.tsx was replaced), which 15 existing Playwright tests depend on, and add coverage for the new mocked-data-flow story. Co-Authored-By: Claude <noreply@anthropic.com> On-Behalf-Of: gdpatchagent[onecli] (yaskkeryodtdijpv)
…ocked live flow - Add a session-only onboarding skip with a persistent "Sign up and stake" banner; resets on reload or wallet reconnect since it's a view-only choice, not membership state. - Split GovernanceWidgetShowcase (real wallet, real dev-celo contract, no mocks) from GovernanceWidgetQA (deterministic fixtures for screenshots/ automation), and add a self-contained "live mocked-data flow" QA story so a human can drive the real runtime end-to-end in Storybook without a live contract or Playwright. - Add GovernanceWidgetThemeOverrides story and a GovernanceWidget.mdx docs page tying the showcase, theme overrides, and QA stories together. - Extract shared story helpers into stories/helpers/governanceWidgetStories, matching the staking-migration-widget convention. - Restore the RealAdapterMockedRuntime QA story (dropped when GovernanceRuntime.stories.tsx was replaced), which 15 existing Playwright tests depend on, and add coverage for the new mocked-data-flow story. Co-Authored-By: Claude <noreply@anthropic.com>
…ase/QA split, mocked live flow - Add a session-only onboarding skip with a persistent "Sign up and stake" banner; resets on reload or wallet reconnect since it's a view-only choice, not membership state. - Split GovernanceWidgetShowcase (real wallet, real dev-celo contract, no mocks) from GovernanceWidgetQA (deterministic fixtures for screenshots/ automation), and add a self-contained "live mocked-data flow" QA story so a human can drive the real runtime end-to-end in Storybook without a live contract or Playwright. - Add GovernanceWidgetThemeOverrides story and a GovernanceWidget.mdx docs page tying the showcase, theme overrides, and QA stories together. - Extract shared story helpers into stories/helpers/governanceWidgetStories, matching the staking-migration-widget convention. - Restore the RealAdapterMockedRuntime QA story (dropped when GovernanceRuntime.stories.tsx was replaced), which 15 existing Playwright tests depend on, and add coverage for the new mocked-data-flow story. Co-Authored-By: Claude <noreply@anthropic.com> On-Behalf-Of: gdpatchagent[onecli] (yaskkeryodtdijpv)
…ase/QA split, mocked live flow - Add a session-only onboarding skip with a persistent "Sign up and stake" banner; resets on reload or wallet reconnect since it's a view-only choice, not membership state. - Split GovernanceWidgetShowcase (real wallet, real dev-celo contract, no mocks) from GovernanceWidgetQA (deterministic fixtures for screenshots/ automation), and add a self-contained "live mocked-data flow" QA story so a human can drive the real runtime end-to-end in Storybook without a live contract or Playwright. - Add GovernanceWidgetThemeOverrides story and a GovernanceWidget.mdx docs page tying the showcase, theme overrides, and QA stories together. - Extract shared story helpers into stories/helpers/governanceWidgetStories, matching the staking-migration-widget convention. - Restore the RealAdapterMockedRuntime QA story (dropped when GovernanceRuntime.stories.tsx was replaced), which 15 existing Playwright tests depend on, and add coverage for the new mocked-data-flow story. Co-Authored-By: Claude <noreply@anthropic.com> On-Behalf-Of: gdpatchagent[onecli] (yaskkeryodtdijpv)
…ase/QA split, mocked live flow - Add a session-only onboarding skip with a persistent "Sign up and stake" banner; resets on reload or wallet reconnect since it's a view-only choice, not membership state. - Split GovernanceWidgetShowcase (real wallet, real dev-celo contract, no mocks) from GovernanceWidgetQA (deterministic fixtures for screenshots/ automation), and add a self-contained "live mocked-data flow" QA story so a human can drive the real runtime end-to-end in Storybook without a live contract or Playwright. - Add GovernanceWidgetThemeOverrides story and a GovernanceWidget.mdx docs page tying the showcase, theme overrides, and QA stories together. - Extract shared story helpers into stories/helpers/governanceWidgetStories, matching the staking-migration-widget convention. - Restore the RealAdapterMockedRuntime QA story (dropped when GovernanceRuntime.stories.tsx was replaced), which 15 existing Playwright tests depend on, and add coverage for the new mocked-data-flow story. Co-Authored-By: Claude <noreply@anthropic.com> On-Behalf-Of: gdpatchagent[onecli] (yaskkeryodtdijpv)
…ase/QA split, mocked live flow - Add a session-only onboarding skip with a persistent "Sign up and stake" banner; resets on reload or wallet reconnect since it's a view-only choice, not membership state. - Split GovernanceWidgetShowcase (real wallet, real dev-celo contract, no mocks) from GovernanceWidgetQA (deterministic fixtures for screenshots/ automation), and add a self-contained "live mocked-data flow" QA story so a human can drive the real runtime end-to-end in Storybook without a live contract or Playwright. - Add GovernanceWidgetThemeOverrides story and a GovernanceWidget.mdx docs page tying the showcase, theme overrides, and QA stories together. - Extract shared story helpers into stories/helpers/governanceWidgetStories, matching the staking-migration-widget convention. - Restore the RealAdapterMockedRuntime QA story (dropped when GovernanceRuntime.stories.tsx was replaced), which 15 existing Playwright tests depend on, and add coverage for the new mocked-data-flow story. Co-Authored-By: Claude <noreply@anthropic.com> On-Behalf-Of: gdpatchagent[onecli] (yaskkeryodtdijpv)
…ase/QA split, mocked live flow - Add a session-only onboarding skip with a persistent "Sign up and stake" banner; resets on reload or wallet reconnect since it's a view-only choice, not membership state. - Split GovernanceWidgetShowcase (real wallet, real dev-celo contract, no mocks) from GovernanceWidgetQA (deterministic fixtures for screenshots/ automation), and add a self-contained "live mocked-data flow" QA story so a human can drive the real runtime end-to-end in Storybook without a live contract or Playwright. - Add GovernanceWidgetThemeOverrides story and a GovernanceWidget.mdx docs page tying the showcase, theme overrides, and QA stories together. - Extract shared story helpers into stories/helpers/governanceWidgetStories, matching the staking-migration-widget convention. - Restore the RealAdapterMockedRuntime QA story (dropped when GovernanceRuntime.stories.tsx was replaced), which 15 existing Playwright tests depend on, and add coverage for the new mocked-data-flow story. Co-Authored-By: Claude <noreply@anthropic.com> On-Behalf-Of: gdpatchagent[onecli] (yaskkeryodtdijpv)
…ase/QA split, mocked live flow - Add a session-only onboarding skip with a persistent "Sign up and stake" banner; resets on reload or wallet reconnect since it's a view-only choice, not membership state. - Split GovernanceWidgetShowcase (real wallet, real dev-celo contract, no mocks) from GovernanceWidgetQA (deterministic fixtures for screenshots/ automation), and add a self-contained "live mocked-data flow" QA story so a human can drive the real runtime end-to-end in Storybook without a live contract or Playwright. - Add GovernanceWidgetThemeOverrides story and a GovernanceWidget.mdx docs page tying the showcase, theme overrides, and QA stories together. - Extract shared story helpers into stories/helpers/governanceWidgetStories, matching the staking-migration-widget convention. - Restore the RealAdapterMockedRuntime QA story (dropped when GovernanceRuntime.stories.tsx was replaced), which 15 existing Playwright tests depend on, and add coverage for the new mocked-data-flow story. Co-Authored-By: Claude <noreply@anthropic.com> On-Behalf-Of: gdpatchagent[onecli] (yaskkeryodtdijpv)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR is a follow-up to #77 on its feature branch, expanding the GovernanceWidget’s Storybook/QA surfaces and adding a session-only onboarding skip UX so the widget can be showcased with a real wallet/contract while still supporting deterministic automation and a self-contained “live mocked” manual flow.
Changes:
- Added a session-only “Skip for now” onboarding path that shows a persistent signup banner and resets on reload or wallet address change.
- Split Storybook coverage into Showcase (real wallet + dev-celo contract) vs QA (deterministic fixtures + a self-contained interactive mocked runtime).
- Added/extended Playwright coverage to exercise the new live mocked-data-flow story end-to-end.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/widgets/governance-widget/runtime.spec.ts | Adds a Playwright test to drive the live mocked-data-flow QA story through registration. |
| packages/governance-widget/src/GovernanceWidget.tsx | Introduces onboarding skip state and a persistent signup banner while onboarding is skipped. |
| examples/storybook/src/stories/helpers/governanceWidgetStories.tsx | Extracts shared GovernanceWidget story helpers (state/dashboard factories + themed playground wrapper). |
| examples/storybook/src/stories/governance-widget/GovernanceWidgetThemeOverrides.stories.tsx | Adds an integrator-facing theme override playground and docs callout for GovernanceWidget theme targets. |
| examples/storybook/src/stories/governance-widget/GovernanceWidgetShowcase.stories.tsx | Adds real-wallet showcase stories targeting the dev-celo GoodDaoHouses contract address. |
| examples/storybook/src/stories/governance-widget/GovernanceWidgetQA.stories.tsx | Reorganizes QA fixtures under a new path and adds a self-contained interactive mocked runtime story. |
| examples/storybook/src/stories/governance-widget/GovernanceWidget.mdx | Adds a GovernanceWidget docs page tying together showcase, theme overrides, and QA entry points. |
| examples/storybook/src/fixtures/governanceRuntimeMock.ts | Extends the governance RPC mock to support interactive “has voted” behavior keyed by voter. |
| examples/storybook/src/fixtures/governanceInteractiveMock.ts | Adds a browser-native interactive environment that mocks RPC + subgraph via window.fetch and provides a mock EIP-1193 provider. |
Suppressed comments (2)
examples/storybook/src/stories/governance-widget/GovernanceWidgetThemeOverrides.stories.tsx:87
- The argTypes descriptions refer to
themes.*.backgroundColor, but for GovernanceWidget those theme tokens arebackground(ImpactCard) andwhite(ImpactCardAction background via$white). This makes the docs misleading and doesn’t match the actual override shape.
impactCardBackground: { control: 'color', description: 'themes.dark_ImpactCard.backgroundColor' },
impactCardActionBackground: {
control: 'color',
description: 'themes.dark_ImpactCardAction.backgroundColor',
},
examples/storybook/src/stories/governance-widget/GovernanceWidgetThemeOverrides.stories.tsx:115
- The “All overridable paths” callout lists
backgroundColorfor GovernanceWidget component themes, but the actual token names arebackground/borderColor/shadowColoretc. Using the wrong token names will send integrators to overrides that don’t take effect.
<strong>dark_GovernanceWrapper / light_GovernanceWrapper</strong>: backgroundColor,
borderColor, color, shadowColor — wired to the controls above (borderColor and
shadowColor only)
</li>
<li>
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up on #77, targeting its feature branch (not main) per request.
Changes
GovernanceWidgetShowcase(real wallet, real GoodDaoHouses contract, no mocks) fromGovernanceWidgetQA(deterministic fixtures for screenshots/automation).createInteractiveGovernanceEnvironment) so a human can drive the realuseGovernanceAdapterruntime end-to-end in Storybook without a live contract or Playwright.GovernanceWidgetThemeOverrides.stories.tsxand aGovernanceWidget.mdxdocs page tying showcase, theme overrides, and QA stories together.stories/helpers/governanceWidgetStories, matching the staking-migration-widget convention.RealAdapterMockedRuntime(dropped whenGovernanceRuntime.stories.tsxwas replaced) which 15 existing Playwright tests depend on, and added a new Playwright test for the mocked-data-flow story.Verification
pnpm --filter @goodwidget/governance-widget buildandlintpass.GOODDAO_HOUSES_ABIincontracts.tsverified directly against the deployed dev-celo contract (0x4Bc3Cdc036f21b68E034C0f1d90775fc3D725735) via liveviemreads — all 9 read functions decode correctly; confirms the existing code comment that FlowSplitter is not yet wired (zero-address result).Co-Authored-By: Claude noreply@anthropic.com