Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

Every release of FormDesign, newest first. Versions follow semver; tags read `v*.*.*`.

## 0.91.0 · 2026-11-20

- On Windows the desktop app's engine ends with the app however the app ends, and it opens no console window of its own. To see the engine in a console window, build it with `FORMDESIGN_ENGINE_WINDOWED=0`.
- When FormDesign cannot start, its message now shows the last lines the engine wrote, the code it stopped with and the full path of its log. The app waits at most 90 seconds for its engine to say where it serves, and says so when that runs out.
- On macOS, an engine left over from an earlier start that has ended is no longer mistaken for one still running.
- The panel's guide says that Codex, Cursor and Antigravity each get a button of their own when they are installed (the shared panel 2.2.1).
- The three browser demos are rebuilt with the current window.

## 0.90.0 · 2026-11-19

- The desktop app's engine stops by itself within about two seconds when the app that started it has gone, so no engine is left running after FormDesign is quit or ended.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</p>

<p align="center">
<img alt="version 0.90.0" src="https://img.shields.io/badge/version-0.90.0-eef0f4?style=flat-square">
<img alt="version 0.91.0" src="https://img.shields.io/badge/version-0.91.0-eef0f4?style=flat-square">
<img alt="Rust" src="https://img.shields.io/badge/rust-layout%20core-B7410E?style=flat-square&logo=rust&logoColor=white">
<img alt="TypeScript and Python" src="https://img.shields.io/badge/typescript%20%2B%20python-engine%20and%20window-3178c6?style=flat-square">
<img alt="macOS, Windows and Linux" src="https://img.shields.io/badge/macOS%20%C2%B7%20Windows%20%C2%B7%20Linux-native-2f7bf5?style=flat-square">
Expand Down
26 changes: 24 additions & 2 deletions backend/HASHOUT_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,33 @@

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.90.0
Last updated: 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.91.0
Last updated: 2026-11-20 · 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.91.0 · the Windows engine is frozen with no console window unless FORMDESIGN_ENGINE_WINDOWED=0 (2026-11-20)

- refers-to: setup/freeze_backend (`window`); setup/freeze_backend.bat (`WINDOW`)
- kind: feat
- logged: v0.91.0 · 2026-11-20

The owner's decision for every app of the family: a Windows engine opens no console window of its own, as FormWeb's does. The freeze scripts had no switch, so both now give PyInstaller `--noconsole` on Windows, and `FORMDESIGN_ENGINE_WINDOWED=0` leaves it out for someone who wants to watch the engine in a console. The Unix script adds it only when `fd_os` says windows; macOS and Linux freezes are unchanged. The entry script already replaces each missing stream with the null device before anything else (the 0.90.0 entry above), so `--selfcheck`, which the scripts run right after freezing, still runs and still answers by its exit code; what it prints goes nowhere in such a build. The shell reads the engine's address and key from pipes it gives the engine, which a windowed build still has. Checked with `bash -n` and by running the switch's two lines under each value; the `.bat` was read, not run. No Windows build has shown it.

---

## v0.91.0 · a leftover engine that has ended but was not yet collected counts as gone on macOS (2026-11-20)

- refers-to: app/core/startup.py :: finished, gone_by; tests/test_startup.py
- kind: fix
- logged: v0.91.0 · 2026-11-20

FormCut's macOS job found it in the family's start-up file: ending a leftover engine waits until it is gone, `_alive_posix` asks `kill(pid, 0)`, and a process that has ended and whose parent has not collected it still answers that. It is told apart only by reading `/proc`, which macOS does not have, so the wait ran out and the start was refused with "could not stop an engine that was left running". In the app it can happen when the leftover engine's own parent is alive and slow to collect it.

`finished(pid)` asks `ps -o stat= -p <pid>` where there is no `/proc` (never on Windows, never on Linux) and answers true for a state that starts with `Z`. `gone_by` stops waiting when the process is not alive or is finished. `alive` itself is unchanged, so the two second watch on the app starts no program. Carried by hand from FormCut's fix; keep the two files the same here.

Seen on Linux with `PROC` pointed at a folder that does not exist: before the change `claim` on a lock whose engine is a child of the caller and whose shell had gone was refused with that sentence after 10.1 seconds; after it the claim succeeded at once. The test does the same. Not run on macOS.

## v0.90.0 · 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 (2026-11-19)

- refers-to: app/core/startup.py; app/core/runtime.py; formdesign_engine.py :: watch_shell, serve, main; tests/test_startup.py
Expand Down
2 changes: 1 addition & 1 deletion backend/app/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.90.0"
__version__ = "0.91.0"
19 changes: 18 additions & 1 deletion backend/app/core/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,26 @@ def same(pid: int, born: float) -> bool:
return alive(pid) and (not born or (seen > 0 and abs(seen - born) <= SLACK))


def finished(pid: int) -> bool:
if WINDOWS or os.path.isdir(PROC):
return False
try:
told = subprocess.run(
["ps", "-o", "stat=", "-p", str(pid)],
stdin=subprocess.DEVNULL,
capture_output=True,
text=True,
timeout=END_WAIT,
check=False,
)
except (OSError, subprocess.SubprocessError):
return False
return told.stdout.strip().startswith("Z")


def gone_by(pid: int, seconds: float) -> bool:
until = time.monotonic() + seconds
while alive(pid):
while alive(pid) and not finished(pid):
if time.monotonic() >= until:
return False
time.sleep(STEP)
Expand Down
19 changes: 19 additions & 0 deletions backend/tests/test_startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,25 @@ def test_a_lock_that_names_a_process_which_is_not_the_engine_is_replaced_and_the
stop(other, mine)


def test_a_leftover_engine_that_has_ended_but_was_not_collected_counts_as_gone_where_there_is_no_proc(tmp_path, monkeypatch):
from app.core import startup

monkeypatch.setattr(startup, "PROC", str(tmp_path / "no-such-folder"))
engine, shell, mine = stand_in(), stand_in(), stand_in()
try:
(tmp_path / startup.LOCK_NAME).write_text(json.dumps(record(startup, engine, shell)))
stop(shell)
began = time.monotonic()
path, replaced = startup.claim(tmp_path, mine.pid)
assert replaced == engine.pid
assert time.monotonic() - began < startup.END_WAIT
assert startup.finished(engine.pid) is True
assert startup.finished(mine.pid) is False
assert json.loads(path.read_text())["pid"] == os.getpid()
finally:
stop(engine, shell, mine)


def test_the_two_ways_of_reading_a_start_time_agree(monkeypatch):
from app.core import startup

Expand Down
2 changes: 1 addition & 1 deletion demo/assets/demo.css

Large diffs are not rendered by default.

443 changes: 241 additions & 202 deletions demo/assets/demo.js

Large diffs are not rendered by default.

Loading
Loading