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
2 changes: 1 addition & 1 deletion .agents/skills/formfabric-modeling/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The tool reference below is generated from the engine's command registry by `./f
## Tool reference

[ffb-tools:begin]
Generated from the engine's command registry (formfabric 0.29.0) by `./formfabric agents sync`; do not edit between the markers by hand.
Generated from the engine's command registry (formfabric 0.29.1) by `./formfabric agents sync`; do not edit between the markers by hand.

- Engine: `system_info`, `system_capabilities`
- Files: `file_new`, `file_save`, `file_open`, `sample_list`, `sample_load`, `exchange_import_dxf`, `exchange_export_dxf`, `snapshot_save`, `snapshot_list`, `snapshot_restore`, `snapshot_remove`, `library_list`, `library_add`, `library_insert`, `library_remove`, `library_roots`, `library_set_roots`, `component_save`
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/formfabric-modeling/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The tool reference below is generated from the engine's command registry by `./f
## Tool reference

[ffb-tools:begin]
Generated from the engine's command registry (formfabric 0.29.0) by `./formfabric agents sync`; do not edit between the markers by hand.
Generated from the engine's command registry (formfabric 0.29.1) by `./formfabric agents sync`; do not edit between the markers by hand.

- Engine: `system_info`, `system_capabilities`
- Files: `file_new`, `file_save`, `file_open`, `sample_list`, `sample_load`, `exchange_import_dxf`, `exchange_export_dxf`, `snapshot_save`, `snapshot_list`, `snapshot_restore`, `snapshot_remove`, `library_list`, `library_add`, `library_insert`, `library_remove`, `library_roots`, `library_set_roots`, `component_save`
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v0.29.1 · 2026-11-20

The window no longer asks for live events before it has its key.

- At each start the window asked the engine for its live events a moment before it held its key, was refused once and asked again 1.5 seconds later. It now waits for its key first, so a normal start shows no refused request, and the events reach the window from the first try.

## v0.29.0 · 2026-11-20

The window's key comes from the engine alone, FormFabric uses the family's design names, and Preferences says when the agent choice was changed outside the app.
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 v0.29.0" src="https://img.shields.io/badge/version-v0.29.0-f97316?style=flat-square">
<img alt="version v0.29.1" src="https://img.shields.io/badge/version-v0.29.1-f97316?style=flat-square">
<img alt="Rust 1.99" src="https://img.shields.io/badge/Rust-1.99-000000?style=flat-square&logo=rust&logoColor=white">
<img alt="TypeScript and Vite" src="https://img.shields.io/badge/TypeScript-Vite-3178C6?style=flat-square&logo=typescript&logoColor=white">
<img alt="macOS, Linux, Windows" src="https://img.shields.io/badge/macOS%20%C2%B7%20Linux%20%C2%B7%20Windows-native-2f7bf5?style=flat-square">
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.29.0
0.29.1
2 changes: 1 addition & 1 deletion backend/app/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.29.0"
__version__ = "0.29.1"
7 changes: 7 additions & 0 deletions frontend/HASHOUT_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

Living context for the window. What would be comments in `frontend/` lives here, newest first. Read before editing.

## v0.29.1 · 2026-11-20

### Live events are asked for only once the window holds its key

- `workspace/offline.ts` and `workspace/viz/api.ts` call `onEngineLink` when their modules load, which is before `main.ts` has claimed the window key, so `engine/events.ts` opened `GET /api/events` without the key, was refused (403) and retried 1.5 s later. `window-key.ts` now has `keySettled()`, a promise that settles when `claimWindowKey` has finished (with or without a key), and `events.ts` opens its stream only after it. The dock's own stream (`agent/link.ts`) already started inside `startApp`, after the claim.
- Seen with the real engine and the built window, 10 starts in a row at normal speed and 10 under 4x CPU throttle: 0 refused requests on the events route in the page's network record and in the engine's access log (before: 1 per start); a page without the key is still refused (403).

## v0.29.0 · 2026-11-20

### A sentence when the agent choice was changed outside the app
Expand Down
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "formfabric",
"private": true,
"version": "0.29.0",
"version": "0.29.1",
"description": "formfabric · garment pattern and cloth simulation in the NodeMode style",
"license": "Apache-2.0",
"type": "module",
Expand Down
11 changes: 9 additions & 2 deletions frontend/src/engine/events.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { openStream, type Stream } from '../agent/sse';
import { keySettled } from './window-key';

export interface EngineChanged { type: 'engine.changed'; epoch: number; name: string }
export type Link = 'connecting' | 'up' | 'down';
Expand All @@ -11,6 +12,7 @@ const linkListeners = new Set<LinkListener>();
let source: Stream | null = null;
let link: Link = 'connecting';
let seen = false;
let asked = false;

function eventsUrl(): string {
const injected = (window as unknown as { __FFB_ENGINE__?: string }).__FFB_ENGINE__;
Expand All @@ -24,8 +26,13 @@ function setLink(next: Link): void {
}

function open(): void {
if (source || !(listeners.size || linkListeners.size)) return;
source = openStream(eventsUrl(), {
if (asked || !(listeners.size || linkListeners.size)) return;
asked = true;
void keySettled().then(() => { source = source ?? stream(); });
}

function stream(): Stream {
return openStream(eventsUrl(), {
open: () => { seen = true; setLink('up'); },
error: (refused) => setLink(refused || seen ? 'down' : 'connecting'),
message: (text) => {
Expand Down
14 changes: 13 additions & 1 deletion frontend/src/engine/window-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ function take(): string {
}

let key = take();
let settle: () => void = () => undefined;
const settled = new Promise<void>((resolve) => { settle = resolve; });

export function keySettled(): Promise<void> {
return settled;
}

export function windowKey(): string {
return key;
Expand All @@ -28,7 +34,13 @@ async function accepted(base: string, value: string): Promise<boolean> {
} catch { return false; }
}

export async function claimWindowKey(base: string): Promise<string> {
export function claimWindowKey(base: string): Promise<string> {
const claim = claimOnce(base);
claim.then(settle, settle);
return claim;
}

async function claimOnce(base: string): Promise<string> {
if (key) return key;
const kept = stored();
if (kept && await accepted(base, kept)) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.29.0';
export const VERSION = '0.29.1';
28 changes: 14 additions & 14 deletions native/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion native/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resolver = "2"
members = ["crates/*"]

[workspace.package]
version = "0.29.0"
version = "0.29.1"
edition = "2021"
license = "Apache-2.0"
authors = ["nodemode-ai"]
Expand Down
2 changes: 1 addition & 1 deletion python/formfabric/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from .errors import ArgumentError, BackendError, CommandError, FormfabricError
from .model import Garment, Link, Panel, Sim, sample_drape

__version__ = "0.29.0"
__version__ = "0.29.1"

__all__ = [
"ArgumentError",
Expand Down
2 changes: 1 addition & 1 deletion python/formfabric/catalogue.json
Original file line number Diff line number Diff line change
Expand Up @@ -13806,5 +13806,5 @@
}
],
"engine": "formfabric",
"version": "0.29.0"
"version": "0.29.1"
}
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "formfabric"
version = "0.29.0"
version = "0.29.1"
description = "Python API for formfabric, the garment pattern and cloth simulation app"
readme = "README.md"
requires-python = ">=3.10"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "formfabric"
version = "0.29.0"
version = "0.29.1"
description = "formfabric desktop shell"
authors = ["nodemode-ai"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "FormFabric",
"version": "0.29.0",
"version": "0.29.1",
"identifier": "ai.nodemode.formfabric",
"build": {
"frontendDist": "../frontend/dist"
Expand Down