diff --git a/.agents/skills/formweb-harness/SKILL.md b/.agents/skills/formweb-harness/SKILL.md
index 6ed094a4..f031bd07 100644
--- a/.agents/skills/formweb-harness/SKILL.md
+++ b/.agents/skills/formweb-harness/SKILL.md
@@ -5,7 +5,7 @@ license: Apache-2.0
compatibility: "Project skill for Claude Code and other clients with the FormWeb MCP server connected. Requires a running local FormWeb FastAPI service and explicit Agents enablement."
metadata:
author: "nodemode-ai"
- version: "0.31.2"
+ version: "0.33.0"
---
# FormWeb Harness
diff --git a/.claude/skills/formweb-harness/SKILL.md b/.claude/skills/formweb-harness/SKILL.md
index 6ed094a4..f031bd07 100644
--- a/.claude/skills/formweb-harness/SKILL.md
+++ b/.claude/skills/formweb-harness/SKILL.md
@@ -5,7 +5,7 @@ license: Apache-2.0
compatibility: "Project skill for Claude Code and other clients with the FormWeb MCP server connected. Requires a running local FormWeb FastAPI service and explicit Agents enablement."
metadata:
author: "nodemode-ai"
- version: "0.31.2"
+ version: "0.33.0"
---
# FormWeb Harness
diff --git a/.docs/wiki/Architecture.md b/.docs/wiki/Architecture.md
index 1b67a11e..130fb176 100644
--- a/.docs/wiki/Architecture.md
+++ b/.docs/wiki/Architecture.md
@@ -55,6 +55,14 @@ New features are modules at the existing layer seams. Read `frontend/HASHOUT_LOG
**Layout grid (0.31.1, issue #36 "snap and grid").** The snap and grid of a structured layout, never a pixel grid: nothing here writes offsets, and nothing relates to breakpoints or the canvas width (see CLAUDE.md). `features/layout-grid.ts` holds the pure geometry, unit-tested in `tests/unit/canvas/`: `slotsOf(kids, flow)` gives one slot per landing place (before the first child, between each two at the middle of the gap, after the last), each with one line, or two where the flow wraps (after the last box of one line and before the first of the next); `nearestSlot` and `lineDistance` pick the slot whose line is nearest the pointer, so a container that takes the element has no dead zone; `trackSizes` and `gridCells` turn a computed `grid-template-columns`/`rows` and the gaps into cells from the content box; `alignOf` reads `align-items` (`justify-items` for a one-column grid; block flow is start) and `alignGuides` draws an edge only when every neighbour shares it within 1 px; `spacing` draws the container's `gap` (flex or grid) or the neighbours' facing margins (block) from each neighbour towards the slot, at a quarter and three quarters across them so the two never overlap; `landing` words the target as "Before {0}", "Inside {0}, at the end" or "Inside {0}". In `canvas-drag.ts`, `Lanes` measures a container's children and slots once per container per drag (cleared when the canvas document scrolls), `findDrop` takes the drag's `Lanes` and returns the spot with its `line` and `lane` (over a container that is a sibling of a dragged element the before or after band is a quarter of its size along the flow, otherwise 12 px, so a card dragged over the next card in a row reorders the row unless it is held over the middle half), and `markOf` draws that line, so the orange line is always one of the drawn slots; a drop on the element's own place is returned as a spot without commands (label "Stays where it is", the drop moves nothing). At drag start the containers that can take the element (`canContain` on the page tree outside the dragged subtrees and linked instances, the same rule `dropTarget` applies to "into") are measured once and drawn shifted by the canvas scroll; per pointer move the scene is redrawn only when the slot, the scroll or the frame position changes. `features/layout-layer.ts` (`styles/layout-grid.css`, `--z-raised`, tokens only, `pointer-events: none`) draws boxes, cells, slot lines, guides and gap measures from pools of fixed elements in `#overlay-root` that grow once and are hidden with `hidden`, converting with `FrameMap.still()` (one frame rectangle read per draw, so no layout thrash). With about 370 elements on the canvas the pointer-move handler measured 0.76 ms on average for small moves and 1.24 ms for random jumps (main: 0.73 and 1.20), and a drag start 20 to 37 ms (main: 20 to 43). The drag clears the layer on drop, Escape, pointer cancel and a second finger. `view.layout-outlines` (Ctrl+Alt+G, registered from `installCanvasDrag`'s returned `commands`) draws the same layer without a drag for the parent chain of the selection (the page root when it is selected), with grid cells; it is kept in `localStorage` (`formweb.canvas.layout-outlines`, read and written in try/catch), repaints on a requestAnimationFrame from a MutationObserver on the canvas document, its scroll, the stage scroll and ResizeObservers on the frame and the stage, is hidden while the Live responsive preview is on (`editing()` false, frame hidden) and, by CSS, while Preview as published is open. The style element in the canvas head also gives a selected or marked element, other than the page root and text being edited, `cursor: move`, and a MutationObserver on `data-fw-selected` shows the drag tip in the status line the first time a canvas press selects an element (once per tab, `sessionStorage` `formweb.canvas.drag-hint`).
+**Hover outlines (0.32.0).** `features/hover-outline.ts` (the row tint in `styles/hover-outline.css`) registers `view.hover-outline` (View > Show hover outlines, on unless `localStorage` `formweb.canvas.hover-outline` is `'0'`). Delegated pointer listeners on the Layers list and, once `canvas.loaded()` resolves, on the canvas document set the attribute `data-fw-hover` on at most one canvas node and, when the pointer is on the canvas, on its layer row; one requestAnimationFrame per change, and an attribute is written only when the hovered key changes. It is an attribute, never a class, so `keyed()` rows and exact-class checks are untouched and `ui/canvas.ts` never removes it. One `"),
+ "Caf\u00e9.HTML": page("Caf\u00e9", "
", ''), "p/src/index.js": "1;\n"}, "p/public/index.html"),
+ "a_by_name_import_one_folder_down": ({"p/package.json": PACKAGE, "p/index.html": module_page(), "p/src/main.js": 'import x from "lib";\n'}, "p/src/main.js"),
+}
+
+
+@pytest.mark.parametrize("case", list(NAMED_ONCE))
+def test_each_script_or_page_is_named_once_by_its_path_in_the_archive(client, blank, case):
+ files, path = NAMED_ONCE[case]
+ status, detail = refusal(client, REVIEW, zip_of(files))
+ assert status == 400
+ says_build_first(detail)
+ assert detail.count(path) == 1, detail
+ name = path.rsplit("/", 1)[-1]
+ assert detail.count(name) == 1, detail
+
+
+def test_an_over_limit_zip_of_video_segments_named_ts_outside_src_gets_the_plain_count_sentence(client, blank):
+ files = {"package.json": PACKAGE, "index.html": page("Video", '')}
+ files.update({f"video/seg{i}.ts": b"\x47" * 188 for i in range(1200)})
+ status, detail = refusal(client, REVIEW, zip_of(files))
+ assert status == 413
+ assert "1,202" in detail
+ assert "npm run build" not in detail
+ assert "zip only the folder that holds the finished site" in detail.lower()
+ assert detail.endswith(NOTHING)
+
+
+def test_an_over_limit_zip_with_the_same_count_of_ts_files_under_src_gets_the_source_sentence(client, blank):
+ files = {"package.json": PACKAGE, "index.html": page("App", "
a
")}
+ files.update({f"src/seg{i}.ts": "export {};\n" for i in range(1200)})
+ status, detail = refusal(client, REVIEW, zip_of(files))
+ assert status == 413
+ says_build_first(detail)
+ assert "1,202" not in detail
diff --git a/docs/AGENT_QUICKSTART.md b/docs/AGENT_QUICKSTART.md
index 6bba1e56..6dd6aaf4 100644
--- a/docs/AGENT_QUICKSTART.md
+++ b/docs/AGENT_QUICKSTART.md
@@ -143,7 +143,7 @@ The pack's [scenario evaluations](../.claude/skills/formweb-harness/references/e
## Driving the editor window
-Every menu action has a stable command id (`file.save`, `edit.undo`, `insert.heading`, `view.mobile`, `window.studio` and so on). In the browser, `window.formweb.commands()` lists them with label, menu, shortcut and whether each is enabled right now, and `window.formweb.run(id)` runs one exactly as the menu would, returning false when it is disabled. Menu rows and command-search results carry the id in `data-command`. People reach the same actions from the menubar or with Ctrl/Cmd+K. Prefer MCP for site changes; use these ids (or `list_ui_commands` and `run_ui_command`) when an agent has to operate the window itself (switching breakpoint, opening a panel or dialog). Agent ids: `window.agents` (Agent Connect panel), `agents.toggle` (MCP and terminal on or off), `view.terminal` (Ctrl+`), `terminal.new`; panel buttons carry `agents.client.`, `agents.launch.`, `approvals.approve` and `approvals.deny`. `file.home` (File > Home, Alt+Ctrl/Cmd+H) shows the Home screen over the editor. `file.import-site` (File > Import site from zip...) opens the Library's site import view and its file picker; the person picks the zip and confirms the review, so an agent holding the zip bytes should call `library_import_site` instead. `inspector.search` (Window > Search properties, Alt+Ctrl/Cmd+F) opens the right panel and focuses its property search. Demo ids (Help > Demos, also the demo cards on Home): `demo.lowlight`, `demo.looking-back`, `demo.harbour-ferries` and the five whole-site starters `demo.coldmere-plumbing` (business), `demo.northfold-studio` (portfolio), `demo.slow-allotment` (blog), `demo.wenlow-type-day` (event) and `demo.fernhollow-pottery` (shop) each open that demo as a new, unsaved site; they replace the open site, and the window asks the person first when that site has changes not saved as a project. `demo.preview` (optional `id`: any of the eight demo ids) shows a finished demo in a preview over the window and changes nothing, and `demo.preview-close` closes it; while the preview is open every command except the `demo.` ids is disabled, and running one of the eight open ids closes the preview first. `view.preview-full` (Mod+Shift+P, the eye Preview button) opens or closes Preview as published, the compiled open site over the whole window, and changes nothing; while it is open every other command is disabled. `view.preview` toggles the in-canvas Live responsive preview. Layout ids: `window.toggle-left`, `window.toggle-right`, `window.toggle-rail` and the presets `workspace.design`, `workspace.content`, `workspace.build`, `workspace.focus`; rail buttons and collapsed-panel strip buttons carry the same `data-command` ids. Pages and layers panel ids (0.29.0) take an optional `id` (the open page or the selected element when left out): `page.open` `{id}`, `page.rename` `{id?, name?}`, `page.duplicate`, `page.set-home`, `page.move-up`, `page.move-down` and `layer.rename` `{id?, name?}` change the site, one undo step each (without `name` a rename opens the name for the person to type); `layer.collapse-all` and `layer.expand-all` change only the layers list. `page.set-home` also points links and click actions at the page's old address to `/`, and refuses, with the reason in the status line, when either page is a CMS template or has a translated address, or a password protects the page through a route other than `/`. To reorder pages from MCP use the engine command `page.move {id, index}`.
+Every menu action has a stable command id (`file.save`, `edit.undo`, `insert.heading`, `view.mobile`, `window.studio` and so on). In the browser, `window.formweb.commands()` lists them with label, menu, shortcut and whether each is enabled right now, and `window.formweb.run(id)` runs one exactly as the menu would, returning false when it is disabled. Menu rows and command-search results carry the id in `data-command`. People reach the same actions from the menubar or with Ctrl/Cmd+K. Prefer MCP for site changes; use these ids (or `list_ui_commands` and `run_ui_command`) when an agent has to operate the window itself (switching breakpoint, opening a panel or dialog). Agent ids: `window.agents` (Agent Connect panel), `agents.toggle` (MCP and terminal on or off), `view.terminal` (Ctrl+`), `terminal.new`; panel buttons carry `agents.client.`, `agents.launch.`, `approvals.approve` and `approvals.deny`. `file.home` (File > Home, Alt+Ctrl/Cmd+H) shows the Home screen over the editor. `file.import-site` (File > Import site from zip...) opens the Library's site import view and its file picker; the person picks the zip and confirms the review, so an agent holding the zip bytes should call `library_import_site` instead; a zip of a project's source (a `package.json` with no HTML page, `.ts`, `.tsx`, `.jsx`, `.vue` or `.svelte` files under its `src` folder or loaded by a page, a `%PUBLIC_URL%` placeholder, or a module script importing a package by name with no import map; `docs/LIBRARY.md` has the exact rule) is refused with a sentence that says to build it and import the output folder. `file.import-html` (File > Import HTML files..., the label was Import HTML...) opens the file picker for one or several `.html` files with Library > Import HTML behind it; the person then chooses As new pages (the same review and one-undo-step import as a site zip) or, for one file, As a section of this page. An agent with the HTML text should call `library_import_html` instead. `view.hover-outline` (View > Show hover outlines, no key, on by default) turns hover outlines on or off: a Layers row under the mouse outlines its element on the canvas, and an element under the mouse is outlined and tints its row. It changes only the view, is remembered in the browser and never saved with the site. `view.design-controls` (View > Show controls in Design fields, checkable, no key) shows or hides the sliders, color swatches and layout choosers beside the Design fields for every field without its own choice (Preferences > Interface > Design fields; each field's label has its own switch). It changes only the editor, is remembered in the browser and never saved with the site; a style value is still one CSS string that you set with `node.update` exactly as before, and the person's controls follow it. `inspector.search` (Window > Search properties, Alt+Ctrl/Cmd+F) opens the right panel and focuses its property search. Demo ids (Help > Demos, also the demo cards on Home): `demo.lowlight`, `demo.looking-back`, `demo.harbour-ferries` and the five whole-site starters `demo.coldmere-plumbing` (business), `demo.northfold-studio` (portfolio), `demo.slow-allotment` (blog), `demo.wenlow-type-day` (event) and `demo.fernhollow-pottery` (shop) each open that demo as a new, unsaved site; they replace the open site, and the window asks the person first when that site has changes not saved as a project. `demo.preview` (optional `id`: any of the eight demo ids) shows a finished demo in a preview over the window and changes nothing, and `demo.preview-close` closes it; while the preview is open every command except the `demo.` ids is disabled, and running one of the eight open ids closes the preview first. `view.preview-full` (Mod+Shift+P, the eye Preview button) opens or closes Preview as published, the compiled open site over the whole window, and changes nothing; while it is open every other command is disabled. `view.preview` toggles the in-canvas Live responsive preview. Layout ids: `window.toggle-left`, `window.toggle-right`, `window.toggle-rail` and the presets `workspace.design`, `workspace.content`, `workspace.build`, `workspace.focus`; rail buttons and collapsed-panel strip buttons carry the same `data-command` ids. Pages and layers panel ids (0.29.0) take an optional `id` (the open page or the selected element when left out): `page.open` `{id}`, `page.rename` `{id?, name?}`, `page.duplicate`, `page.set-home`, `page.move-up`, `page.move-down` and `layer.rename` `{id?, name?}` change the site, one undo step each (without `name` a rename opens the name for the person to type); `layer.collapse-all` and `layer.expand-all` change only the layers list. `page.set-home` also points links and click actions at the page's old address to `/`, and refuses, with the reason in the status line, when either page is a CMS template or has a translated address, or a password protects the page through a route other than `/`. To reorder pages from MCP use the engine command `page.move {id, index}`.
Canvas context menu ids act on the selected element: `edit.text` starts inline text editing on the canvas, `edit.select-parent` selects the containing element, `edit.wrap` puts the element, with any other selected elements beside it in the same parent, in a new empty div (one undo step), `style.copy` remembers its styles for the picked breakpoint in the window and `style.paste` applies them to the selection (one undo step), and `inspector.text-style`, `inspector.background`, `inspector.spacing`, `inspector.size`, `inspector.link` and `inspector.image` open the right panel at that field. From MCP, change styles with the engine command `node.update` instead.
diff --git a/docs/CONTENT_PORTABILITY.md b/docs/CONTENT_PORTABILITY.md
index bc0fbb08..e7db8d24 100644
--- a/docs/CONTENT_PORTABILITY.md
+++ b/docs/CONTENT_PORTABILITY.md
@@ -16,6 +16,6 @@ Local library storage is a component sharing workflow across projects in this Fo
POST /api/library/import-site/review takes the bytes of a .zip holding a static site (HTML, CSS, JavaScript, pictures, fonts) and answers what an import would do without changing anything: each page with its file, proposed route and the route it would replace, the number and size of assets, every skipped file with a reason, the count of ignored system files, whether replacing matching routes is safe, and the revision it was computed against. POST /api/library/import-site?mode=new|replace&revision=N imports the same bytes as one Rust-validated batch, so one undo step, and refuses with 409 when the site has changed since that revision. File > Import site from zip... and the MCP tool library_import_site use these routes.
-Each HTML file becomes a page holding one code section under the single-page Import HTML rules; it is editable as code. In the editor the import offers to bring pages in as editable elements, and any code section can be converted later (Convert to editable elements..., command `library.convert-section`); the section below says what that keeps. Pictures, videos and WOFF2 fonts are stored through the asset store with its type and size checks and their references rewritten; links between imported pages are rewritten to the new routes; external URLs are untouched; title and meta description fill page SEO. The archive is read in memory under hard caps (64 MiB archive, 1,000 entries, 2 MiB file list, 128 MiB unpacked, 12 folder levels, a 100 to 1 expansion limit for entries over 1 MiB, per-file caps matching the asset caps) and refused whole for absolute, drive-letter or `..` names, symbolic links and passwords. The import changes neither the site document model nor GET /api/export: an imported page exports like any page with a code section. [LIBRARY.md](LIBRARY.md) lists the exact rules.
+Each HTML file becomes a page holding one code section under the single-page Import HTML rules; it is editable as code. In the editor the import offers to bring pages in as editable elements, and any code section can be converted later (Convert to editable elements..., command `library.convert-section`); the section below says what that keeps. Pictures, videos and WOFF2 fonts are stored through the asset store with its type and size checks and their references rewritten; links between imported pages are rewritten to the new routes; external URLs are untouched; title and meta description fill page SEO. The archive is read in memory under hard caps (64 MiB archive, 40,000 entries and a 2 MiB file list in all, 1,000 entries and 12 folder levels outside the ignored `__MACOSX`, `node_modules` and dot folders, 128 MiB unpacked, a 100 to 1 expansion limit for entries over 1 MiB, per-file caps matching the asset caps) and refused whole for absolute, drive-letter or `..` names, symbolic links and passwords, and for a project's source that still needs a build step (a `package.json` at the top or one folder down with no HTML page, `.ts`, `.tsx`, `.jsx`, `.vue` or `.svelte` files under its `src` folder, a page loading such a script or holding `%PUBLIC_URL%`, or a module script importing a package by name with no import map; [LIBRARY.md](LIBRARY.md) has the exact rule). The same two routes also take loose HTML pages as `{"files": [{"name", "html"}]}` (File > Import HTML files...), read as if they were the top level of a zip. The import changes neither the site document model nor GET /api/export: an imported page exports like any page with a code section. [LIBRARY.md](LIBRARY.md) lists the exact rules.
Converting HTML to editable elements happens in the editor window, because it needs a browser to work out the cascade: the section's HTML and CSS are rendered in a hidden frame with no scripts and no outside network, each element's computed style is reduced to what differs from that element's own default, and the result goes to the engine as one batch of `node.add` commands with chosen ids (one undo step), so the engine's tag, attribute, URL and style allowlists are the last word. What converts: every tag the engine takes (structure, headings, text, inline formatting as child elements, links, pictures, lists, tables, forms and fields, figures, details, video and audio), with text, ids, link addresses and targets, picture sources, alternative text and sizes, form attributes and table spans; old presentational tags and attributes (``, `
`, `bgcolor`, `align`, `cellpadding`) become styles. Base styles only: layout (display, flex, grid, gaps, alignment, position), sizes, spacing, type (family, size, weight, style, line height, letter spacing, alignment, case, decoration), colours, background colours and gradients, borders, radius, shadows, opacity, overflow, object fit, list and table styles, transforms. Self-hosted WOFF2 faces the page uses join `design.fonts`. What stays as code, in place, as small code sections with their measured look inlined: scripts (the page script is kept unless the person unticks it), inline frames, `