position-tracker/public
Manohar 8cd09d8a0e fix: three issues — symbol parser, booked PnL window, token reauth
1. parseOptionSymbol (greeks.ts)
   Added Format 3 for SENSEX weekly DD+MON+STRIKE symbols (no year).
   SENSEX26JUN77300PE was returning null — parser read year=26, day=77
   giving invalid date 2026-06-77. Now correctly parses as day=26,
   month=JUN, year=2026 (inferred), strike=77300.

2. Booked PnL window (server.ts)
   Changed all three booked-PnL queries from 'today IST only' to
   'last 7 days'. With a stale Angel One token, positions are not
   updated today so date(updated_at)=today returns 0 even when
   real closed-position PnL exists from yesterday.

3. Angel One token expiry UX (server.ts + index.html)
   - Added POST /api/reauth endpoint — forces a fresh Angel One
     login without restarting the container
   - Nav now shows red error text +  Reauth button whenever
     lastError is set; clicking reauth calls /api/reauth then
     re-runs refresh + analysis
   - Fixed loadHealth() to show/hide the error span (was always
     hidden due to missing display toggle)
   - Label changed from 'Booked P&L Today' → 'Booked PnL (7d)'

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 10:07:20 +05:30
..
index.html fix: three issues — symbol parser, booked PnL window, token reauth 2026-06-24 10:07:20 +05:30