web: parity page renders the three-scenario comparison from live data
App.vue fetches the default config, posts it to /api/comparison, and renders ComparisonTable; the Vite dev server proxies /api to the Go server so the browser sees one origin. src/lib/api.ts is the only fetch code and uses exclusively generated types: no shape is defined on the frontend. Scaffold example components removed. Engine fix surfaced by the smoke test: a nil Go slice marshals to JSON null, violating the generated 'educated: number[]' contract; RunScenario now returns an empty slice instead. Verified end to end: curl through the Vite proxy returns the golden 99/70/7. Vitest covers the table rendering; type-check, oxlint, eslint clean. This completes the milestone 2 parity check.
This commit is contained in:
parent
e9f36f509e
commit
c935071bd1
17 changed files with 198 additions and 319 deletions
|
|
@ -93,6 +93,9 @@ func RunScenario(config Config, strategy Strategy) (Result, error) {
|
|||
return Result{}, fmt.Errorf("scenario: unknown strategy %q", strategy)
|
||||
}
|
||||
|
||||
if educated == nil {
|
||||
educated = []int{} // a nil slice marshals to JSON null, not []
|
||||
}
|
||||
cascade := RunCascade(graph, config.Origin, config.ForwardProb, educated, thresholds)
|
||||
return Result{
|
||||
Strategy: strategy,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue