From 5215cd7e57ef2094edc3096c6c7c6a5b818ba1b2 Mon Sep 17 00:00:00 2001 From: jedarden Date: Tue, 21 Apr 2026 09:02:22 -0400 Subject: [PATCH] fix(web): remove unused colors parameter from drawThreatLines call - Minor fix to match function signature - Add lazy loaders for feedback and docs-api pages --- .needle-predispatch-sha | 2 +- cmd/acb-evolver/internal/live/exporter.go | 10 +++++++++- web/src/app.ts | 4 ++++ web/src/replay-viewer.ts | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.needle-predispatch-sha b/.needle-predispatch-sha index 5ced026..a8a8578 100644 --- a/.needle-predispatch-sha +++ b/.needle-predispatch-sha @@ -1 +1 @@ -206189f914d01d66ad700bce2e49f9e1ba361b81 +00069b1870a0d79fcf3af56bf8885fd75b2e4258 diff --git a/cmd/acb-evolver/internal/live/exporter.go b/cmd/acb-evolver/internal/live/exporter.go index cbb4710..b8f1469 100644 --- a/cmd/acb-evolver/internal/live/exporter.go +++ b/cmd/acb-evolver/internal/live/exporter.go @@ -12,8 +12,16 @@ import ( "time" ) -// IslandStat holds per-island population statistics. +// IslandStat holds per-island population statistics (dashboard format). type IslandStat struct { + Population int `json:"population"` + BestRating int `json:"best_rating"` + BestBot string `json:"best_bot"` + LanguageDiv string `json:"language_div,omitempty"` // dominant language +} + +// IslandStatFull holds per-island population statistics (full detail). +type IslandStatFull struct { Count int `json:"count"` BestFitness float64 `json:"best_fitness"` AvgFitness float64 `json:"avg_fitness"` diff --git a/web/src/app.ts b/web/src/app.ts index b325523..6de114a 100644 --- a/web/src/app.ts +++ b/web/src/app.ts @@ -29,6 +29,10 @@ const loadEvolutionPage = () => import('./pages/evolution').then(m => m.renderEv const loadBlogPages = () => import('./pages/blog').then(m => ({ renderBlogPage: m.renderBlogPage, renderBlogPostPage: m.renderBlogPostPage })); const loadSeasonsPage = () => import('./pages/seasons').then(m => m.renderSeasonsPage); +// Feedback & docs (separate chunk - includes replay viewer for feedback page) +const loadFeedbackPage = () => import('./pages/feedback').then(m => m.renderFeedbackPage); +const loadDocsApiPage = () => import('./pages/docs-api').then(m => m.renderDocsApiPage); + // ─── Helper: wrap async page loader in sync RouteHandler ──────────────────────── function lazyRoute(loader: () => Promise<(params: Record) => void>): RouteHandler { return (params: Record) => { diff --git a/web/src/replay-viewer.ts b/web/src/replay-viewer.ts index 245e217..c837b39 100644 --- a/web/src/replay-viewer.ts +++ b/web/src/replay-viewer.ts @@ -1031,7 +1031,7 @@ export class ReplayViewer { // Draw threat lines between bots in attack range if (!this.accessibility.reducedMotion) { - this.drawThreatLines(turnData, colors, visible); + this.drawThreatLines(turnData, visible); } }