Skip to content

fix(streaming-widget): register light/dark surface sub-themes, use WidgetTabs header, and gate off-Base SUP reserve (#255, #263) - #291

Open
cyzcz wants to merge 1 commit into
GoodDollar:mainfrom
cyzcz:fix/streaming-widget-light-theme-and-qa-255
Open

cyzcz wants to merge 1 commit into
GoodDollar:mainfrom
cyzcz:fix/streaming-widget-light-theme-and-qa-255

Conversation

@cyzcz

@cyzcz cyzcz commented Nov 7, 2026

Copy link
Copy Markdown

Summary

Completes the remaining light/dark surface registration and QA sweep follow-ups for @goodwidget/streaming-widget (#255, #263, #36, #254).

Closes #255

Changes

  1. Registered light_* and dark_* component sub-themes (packages/streaming-widget/src/config.ts):
    • Added streamingWidgetConfig, streamingSurfaceTheme, and createStreamingWidgetConfig(config) registering both light_* and dark_* themes for all 6 Card-derived surfaces (StreamRow, PoolRow, BalanceCard, EmptyStateCard, ErrorStateCard, SetStreamFormCard).
    • Wired createStreamingWidgetConfig(config) into StreamingWidget and StreamingWidgetPreview, and spread extends: 'Card' + ...streamingSurfaceTheme in components/shared.tsx.
  2. Header & Chain Badge Alignment (packages/streaming-widget/src/components/StreamingWidgetView.tsx):
    • Added backgroundColor="$background" to the root YStack container and delegated the GoodDollar header + chain display name badge (getChainDisplayName(chainId)) to <WidgetTabs chainId={state.chainId ?? undefined} />, fixing the exploratory QA finding where raw "Chain 1" was shown instead of the network name.
  3. Off-Base SUP Reserve Indicator (packages/streaming-widget/src/components/BalancesTab.tsx):

Verification

  • pnpm --filter @goodwidget/ui --filter @goodwidget/core --filter @goodwidget/embed --filter @goodwidget/streaming-widget build (ESM, CJS, DTS passing)
  • pnpm --filter @goodwidget/streaming-widget lint (0 errors, 0 warnings)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Named surface themes ignore effective token overrides, and whole-card opacity reduces small-text contrast below the required 4.5:1 ratio.

2 open issues
What changed in this PR

Addresses streaming-widget theme and UI follow-ups from #255 and #263 by registering named card surfaces, adopting the shared header, and clarifying off-Base SUP reserve availability.

Changes:

  • Registers light/dark themes for six card-derived surfaces and wires configuration into both widget entry points.
  • Uses WidgetTabs for the shared header and network display.
  • Adds off-Base reserve guidance and corresponding test assertions while retaining read-only data.
File Description
tests/​widgets/​streaming-widget/​states.spec.ts Asserts off-Base badge and guidance text.
packages/​streaming-widget/​src/​StreamingWidget.tsx Applies widget configuration to runtime and preview providers.
packages/​streaming-widget/​src/​index.ts Exports widget configuration helpers and defaults.
packages/​streaming-widget/​src/​config.ts Defines light/dark surface themes and configuration merging.
packages/​streaming-widget/​src/​components/​StreamingWidgetView.tsx Uses the shared header and themed root background.
packages/​streaming-widget/​src/​components/​shared.tsx Connects named cards to shared surface styling.
packages/​streaming-widget/​src/​components/​BalancesTab.tsx Adds off-Base reserve messaging, dimming, and spinner gating.

Review effort: Balanced

</BalanceCard>

<BalanceCard>
<BalanceCard opacity={isBaseChain ? 1 : 0.75}>
Comment thread packages/streaming-widget/src/config.ts Outdated
import type { GoodWidgetConfig } from '@goodwidget/core'
import { defaultTokenPreset, mergeOverrideMaps } from '@goodwidget/ui'

const color = defaultTokenPreset.tokens.color
…dgetTabs header, and gate off-Base SUP reserve (GoodDollar#255, GoodDollar#263)

Co-authored-by: Cursor <cursoragent@cursor.com>

This branch is waiting to be deployed

1 waiting (outdated) deployment
external — 05ab7117 Waiting Nov 7, 2026 by cyzcz via authorize-preview #561
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.

[GoodBounty-Patch] Streaming widget: light-theme parity and UI structure alignment

2 participants