Skip to content

Hero: add Total P&L tile beside Realised line#39

Merged
heyitsStylez merged 1 commit into
mainfrom
hero-total-pnl-tile
May 6, 2026
Merged

Hero: add Total P&L tile beside Realised line#39
heyitsStylez merged 1 commit into
mainfrom
hero-total-pnl-tile

Conversation

@heyitsStylez
Copy link
Copy Markdown
Owner

Closes #36. Implements ADR 0004.

Summary

  • New #cpnl-tile in .cpnl-hero-hd showing stacked Unrealised (small) and Total (peer weight to Realised number), plus muted sub-line for missing-spot.
  • New rHeroTile() in 07-render-charts.js — sources unrealised, total, missingSpotAssets from computePnl and open-lot inventory from compute().lots. Called at top of rCpnlChart(), so asset filter + render cycle drive it for free.
  • CSS in .cpnl-hero-tile block — vars only, no hardcoded colours.

States

  • No open lots → Unrealised , Total = Realised, no sub-line.
  • All open-lot assets missing spot → both , sub-line spot unavailable: <ASSETS>. Realised line unaffected.
  • Partial miss → tile renders partial Total + sub-line listing missing assets. No asterisk anywhere.

Test plan

  • python3 build.py --check passes
  • npm test passes (64 tests, +5 new)
  • Visual check in browser: tile renders right of Realised number, asset chips filter both halves, sub-line appears under partial/full miss.

Sources unrealised, total, missingSpotAssets from computePnl — no engine
changes. Handles three states: no open lots, all-spot-missing (dashes +
sub-line), partial/ok (values + optional sub-line). No asterisks.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyperwheel Ready Ready Preview, Comment May 6, 2026 9:39am

@heyitsStylez heyitsStylez merged commit c977806 into main May 6, 2026
4 checks passed
@heyitsStylez heyitsStylez deleted the hero-total-pnl-tile branch May 6, 2026 13:33
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.

Hero: add Total P&L tile beside Realised line

1 participant