frontend: compare mode (overlay 2-5 scenarios on one fan chart)
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was canceled
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was canceled
Multi-select on /scenarios — checkbox per row, capped at 5. When ≥2 are picked, a "Compare N" button appears that navigates to /compare?ids=1,2,3. /compare page pulls each scenario + its latest projection in parallel via useQueries. Each scenario gets a distinct hue (5 in the palette); median lines drawn solid, p10 + p90 dashed at 60% opacity. Stats table below shows success / p10 / p50 / p90 endings + median lifetime tax per scenario, with inline "no run yet" rows for scenarios missing a projection (404 from /projection treated as soft state, not error). 7 tests pass (was 5). Bundle still ~470 KB gz. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
60c275cd05
commit
b2af5c5893
5 changed files with 370 additions and 3 deletions
|
|
@ -2,6 +2,7 @@ import { useQuery } from '@tanstack/react-query';
|
|||
import { NavLink, Route, Routes, Link } from 'react-router-dom';
|
||||
|
||||
import { api } from '@/api/client';
|
||||
import { Compare } from '@/pages/Compare';
|
||||
import { Dashboard } from '@/pages/Dashboard';
|
||||
import { ScenarioDetail } from '@/pages/ScenarioDetail';
|
||||
import { ScenarioNew } from '@/pages/ScenarioNew';
|
||||
|
|
@ -43,6 +44,7 @@ export function App() {
|
|||
<Route path="/scenarios" element={<Scenarios />} />
|
||||
<Route path="/scenarios/new" element={<ScenarioNew />} />
|
||||
<Route path="/scenarios/:id" element={<ScenarioDetail />} />
|
||||
<Route path="/compare" element={<Compare />} />
|
||||
<Route path="/what-if" element={<WhatIf />} />
|
||||
</Routes>
|
||||
</main>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue