Skip to content

feat(ui): UTA pages redesign + cross-cutting design polish#173

Merged
luokerenx4 merged 1 commit intomasterfrom
dev
May 9, 2026
Merged

feat(ui): UTA pages redesign + cross-cutting design polish#173
luokerenx4 merged 1 commit intomasterfrom
dev

Conversation

@luokerenx4
Copy link
Copy Markdown
Contributor

@luokerenx4 luokerenx4 commented May 9, 2026

Summary

Two-session uplift of the OpenAlice frontend:

  1. Trading list + UTA detail redesign — adds live numbers, NAV chart,
    asset-class-grouped positions, git-log-style snapshot timeline.
  2. Cross-cutting design polish — typography scale, lucide icons in
    the shell, unified PnL color tokens, live-pulse indicator on
    auto-refreshing pages, Portfolio page polished to the same bar.

No backend changes; every visual feeds existing endpoints.

Per-session contributions

2026-05-09 — Cross-cutting design polish

  • Typography scale.text-display / .text-title / .text-body
    / .text-caption / .text-micro defined in index.css so future
    code stops inventing text-[Npx] values
  • <LiveIndicator> + <PageHeader live={...}> — pulsing green dot
    • "updated Xs ago" microcopy ticks itself every 5s. Wired into
      Trading / UTA detail / Portfolio. New live-pulse keyframe (2.4s,
      ambient).
  • PnL color discipline — replaced 3+ green shades and 2+ red
    shades scattered as text-green-400 / text-emerald-* /
    text-red-400 / bg-red-500 etc. with the canonical
    text-green / text-red / bg-red tokens across 14 files
    (PushApprovalPanel, market panels, ContextMenu, ChatMessage,
    ChatChannelList(Container), DevPage, MarketSidebar,
    NotificationsInboxPage). Categorical asset-class chips now share
    the green token instead of a mismatched emerald.
  • lucide-react — installed and replaced ActivityBar's 9 nav icons
    • TabStrip × button + ChatChannelList settings/delete buttons.
      Removed inline INDICATOR_STYLE (#58a6ff hex) — active indicator
      uses bg-accent token. In-page custom SVGs deferred to later passes.
  • Portfolio polish — hero rebuilt with shared <Metric> + today
    PnL delta arrow; per-account <Sparkline> in a 2-column card grid;
    inlined format helpers replaced with imports from lib/format
  • Key commit: 91d1470

2026-05-09 — UTA pages redesign

  • New primitives: ui/src/components/Sparkline.tsx,
    ui/src/components/Metric.tsx, ui/src/lib/format.ts,
    ui/src/lib/asset-class.ts (consolidates per-page inline copies)
  • TradingPage: PortfolioBanner hero (USD totals + 24h delta + cash +
    unrealized) above redesigned UTA cards (live NLV, today PnL with
    arrow, cash, 24h sparkline). 30s polling shared across all cards.
  • UTADetailPage: 28-36px hero NLV + today PnL arrow + 4-up secondary
    metrics row, EquityCurve reused in single-account mode, positions
    grouped by asset class with per-group subtotals, snapshots-as-timeline
    with sticky date dividers + delta-vs-previous, click-to-expand
    SnapshotDetail in place. Snapshot fetch bumped 20 → 50.
  • Asset-class mapping is defensive: unrecognised secType falls to
    Other rather than guessing — surfaces broker quirks loudly
  • Key commit: b0b79ba

Full commit log

91d1470 feat(ui): cross-cutting design polish — typography scale, lucide icons, PnL color discipline, live-pulse indicator, Portfolio polish
b0b79ba feat(ui/uta): redesign Trading list + UTA detail with live data, NAV chart, grouped positions, snapshot timeline

Test plan

  • npx tsc --noEmit clean (root + ui)
  • pnpm test — 1520 / 1520 passing
  • vite build clean
  • Manual visual review (handed to user — these changes touch a lot
    of green/red signs and deltas; "AI portfolio intuition gap" memory
    note flags exactly this pattern):
    • UTA detail today PnL renders correctly for positive AND negative cases
    • Position group subtotals add up; mixed-currency groups label correctly
    • Snapshot timeline delta-vs-previous correct across day boundaries
    • Sparkline direction matches today-PnL color on Trading list cards
    • Freshly-created UTA (< 24h, no snapshots) shows "—" not "+$0.00"
    • Mobile width: sparkline hides, positions table scrolls horizontally
    • NEW ActivityBar lucide icons — verify all 9 nav items render and
      active indicator left-bar shows on selected section
    • NEW PnL colors visually identical across PushApprovalPanel /
      market panels / chat scroll-buttons (single shade of green,
      single shade of red)
    • NEW PageHeader live indicator — pulses on Trading / UTA detail
      / Portfolio; "updated Xs ago" ticks every 5s
    • NEW Portfolio AccountStrip — 2-col card grid, sparkline visible
      per healthy UTA, today-PnL delta sign-colored

🤖 Generated with Claude Code

…chart, grouped positions, snapshot timeline

Both pages were sitting on richer data than they used:
- api.trading.equity() — USD totals + per-UTA breakdown (no polling)
- api.trading.equityCurve() — time-bucketed NAV with per-UTA points
- snapshots() already polled at 60s on detail page

Trading list:
- Hero banner: total NLV (USD) + 24h delta + cash + unrealized
- UTA cards: live NLV, today PnL with arrow, cash, 24h sparkline
- 30s polling on aggregates (equity + equityCurve)

UTA detail:
- Hero with 28-36px NLV + today PnL arrow + 4 secondary metrics
- Reused EquityCurve in single-account mode for the NAV chart
- Positions grouped by asset class (Equity / Crypto / Option / etc.)
  with per-group subtotals; secType→class via new asset-class helper,
  unrecognised types fall to Other rather than guessing
- Avg→Mark column collapses two old columns into a directional read
- Snapshots-as-timeline with sticky date dividers + delta vs previous;
  click expands existing SnapshotDetail inline
- Bumped snapshot fetch from 20 → 50 entries

New primitives:
- ui/src/components/Sparkline.tsx — recharts AreaChart, no axes,
  color auto-derived from trend
- ui/src/components/Metric.tsx — label/value/delta with sm/md/lg sizes,
  consolidates per-page inline copies
- ui/src/lib/format.ts — fmt/fmtPnl/fmtNum/fmtPctSigned/currencySymbol
  consolidated; re-exports market/format helpers
- ui/src/lib/asset-class.ts — secTypeToClass + ordering for grouping

No backend changes; every visual feeds an existing endpoint.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@luokerenx4 luokerenx4 merged commit 0bc0fc0 into master May 9, 2026
2 checks passed
@luokerenx4 luokerenx4 changed the title feat(ui/uta): redesign Trading list + UTA detail feat(ui): UTA pages redesign + cross-cutting design polish May 9, 2026
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.

1 participant