panel-redesign: ratchet list, fixture registry and a route seam for the guards

Groundwork the guard tests of stage 0 stand on; no behaviour changes.

  - internal/web/view/legacy_pages.txt: the redesign ratchet. Every page of
    today's panel is listed as still old, plus @kit and @routes for the two
    pieces of work whose tests stay quiet until they land. The list only
    shrinks (enforced by CI in the next commits).
  - internal/web/view/fixtures_test.go: the registry of fixtures the guards
    render redesigned pages with. Empty until the kit page exists.
  - web.go: route registration moves out of Handler() into muxes(), so a
    test can ask the real muxes which pattern answers a path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mix
2026-10-09 17:19:22 +03:00
co-authored by Claude Opus 5.5
parent 57c6fddfc3
commit 049d8c781c
3 changed files with 66 additions and 3 deletions
+17
View File
@@ -0,0 +1,17 @@
package view
// pageFixtures is the data each redesigned page is rendered with by the guard
// tests (guard_panel_test.go): one entry per page that has left
// legacy_pages.txt, keyed by the page's engine name. The guards render the page
// through Engine.Render with this value and hold the result to the design
// contract — its class vocabulary, its page structure and the component
// skeleton recorded for the mockup of the same name in
// docs/assets/panel-redesign/panel/outlines.json.
//
// A fixture therefore has to fill the page the way its mockup is filled: the
// same boxes, the same number of records. It is also what the evidence
// screenshots are compared against, so use plausible values, not "foo".
//
// This file belongs to the implementation, not to the guards: the step that
// restyles a page adds its fixture here in the same commit.
var pageFixtures = map[string]func() any{}