From 6685a758649a4c624c56e4d7b9710f217f49d900 Mon Sep 17 00:00:00 2001 From: Brandon Li Date: Fri, 11 Sep 2026 18:51:03 -0500 Subject: [PATCH] Report and badge Personal DLL days A stop-enabled account whose day booked red via its own stop shows an amber "Personal DLL" badge on the dashboard (the firm's lockout keeps its red "Hit DLL") and reports as personalDll in the day outcomes instead of loss, per account type and per firm. Co-Authored-By: Claude Fable 5 --- app/api/state/route.ts | 6 ++++++ app/page.tsx | 8 +++++--- lib/master-protocol.ts | 4 ++++ lib/reporter.ts | 15 ++++++++++++--- types.ts | 3 +++ 5 files changed, 30 insertions(+), 6 deletions(-) diff --git a/app/api/state/route.ts b/app/api/state/route.ts index 6364568..2065fac 100644 --- a/app/api/state/route.ts +++ b/app/api/state/route.ts @@ -154,6 +154,12 @@ export async function GET() { // on the Tuesday after a holiday this includes Sun/Mon. realizedPnL: combined.realizedPnL, daysTraded, + // A stop-enabled account whose day booked red via its own + // stop — the personal DLL. Firm DLL lockouts show via + // !active instead. + personalDll: !!cfg && (cfg.firstDayStop || cfg.minDayStop) + && acc.active && !client.positions[acc.id] + && combined.realizedPnL <= -25, positionDirection: client.positions[acc.id] ? (client.positions[acc.id].netPos > 0 ? 'long' as const : 'short' as const) : null, diff --git a/app/page.tsx b/app/page.tsx index 2aa4e4d..c0c2059 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -362,9 +362,11 @@ function AccountRow({ account, firm, hideDead, privacy, onAssigned }: { ? Hit DLL : account.positionDirection ? {account.positionDirection === 'long' ? 'Long' : 'Short'} - : account.targetHit - ? Target Hit - : Flat} + : account.personalDll + ? Personal DLL + : account.targetHit + ? Target Hit + : Flat}