The Alert Settings card (sec-cfg) was missing its outer closing </div>.
This caused the browser to nest view-analysis INSIDE view-dashboard.
When showView() set view-dashboard to display:none, view-analysis was
hidden too — making display:block on view-analysis itself useless since
a parent with display:none overrides all children.
Also retains the force-expand and loading-state improvements from prior
commits, and the diagnostic banner (to be removed once confirmed working).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a visible orange banner that updates at each step of loadAnalysis
(fetch → got data → renderAnalysis called → complete / error).
This definitively shows whether the view is reached and where it fails.
Remove after root cause is confirmed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 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>
- 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>