π Description
Once a trade starts, users need to see the escrow lifecycle. Add app/trades/[id]/page.tsx with a
vertical stepper reflecting the Trustless Work escrow flow:
Initiated β Funded β Released (with a Disputed branch). Each step shows a state
(done / current / pending) and a mock timestamp, plus the primary action for the current state.
β
Acceptance Criteria
- New route
app/trades/[id]/page.tsx.
- New component
frontend/components/trade/escrow-stepper.tsx (a reusable stepper).
- Steps render with distinct visual states using tokens: completed =
primary, current =
emphasized, pending = muted-foreground, disputed = destructive.
- A summary header (amount, counterparty via
WalletBadge, contract-id placeholder).
- A context-aware primary action button (e.g. "Fund escrow" / "Release funds" / "Open dispute")
wired to console.log stubs.
- Mock trade state; light + dark correct.
π References
- Escrow flow context: root
README.md ("How It Works") + p2p-safe-swap/lib/trustless-work.ts
(the escrow steps this UI represents: initialize β fund β complete β dispute β resolve)
frontend/components/ui/Button/Button.tsx, WalletBadge
π Additional Notes
- UI/mock only β do not call the Trustless Work API in this issue.
- Make the stepper data-driven (array of steps) so it can be reused later.
Guidelines
- Use semantic brand tokens only β
bg-card, text-foreground, text-muted-foreground,
bg-primary, border-border, etc. No hardcoded hex. Reference:
docs/guidelines/colors.md.
- Typography is Satoshi (already global) β no font setup needed.
- Light + dark: build both. Test with the theme toggle (bottom-right) β every screen must
look right in both themes.
- Reuse existing components before building new ones:
Button
(frontend/components/ui/Button), WalletBadge, TransactionList, TabBar, SearchBar,
Reveal (frontend/components/motion/reveal.tsx).
- Motion: wrap screen content / lists in
<Reveal> for a subtle entrance; it already
honors prefers-reduced-motion.
- Layout: mobile-first. Match existing screens β centered column,
max-w-md, bg-background.
- Data: mock data only (no backend). Keep mock arrays in the page file or a local
mock.ts.
- Copy: match the language of the surrounding screens (currently Spanish labels, e.g.
"Comprar", "Transacciones"). Don't introduce a new convention.
- Accessibility: semantic elements,
aria-labels, keyboard-focusable controls.
- Definition of done:
npm run lint + npx tsc --noEmit clean; screen renders at its route
in both themes; no changes to files outside the issue's declared scope.
π Description
Once a trade starts, users need to see the escrow lifecycle. Add
app/trades/[id]/page.tsxwith avertical stepper reflecting the Trustless Work escrow flow:
Initiated β Funded β Released (with a Disputed branch). Each step shows a state
(done / current / pending) and a mock timestamp, plus the primary action for the current state.
β Acceptance Criteria
app/trades/[id]/page.tsx.frontend/components/trade/escrow-stepper.tsx(a reusable stepper).primary, current =emphasized, pending =
muted-foreground, disputed =destructive.WalletBadge, contract-id placeholder).wired to
console.logstubs.π References
README.md("How It Works") +p2p-safe-swap/lib/trustless-work.ts(the escrow steps this UI represents: initialize β fund β complete β dispute β resolve)
frontend/components/ui/Button/Button.tsx,WalletBadgeπ Additional Notes
Guidelines
bg-card,text-foreground,text-muted-foreground,bg-primary,border-border, etc. No hardcoded hex. Reference:docs/guidelines/colors.md.look right in both themes.
Button(
frontend/components/ui/Button),WalletBadge,TransactionList,TabBar,SearchBar,Reveal(frontend/components/motion/reveal.tsx).<Reveal>for a subtle entrance; it alreadyhonors
prefers-reduced-motion.max-w-md,bg-background.mock.ts."Comprar", "Transacciones"). Don't introduce a new convention.
aria-labels, keyboard-focusable controls.npm run lint+npx tsc --noEmitclean; screen renders at its routein both themes; no changes to files outside the issue's declared scope.