Skip to content

v2.6.0

Latest

Choose a tag to compare

@vicmaster vicmaster released this 25 Nov 23:46
e586047

Install or upgrade with npx framesmith, or npm i -g framesmith.

The redesigned framesmith viewer: a light sidebar of projects with counts and Archive at the bottom, and the Pattern library project with a search field, Web / Mobile / Desktop app tabs and a grid of live thumbnails, each with its quality score on the corner, the dashboard's 95 in amber below the bar.

The viewer is rebuilt to a design framesmith made of itself: seven screens, each 100/100 with a clean stress run in both themes, ported and checked side by side. It follows your system's light or dark setting, scores every design against the evaluator's bar, updates live, and works by keyboard. (#262–#268)

Three server fixes came out of the port: the viewer serves only its own pages (#269), every tool reads a canvas as it is on disk now (#270), and canvas files added on disk while the server runs are picked up without a restart (#271).

The viewer

  • Follows your system. Light or dark from prefers-color-scheme, on neutral chrome that never tints a design. Its fonts (Inter, Space Grotesk) load from framesmith's font cache, with the system font as the fallback offline.
  • Gallery.
    • Each card is a live thumbnail at the artboard's proportions with its score on the corner: neutral at 96 and above, amber at 95 or below.
    • The header reads "N canvases · M below the bar" beside a Live / Offline status.
    • Search by name and filter by Web, Mobile or Desktop app; both are kept in the URL (?q=, ?type=).
    • The gallery reloads on any edit, rename, genre, type or state change, not only when a canvas is added.
  • Canvas detail.
    • A toolbar with the project back link, the canvas's states as a nav, breakpoint tabs and Compare, a Comment button with the open count, and a More menu: View JSON, Copy canvas ID, Archive or Restore, and Delete canvas, which asks in a dialog.
    • The preview opens fitted to the pane, with zoom steps (50–200%), Fit, Preview in dark, and Show safe area on phone canvases.
  • Quality tab. The score, an At the bar or Below the bar chip, a reason line ("Coverage holds it back: …"), what the canvas was built from, the vision critique when there is one, categories lowest first, and the issues folded as canvas_evaluate folds them, each with "Show n nodes".
  • Comments. Comment opens a popover; click an element to pin the note to it, or save it for the whole page. The Feedback tab, the counts and the panels refresh on their own.
  • Archive. A tree of archived canvases by project (newest first), the selected one's preview, project, archived date, score and size, Restore to its project, and Delete permanently behind a dialog.
  • Removed. The disabled Import tab and the green / amber / red score scale.

Server fixes

  • The viewer serves only its own pages. It sent Access-Control-Allow-Origin: * on every response, so any page open in your browser could read every canvas and its comments, and archive, delete or comment through a request that needs no preflight. The header is gone, writes must come from the viewer's own pages, and a request whose host is not 127.0.0.1, localhost or [::1] is refused, which blocks DNS rebinding. (#269)
  • Tools read what is on disk. After a git pull, a branch switch, a hand edit or a comment from the viewer, screenshot, export, read_nodes, snapshot_layout, get_variables, canvas_diff, canvas_list and the other read tools served the copy they had loaded. Every tool now reloads a changed canvas file first, and listings refresh every canvas. While a canvas file can't be parsed (a merge conflict), tools treat it as not found instead of using an old copy, and pick it up once it parses. (#270)
  • Canvas files added on disk are picked up. A pulled screen, a pulled project, or a canvas another session wrote to the global store now appears in the next listing, or as soon as a tool is given its id. A canvas moved to another project is found at its new place, and a path that now holds another canvas after a branch switch loads under its own id. (#271)

Upgrading

  • The viewer looks different, and its page markup and CSS changed completely. Anything that scraped the old pages will break. The JSON API keeps its routes: /api/canvases rows gain type and genre, /api/canvas/:id/meta gains feedbackKey, and there are two new routes, GET /canvas/:id/inspector and /assets/fonts/<file>.
  • The viewer no longer answers other origins. A script on another site can't read its API, and a write (archive, delete, comment) is refused unless it comes from the viewer's own pages. curl and local scripts, which send no Origin, still work. If you reach the viewer through a proxy or tunnel under another host name, use localhost or 127.0.0.1 instead; any other host now gets a 403.
  • Tools can report "not found" for a canvas whose file has a merge conflict, where they used to keep using the loaded copy. Resolve the conflict and retry.
  • No tool, parameter or report field changed.