diff --git a/CHANGELOG.md b/CHANGELOG.md index 126c128..093eb6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ Every release of FormDesign, newest first. Versions follow semver; tags read `v*.*.*`. +## 0.93.1 · 2026-11-20 + +- Building the desktop app on Windows now stops with an error when the engine or the layout core cannot be copied into place (for example while FormDesign is still open), instead of finishing with the copies left from an earlier build. +- The desktop app's own source files carry no comments; what they explained is kept in the desktop shell's log. Nothing in the app changes. +- The three browser demos are rebuilt with this version. + ## 0.93.0 · 2026-11-20 - FormDesign's colour and layout settings carry every name used across the Form family's apps, so panels shared with the other apps find all of them. Nothing on screen changes. diff --git a/README.md b/README.md index bdcced5..4e3cfd9 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@
-
+
diff --git a/backend/HASHOUT_LOG.md b/backend/HASHOUT_LOG.md
index 66d0766..b8bf022 100644
--- a/backend/HASHOUT_LOG.md
+++ b/backend/HASHOUT_LOG.md
@@ -2,8 +2,20 @@
Living log for the engine service. Source files stay comment-free; what they would have said lives here, indexed. Read it before editing `backend/`.
-Current build version: v0.93.0
-Last updated: 2026-11-20 · no engine change in 0.93.0 (the version string only) · a stored path for Codex, Cursor and Antigravity under the agents seal · the Windows engine is frozen with no console window · a leftover engine that has ended but was not collected counts as gone on macOS; 2026-11-19 · the desktop engine keeps a log, holds a lock on its data folder, leaves when its app has gone and serves nothing when started alone · the family's finder 1.0.1 for the four agent programs · an Antigravity tab and agents install antigravity · the tests find only stand-in agent programs · the engine starts with no output streams · only the app window can change what agents may do, open a terminal or answer an approval; the stored agent choices are sealed; the command line is an agent like any other; agents/manifest.json says what the app offers agents; the use_tool description says 41 layout tools; the engine side of the shared dock's contract; 2026-11-13 · no engine change in 0.87.0 (version string only; the demo covers and browser demo pages are in the frontend log); a recent document's first-page thumbnail; three demos built on demand by Make; counts --check fails if a sparkle icon returns; the desktop extension, attach mode and the plugin manifest; 2026-11-11 · engine commands run in the active document; Save to a folder that cannot be made answers 422; a tools/call name that is not a string gets a JSON-RPC error; PNG and JPEG export count pages from 1; the in-app token reaches Claude Code in a private file; 2026-11-10 · Claude chat keeps only the screenshots its messages still show; Claude chat history is found under a non-ASCII agent folder; a prompt that starts with "-" reaches Claude Code as a prompt; text with a non-ASCII style name is placed; bad input to open, pack edits, make, tabs and media answers 4xx; LibreOffice gets a well-formed profile URL; links found in contact and footer text keep their query strings; fixed-layout EPUB marks every animated page as scripted; images from different sources with the same name stay distinct; book operations run one at a time; malformed agent, plug-in, package and book input gets an error message; Edit Original opens only image, vector and PDF files; counts --check reads only the MCP tool count; Windows Node check and install --lite; clean.bat --all removes each folder on its own; build_frontend.bat restores its caller's folder; agents install codex writes valid TOML on Windows; the MCP stdio bridge runs under Python 3.9; every window socket request gets an answer; a Claude Code launch is quoted for the login shell that runs it; a failed thumbnail leaves no document open; a video's poster file is used only when it is a real image; only the window installs, enables and removes plug-ins; PDF, DXF and PDF comment imports run off the event loop; one-column CSV files are read; a bad or empty zip becomes an intake warning; a wrong-shaped template spec answers problems; phone photos are measured and placed upright; a long paste reaches the terminal whole; intake and PDF reading by agents no longer freeze the engine; review comments posted at the same time all stay; a failing tool or a malformed MCP request gets a JSON-RPC answer; names without Latin letters get their own file; downloads with non-Latin names arrive; an engine on a fallback port tells everyone its real port; non-Latin names save on Windows; save_document asks before overwriting the file it will really write; an uploaded file name cannot leave the pack folder; a website export never deletes files it did not write; published sites and placed assets run sandboxed; a plug-in's fetch checks every redirect hop; document text stays inside a published page's JSON-LD block; run_commands asks for approval wherever run_command does; a template is saved only inside the template library; only the in-app token makes a client the in-app Claude Code; 2026-10-31 · .js, .mjs and .css keep their types on Windows; formdesign-core links the C runtime statically on Windows; 2026-10-30 · the Windows desktop build stops on a failed bundle step; 2026-10-26 · fixes the test suite found (FB-045 to FB-049); 2026-10-25 · LocalGuard; 2026-10-23 · full fonts for the Reserved Font Name families; the ICC profile in the frozen engine
+Current build version: v0.93.1
+Last updated: 2026-11-20 · no engine change in 0.93.1 (the version string only); the Windows freeze stops when a sidecar cannot be copied · no engine change in 0.93.0 (the version string only) · a stored path for Codex, Cursor and Antigravity under the agents seal · the Windows engine is frozen with no console window · a leftover engine that has ended but was not collected counts as gone on macOS; 2026-11-19 · the desktop engine keeps a log, holds a lock on its data folder, leaves when its app has gone and serves nothing when started alone · the family's finder 1.0.1 for the four agent programs · an Antigravity tab and agents install antigravity · the tests find only stand-in agent programs · the engine starts with no output streams · only the app window can change what agents may do, open a terminal or answer an approval; the stored agent choices are sealed; the command line is an agent like any other; agents/manifest.json says what the app offers agents; the use_tool description says 41 layout tools; the engine side of the shared dock's contract; 2026-11-13 · no engine change in 0.87.0 (version string only; the demo covers and browser demo pages are in the frontend log); a recent document's first-page thumbnail; three demos built on demand by Make; counts --check fails if a sparkle icon returns; the desktop extension, attach mode and the plugin manifest; 2026-11-11 · engine commands run in the active document; Save to a folder that cannot be made answers 422; a tools/call name that is not a string gets a JSON-RPC error; PNG and JPEG export count pages from 1; the in-app token reaches Claude Code in a private file; 2026-11-10 · Claude chat keeps only the screenshots its messages still show; Claude chat history is found under a non-ASCII agent folder; a prompt that starts with "-" reaches Claude Code as a prompt; text with a non-ASCII style name is placed; bad input to open, pack edits, make, tabs and media answers 4xx; LibreOffice gets a well-formed profile URL; links found in contact and footer text keep their query strings; fixed-layout EPUB marks every animated page as scripted; images from different sources with the same name stay distinct; book operations run one at a time; malformed agent, plug-in, package and book input gets an error message; Edit Original opens only image, vector and PDF files; counts --check reads only the MCP tool count; Windows Node check and install --lite; clean.bat --all removes each folder on its own; build_frontend.bat restores its caller's folder; agents install codex writes valid TOML on Windows; the MCP stdio bridge runs under Python 3.9; every window socket request gets an answer; a Claude Code launch is quoted for the login shell that runs it; a failed thumbnail leaves no document open; a video's poster file is used only when it is a real image; only the window installs, enables and removes plug-ins; PDF, DXF and PDF comment imports run off the event loop; one-column CSV files are read; a bad or empty zip becomes an intake warning; a wrong-shaped template spec answers problems; phone photos are measured and placed upright; a long paste reaches the terminal whole; intake and PDF reading by agents no longer freeze the engine; review comments posted at the same time all stay; a failing tool or a malformed MCP request gets a JSON-RPC answer; names without Latin letters get their own file; downloads with non-Latin names arrive; an engine on a fallback port tells everyone its real port; non-Latin names save on Windows; save_document asks before overwriting the file it will really write; an uploaded file name cannot leave the pack folder; a website export never deletes files it did not write; published sites and placed assets run sandboxed; a plug-in's fetch checks every redirect hop; document text stays inside a published page's JSON-LD block; run_commands asks for approval wherever run_command does; a template is saved only inside the template library; only the in-app token makes a client the in-app Claude Code; 2026-10-31 · .js, .mjs and .css keep their types on Windows; formdesign-core links the C runtime statically on Windows; 2026-10-30 · the Windows desktop build stops on a failed bundle step; 2026-10-26 · fixes the test suite found (FB-045 to FB-049); 2026-10-25 · LocalGuard; 2026-10-23 · full fonts for the Reserved Font Name families; the ICC profile in the frozen engine
+
+---
+
+## v0.93.1 · the Windows freeze stops when a sidecar cannot be copied into src-tauri\binaries (2026-11-20)
+
+- refers-to: setup/freeze_backend.bat (the two `copy /y` lines)
+- kind: fix
+- logged: v0.93.1 · 2026-11-20
+
+Found by reading the PyInstaller command line of `setup/freeze_backend.bat` token by token against `setup/freeze_backend`: with `!WINDOW!` and `!DATA!` expanded (and the fonts folder present), both give PyInstaller the same 42 arguments in the same order, every `--add-data` pair separate, no glued token, no double space or tab, every line CRLF. The difference was after it: the Unix script runs under `set -e`, so a failed `cp` of the engine or the core ends it, but the `.bat` copied both with `copy /y ... >nul` and went on. A copy onto a sidecar that a running FormDesign still holds fails on Windows; the script then ran `--selfcheck` on the old engine left in `src-tauri\binaries`, passed, and said the sidecars were ready. Both copies now end with `|| exit /b 1`, as the Unix twin stops. Read again token by token after the edit; not run (no Windows here).
+
+Other differences between the twins, left as they are: the `.bat` takes the target triple only from `rustc -vV` (the Unix script also takes `FORMDESIGN_TARGET`), looks for the core only at `native\target\release\formdesign-core.exe` (the Unix script also takes `FORMDESIGN_CORE` and `native/bin`), and says nothing when the font install fails (the Unix script says the bundle falls back to the core's fonts); in each case the Windows build does what the default Unix build does.
---
diff --git a/backend/app/__init__.py b/backend/app/__init__.py
index 173e44b..c9200b5 100644
--- a/backend/app/__init__.py
+++ b/backend/app/__init__.py
@@ -1 +1 @@
-__version__ = "0.93.0"
+__version__ = "0.93.1"
diff --git a/demo/assets/demo.js b/demo/assets/demo.js
index 8d6fd03..6a0001a 100644
--- a/demo/assets/demo.js
+++ b/demo/assets/demo.js
@@ -627,7 +627,7 @@ struct Out {
Documents you opened or saved, newest first.
Documents you open appear here.
Original templates for print, screen and the web. Each opens as a new document with sample text and pictures.
${b(e.source)} was rebuilt as an editable document with ${e.pages} page${e.pages===1?``:`s`}${e.via?` through ${b(e.via)}`:``}.
`];i.push(`${b(e)}
`).join(``)}`),t.body.append(f(`${n}
A .fdes file keeps the layout, its slots and the content it was made from. End the name with .idml for an IDML package or .fdoc for the bare layout.
`));let i=p(r.body,`.fd-save-path`),a=``;try{a=(await w(`/capabilities`)).paths?.projects??``}catch{}let o=(t.title||`Untitled`).replace(/\.(fdes|fdoc|idml)$/i,``);i.value=t.path&&/\.fdes$/i.test(t.path)?t.path:`${a?a.replace(/[\\/]$/,``)+(a.includes(`\\`)?`\\`:`/`):``}${o}.fdes`;let s=f(``),c=f(``);r.foot.append(c,s);let l=await new Promise(e=>{c.addEventListener(`click`,()=>{r.close(),e(null)}),s.addEventListener(`click`,()=>{e(i.value.trim()||null),r.close()}),i.addEventListener(`keydown`,e=>{e.key===`Enter`&&s.click()}),r.onClose=()=>{r.scrim.remove(),e(null)},r.open(i)});if(!l)return!1;n=l}try{return x(`Saved ${(await w(`/documents/save`,{json:n?{path:n}:{}})).path}`),D.refreshMeta(),!0}catch(e){return x(E(e.message),`error`),!1}}async closeDoc(e){let t=D.docs[e];if(t){if(t.dirty){D.active!==e&&await D.activate(e);let n=await wee(t.title);if(n===`cancel`||n===`save`&&!await this.save(!1))return}try{await w(`/documents/close`,{json:{index:e}})}catch(e){x(E(e.message),`error`)}D.refreshMeta()}}async place(){let e=await this.pickFiles(`image/*,video/*,audio/*,.pdf,.svg,.eps,.txt,.md,.docx,.rtf,.csv,.xlsx,.idml,.html`,!0);if(e.length)try{let t=await this.upload(e),n=!1;if(t.length===1){for(let e of this.placeHandlers)if(await e(t[0])){n=!0;break}}if(n)return;t.length>1?await this.runCore(`place.load`,{paths:t}):await this.runCore(`file.place`,{path:t[0]}),this.setHint(`Click or drag to place the loaded content`)}catch(e){x(E(e.message),`error`)}}onRequest(e){let t=e?.kind??Object.keys(e??{})[0];if(t===`toast`){let t=typeof e.text==`string`?E(e.text).trim():``;t&&x(t,`error`)}else if(t===`pick`&&(e.purpose??e.pick?.purpose)===`place`)this.place();else if(t===`view`){let t=e.params??{};typeof t.page==`number`&&this.viewport.showPage(t.page)}else if(t===`dialog`){let t=String(e.id??``),n=D.commands.find(e=>e.id===t||e.id.endsWith(`.${t}`));n&&this.paramsDialog(n,`Set the options, then run.`,e.params??{})}}renderTools(){let e=p(this.root,`.cv-rail-tools`);if(e.childElementCount||!D.tools.length)return;D.tools.forEach((t,n)=>{if(!t.length){e.appendChild(f(``));return}let r=t[0],i=f(``);i.dataset.group=String(n),i.dataset.tool=r.id,g(i,r.shortcut?`${r.label} (${r.shortcut})`:r.label),i.addEventListener(`click`,()=>void D.setTool(i.dataset.tool));let a=0,o=()=>this.toolFlyout(i,t);i.addEventListener(`pointerdown`,()=>{t.length>1&&(a=window.setTimeout(o,380))}),i.addEventListener(`pointerup`,()=>window.clearTimeout(a)),i.addEventListener(`pointerleave`,()=>window.clearTimeout(a)),i.addEventListener(`contextmenu`,e=>{e.preventDefault(),t.length>1&&o()}),e.appendChild(i)});let t=p(this.root,`.fd-fillstroke`);t.childElementCount||t.append(f(`${a3(`fill-stroke`,22)}`)),this.syncTools()}toolFlyout(e,t){this.flyout?.remove();let n=f(``);for(let r of t){let t=f(``);s(t.querySelectorAll(`span`)[0],r.label),s(p(t,`.cv-flyout-key`),r.shortcut??``),t.addEventListener(`click`,()=>{e.dataset.tool=r.id,e.innerHTML=a3(r.icon,20),g(e,r.shortcut?`${r.label} (${r.shortcut})`:r.label),D.setTool(r.id),n.remove(),this.flyout=null}),n.appendChild(t)}document.getElementById(`overlay-root`)?.appendChild(n);let r=e.getBoundingClientRect();n.style.left=`${Math.round(r.right+6)}px`,n.style.top=`${Math.round(r.top)}px`,this.flyout=n;let i=e=>{n.contains(e.target)||(n.remove(),this.flyout=null,document.removeEventListener(`pointerdown`,i,!0))};window.setTimeout(()=>document.addEventListener(`pointerdown`,i,!0),0)}syncTools(){let e=p(this.root,`.cv-rail-tools`);for(let t of Array.from(e.querySelectorAll(`.cv-tool`))){let e=(D.tools[Number(t.dataset.group)]??[]).find(e=>e.id===D.tool);e&&t.dataset.tool!==e.id&&(t.dataset.tool=e.id,t.innerHTML=a3(e.icon,20),g(t,e.shortcut?`${e.label} (${e.shortcut})`:e.label)),c(t,`is-active`,!!e)}let t=D.tools.flat().find(e=>e.id===D.tool);this.setHint(t?t.label:``)}syncTabs(){a(p(this.root,`.cv-tab-strip`),D.docs,{key:e=>String(e.uid),create:e=>{let t=f(`${b(e.source)} was rebuilt as an editable document with ${e.pages} page${e.pages===1?``:`s`}${e.via?` through ${b(e.via)}`:``}.
`];i.push(`${b(e)}
`).join(``)}`),t.body.append(f(`${n}
A .fdes file keeps the layout, its slots and the content it was made from. End the name with .idml for an IDML package or .fdoc for the bare layout.
`));let i=p(r.body,`.fd-save-path`),a=``;try{a=(await w(`/capabilities`)).paths?.projects??``}catch{}let o=(t.title||`Untitled`).replace(/\.(fdes|fdoc|idml)$/i,``);i.value=t.path&&/\.fdes$/i.test(t.path)?t.path:`${a?a.replace(/[\\/]$/,``)+(a.includes(`\\`)?`\\`:`/`):``}${o}.fdes`;let s=f(``),c=f(``);r.foot.append(c,s);let l=await new Promise(e=>{c.addEventListener(`click`,()=>{r.close(),e(null)}),s.addEventListener(`click`,()=>{e(i.value.trim()||null),r.close()}),i.addEventListener(`keydown`,e=>{e.key===`Enter`&&s.click()}),r.onClose=()=>{r.scrim.remove(),e(null)},r.open(i)});if(!l)return!1;n=l}try{return x(`Saved ${(await w(`/documents/save`,{json:n?{path:n}:{}})).path}`),D.refreshMeta(),!0}catch(e){return x(E(e.message),`error`),!1}}async closeDoc(e){let t=D.docs[e];if(t){if(t.dirty){D.active!==e&&await D.activate(e);let n=await wee(t.title);if(n===`cancel`||n===`save`&&!await this.save(!1))return}try{await w(`/documents/close`,{json:{index:e}})}catch(e){x(E(e.message),`error`)}D.refreshMeta()}}async place(){let e=await this.pickFiles(`image/*,video/*,audio/*,.pdf,.svg,.eps,.txt,.md,.docx,.rtf,.csv,.xlsx,.idml,.html`,!0);if(e.length)try{let t=await this.upload(e),n=!1;if(t.length===1){for(let e of this.placeHandlers)if(await e(t[0])){n=!0;break}}if(n)return;t.length>1?await this.runCore(`place.load`,{paths:t}):await this.runCore(`file.place`,{path:t[0]}),this.setHint(`Click or drag to place the loaded content`)}catch(e){x(E(e.message),`error`)}}onRequest(e){let t=e?.kind??Object.keys(e??{})[0];if(t===`toast`){let t=typeof e.text==`string`?E(e.text).trim():``;t&&x(t,`error`)}else if(t===`pick`&&(e.purpose??e.pick?.purpose)===`place`)this.place();else if(t===`view`){let t=e.params??{};typeof t.page==`number`&&this.viewport.showPage(t.page)}else if(t===`dialog`){let t=String(e.id??``),n=D.commands.find(e=>e.id===t||e.id.endsWith(`.${t}`));n&&this.paramsDialog(n,`Set the options, then run.`,e.params??{})}}renderTools(){let e=p(this.root,`.cv-rail-tools`);if(e.childElementCount||!D.tools.length)return;D.tools.forEach((t,n)=>{if(!t.length){e.appendChild(f(``));return}let r=t[0],i=f(``);i.dataset.group=String(n),i.dataset.tool=r.id,g(i,r.shortcut?`${r.label} (${r.shortcut})`:r.label),i.addEventListener(`click`,()=>void D.setTool(i.dataset.tool));let a=0,o=()=>this.toolFlyout(i,t);i.addEventListener(`pointerdown`,()=>{t.length>1&&(a=window.setTimeout(o,380))}),i.addEventListener(`pointerup`,()=>window.clearTimeout(a)),i.addEventListener(`pointerleave`,()=>window.clearTimeout(a)),i.addEventListener(`contextmenu`,e=>{e.preventDefault(),t.length>1&&o()}),e.appendChild(i)});let t=p(this.root,`.fd-fillstroke`);t.childElementCount||t.append(f(`${a3(`fill-stroke`,22)}`)),this.syncTools()}toolFlyout(e,t){this.flyout?.remove();let n=f(``);for(let r of t){let t=f(``);s(t.querySelectorAll(`span`)[0],r.label),s(p(t,`.cv-flyout-key`),r.shortcut??``),t.addEventListener(`click`,()=>{e.dataset.tool=r.id,e.innerHTML=a3(r.icon,20),g(e,r.shortcut?`${r.label} (${r.shortcut})`:r.label),D.setTool(r.id),n.remove(),this.flyout=null}),n.appendChild(t)}document.getElementById(`overlay-root`)?.appendChild(n);let r=e.getBoundingClientRect();n.style.left=`${Math.round(r.right+6)}px`,n.style.top=`${Math.round(r.top)}px`,this.flyout=n;let i=e=>{n.contains(e.target)||(n.remove(),this.flyout=null,document.removeEventListener(`pointerdown`,i,!0))};window.setTimeout(()=>document.addEventListener(`pointerdown`,i,!0),0)}syncTools(){let e=p(this.root,`.cv-rail-tools`);for(let t of Array.from(e.querySelectorAll(`.cv-tool`))){let e=(D.tools[Number(t.dataset.group)]??[]).find(e=>e.id===D.tool);e&&t.dataset.tool!==e.id&&(t.dataset.tool=e.id,t.innerHTML=a3(e.icon,20),g(t,e.shortcut?`${e.label} (${e.shortcut})`:e.label)),c(t,`is-active`,!!e)}let t=D.tools.flat().find(e=>e.id===D.tool);this.setHint(t?t.label:``)}syncTabs(){a(p(this.root,`.cv-tab-strip`),D.docs,{key:e=>String(e.uid),create:e=>{let t=f(`