Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
86b8ff1
feat(import): the import review names the hosts a page loads styleshe…
nodemode-ai Nov 27, 2026
b15966b
feat(convert): a page converted to elements with its script kept keep…
nodemode-ai Nov 27, 2026
1c868a5
feat(audit): a module that draws one marker per element with an audit…
nodemode-ai Nov 27, 2026
45ad361
feat(desktop): Preferences chooses where exports are saved (Downloads…
nodemode-ai Nov 27, 2026
bcffcd3
fix(wave): the import review reads a link the way a browser does, so …
nodemode-ai Nov 27, 2026
db33c01
i18n: the 55 new strings of 0.35.0 (audit markers, where exports are …
nodemode-ai Nov 27, 2026
95e8d73
fix(wave): an audit marker sits centred on the top right corner of it…
nodemode-ai Nov 27, 2026
2f9df78
feat(search): Search properties lists what matches as text with its p…
nodemode-ai Nov 27, 2026
4285801
i18n: the changed sentence under the audit marker switch and the sent…
nodemode-ai Nov 27, 2026
9813bc5
fix(editor): closing a dialog whose opener is gone, as after a menu c…
nodemode-ai Nov 27, 2026
5f9f9b8
ci(window): the window tests are built once and run as eight parts si…
nodemode-ai Nov 27, 2026
33a9565
test(service): the import review's outside list, its hosts read the w…
nodemode-ai Nov 27, 2026
98a0e32
test(editor): the rules kept for a script after a conversion, where e…
nodemode-ai Nov 27, 2026
4f8df4d
test(window): audit markers, where exports are saved with a stand-in …
nodemode-ai Nov 27, 2026
97b4e4f
docs(hashout): audit markers, the export folder, outside files in the…
nodemode-ai Nov 27, 2026
4323f69
docs(guide): the guide, manual, wiki and agent pages describe audit m…
nodemode-ai Nov 27, 2026
25a69bc
docs(changelog): the 0.35.0 section
nodemode-ai Nov 27, 2026
04587ec
test(window): four older tests that used Search properties to reach a…
nodemode-ai Nov 27, 2026
b15c31b
docs(changelog): the test counts and two more known gaps of 0.35.0
nodemode-ai Nov 27, 2026
04b0a72
chore(release): bump version to 0.35.0
nodemode-ai Nov 27, 2026
c23f372
feat(import): a file from the web that a person ticks in the review i…
nodemode-ai Nov 28, 2026
c90cd17
feat(convert): a page brought in with files from the web has its scri…
nodemode-ai Nov 28, 2026
d323f8d
feat(import): the review has a tick for each file a page loads from t…
nodemode-ai Nov 28, 2026
b9acc8c
feat(import): a page that brought files from the web keeps the class …
nodemode-ai Nov 28, 2026
60dbe44
i18n: the strings of the review's ticks, the downloads, the sealed ru…
nodemode-ai Nov 28, 2026
23c19bd
fix(import): the result of an import where only some pages ran their …
nodemode-ai Nov 28, 2026
6a920be
feat(convert): the sealed run can hand back a checked copy of what th…
nodemode-ai Nov 28, 2026
ab3151b
fix(import): a downloaded stylesheet that still names an outside addr…
nodemode-ai Nov 28, 2026
c010335
fix(convert): the sealed frame cannot navigate itself to another addr…
nodemode-ai Nov 28, 2026
f41d583
test(import): 30 service tests for the download's address, redirect, …
nodemode-ai Nov 28, 2026
1d559fd
test(convert): 9 editor function tests for the check of the sealed fr…
nodemode-ai Nov 28, 2026
abd621e
test(window): 9 window tests for the review's ticks and the sealed ru…
nodemode-ai Nov 28, 2026
d9eb455
docs(guide): the guide, the manual and the library reference describe…
nodemode-ai Nov 28, 2026
f153c88
docs(hashout): why the download has one connection seam, why the revi…
nodemode-ai Nov 28, 2026
008c097
docs(changelog): 0.36.0
nodemode-ai Nov 28, 2026
8c21c22
docs(hashout): what the security pass found in the sealed frame and t…
nodemode-ai Nov 28, 2026
9ea4e85
test(window): two import review tests from 0.35.0 follow the sentence…
nodemode-ai Nov 28, 2026
c53dcd3
chore(release): bump version to 0.36.0
nodemode-ai Nov 28, 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.34.0"
version: "0.36.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.34.0"
version: "0.36.0"
---

# FormWeb Harness
Expand Down
8 changes: 5 additions & 3 deletions .docs/wiki/Architecture.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .docs/wiki/Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ The user guide teaches FormWeb to a person who has never used it: plain words, n
- [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)
- [Export and publishing](https://github.com/nodemode-dev/formweb/blob/main/docs/guide/08-export-and-publish.md)
- [Importing](https://github.com/nodemode-dev/formweb/blob/main/docs/guide/09-importing.md)
- [Audit](https://github.com/nodemode-dev/formweb/blob/main/docs/guide/07-audit.md): the audit, Select, and audit markers on the page.
- [Export and publishing](https://github.com/nodemode-dev/formweb/blob/main/docs/guide/08-export-and-publish.md): the zip, and where the desktop app saves exports.
- [Importing](https://github.com/nodemode-dev/formweb/blob/main/docs/guide/09-importing.md): the review names files a page loads from the web; a converted page keeps the style rules its script needs.
- [Components and the Library](https://github.com/nodemode-dev/formweb/blob/main/docs/guide/10-components-and-library.md)
- [Keyboard shortcuts](https://github.com/nodemode-dev/formweb/blob/main/docs/guide/11-keyboard-shortcuts.md)
- [Coming from Dreamweaver or another visual builder](https://github.com/nodemode-dev/formweb/blob/main/docs/guide/12-coming-from-other-builders.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.34.0. Author: nodemode-ai. The repository README and changelog record this release.
Release version: 0.36.0. Author: nodemode-ai. The repository README and changelog record this release.

| Surface | Current boundary |
| --- | --- |
Expand Down
8 changes: 6 additions & 2 deletions .docs/wiki/Library.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ Placeholders in a template are `$parent`, `@@key@@` for a node id and `{{field}}

## Import site from zip

`backend/app/site_import.py` reads a static site zip in memory with `zipfile` under hard caps (64 MiB; 40,000 entries and a 2 MiB file list checked from the end record before parsing; then 1,000 entries and 12 levels counted only outside the ignored `__MACOSX`, `node_modules` and dot folders; 128 MiB unpacked, an expansion limit, per-type file caps) and refuses traversal, absolute and drive-letter names, links and passwords outright. A project's source (a `package.json` at the top or one folder down, plus one of: no HTML page; `.ts`, `.tsx`, `.jsx`, `.vue` or `.svelte` files under that project's `src` folder; a page loading such a script, holding `%PUBLIC_URL%`, or loading a module script that imports a package by name while no page has an import map) is refused with a sentence that says to build it and import the output folder (`_project`; `_peek` reads names from the file list of an archive refused before it is opened, only to choose that sentence). Both routes also take loose pages as JSON, `{"files": [{"name", "html"}]}`, which `read_files` turns into the same structure as a zip holding them at its top level. The review route plans without changing anything; the import route re-reads the same bytes, refuses a changed revision, stores assets through `ingest` and sends one batch of `page.add`, `page.update`, `node.add` and `code.section.set` (and `node.remove` in replace mode, offered only when no extension entry or component source points into the page). Each page is one code section built with Import HTML's `kit_script`, so the script policy is the same; both paths use `site_import.script_type` to leave out script elements that are not JavaScript (JSON-LD among them) with the same warning. The editor view is `features/library/site-import.ts` (File > Import site from zip..., `file.import-site`, and the review of File > Import HTML files..., `file.import-html`); both commands share its one hidden `multiple` file input, whose `accept` `choose(kind)` sets just before `click()`, after `reset()` has cleared any earlier import, so the picker opens inside the person's click over a clean view. The view has one Bring ... in as choice for pages and a section, its result note at the end of the scroller and work in progress on the import button. Agents use `library_import_site`.
`backend/app/site_import.py` reads a static site zip in memory with `zipfile` under hard caps (64 MiB; 40,000 entries and a 2 MiB file list checked from the end record before parsing; then 1,000 entries and 12 levels counted only outside the ignored `__MACOSX`, `node_modules` and dot folders; 128 MiB unpacked, an expansion limit, per-type file caps) and refuses traversal, absolute and drive-letter names, links and passwords outright. A project's source (a `package.json` at the top or one folder down, plus one of: no HTML page; `.ts`, `.tsx`, `.jsx`, `.vue` or `.svelte` files under that project's `src` folder; a page loading such a script, holding `%PUBLIC_URL%`, or loading a module script that imports a package by name while no page has an import map) is refused with a sentence that says to build it and import the output folder (`_project`; `_peek` reads names from the file list of an archive refused before it is opened, only to choose that sentence). Both routes also take loose pages as JSON, `{"files": [{"name", "html"}]}`, which `read_files` turns into the same structure as a zip holding them at its top level. The review route plans without changing anything; the import route re-reads the same bytes, refuses a changed revision, stores assets through `ingest` and sends one batch of `page.add`, `page.update`, `node.add` and `code.section.set` (and `node.remove` in replace mode, offered only when no extension entry or component source points into the page). Each page is one code section built with Import HTML's `kit_script`, so the script policy is the same; both paths use `site_import.script_type` to leave out script elements that are not JavaScript (JSON-LD among them) with the same warning. The editor view is `features/library/site-import.ts` (File > Import site from zip..., `file.import-site`, and the review of File > Import HTML files..., `file.import-html`); both commands share its one hidden `multiple` file input, whose `accept` `choose(kind)` sets just before `click()`, after `reset()` has cleared any earlier import, so the picker opens inside the person's click over a clean view. The view has one Bring ... in as choice for pages and a section, its result note at the end of the scroller and work in progress on the import button. Since 0.35.0 the review gives each page `outside` and `outsideMore`: the stylesheets and scripts it loads from other hosts as `{kind, host, url}`, read by `outside_file` the way a browser reads a link (no regular expression, bounded), in document order, at most 20; nothing is fetched. `outsideWarnings` holds the indexes of the older outside-script and head-stylesheet warnings that `outside` names in full (every counted reference parsed and `outsideMore` 0), and the view leaves those warnings out of the row. The view names those hosts per page in plain text and starts the Bring choice on Code sections, with the reason, when any page has them (set once when the review arrives). Agents use `library_import_site`.

## Convert to editable elements

`frontend/src/features/convert/` turns a code section into ordinary elements: `rules.ts` (pure: tag and attribute mapping, style reduction against a bare twin, text runs, selector scoping, the result sentence), `measure.ts` (two hidden `sandbox="allow-same-origin"` frames with a `default-src 'none'` policy, one with the section's sanitized HTML and CSS at 1440 px, one with the export's base styles and a bare twin per new element) and `index.ts` (the `library.convert-section` command, its dialog, the canvas and layer menu entry, and one `/api/batch` of `node.add` with chosen ids, retried without any value the engine refuses). Import HTML and Import site from zip offer Editable elements or Code sections (`features/library/bring.ts`); with elements they call the converter through the library hook `convert` after the import. The MCP import tools reach it through the window command bridge with `bring_in: "elements"`. An own-asset background picture sized cover or contain becomes an `img` behind the content (`rules.ts` `backdropLayers`). Limits, losses and the security of the measuring frame: `docs/LIBRARY.md`, Convert to editable elements.
`frontend/src/features/convert/` turns a code section into ordinary elements: `rules.ts` (pure: tag and attribute mapping, style reduction against a bare twin, text runs, selector scoping, the result sentence), `measure.ts` (two hidden `sandbox="allow-same-origin"` frames with a `default-src 'none'` policy, one with the section's sanitized HTML and CSS at 1440 px, one with the export's base styles and a bare twin per new element) and `index.ts` (the `library.convert-section` command, its dialog, the canvas and layer menu entry, and one `/api/batch` of `node.add` with chosen ids, retried without any value the engine refuses). Import HTML and Import site from zip offer Editable elements or Code sections (`features/library/bring.ts`); with elements they call the converter through the library hook `convert` after the import. The MCP import tools reach it through the window command bridge with `bring_in: "elements"`. An own-asset background picture sized cover or contain becomes an `img` behind the content (`rules.ts` `backdropLayers`). Since 0.35.0, with the script kept, `measure.ts` `keepRules` stores the rules no converted element uses (and the class rules the script names) in the script's code section CSS, scoped to the converted root and guarded with `:where(:not([data-fw-node]))`, at most 3,000 rules and 192 KiB, with a 2 s matching bound; `fillWindow` writes heights that followed the window in vh, so a page that filled the window fills the canvas and Preview. Since 0.36.0 `convertSections(ids, keepScript, part, run)` with `run` true first runs the section's script in `sealed.ts` (a hidden `sandbox="allow-scripts"` srcdoc frame with a no-network policy, FormWeb's measuring script first, one checked plain-data message back) and measures the section's own markup with the classes and attributes it had afterwards and its CSS followed by the rules the script produced; everything after that is the 0.35.0 path, and `run` false is unchanged. The site review passes `run` for pages listed in the import's `outside.pages`. Limits, losses and the security of the measuring frames: `docs/LIBRARY.md`, Convert to editable elements.

## Files from the web (0.36.0)

`backend/app/outside_fetch.py` downloads one ticked file at a time for the review, through one network seam `connect(host, port, pick, seconds)`: the caller's `pick` holds the every-address-public check and a connection on which `pick` was never called is refused, so a stand-in seam cannot skip it. Guards, limits and the token store (in memory, 30 files and 8 MiB per token, 20 tokens, 20 minutes idle) are listed in `docs/LIBRARY.md`, Import site from zip. Routes `POST /api/library/outside/fetch` and `/outside/drop` in `library_routes.py`; `import-site?...&outside=TOKEN` merges, in `site_import.py`, only kept files the page names. The review (`features/library/site-import.ts`) keeps one map of outside files by URL across pages, sends fetches and drops on one promise chain, and drops the whole token on a new pick, Back, reset or after the import; MCP tools never fetch.

## Page components

Expand Down
2 changes: 1 addition & 1 deletion .docs/wiki/Publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ FormWeb exports portable HTML/CSS/JavaScript, serves immutable local versions an

The Rust exporter creates responsive page output, queried/templated CMS records, locale routes/alternates, metadata and runtime behavior. The Python service validates output paths, bundles stored raster assets, archives exports and hosts publications. Preview uses this compiled output in persistent opaque iframe slots; the old design/runtime remains visible until its replacement loads. Check warnings and desktop/mobile behavior before sharing output.

In the editor, File > Export static site (`file.export`, the toolbar's Export button) and File > Download .fweb project (`file.download`) go through `deliver()` in `frontend/src/ui/downloads.ts`. While the ZIP is fetched the Export button is `disabled` with `aria-busy="true"` (same size, progress pointer, pulsing icon, still with reduced motion) and `file.export` reports itself disabled, so no second export starts. `download()` in `frontend/src/api.ts` attaches its hidden link to the document before the click, keeps the blob URL for 60 seconds, and throws the service's `detail` when the reply is not OK. The result is shown in `ui/notice.ts`, one notice in the overlay root (role `status`, 12 seconds, 30 for an error, paused while hovered or focused): "Downloaded coldmere-site.zip" in a browser; in the desktop shell "Exported coldmere-site.zip to your Downloads folder", then, when the shell's `formweb-download` window event names the path it really wrote, the folder and a Show in folder action (the `reveal_download` command). When it cannot show the file, `reveal_download` answers a code with the file, its folder and the system's reason (`download.none`, `download.moved`, `download.reveal-failed`), never an English sentence, and `shellSentence()` in `ui/downloads.ts` turns it into a translated one. The engine start failures the shell shows in a native dialog before the editor exists stay English, since no editor is there to translate them. A failed export shows its message in the notice and the status line. `GET /api/export` itself is unchanged: same route, `site-export.zip` name and headers, which FormPublisher reads.
In the editor, File > Export static site (`file.export`, the toolbar's Export button) and File > Download .fweb project (`file.download`) go through `deliver()` in `frontend/src/ui/downloads.ts`. While the ZIP is fetched the Export button carries `aria-disabled="true"` and `aria-busy="true"` (same size, progress pointer, pulsing icon, still with reduced motion; not `disabled`, which would drop the focus to the page body) and `file.export` reports itself disabled, so no second export starts. Since 0.35.0 every download of the editor goes through `deliver()` or `deliverFile()` (QR codes, the Website studio, the vector exports with `saveBlob()`), so in the desktop app all of them follow Preferences > General > Where exports are saved (`features/export-folder.ts`, handed to the shell's `set_export_place`); in ask mode the shell's save dialog (`ask_export_place`) opens before the fetch, ask-mode deliveries run one at a time, and a cancel returns null and says "Nothing was saved.". The `formweb-download` event now also carries `unusable` (the chosen folder that could not be used, and the file went to Downloads) and, for a download refused in ask mode, `reason: "not-asked"`. `download()` in `frontend/src/api.ts` attaches its hidden link to the document before the click, keeps the blob URL for 60 seconds, and throws the service's `detail` when the reply is not OK. The result is shown in `ui/notice.ts`, one notice in the overlay root (role `status`, 12 seconds, 30 for an error, paused while hovered or focused): "Downloaded coldmere-site.zip" in a browser; in the desktop shell "Exported coldmere-site.zip to your Downloads folder", then, when the shell's `formweb-download` window event names the path it really wrote, the folder and a Show in folder action (the `reveal_download` command). When it cannot show the file, `reveal_download` answers a code with the file, its folder and the system's reason (`download.none`, `download.moved`, `download.reveal-failed`), never an English sentence, and `shellSentence()` in `ui/downloads.ts` turns it into a translated one. The engine start failures the shell shows in a native dialog before the editor exists stay English, since no editor is there to translate them. A failed export shows its message in the notice and the status line. `GET /api/export` itself is unchanged: same route, `site-export.zip` name and headers, which FormPublisher reads.

Local immutable /published/ URLs remain available while the service runs. Promotion changes only the active /sites/ route; rollback selects an earlier version. The seo.redirects map produces a portable manifest and the active local route consumes it. Splat rules are allowed: a path `/x/*` (one star, last segment only, non-empty base) may redirect to a target that uses `/:splat` once. `:splat` needs a splat path. A splat into its own prefix (`/docs/*` to `/docs/:splat`), `/*`, `/a/*/b`, `/a*` and splat cycles are refused. Exact paths win over splats, then the longest splat prefix. `redirects.json` keeps its shape (a map of path to target or {to, status}). Published releases follow splats and never let a splat become a redirect off the site. A page routed at `/404` is also exported as a root `404.html` (its URLs start at the base URL's path, such as `/assets/...` or `/repo/assets/...`, so it works at any missing address; not in the sitemap or routes.json), so static hosts that look for `404.html` find it; sites without a 404 page export as before. A published release answers a missing path with that page and status 404, after the same visitor and password gates as the page itself, and an unpublished preview answers a missing path with it too when the export has one. The served copy sends fragment-only links (the skip link, in-content anchors) to the request's own path so they scroll on the same document. With a base URL unset or example.com, a site with a 404 page gets an export warning and the audit issue seo.base-url-404; the Base URL field's help says that leaving it empty keeps the https://example.com placeholder. Protected member routes require backend authorization, and public static export of gated content is rejected. Page passwords live in the service database (`passwords.py`), so `Studio.publish` passes their routes to the exporter as `passwordRoutes`: the pages at or under those routes stay out of `search-index.json`, and so do the pages under a member gate, which `search::index` reads from the site itself; the index in the publication's folder therefore holds no gated text, whoever later copies that folder to another host. The exporter no longer drops `site.formweb.json` for them: `Studio.publish` is the one place that leaves it out of a local publication, for every site, and `serve_release` refuses it (`PRIVATE_FILES`) for releases written before that. `serve_release` also filters `search-index.json` at request time (`public_search_index`), which covers releases made before a password was set.

Expand Down
Loading
Loading