- showView('analysis') now removes 'collapsed' from all three analysis
card sections so localStorage state can't keep them hidden
- loadAnalysis() shows "Loading analysis…" immediately before the fetch
so the user sees the view is active (not blank)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>
Angel One SENSEX weeklies use e.g. SENSEX26JUN77300PE where 26=day,
JUN=month, 77300=strike — no year in the symbol. The previous parser
tried YY+MON+DD, treating 26 as year and 77 as day, giving an invalid
date (2026-06-77) and returning null for ALL option positions.
Added Format 3: DD(1-2) + MON(3-letter) + STRIKE + TYPE
Year is inferred: current year, or next year if date is >7 days past.
Format 2 (YY+MON+DD) is left as-is so it still falls through to Format 3
when its parsed date is invalid (day=77 etc).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- showView() now tracks _curView, scrolls to top, forces visibility
- loadAnalysis() shows clear "No data yet" message when API returns null
instead of silently leaving static placeholder text
- forceRefreshAnalysis() added: POSTs /api/refresh then reloads analysis
- ↻ Refresh button added at top of Analysis view with live timestamp
- Auto-refresh analysis every 30s when Analysis tab is active
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Was bound to 0.0.0.0:3457 making the API reachable without auth.
Now relies exclusively on Traefik (angel.manohargupta.com) for ingress.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>