Conversation
3 tasks
Co-authored-by: sirpy <671095+sirpy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix claim toast visibility during on-chain confirmation
chore: add Playwright CI workflow, fix storybook import, and update deploy workflow triggers
Aug 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR bundles CI/workflow improvements with a rollback of the “transaction confirming” toast phase in the citizen-claim flows, aligning the widget with the stated plan to reintroduce a proper mid-flight callback at the SDK level.
Changes:
- Added a Playwright CI workflow to run the demo Playwright suite on PRs and pushes to
main. - Simplified toast/status handling by removing the
confirmingtoast status and removing theonTransactionSubmittedcallback plumbing from the citizen-claim adapter contract and widget UI. - Updated deploy workflow triggers to include shared dependency paths on
pushtomainwhile keeping preview deploy triggers narrowly scoped.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/playwright-demo-tests.yml |
Adds CI job to build and run the demo Playwright suite on PR/push with artifact upload on failure. |
.github/workflows/deploy-ai-credits-web.yml |
Expands push path filters to include shared packages/lockfiles so prod deploys run when dependencies change. |
.github/workflows/deploy-superfluid-campaign-web.yml |
Expands push path filters (including dependent widget paths) so prod deploys run when dependencies change. |
packages/ui/src/components/Toast.tsx |
Removes confirming from the exported toast status type, styling variants, and status icon handling. |
packages/citizen-claim-widget/src/widgetRuntimeContract.ts |
Removes optional transaction-submitted callbacks from exported adapter action types. |
packages/citizen-claim-widget/src/adapter.ts |
Removes the EIP-1193 provider proxy and callback plumbing; updates adapter action implementations accordingly. |
packages/citizen-claim-widget/src/CitizenClaimWidget.tsx |
Removes mid-flight toast updates and updates claim calls to the simplified action signatures. |
Suppressed comments (2)
packages/ui/src/components/Toast.tsx:113
- If you keep
ToastStatusbackwards-compatible with 'confirming', theToastFramevariants also need to accept it; otherwisestatuspassed through fromToastItemComponentwon’t typecheck.
pending: { borderColor: '$primary' },
success: { borderColor: '$success' },
error: { borderColor: '$error' },
info: { borderColor: '$primary' },
packages/ui/src/components/Toast.tsx:165
- If 'confirming' remains a supported (even deprecated)
ToastStatus, the status icon switch should handle it to avoid falling into the default null icon.
switch (status) {
case 'pending':
return <Spinner size="sm" />
case 'success':
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| // --------------------------------------------------------------------------- | ||
|
|
||
| export type ToastStatus = 'pending' | 'confirming' | 'success' | 'error' | 'info' | ||
| export type ToastStatus = 'pending' | 'success' | 'error' | 'info' |
Comment on lines
+71
to
75
| claim: () => Promise<unknown> | ||
| claimOnChain: (chainId: number) => Promise<unknown> | ||
| claimAll: ( | ||
| chainIds: number[], | ||
| onTransactionSubmitted?: (chainId: number) => void, | ||
| ) => Promise<CitizenClaimWidgetChainClaimResult[]> |
Comment on lines
254
to
+255
| try { | ||
| const receipt = await actions.claim(() => | ||
| updateToast(toastId, { | ||
| message: `Claiming on ${singleChainName} — waiting for blockchain confirmation`, | ||
| status: 'confirming', | ||
| duration: 0, | ||
| }), | ||
| ) | ||
| const receipt = await actions.claim() |
Comment on lines
297
to
299
| const claimResults = await actions.claimAll( | ||
| claimPlan.map((entry) => entry.chainId), | ||
| (submittedChainId) => { | ||
| const toastId = toastByChain.get(submittedChainId) | ||
| if (!toastId) return | ||
| const entryChainName = | ||
| chainNameById.get(submittedChainId) ?? getChainDisplayName(submittedChainId) | ||
| updateToast(toastId, { | ||
| message: `Claiming on ${entryChainName} — waiting for blockchain confirmation`, | ||
| status: 'confirming', | ||
| duration: 0, | ||
| }) | ||
| }, | ||
| ) |
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.
Summary
This PR bundles several infrastructure and DX improvements that surfaced during the claim-widget work:
.github/workflows/playwright-demo-tests.ymlworkflow that runs the root Playwright demo suite on every PR and push tomain.useEffect is not definederror in the citizen-claim-widget Storybook helper by adding the missinguseEffectimport.pull_request_targetpath filters fordeploy-ai-credits-webanddeploy-superfluid-campaign-webso preview deploys only fire when the relevant app/widget code changes, while preserving the full set of dependency paths (packages/core/**,packages/ui/**,packages/embed/**,pnpm-lock.yaml,pnpm-workspace.yaml) under thepush: branches: maintrigger so production deploys still run when shared packages change.Scope note
The mid-flight "confirming" toast state for claim transactions (updating toast copy from "sign transaction in your wallet" → "waiting for blockchain confirmation") has been scoped out of this PR. The approach of wrapping the EIP-1193 provider with a proxy was reverted in favour of a proper SDK-level callback. A follow-up PR in GoodDollar/GoodSDKs will add an
onTransactionSubmittedparameter toClaimSDK.claim()(forwarded to the existingsubmitAndWaitonHashhook); GoodWidget will wire it up once that SDK version is published.Test plan
pnpm --filter @goodwidget/ui --filter @goodwidget/citizen-claim-widget build— cleanuseEffect is not defined🤖 Generated with Claude Code