Short description of the new GoodWidget
A read-only widget that lists a payer’s AI credit events from the backend: G$ deposits, stream updates, and stream credit accruals. Users filter by event source and funding status, paginate through history, and see whether Base funding succeeded or failed per row.
Separate package from ai-credits-widget (buy) and ai-credits-manage-widget (dashboard). Can be embedded on the same page below management or used standalone.
Which repos and packages the AI should work with
| Repo / package |
Role |
GoodWidget |
New package packages/ai-credits-history-widget |
GoodWidget/packages/ai-credits-widget |
Reuse mockBackendClient / getTransactions, microUsdToCredits, GdCreditEntry types |
GoodWidget/packages/ui, packages/core |
List, filters, wallet address |
antseed-integration (antseed) |
GET /v1/accounts/:account/transactions?status=&limit=&cursor= |
Storybook examples/storybook |
Stories under ai-credits-history/ |
UI implementation reference
AI credit history
Source: [✓ Deposit] [✓ Stream update] [✓ Stream request] [ ] Auto (cron)
Status: [All ▾]
┌─────────────────────────────────────────────────────────┐
│ G$ deposit · Jun 25, 2026 · +0.66 cr · funded ⓘ │
│ Stream update · Jun 24, 2026 · 10 G$/mo ⓘ │
│ Stream credit · Jun 23, 2026 · +0.12 cr · pending ⓘ │
└─────────────────────────────────────────────────────────┘
[ Load more ]
- One compact line per row — do not stack G$, credits, tx hashes, and errors in the list.
- ⓘ on each row — hover (web) or press opens tooltip/popover with full event description.
- Title row only (no outer card required); list can live in one card or flat rows.
- Empty state: “No credit events yet” when filter yields zero rows.
User flows, states and behaviours
Data source
GET /v1/accounts/{payer}/transactions
Response: { account, transactions: GdCreditEntry[], nextCursor? }
Each GdCreditEntry field — use in tooltip / detail popover, not all on the list row:
| Field |
Tooltip / detail |
source |
Event type label |
gdAmountWei |
G$ amount |
principalMicroUsd, bonusMicroUsd, totalCreditMicroUsd |
Credit breakdown |
fundingStatus |
pending | funded | failed |
fundingError |
Full message when failed |
txHash |
Celo tx link or copy |
fundingTxHash |
Base funding tx link or copy |
createdAt |
Full timestamp |
streamUpdateMonth |
Stream month context |
buyerAddress |
Buyer address |
id |
Entry id (optional, for support) |
Source filter (mandatory UI)
Multi-select or checkboxes — always visible. Filter is applied client-side (backend has no source query param today).
source |
Default |
Label |
deposit |
on |
G$ deposit |
streamUpdate |
on |
Stream update |
streamRequest |
on |
Stream credit (manual) |
streamCron |
off |
Stream credit (auto) |
Default set: deposit, streamUpdate, streamRequest — exclude streamCron until user enables “Auto (cron)”.
Changing source filter re-filters loaded rows immediately; optionally refetch from API if status filter changed.
Funding status filter
Dropdown: All | Pending | Funded | Failed
When not “All”, pass ?status= to API on fetch / load-more (pending | funded | failed).
Pagination
- Initial load:
limit=20 (or 25).
- Load more when
nextCursor present; append rows.
- Show loading spinner on fetch; error + retry on failure.
Row presentation (compact list + tooltip)
List row (single line only) — source label, short date, one summary value, funding status chip if relevant, info icon:
| Source |
Row summary (visible) |
deposit |
G$ deposit · {date} · {total credits} cr · {status} |
streamUpdate |
Stream update · {date} · {G$/mo or “updated”} |
streamRequest |
Stream credit · {date} · {total credits} cr · {status} |
streamCron |
Stream credit (auto) · {date} · {total credits} cr · {status} |
Failed rows: show failed chip on the line; do not inline full fundingError text in the list.
Tooltip / popover (full description) — opened from ⓘ on the row (hover on web, tap on mobile). Include all available fields for that entry, e.g.:
- Event type and
createdAt (full)
- G$ amount (
gdAmountWei)
- Principal / bonus / total credits (formatted)
- Funding status; if failed →
fundingError
txHash, fundingTxHash (truncated in tooltip with copy)
streamUpdateMonth, buyerAddress when present
Use monospace for hashes. Tooltip content can be plain structured text or a small stacked block — not a second expanded list row.
Ask first if adding a shared Tooltip / Popover primitive to packages/ui; otherwise use web title, Tamagui popover, or a small local detail panel consistent with bonus-badge info pattern in manage widget.
Widget states
- Wallet disconnected → connect prompt or rely on host wallet.
- Connected, empty history → empty state copy.
- Connected, filters exclude all → “No events match filters”.
- Backend unavailable → error banner + retry.
Create the plan (keep this section in the issue body)
Create the plan
Based on the above description create an execution plan in a new sub-issue and preserve the original issue content unchanged.
Do not execute the plan until given instructions to do so.
Sub-issue requirements:
- Title format:
[DRAFT][PLAN] <what issue is being planned>
- Type:
Task
- Description must start with:
<sub-issue title>
- Link the sub-issue back to this parent issue.
Instructions when creating the plan:
- Map relevant files that are too be used as reference from all repos mentioned
- import existing @GoodDollar packages
- Map new components that should be created. Assess when a new component should be created in the new savings widget package or made part of the reusable packages/ui
Plan specification required sections:
- Required states, flows, and behaviors
- Execution plan
- acceptance criteria
- human-reviewer checklist
Short description of the new GoodWidget
A read-only widget that lists a payer’s AI credit events from the backend: G$ deposits, stream updates, and stream credit accruals. Users filter by event source and funding status, paginate through history, and see whether Base funding succeeded or failed per row.
Separate package from
ai-credits-widget(buy) andai-credits-manage-widget(dashboard). Can be embedded on the same page below management or used standalone.Which repos and packages the AI should work with
GoodWidgetpackages/ai-credits-history-widgetGoodWidget/packages/ai-credits-widgetmockBackendClient/getTransactions,microUsdToCredits,GdCreditEntrytypesGoodWidget/packages/ui,packages/coreantseed-integration(antseed)GET /v1/accounts/:account/transactions?status=&limit=&cursor=examples/storybookai-credits-history/UI implementation reference
User flows, states and behaviours
Data source
GET /v1/accounts/{payer}/transactionsResponse:
{ account, transactions: GdCreditEntry[], nextCursor? }Each
GdCreditEntryfield — use in tooltip / detail popover, not all on the list row:sourcegdAmountWeiprincipalMicroUsd,bonusMicroUsd,totalCreditMicroUsdfundingStatusfundingErrortxHashfundingTxHashcreatedAtstreamUpdateMonthbuyerAddressidSource filter (mandatory UI)
Multi-select or checkboxes — always visible. Filter is applied client-side (backend has no
sourcequery param today).sourcedepositstreamUpdatestreamRequeststreamCronDefault set:
deposit,streamUpdate,streamRequest— excludestreamCronuntil user enables “Auto (cron)”.Changing source filter re-filters loaded rows immediately; optionally refetch from API if status filter changed.
Funding status filter
Dropdown: All | Pending | Funded | Failed
When not “All”, pass
?status=to API on fetch / load-more (pending|funded|failed).Pagination
limit=20(or 25).nextCursorpresent; append rows.Row presentation (compact list + tooltip)
List row (single line only) — source label, short date, one summary value, funding status chip if relevant, info icon:
depositG$ deposit · {date} · {total credits} cr · {status}streamUpdateStream update · {date} · {G$/mo or “updated”}streamRequestStream credit · {date} · {total credits} cr · {status}streamCronStream credit (auto) · {date} · {total credits} cr · {status}Failed rows: show failed chip on the line; do not inline full
fundingErrortext in the list.Tooltip / popover (full description) — opened from ⓘ on the row (hover on web, tap on mobile). Include all available fields for that entry, e.g.:
createdAt(full)gdAmountWei)fundingErrortxHash,fundingTxHash(truncated in tooltip with copy)streamUpdateMonth,buyerAddresswhen presentUse monospace for hashes. Tooltip content can be plain structured text or a small stacked block — not a second expanded list row.
Ask first if adding a shared
Tooltip/Popoverprimitive topackages/ui; otherwise use webtitle, Tamagui popover, or a small local detail panel consistent with bonus-badge info pattern in manage widget.Widget states
Create the plan (keep this section in the issue body)
Create the plan
Based on the above description create an execution plan in a new sub-issue and preserve the original issue content unchanged.
Do not execute the plan until given instructions to do so.
Sub-issue requirements:
[DRAFT][PLAN] <what issue is being planned>Task<sub-issue title>Instructions when creating the plan:
Plan specification required sections: