Show stage pill next to profit target on dashboards

State API now returns stage = 1 + number of withdrawals. Both the main
dashboard and the account detail page show a small Stage N pill next to
the profit target value.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Brandon Li
2026-04-26 03:02:02 -05:00
co-authored by Claude Opus 4.6
parent 009f7471c2
commit 536aad27ef
4 changed files with 21 additions and 4 deletions
+2
View File
@@ -34,6 +34,8 @@ export interface AccountState {
totalProfit: number;
/** True when today's realizedPnL has met or exceeded the computed daily target */
targetHit: boolean;
/** Current stage = 1 + number of withdrawals (negative fund transactions). Stage 1 = fresh account. */
stage: number;
/** Next trading day's target, computed server-side. null when account is dead or config is missing. */
dailyTarget: { amount: number; path: 'first_day' | 'normal_day' | 'reduced_day' } | null;
/** Actual profit target to hit — max(stage profit target, consistency realTarget = maxDay/consistency). */