Open
Move DefaultAppKitProvider into @goodwidget/embed and expose as subpath export#83
DefaultAppKitProvider into @goodwidget/embed and expose as subpath export#83Conversation
Co-authored-by: sirpy <671095+sirpy@users.noreply.github.com>
Co-authored-by: sirpy <671095+sirpy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add default reown appkit provider with environment variable support
feat(ai-credits-web): add default Reown AppKit provider and wire ai-credits app to it
Jul 15, 2026
Co-authored-by: sirpy <671095+sirpy@users.noreply.github.com>
Co-authored-by: sirpy <671095+sirpy@users.noreply.github.com>
Copilot
AI
changed the title
feat(ai-credits-web): add default Reown AppKit provider and wire ai-credits app to it
Move Jul 15, 2026
DefaultAppKitProvider into @goodwidget/embed and expose as subpath export
Contributor
There was a problem hiding this comment.
Pull request overview
This PR relocates DefaultAppKitProvider into @goodwidget/embed and exposes it via a new @goodwidget/embed/appkit-provider subpath export, then updates Ai Credits consumers (web app + Storybook + Playwright) to use the shared embedding-layer provider wiring.
Changes:
- Added
@goodwidget/embed/appkit-providersubpath export (plus tsup entry + packageexports) and re-exportedDefaultAppKitProviderfrom@goodwidget/embed. - Introduced an optional
connectOverridehook-up from widget props →GoodWidgetProvider→ connect logic to support AppKit modal-driven connect flows. - Updated Ai Credits Storybook stories and Playwright state tests to cover AppKit “connect wallet” behavior (including a “no config” fallback path).
Reviewed changes
Copilot reviewed 17 out of 117 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/widgets/ai-credits-widget/states.spec.ts | Adds new Playwright states/tests for AppKit provider/connect flows and screenshots. |
| packages/embed/tsup.config.ts | Emits an additional build entry for the new subpath export. |
| packages/embed/src/index.ts | Re-exports DefaultAppKitProvider at the package root. |
| packages/embed/src/importMeta.d.ts | Adds embed-local ImportMetaEnv typing for VITE_REOWN_PROJECT_ID. |
| packages/embed/src/DefaultAppKitProvider.tsx | New shared AppKit provider component (moved from app). |
| packages/embed/src/appkitProvider.ts | New subpath module re-exporting provider + AppKit hooks/helpers. |
| packages/embed/package.json | Adds subpath export map and new AppKit/Wagmi-related dependencies. |
| packages/core/src/types.ts | Adds connectOverride to GoodWidgetProviderProps. |
| packages/core/src/provider.tsx | Uses connectOverride to customize connect behavior. |
| packages/ai-credits-widget/src/widgetRuntimeContract.ts | Adds connectOverride to widget runtime contract. |
| packages/ai-credits-widget/src/AiCreditsWidget.tsx | Threads connectOverride through to GoodWidgetProvider. |
| packages/ai-credits-widget/src/adapter.ts | Improves connect cancellation handling; formatting/refactors. |
| examples/storybook/src/stories/helpers/aiCreditsWidgetStories.tsx | Adds AppKit story wiring using shared embed provider. |
| examples/storybook/src/stories/ai-credits-widget/AiCreditsWidgetShowcase.stories.tsx | Adds WalletConnect/AppKit story to showcase. |
| examples/storybook/src/stories/ai-credits-widget/AiCreditsWidgetQA.stories.tsx | Adds QA play interaction to open the AppKit modal. |
| examples/storybook/src/globals.d.ts | Adds Storybook env typings for Ai Credits + AppKit vars. |
| examples/storybook/package.json | Adds @goodwidget/embed dependency for Storybook usage. |
| apps/ai-credits-web/src/globals.d.ts | Adds VITE_REOWN_PROJECT_ID typing. |
| apps/ai-credits-web/src/App.tsx | Migrates app to AppKit-based connect flow via embed provider + connectOverride. |
| apps/ai-credits-web/package.json | Adds @goodwidget/embed and AppKit dependency wiring. |
blueogin
requested changes
Jul 15, 2026
Contributor
|
@copilot |
Contributor
|
@blueogin we need to provide the reown project id, copilot cannot provide one for us afaik. |
…ect ID, add no-config fallback, fix comment Co-authored-by: blueogin <43612769+blueogin@users.noreply.github.com>
Contributor
Author
All review comments addressed in commit
|
blueogin
approved these changes
Jul 15, 2026
L03TJ3
marked this pull request as ready for review
July 15, 2026 16:22
sirpy
approved these changes
Jul 16, 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.
DefaultAppKitProviderlived in the ai-credits app, but is also consumed by Storybook runtime fixtures. This PR relocates it topackages/embedso provider wiring is owned by the embedding layer and reused through a package export.Provider ownership and location
DefaultAppKitProviderfromapps/ai-credits-webtopackages/embed/src/DefaultAppKitProvider.tsx.ImportMetaEnvtyping forVITE_REOWN_PROJECT_ID.Public API surface
@goodwidget/embed/appkit-providersubpath export (src/appkitProvider.ts+ packageexports).packages/embed/src/index.ts.Consumer updates
@goodwidget/embed/appkit-provider.@goodwidget/embedand@reown/appkitin affected package manifests.