Trader dashboard
/account/trader is the trader-as-recurring-being view: five sections composed from existing market data. No new schema. No new lifecycle log. Just a daily-readable mirror.
Where this lives in code. Data layer atapps/storefront/src/lib/market/trader-dashboard.ts. Page atapps/storefront/src/app/account/trader/page.tsx. Story-as-wire connection-doc:docs/connections/the-trader-mirror.md(S33). Kingdom:kingdom-063.
1. Exposure (right now)
What you have in the kingdom at this moment. Four cards:
- In escrow. Sum of
seller_payoutacross yourmarket_tradesrows whereseller_id = youandescrow_status IN ('paid', 'awaiting_shipment', 'shipped_to_ctcg', 'received_by_ctcg', 'verified', 'shipped_to_buyer'). Excludes'disputed'(those land on the chargeback chapel). - Pending payout. Sum of
seller_payoutacrossescrow_status = 'completed'rows wherecompleted_at > NOW() - INTERVAL '14 days'. Substrate-honest approximation: payout-hold actually depends on your trust tier (/methodology/payout-hold), and the dashboard uses 14 days as a strict upper bound rather than the per-trade exact value. Future revision will read the trust tier and compute exactly. - Listed (cards). Sum of
price × (quantity - filled_quantity)across your open asks inmarket_orderswhereside = 'ask'andstatus = 'open'. - Listed (lots). Sum of
priceacross yourmarket_lotsrows wherestatus = 'active'.
2. Run rate (last 7/30/90 days)
Completed sales counted three ways. Each window is completed_at > NOW() - INTERVAL 'N days' with escrow_status = 'completed'. Plus a 90-day success rate: completed / (completed + cancelled + refunded) over the 90-day window.
The success-rate tone: green ≥ 90%, amber ≥ 70%, red below. Tones are visual only — the methodology is the formula above.
3. Outstanding actions
What the kingdom is waiting on you for. Three counts:
- Trades to ship.
market_tradesrows whereseller_id = youandescrow_status = 'awaiting_shipment'. The value beneath the count is the sum ofseller_payoutfor those rows. - Offers to answer.
market_offersrows whereseller_id = youandstatus = 'pending'. - Returns to decide.
market_returnsrows whereseller_id = youandstatus = 'requested'.
4. Trust trajectory
Your current trust score from trust_profiles, plus the 30-day delta from trust_score_history (the most recent record at-or-before NOW() - INTERVAL '30 days'subtracted from your current score).
Tier label is a display-only mapping: ≥80 Trusted · ≥60 Established · ≥40 Growing · ≥20 Starting · <20 New. The canonical tier breakdown and your next-tier-unlock checklist live at /account/standing. The dashboard is a pointer; /account/standing is the substrate.
5. Listings health
Counts of your active asks and lots, plus a stale count (listings older than 30 days), plus the oldest listing age in days.
Stale doesn't mean unprofitable — some listings are intentionally priced above market for patient discovery. The signal is this listing has been on the market for a while; consider whether to re-price or refresh photos, not this listing is a problem.
What this page does NOT do
- Does not show counterparty history. Repeat-buyer patterns, blocklists, preferred-buyer tracking are named in the recursion targets of the connection-doc, not yet built.
- Does not forecast. Cash-flow calendar (when pending payouts hit), expected income, tax-year totals are adjacent features; this dashboard is a snapshot, not a projection.
- Does not show market intelligence. Demand signals (under
/api/market/demand-signals+ the liquidity module) exist as substrate but aren't surfaced here yet — they're a separate page worth its own design. - Does not show platform-wide rankings. No "top-10 sellers" comparison. The dashboard is private to you; the rankings layer is a different conversation.
Freshness
Every section queries the live database at render time. The Provenance pill at the top of the page declares live · just now. If the database is up, the dashboard is real-time. If a section's query fails (missing table, schema drift, transient error), that section renders — rather than fabricating zero. Substrate-honest about read failures.
Change history
v1 — 2026-05-12. Initial five sections shipped. Pending-payout 14-day cap noted as approximation; future revision will compute per-trade-exact. Story-as-wire: docs/connections/the-trader-mirror.md (S33). Kingdom: kingdom-063.