Skip to content

Spec Phase 33: port the viewer to the redesigned screens - #262

Merged
vicmaster merged 2 commits into
masterfrom
phase-33-spec
Nov 24, 2026
Merged

vicmaster merged 2 commits into
masterfrom
phase-33-spec

Conversation

@vicmaster

Copy link
Copy Markdown
Owner

Planning artifact for Phase 33, which ports the web viewer to the redesigned screens. No code: docs/specs/PHASE-33-SPEC.md, the VISION entry, and the design itself.

The thesis: Phase 31 rebuilt the viewer as canvases to prove the desktop-app rules and left the code alone. A design pass redrew those seven screens (the gallery, the detail page with its More menu, comment and delete states, the archive and its empty state). Each scores 100 in fast and detailed canvas_evaluate and passes a full canvas_stress run, in both themes. This PR commits them as the design source, and the spec ports them. The port also fixes what the current viewer gets wrong: edited designs keep stale thumbnails, comments the agent resolved stay open until a manual reload, inspector tabs and archive actions cannot be reached by keyboard or touch, and scores are coloured on an 80/60 scale the evaluator never uses.

What this PR adds

  • docs/specs/PHASE-33-SPEC.md and a Phase 33 section in VISION.md.
  • The seven design canvases in a "Viewer redesign" project under .framesmith/viewer-redesign/, with their seven thumbnail assets in .framesmith/assets/ (112K) and the project's design system in .framesmith/workspace.json. The repo already tracks its other dogfood projects there.
  • Light and dark renders of each screen in docs/viewer-redesign/ (14 PNGs, 1.6M).

Slices

A. Foundation. src/viewer.ts becomes src/viewer/, one module per page, still template strings with no new dependency. The viewer's tokens are copied from the design system, and a test fails if they drift from it. Fonts are served from the font cache. One sidebar, tab list, menu and dialog are built once and used everywhere, all working by keyboard.
B. Gallery. Real thumbnails with the score on the corner, neutral at the bar and amber below it. Search and a type filter are kept in the URL. A Live status shows whether the page is still connected, and any edit, rename, genre change or new state variant refreshes the card.
C. Detail shell. The toolbar gets a state switcher, a More menu (View JSON, Copy canvas ID, Archive, Delete) and a delete dialog in place of the browser's confirm box. Preview tools cover zoom, fit, the preview's theme and the safe area.
D. Inspector and comments. The Quality tab leads with the score, a reason line and the categories lowest first, then the issues grouped as canvas_evaluate groups them for agents. Design system and Feedback are restyled, and the disabled Import placeholder is removed. The comment popover opens under the Comment button, and every inspector panel refreshes while you watch.
E. Archive, docs, acceptance. The archive becomes a tree by project with a preview panel and a one-click restore. The README and its three viewer screenshots are updated. Each screen goes beside its design render.

Decisions

Every fork in the spec's Clarify section is settled.

  1. The viewer's theme follows the system setting, with no toggle (Victor). The preview's own dark switch stays, because it is about the canvas, not the page.
  2. The tokens are copied into the code and pinned by a test, not read from the canvas store at runtime. Reading them live would make the viewer depend on a store that can be absent or edited by hand.
  3. One score threshold, the evaluator's quality bar (a score above 95). It is a target, not the presenting gate, and the chip says "Below the bar", not "not ready".
  4. The verdict chip is score-based. The evaluator's READY directive also depends on the stress verdict, which lives in the MCP server's memory, not the viewer's process, so the viewer cannot report it truthfully.
  5. Live refresh is fixed in this phase. The design shows a Live status, and shipping it while thumbnails and comments go stale would make it untrue.
  6. Controls the design did not draw keep their behaviour and get a home. The preview theme and safe area join the preview tools. Provenance and the vision critique move into the Quality tab. JSON moves into the More menu.
  7. Issue suggestions move to a tooltip, as the approved design shows. Agents still read them from canvas_evaluate.

The main risks, plainly

  • Ten unit tests and two browser tests assert markup strings, so they break by design. The spec names each one and the slice that rewrites it, and each slice PR lists every assertion it changed and the behaviour that assertion still covers.
  • The default preview changes from 1:1 to fit. Today a 1440 canvas opens at full size and scrolls. After the port it opens scaled to the pane, and 100% is one zoom step away.
  • The design canvases can be edited later. The token test catches colour and type drift continuously, but layout drift between the canvases and the code is caught only by the side-by-side acceptance at the end of the phase.
  • Found, out of scope: the viewer answers every request with Access-Control-Allow-Origin: *, mutating routes included. It binds 127.0.0.1, but a page the user visits can still send a simple cross-origin POST to it. That needs its own change and test.

Verification

Before writing, an inventory pass read the whole viewer, its routes, and every test and doc that touches it. Two verifier rounds then checked the spec against the code. Round 1 found seven major problems: a wrong description of today's Fit button, a live-refresh key that missed renames and genre changes, a feedback key that went stale on delete, a Quality tab that could not work without foldIssues, a colour-literal grep that passed vacuously on macOS, a slice A acceptance that needed slice C's menu, and two tests that would break unlisted. Round 2 confirmed the fixes and found three more: folded issues losing their "auto-fixable" label, slice C breaking a test that slice D's change fixes, and one more unlisted test. All of them are resolved in the text.

Phase 31 left the viewer's code port out of scope. The 2026-11-24 design
pass produced seven screens, each clean in both themes; this commits them
as the port's design source and specs the port in five slices.
@vicmaster
vicmaster merged commit 174f4e9 into master Nov 24, 2026
3 checks passed
@vicmaster
vicmaster deleted the phase-33-spec branch November 24, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant