Skip to content

feat(bridging-widget): implement GoodWidget bridging widget (#243) - #251

Open
goodbounties-nanoclaw-agent[bot] wants to merge 82 commits into
mainfrom
feat/gw243-bridging-widget
Open

goodbounties-nanoclaw-agent[bot] wants to merge 82 commits into
mainfrom
feat/gw243-bridging-widget

Conversation

@goodbounties-nanoclaw-agent

Copy link
Copy Markdown
Contributor

Implements the approved execution plan from #244 for #243: a new @goodwidget/bridging-widget package wrapping @goodsdks/bridging-sdk, covering wallet gate → chain/protocol selection → amount entry/fee quote → review → confirm/submit → history → FAQ, plus Storybook QA fixtures and a Playwright spec with baseline screenshots per repo convention.

What's included

  • packages/bridging-widget: adapter hook (useBridgingAdapter) + presentational components for all widget states (loading, error, below-min-amount, insufficient-balance, needs-approval, ready-to-bridge, review, submission steps, history, FAQ).
  • examples/storybook: QA/BridgingWidget/Runtime Fixtures stories exercising every adapter state via local fixtures, plus a custodial-local and injected-wallet live story.
  • tests/widgets/bridging-widget/states.spec.ts + baseline screenshots (bw-01 … bw-26), run against the fixtures above.

Manual QA performed

  • pnpm --filter @goodwidget/bridging-widget build — clean (tsup ESM/CJS/DTS; this is the package's real type-check gate, since tsconfig.json isn't meant for standalone tsc --noEmit).
  • pnpm --filter @goodwidget/bridging-widget lint — clean.
  • pnpm --filter @goodwidget/storybook build-storybook — clean, widget fixtures bundled.
  • pnpm exec tsc --noEmit -p tsconfig.json in examples/storybook — 3 pre-existing errors surfaced (DataTable.stories.tsx x2, GoodReserveWidget.stories.tsx, a Tamagui vendor type) — confirmed via git diff --stat origin/main..HEAD to be untouched by this branch, not introduced here.
  • pnpm exec playwright test tests/widgets/bridging-widget/states.spec.ts — 18/18 passed against a live Storybook server.

Notes for reviewers

  1. Pre-existing Input component typing gap — surfaced while wiring AmountEntry; not fixed here as it's out of this widget's scope, flagging for a follow-up.
  2. @goodsdks/bridging-sdk v1.0.6 gap-resolution status — the plan's Risks section called out gaps against the SDK version pinned at plan time; confirm current pnpm-lock.yaml pin still matches what was validated during planning.
  3. @goodsdks/react-hooks absence — the plan referenced this package as a possible dependency; it isn't present in the monorepo, so the adapter hook talks to @goodsdks/bridging-sdk directly instead.
  4. FAQ content source — used faqBridgeCopy (not faqMpbBridgeCopy) for FaqTab; flagging the choice explicitly since both exist in the content package.
  5. Storybook SDK re-export boundary — @goodwidget/bridging-widget re-exports BridgeConfig/BridgeFeeQuote/BridgeProtocol/BridgeRequirement/BridgeTransaction from @goodsdks/bridging-sdk so Storybook fixtures can build adapter state without a direct SDK dependency — same pattern used elsewhere in the repo.
  6. Playwright screenshot artifact (bw-13…bw-18) — fullPage: true captures of the Review/Confirm/Submission modals show a cosmetic "ghosting" duplication from Playwright's screenshot-stitching when a position: fixed overlay spans multiple viewport segments. Confirmed identical in freshly-regenerated captures vs. the committed baselines — a known Playwright capture quirk, not a widget rendering bug, so no code change was made for it.

Acceptance criteria

  • All wallet/chain/route/amount/quote/review/submit/history/FAQ states implemented per plan.
  • Storybook QA fixtures cover every adapter state.
  • Playwright spec + baseline screenshots committed per repo convention.
  • Package builds, lints, and typechecks (via its real build-time DTS gate) clean.

examples/storybook/package.json

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
examples/storybook/src/stories/bridging-widget/BridgingWidgetQA.stories.tsx

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
examples/storybook/src/stories/helpers/bridgingWidgetStories.tsx

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…, route/protocol selection

packages/bridging-widget/package.json

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…, route/protocol selection

packages/bridging-widget/src/BridgingWidget.tsx

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…, route/protocol selection

packages/bridging-widget/src/adapter.ts

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…, route/protocol selection

packages/bridging-widget/src/adapter/bridgeRoutes.ts

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…t Bridge tab

packages/bridging-widget/src/adapter/bridgingClient.ts

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…, route/protocol selection

packages/bridging-widget/src/adapter/chains.ts

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…t Bridge tab

packages/bridging-widget/src/adapter/errors.ts

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…steps 5+6)

packages/bridging-widget/src/adapter/submissionSteps.ts

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…t Bridge tab

packages/bridging-widget/src/adapter/useBridgeConfig.ts

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…(step 7)

packages/bridging-widget/src/adapter/useBridgeHistory.ts

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…t Bridge tab

packages/bridging-widget/src/adapter/useBridgeQuote.ts

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…steps 5+6)

packages/bridging-widget/src/adapter/useBridgeSubmission.ts

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…t Bridge tab

packages/bridging-widget/src/amount.ts

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…t Bridge tab

packages/bridging-widget/src/components/AmountEntry.tsx

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…steps 5+6)

packages/bridging-widget/src/components/BridgeConfirmModal.tsx

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…(step 7)

packages/bridging-widget/src/components/BridgeHistoryDetailModal.tsx

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…, route/protocol selection

packages/bridging-widget/src/components/BridgeTab.tsx

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…, route/protocol selection

packages/bridging-widget/src/components/BridgingWidgetView.tsx

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…, route/protocol selection

packages/bridging-widget/src/components/FaqTab.tsx

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…t Bridge tab

packages/bridging-widget/src/components/FeeBreakdown.tsx

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…, route/protocol selection

packages/bridging-widget/src/components/HistoryTab.tsx

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…steps 5+6)

packages/bridging-widget/src/components/ReviewScreen.tsx

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…, route/protocol selection

packages/bridging-widget/src/components/WalletGate.tsx

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…, route/protocol selection

packages/bridging-widget/src/components/shared.tsx

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…, route/protocol selection

packages/bridging-widget/src/element.ts

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
packages/bridging-widget/src/faqContent.ts

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…, route/protocol selection

packages/bridging-widget/src/index.ts

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…per-entry failure handling, polling, partial-fetch UI)

Trims PR #251 round-1 to the 4 approved History-side fixes:
- group history entries by bridge+source chain+id (ids are only unique per chain)
- Promise.allSettled per entry so one failed delivery-status lookup doesn't blank the whole list
- poll while any entry is pending, refresh on submission completion
- surface partial-fetch failures in the History tab UI with a Retry/Refresh affordance

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
…per-entry failure handling, polling, partial-fetch UI)

Trims PR #251 round-1 to the 4 approved History-side fixes:
- group history entries by bridge+source chain+id (ids are only unique per chain)
- Promise.allSettled per entry so one failed delivery-status lookup doesn't blank the whole list
- poll while any entry is pending, refresh on submission completion
- surface partial-fetch failures in the History tab UI with a Retry/Refresh affordance

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)

This branch was successfully deployed

5 active deployments
preview-superfluid-campaign — cf77f380 Deployed Oct 28, 2026 by L03TJ3 via preview #249
preview-gooddata — cf77f380 Deployed Oct 28, 2026 by L03TJ3 via gooddata-web-preview #141
preview-ai-credits — cf77f380 Deployed Oct 28, 2026 by L03TJ3 via preview #422
preview-storybook — cf77f380 Deployed Oct 28, 2026 by L03TJ3 via preview #496
internal — cf77f380 Deployed Oct 28, 2026 by L03TJ3 via authorize-preview #249
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants