Add AI Credits management dashboard with source-filtered historical credits#69
Draft
Copilot wants to merge 31 commits into
Draft
Add AI Credits management dashboard with source-filtered historical credits#69Copilot wants to merge 31 commits into
Copilot wants to merge 31 commits into
Conversation
- widgetRuntimeContract.ts: 13 states, all action types, adapter factory pattern - mockBackendClient.ts: interface + mock + production client, createBackendClient factory - adapter.ts: useAiCreditsAdapter hook with full state machine (EIP-712 consent, buyer key gen, Celo payment) - aiCreditsComponents.tsx: all widget-specific components (AiCreditsHero, BuyerKeyPanel, OperatorConsentStep, AmountPicker, CreditsBalance, SetupSnippet, UsageLog, AiCreditsFlowStepper) - AiCreditsWidget.tsx: main widget with GoodWidgetProvider wrapper and state-driven render - integration.ts: manifest with Celo+Base chain IDs and all 13 states - element.ts + register.ts: <ai-credits-widget> web component bridge - index.ts: public exports - Storybook stories: QA + Showcase stories for all 13 states - aiCreditsWidgetStories.tsx: mock state factory and story helpers - Playwright smoke tests: states.spec.ts covering all states - pnpm build passes, pnpm lint passes (0 errors)
…t, vault deposit, on-chain GoodID
… dimmed, pending quieter
…ty and simplicity
… mock backend client
… with error handling
…eposit (transferAndCall) in one tx Co-authored-by: blueogin <43612769+blueogin@users.noreply.github.com>
…larity and maintainability
Co-authored-by: blueogin <43612769+blueogin@users.noreply.github.com>
…nts in ai-credits-widget
…ent and transaction handling
… improve error handling
… and related components
…in ai-credits-widget
…oved setup snippet generation
…ots (13/13 pass) Co-authored-by: blueogin <43612769+blueogin@users.noreply.github.com>
Co-authored-by: blueogin <43612769+blueogin@users.noreply.github.com>
Co-authored-by: blueogin <43612769+blueogin@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add AI Credits management widget for issue #61
Honor draft-plan gate for AI Credits management widget
Jun 26, 2026
Co-authored-by: blueogin <43612769+blueogin@users.noreply.github.com>
…nto copilot/ai-credits-management-widget Co-authored-by: blueogin <43612769+blueogin@users.noreply.github.com>
Co-authored-by: blueogin <43612769+blueogin@users.noreply.github.com>
Co-authored-by: blueogin <43612769+blueogin@users.noreply.github.com>
Copilot
AI
changed the title
Honor draft-plan gate for AI Credits management widget
Add AI Credits management dashboard with source-filtered historical credits
Jun 26, 2026
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 update implements the AI Credits management experience on top of the existing widget flow, consolidating post-purchase controls and account visibility into one coherent screen. It adds the required sections and behavior, including mandatory historical source filtering with
streamCronexcluded by default.Management dashboard surface
+10%/+20%) and explanatory help toggletotal now,estimated monthly stream) andBuy/Add creditaction stubcurrent flow,Update flowaction stub)Historical credits + mandatory source filter
sourceandgdAmountmetadata.deposit | streamUpdate | streamRequest | streamCron.streamCronuntil explicitly enabled.Data shaping and mock backend alignment
QA fixture and smoke coverage alignment