Enforce draft-plan gate for AI Credits Widget issue before implementation#35
Closed
Copilot wants to merge 1 commit into
Closed
Enforce draft-plan gate for AI Credits Widget issue before implementation#35Copilot wants to merge 1 commit into
Copilot wants to merge 1 commit into
Conversation
10 tasks
Copilot
AI
changed the title
[WIP] Add UI implementation for AI Credits Widget
Enforce draft-plan gate for AI Credits Widget issue before implementation
May 19, 2026
Ryjen1
pushed a commit
to Ryjen1/GoodWidget
that referenced
this pull request
Jun 6, 2026
… typed seam Replace the dynamic Function-based loader with a typed lazy import() of @goodsdks/good-reserve (declared as an optionalDependency, since it is not yet published). The seam in sdk.ts mirrors the real PR GoodDollar#35 public surface (GoodReserveSDK / ReserveStats / ReserveTransactionResult), so every adapter call site is type-checked against the actual contract instead of a loose shadow type. - Wire the onHash callback on buy/sell so swap_pending surfaces the submitted tx hash before the receipt resolves; read result.hash. - Scale exitContribution from parts-per-million (/10_000) per the Mento convention, instead of the previous incorrect * 100. - Re-validate the wallet's current chain via a live eth_chainId read before signing, rather than trusting the memoized chain flag. - Guard the empty-input quote effect so it cannot clobber terminal swap states (success/error/pending) back to idle. - Broaden mapReserveError to cover network/timeout/rejection and sanitized revert reasons, matching citizen-claim-widget's coverage. - Add a deterministic fake SDK + EIP-1193 test provider and an injection seam, plus a LiveFakeSdk story and a Playwright test that drives the full real adapter flow (quote -> confirm -> buy -> success with tx hash) with no published SDK and no live RPC. The harness clears the injected fake on unmount. All 17 widget Playwright tests pass; build and lint clean.
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.
This issue is a planning artifact (
[DRAFT][PLAN]) for the AI Credits Widget, not an execution ticket. The required states/flows are already captured in the issue body; implementation should start only after draft removal per repository workflow.Scope handled
Workflow correction applied
[DRAFT][PLAN]to an executable plan state before coding.Net repository impact
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
storybook.js.org/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/GoodWidget/GoodWidget/examples/storybook/node_modules/.bin/../storybook/bin/index.cjs dev -p 6006(dns block)If you need me to access, download, or install something from one of these locations, you can either: