Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
78cedb3
feat(canvas): the canvas can draw temporary styles in two named layer…
nodemode-ai Nov 27, 2026
e1c3645
feat(inspector): a Design field control can hand its pending value to…
nodemode-ai Nov 27, 2026
003eff3
feat(inspector): a try bar that names the choice being tried with Kee…
nodemode-ai Nov 27, 2026
734e82b
feat(inspector): the Design fields that are lists open the editor's o…
nodemode-ai Nov 27, 2026
71d469b
feat(editor): a clicked choice in Display, Direction, Align, Justify,…
nodemode-ai Nov 27, 2026
1011712
feat(motion): a click on a motion preset sets it and plays it once on…
nodemode-ai Nov 27, 2026
9f97a21
i18n: the 15 new strings of 0.34.0 (the try bar, the switch in Prefer…
nodemode-ai Nov 27, 2026
c1cd8ae
fix(editor): Undo by key, menu or toolbar during a trial only puts th…
nodemode-ai Nov 27, 2026
eb89cdc
fix(inspector): the try bar stays inside the panel of its field in tw…
nodemode-ai Nov 27, 2026
b73bff9
fix(editor): a pointer press on the canvas ends a trial, also on the …
nodemode-ai Nov 27, 2026
ce786be
fix(inspector): a Reset click empties the field as it takes the focus…
nodemode-ai Nov 27, 2026
b09abac
test(editor): the canvas layers through render and setLayer (which la…
nodemode-ai Nov 27, 2026
a4d578f
test(window): trying a choice in the real window: segment groups and …
nodemode-ai Nov 27, 2026
3240235
docs(hashout): frontend v0.34.0, the canvas layers and their order, t…
nodemode-ai Nov 27, 2026
628cc5e
docs(guide): the guide, manual, keyboard page, agent quickstart and w…
nodemode-ai Nov 27, 2026
f13e8b7
docs(changelog): 0.34.0, try a choice before keeping it, with the tes…
nodemode-ai Nov 27, 2026
ed31ead
chore(release): bump version to 0.34.0
nodemode-ai Nov 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/skills/formweb-harness/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.33.0"
version: "0.34.0"
---

# FormWeb Harness
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/formweb-harness/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.33.0"
version: "0.34.0"
---

# FormWeb Harness
Expand Down
4 changes: 3 additions & 1 deletion .docs/wiki/Architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ New features are modules at the existing layer seams. Read `frontend/HASHOUT_LOG

## Editor layers (v0.6 and v0.7)

**Commands registry.** `frontend/src/commands/registry.ts` holds one `Commands` singleton: each command has an id, label, key bindings (`Mod+Shift+S` form, read from `event.code` so they are layout independent), enabled and checked state, menu, group, description, parameters, and `mutates` and `risky` flags. A duplicate id throws and a duplicate key is dropped from the later command. `keymap.ts` installs one capture listener on the top document; it ignores inputs, textareas, selects, contenteditable and the terminal, so single keys never fire while typing, except commands marked `global` on a Mod combo. Keys pressed while focus is inside the canvas iframe are forwarded by `ui/canvas.ts` to the top document (not from editable targets), so shortcuts work after clicking the canvas. `catalogue.ts` posts the list to the backend, and `backend/app/commands_mirror.py` long-polls the window so MCP `list_ui_commands`, `describe_ui_command` and `run_ui_command` run commands in the open page, with an Allow or Deny prompt for risky ones. User rebinding is stored in `localStorage` only.
**Commands registry.** `frontend/src/commands/registry.ts` holds one `Commands` singleton: each command has an id, label, key bindings (`Mod+Shift+S` form, read from `event.code` so they are layout independent), enabled and checked state, menu, group, description, parameters, and `mutates` and `risky` flags. A duplicate id throws and a duplicate key is dropped from the later command. `keymap.ts` installs one capture listener on the top document; it ignores inputs, textareas, selects, contenteditable and the terminal, so single keys never fire while typing, except commands marked `global` on a Mod combo and, since 0.34.0, `edit.undo` and `edit.redo` on a Mod combo from a Design list field (`select[data-style]`). Keys pressed while focus is inside the canvas iframe are forwarded by `ui/canvas.ts` to the top document (not from editable targets), so shortcuts work after clicking the canvas. `catalogue.ts` posts the list to the backend, and `backend/app/commands_mirror.py` long-polls the window so MCP `list_ui_commands`, `describe_ui_command` and `run_ui_command` run commands in the open page, with an Allow or Deny prompt for risky ones. User rebinding is stored in `localStorage` only.

**Pages and layers panel (0.29.0).** `ui/context-menu.ts` is the one context menu helper: `showContextMenu(entries, anchor, {host, className, run, returnFocus})` takes items (`id`, `label`, `enabled`, `title`, `keys`, `run`) and `{separator: true}` entries, anchors at a pointer position or an element, and handles arrow keys, Home, End, Enter, Escape and outside clicks; `menuKeyPressed` and `anchorOf` serve the Menu key and Shift+F10. The layers menu (`fw-layer-menu`) and the page menu (`fw-page-menu`) are built with it. `features/panel/` holds the panel logic: `index.ts` (`installPanel`, the page and layer commands and menus, row keyboard wiring) and `pages.ts` (free copy name and slug, list moves as `page.move` commands, the home page batch). Page commands take an optional `id` so a menu can act on a page other than the open one; `invoke(id, params)` runs a registered command for such a target. `rename.ts` puts a fixed field over a row's label in the overlay root (rows are buttons and the lists are `keyed()`, so the field cannot live inside either); the row only hides its label, so nothing moves. `fold.ts` owns folding: `LayerFolds.rows()` is the layers walk (it skips paint definitions and `tspan` as before, leaves out the children of folded rows, and counts every layer for the heading), folded ids are kept per page in memory and in `localStorage` (`formweb.layers.folded`, at most 64 pages and 2,000 ids each) and the heading state in `formweb.panel.sections`; nothing goes into the site, because FormPublisher opens `.fweb` files with an older engine. A change of selection unfolds its ancestors once, so folding the parent of the selected element keeps it folded. The twisty sits in its own grid column, reserved on leaf rows, and is placed by `grid-column` so the rows' child order is unchanged. `drop.ts` is the pure drop logic and takes lists of ids, for the canvas drag and multi-select that build on it: `zoneAt(fraction, into)` (thirds over containers, halves elsewhere), `dropTarget(site, root, ids, over, zone, open)` returning `{over, zone, parent, anchor}` or null (no page roots, no drop into the dragged nodes or their descendants, only `CONTAINER_TAGS` take children, nothing in or out of linked instance structure, as `guard_structure` in the engine refuses), and `moveCommands(site, ids, target)`, which turns the move into `node.move` commands in document order against a simulated child list and leaves out no-ops, so one drop is one batch and one undo step. `pages.ts` has the same shape for pages (`pageMoveCommands(site, ids, anchor)` as `page.move` commands). `drag.ts` is the pointer controller for both lists: a 4 px threshold so a click still selects at once, a fixed drop line in the overlay root, the `is-drop-into` outline, auto-scroll within 28 px of the list edges, Escape to cancel, and the click after a drop swallowed. Row clicks go through `pageRowClick` and `layerRowClick` in `main.ts`, which pass the event on and do not stop modifier clicks.

Expand All @@ -63,6 +63,8 @@ New features are modules at the existing layer seams. Read `frontend/HASHOUT_LOG

**Design field controls (0.33.0).** `features/inspector/controls/` puts a control beside a style field made by `addStyle()` in `main.ts`, by CSS key, without owning its value: the text input stays visible and is the one stored value, and a control writes through `field.commit()`, which goes through the same `setStyle()` as typing (breakpoint scope, undo, brand check). `index.ts` is the kit: `registerControl(keys, factory)`, `installControls()` (called once after the inspector is built), three slots per field (`lead`, `trail`, `below`, mounted once; a field's state is `data-ctl` `off`, `on` or `raw` and never changes its height), the raw CSS switch in each label, and the default in `localStorage['formweb.design-controls']`, never in the site. `slider.ts` with the fixed range table in `number.ts`, `color.ts` with one picker popover in `color-picker.ts` (`color-area.ts`, `color-math.ts`), the picker's Gradient tab in `gradient.ts` and `gradient-model.ts` through `registerPickerTab`, and `grid.ts` with `grid-tracks.ts`. Controls that use plain keys carry `data-own-keys`, which `commands/keymap.ts` reads to leave plain keys to them while still running Ctrl/Cmd shortcuts. `view.design-controls` (View > Show controls in Design fields) flips the default. `frontend/HASHOUT_LOG.md` (0.33.0) has the contract and the traps.

**Try a choice (0.34.0).** A trial is canvas-only: no engine command, no `/api` call and no stored value changes until Keep. `ui/canvas.ts` `Canvas.setLayer(name, frame)` draws two named layers over the stored styles, `play` then `trial` (after the scene scrubber's motion frame; later wins), restyling only the named properties of the named nodes and never calling `render()`; a `null` value shows what the element inherits at the picked breakpoint. `features/try/` holds the contract (`types.ts`) and the kit (`index.ts`, `installTry()`, called once from `main.ts` before `installControls`): one trial at most, `begin(owner)`, `put`, `keep` (one `setStyle`, one undo step), `revert`, and `sync()` from `update()`, which drops a trial when the selection, breakpoint or page changes, design is left, or another writer changes the same property. `bar.ts` is the one Keep and Revert bar in `#overlay-root`; `segments.ts` takes over the Design segment groups with a capture-phase click; `choice-list.ts` opens one `listbox` popover for the eight `select[data-style]` fields while the select keeps the stored value. `commands/registry.ts` asks `Commands.intercept` before every `run()` and `call()`: a command reverts a trial first, a person's Undo during a trial is used up, and an agent's call always runs. The control kit hands drag values to the canvas through its `trial` option (`live`, `settled`). `features/motion/play.ts` plays a motion preset once through the `play` layer, frame by frame in the editor, with nothing added to the canvas document. `view.try-choices` and Preferences > Interface > Design fields turn trying off, stored only in `localStorage['formweb.try-choices']`. `frontend/HASHOUT_LOG.md` (0.34.0) has every way a trial ends and the traps.

**Touch, pen and Select several.** `features/hold.ts` holds what both drags share for touch: a 350 ms hold with an 8 px slop, `startsDrag` (left button only, and for a pen only `buttons === 1`, so the barrel or eraser button never starts a drag), a permanent non-passive `touchmove` listener on the list and on the canvas document that calls `preventDefault` only while a drag is armed (setting `touch-action` after `touchstart` does not affect the running gesture, so this is what keeps the list or canvas still), a capture `contextmenu` blocker on the top window and the canvas window for the length of a held gesture, and a synthetic `contextmenu` at the release point when a hold ends without moving, so the existing menus open by touch on every platform, including those that never fire `contextmenu` on a long press. `installRowDrag` and `installCanvasDrag` keep the mouse path as it was (4 px and 6 px thresholds, immediate) and run pens through it; a touch press arms a timer instead, and moving past the slop first gives the gesture back to the browser, so it scrolls. When the hold takes, the row gets `is-lifted` or the element `data-fw-lifted` (on the canvas an unselected element is selected first), the drag then follows the finger with pointer capture, and listeners filter by `pointerId`: a `pointerdown` of any other pointer or a `pointercancel` ends it with no command. A touch lift outside the list or the canvas finds no target. `features/select-mode.ts` adds the header toggles (one shared state, `picking()` in `features/selection.ts`, which makes `layerClick`, `pageClick` and `canvasClick` toggle as Ctrl+click does), the count and Done bar laid over the heading's first grid column so nothing moves, the `edit.select-mode` command, Escape on the window, and a capture `dblclick` blocker on the lists and the canvas window while the mode is on; `main.ts` repaints it from `update()`.

**Vector module.** `frontend/src/vector/` draws and edits on an overlay above the canvas. The model is plain engine data: an `svg` node holding `path` nodes, with `d` always the rendered result and `data-fw-vector` the anchor model (including Live Corners, which stay non-destructive). One gesture is one engine batch, so undo, revision and MCP behave as for any edit. The tag and attribute allowlist, the `d` grammar and same-svg `url(#id)` references are enforced independently in `formweb-model/src/vector.rs`, `ui/canvas.ts` and `backend/app/assets.py`, which must stay in step. `POST /api/vector/import-svg` cleans imported SVG with the same rules. Tool letters are handled by the vector editor's own capture listener, which runs before the keymap.
Expand Down
2 changes: 1 addition & 1 deletion .docs/wiki/Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The user guide teaches FormWeb to a person who has never used it: plain words, n
- [Your first site](https://github.com/nodemode-dev/formweb/blob/main/docs/guide/01-first-site.md): from an empty page to an exported zip.
- [Pages and layers](https://github.com/nodemode-dev/formweb/blob/main/docs/guide/02-pages-and-layers.md)
- [Working on the canvas](https://github.com/nodemode-dev/formweb/blob/main/docs/guide/03-canvas.md): select, the right-click menu, dragging with the layout grid it snaps to, View > Show layout outlines and View > Show hover outlines.
- [The right panel](https://github.com/nodemode-dev/formweb/blob/main/docs/guide/04-right-panel.md): tabs, sliders, the color picker and gradients, the grid layout chooser, Search properties and breakpoints.
- [The right panel](https://github.com/nodemode-dev/formweb/blob/main/docs/guide/04-right-panel.md): tabs, trying a choice before keeping it, sliders, the color picker and gradients, the grid layout chooser, motion presets, Search properties and breakpoints.
- [Page background and theme colors](https://github.com/nodemode-dev/formweb/blob/main/docs/guide/05-background-and-theme-colors.md)
- [Preview](https://github.com/nodemode-dev/formweb/blob/main/docs/guide/06-preview.md)
- [Audit](https://github.com/nodemode-dev/formweb/blob/main/docs/guide/07-audit.md)
Expand Down
2 changes: 1 addition & 1 deletion .docs/wiki/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

FormWeb is the form family's visual website authoring application. A Rust engine owns editable sites and exports browser-native HTML, CSS and JavaScript. A Python/FastAPI service supplies projects, local publications, forms and MCP. A vanilla TypeScript/Vite window displays and changes the same engine state.

Release version: 0.33.0. Author: nodemode-ai. The repository README and changelog record this release.
Release version: 0.34.0. Author: nodemode-ai. The repository README and changelog record this release.

| Surface | Current boundary |
| --- | --- |
Expand Down
Loading
Loading