phase-10.5: market screener ui enhancements

This commit is contained in:
saikiranvella
2026-06-09 01:21:02 -04:00
parent 3c321a4a79
commit 5c8cd8935a
45 changed files with 3054 additions and 539 deletions
+56
View File
@@ -1257,6 +1257,62 @@ lib/types/
**Timeline:** 4-6 weeks (after Phase 10).
---
### Phase 10.5 — Implementation Status (June 2026)
#### ✅ Completed
| Item | Details |
|------|---------|
| **Column sort** | Click any header to sort asc/desc; sort icon indicates active column |
| **Inline filter row** | Per-column `<thead>` filter row — no external sidebar needed for quick filters |
| **Verdict filter** | Dropdown in filter row with per-asset-type label sets (Strong Buy, Momentum, etc.) |
| **Style filter** | Dropdown to filter by growth style (High Growth, Turnaround, Value, etc.) |
| **Cap tier filter** | Dropdown to filter by market cap segment (Mega, Large, Mid, Small, Micro) |
| **Merged Signal + Verdict column** | Single `sv-pill` badge replaces two separate columns; color-coded by signal class |
| **Dot-scale score** | `●●●●○` 5-dot scale derived from raw score, with numeric beside it |
| **Flags hover badge** | `⚠ N` count badge; hover expands into tooltip showing individual risk flag pills |
| **Row lift highlight** | Brighter left border accent + lighter background on hover/open; sticky column background inherits row color (fixed stacking context clipping) |
| **Market strip rounding** | 10Y, VIX, REIT Yld → `.toFixed(1)`; IG Sprd → `.toFixed(2)`; P/E ratios → `fmtPE()` |
| **Regime badge colors** | `HIGH` = amber, `NORMAL` = muted gray, `LOW` = blue (driven by `data-regime` CSS attribute) |
| **Signal Summary hidden** | Removed from `+page.svelte` — table section no longer renders |
#### 🔲 Next Up (Phase 10.5 Remaining)
These five items are the immediate next build targets, in priority order:
**1. Slide-in tearsheet panel** (`10.5d`)
- Replace the current inline expand row with a 420px right-side slide-in panel (CSS `transform: translateX` animation, 0.2s)
- Panel triggered by row click; closes via `[X]` button or `Escape`
- Sticky header shows ticker + price; body scrolls independently
- All current inline-expand content (display metrics grid) moves here as the first section
**2. P/E + ROE + 52W columns in main table** (`10.5c`)
- Add three numeric columns: `P/E` (from `peRatio`), `ROE` (from `roe`), `52W Chg` (from `52W Chg` display metric)
- Right-aligned monospace; color-coded (P/E neutral, ROE green if >15%, 52W green/red by sign)
- Replace the existing free-form metric columns that show different fields per asset type
**3. Valuation context (peer comparison) as first tearsheet section** (`10.5d §2`)
- Table inside tearsheet: `Metric | THIS | Sector | S&P500`
- Rows: P/E, PEG, ROE — pull sector avg and market avg from `marketContext.benchmarks`
- Makes the tearsheet immediately useful before any LLM analysis is run
**4. Numeric range filters for P/E and ROE** (`10.5b`)
- Add two range inputs to the filter row (or a compact filter popover): `P/E max` and `ROE min`
- Filter applied client-side against `displayMetrics` values; integrates with existing `filteredRows()` chain
- Input type `number`, placeholder `P/E ≤` / `ROE ≥`
**5. Threshold sensitivity block in tearsheet** (`10.5d §5`)
- Section inside tearsheet: "WHAT-IF SCENARIOS"
- Three computed rows:
- If P/E compresses to `currentPE * 0.75`: stock price impact %
- If growth slows to half current rate: stock price impact % (via DCF delta)
- If rates rise 100bps: discount rate impact on DCF intrinsic value
- All computed client-side from existing `dcfIntrinsicValue`, `peRatio`, `earningsGrowth` fields — no extra API call
---
### 10.5a — UI Architecture: Three-Layer Layout
```