diff --git a/CHANGELOG.md b/CHANGELOG.md index 0101796..be8bbb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,31 @@ # Changelog -## 0.15.0 +## 0.15.1 + +FormLedger's window now matches the other Form apps at the top right, in Preferences and around the macOS traffic lights. + +### New +- **Two buttons at the top right of the window:** the robot opens and closes the agent dock and stays lit while the dock is open, and the gear opens Preferences. They look and sit as they do in FormPortal. +- **Antigravity in the agent dock:** a tab of its own next to Claude Code, Codex and Cursor when Antigravity's `agy` is installed on your computer, with its install line when it is not. + +### Changed +- **Preferences is a floating dialog** over the dimmed window, not a page. Its sections (Appearance, Menus in Window on macOS, Agents and Security) sit in a rail at its left, a drawn line joins the chosen section to the panel, and one section shows at a time. Esc, Done, the close button or a click outside closes it, and Tab stays inside it while it is open. Every way in opens the dialog: the gear, Cmd or Ctrl plus comma, the Preferences menu item, the command palette, the Preferences button on Home and the item in the user menu. Every setting is where it was. +- **On/off settings are toggle switches,** the same as in the other Form apps: Menus in Window, Show the agent dock and the app lock in Preferences, and the app lock on the Account page. The label sits on the left and the switch on the right. Clicking the label or pressing Space still turns it on or off. +- **macOS:** the window has no grey title strip any more; the page runs to the top edge, as in the other Form apps. The traffic lights sit over the sidebar head, which starts 78 pixels in so the FormLedger name stays clear of them, and the sidebar is a little wider to keep the name and version whole. With Menus in Window on, the menu bar starts 78 pixels in instead. In full screen the inset goes away. The window is dragged by the top bar, the sidebar head or the menu bar. +- **macOS:** the menu bar shown while the window first loads has Account, Agent Dock and Menus in Window, like the full menu bar that replaces it. + +### Fixed +- The dock's tour named only Codex and Cursor as the other agent programs. + +### Known issues +- macOS: none of the macOS changes were run on a Mac: the title bar, the traffic-light inset, dragging the window, full screen and the system menu. They were checked in a browser that pretends to be the macOS app. +- Windows: the dock's tabs cannot open a terminal yet; the dock says so. +- The rest of the 0.15.0 known issues still apply. + +### Under the hood +- The dialog is a port of FormVis's Preferences dialog (`SettingsDialog` and its wire) through FormPortal's version of it, on a native ``. The shell asks macOS for an overlay title bar and the window may now start a drag and toggle maximize (two new permissions in `capabilities/main.json`). The engine's agent status and `/api/terminal/agent` take `antigravity`. +- Checked: `tsc --noEmit` (both configs), `npm run build`, `go build ./...`, `go vet ./...` and `cargo check` of the desktop shell on Linux pass. There are no Go, window or Rust tests in the repository. A demo company (Ironbark Hardware and Supply) was served by this branch's binary and opened in headless Chrome with the CPU slowed four times and the content security policy enforced: no layout shift on load (dark and light, with the dock saved open or closed), on opening and closing Preferences, on switching its sections or on opening and closing the dock; the dialog's frame stayed the same size and place on every section at 1440 by 900 and 1000 by 700. The switches were checked in a desktop-mode server, dark and light, in Preferences and on Account, with no layout shift. In a stand-in macOS shell the inset was on the first frame, went away in full screen and came back, and the system menu was built from the same list as the in-window bar with all seven menus. Home, the sales and purchase invoice lists, a sales invoice, the general ledger, the trial balance, profit and loss and Reports were looked at at 1440 by 900 and 1280 by 800: none needs more than a short scroll, and the general ledger with no account chosen says so under its account picker. +- Not run: a Mac, Windows, a desktop build or installer. FormLedger gets the family's menu bar, a Home start screen, Preferences and the agent dock, and takes on the family look. diff --git a/Makefile b/Makefile index 978a750..a30a5fd 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION := v0.15.0 +VERSION := v0.15.1 GO_BUILD := CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" .PHONY: build web server check clean diff --git a/README.md b/README.md index fdb006b..eebdad4 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@

- version v0.15.0 + version v0.15.1 Go 1.26+ TypeScript and Vite License: Apache-2.0 @@ -94,9 +94,9 @@ - The Preferences screen with theme choices Dark, Light and Match the system, six accent colours, a Show the agent dock checkbox and a Security heading + The Preferences dialog floating over the window, its section rail at the left with Appearance, Agents and Security, a wire from the Appearance tab to the panel, and the theme choices Dark, Light and Match the system with six accent colours -
Preferences, from 0.15.0: theme, accent, the agent dock and the app lock. +
Preferences, from 0.15.1 a floating dialog: theme, accent, the agent dock and the app lock.

Preferences

Dark, light or the system's theme, six accents that leave debit, credit and chart colours alone, the agent dock and the app lock. @@ -106,7 +106,7 @@ - + @@ -124,7 +124,7 @@ The command line is a client of the running server; it never opens the database. [`docs/ledger/cli.md`](docs/ledger/cli.md) walks from an empty company to a trial balance. What the app commits to do is listed in [`docs/BEHAVIOURS.md`](docs/BEHAVIOURS.md), and [`AGENTS.md`](AGENTS.md) is the guide for coding agents working on the repo. -From 0.15.0 the window also has an agent dock, opened from View, Agent Dock or with Cmd or Ctrl plus J: a terminal panel beside the books with a shell tab and tabs for Claude Code, Codex and Cursor when they are installed on your computer. Only the owner of the books can open it, and only from this computer. On Windows its terminals do not open yet. FormLedger has no MCP server yet; an agent drives the books through the command line above. +From 0.15.0 the window also has an agent dock, opened from View, Agent Dock, the robot button at the top right or with Cmd or Ctrl plus J: a terminal panel beside the books with a shell tab and tabs for Claude Code, Codex, Cursor and, from 0.15.1, Antigravity when they are installed on your computer. Only the owner of the books can open it, and only from this computer. On Windows its terminals do not open yet. FormLedger has no MCP server yet; an agent drives the books through the command line above. ## Network diff --git a/assets/screens/preferences-light.webp b/assets/screens/preferences-light.webp index 5896cc3..fe08a27 100644 Binary files a/assets/screens/preferences-light.webp and b/assets/screens/preferences-light.webp differ diff --git a/assets/screens/preferences.webp b/assets/screens/preferences.webp index 8ef4fe2..7d7e2d2 100644 Binary files a/assets/screens/preferences.webp and b/assets/screens/preferences.webp differ diff --git a/cmd/HASHOUT_LOG.md b/cmd/HASHOUT_LOG.md index a3a86a0..563aa65 100644 --- a/cmd/HASHOUT_LOG.md +++ b/cmd/HASHOUT_LOG.md @@ -2,7 +2,7 @@ Living log of all comment content, explainers, rationale, TODOs, & removed (hashed-out) code for the entry point, `embed.go`, `internal/server`, `internal/static` and `internal/startup`. Source files stay comment-free per dev-rules `sub-skills/hashout-log/SUB-SKILL.md`; everything they would have said lives here, indexed. Read it first, then edit code surgically. -Current build version: v0.15.0 +Current build version: v0.15.1 Last updated: 2026-11-26 (US Eastern) · skeleton port from form.md --- diff --git a/internal/HASHOUT_LOG.md b/internal/HASHOUT_LOG.md index 36df965..1a9e325 100644 --- a/internal/HASHOUT_LOG.md +++ b/internal/HASHOUT_LOG.md @@ -2,7 +2,7 @@ Living log of comment content, rationale and removed code for the core skeleton packages under `internal/`. Source files stay comment-free; what they would have said lives here, indexed. Read it first, then edit code surgically. Covers the packages ported in the core slice only; `internal/server`, `internal/static` and `internal/startup` are logged by their own slice. -Current build version: v0.15.0 +Current build version: v0.15.1 Last updated: 2026-11-27 (US Eastern) · profit and loss and the balance sheet --- @@ -1951,3 +1951,10 @@ RFC 6455 server side only: the handshake through `http.ResponseController.Hijack - logged: v0.15.0 · 2026-12-01 (EST) `GET /api/terminal` (`{terminals: [{id,title,cwd,alive,kind}]}`), `POST /api/terminal` (shell, `{cols,rows}`), `POST /api/terminal/claude` (`{cols,rows,prompt?,resume?}`), `POST /api/terminal/agent` (`{kind: codex|cursor, cols, rows}`), `POST /api/terminal/{id}/resize`, `POST /api/terminal/{id}/restart`, `DELETE /api/terminal/{id}`, `GET /api/terminal/{id}/stream` (WebSocket), `GET /api/agent/status` (`{claude,codex,cursor}` each `{installed,version,install,signedIn,said?,title}`, FormDeck's shape). A missing program answers 409 `program_missing`, which the adapter maps to `notInstalled`. Shells and programs start in the user's home folder (the data folder if there is none), never in the data folder's books. + +### internal/dock/programs.go, internal/dock/module.go · Antigravity as the fourth agent program +- refers-to: internal/dock/programs.go :: programs; internal/dock/module.go :: openAgent +- kind: rationale, removed-code +- logged: v0.15.1 · 2026-12-01 (EST) + +The Form shell standard, line 3, lists Claude Code, Codex, Cursor and Antigravity tabs when installed. FormLedger 0.15.0 had the first three only. Antigravity is FormVis's fourth program (`backend/app/services/agent_lookup.py`): the executable `agy`, the install line `curl -fsSL https://antigravity.google/cli/install.sh | bash`. It joins `programs`, so `/api/agent/status` now answers `{claude,codex,cursor,antigravity}` and `POST /api/terminal/agent` takes `kind: antigravity`. It is looked for on `PATH` and the same install folders as the others and has no sign-in probe, so `signedIn` is null ("cannot tell"). FormVis writes an MCP entry into Antigravity's own folder for its tab; FormLedger has no MCP server, so nothing is written, as for the other programs. Removed: the refusal text `"the agent program must be codex or cursor"`, now `"the agent program must be codex, cursor or antigravity"`. diff --git a/internal/app/version.go b/internal/app/version.go index 4c590fe..bf7d754 100644 --- a/internal/app/version.go +++ b/internal/app/version.go @@ -1,5 +1,5 @@ package app -var Version = "v0.15.0" +var Version = "v0.15.1" const Product = "FormLedger" diff --git a/internal/dock/module.go b/internal/dock/module.go index 6499571..ea8cd4a 100644 --- a/internal/dock/module.go +++ b/internal/dock/module.go @@ -179,7 +179,7 @@ func (m *module) openAgent(w http.ResponseWriter, r *http.Request, p *policy.Pri } prog, ok := programFor(b.Kind) if !ok || prog.kind == "claude" { - return httpx.Fail(http.StatusBadRequest, "bad_kind", "the agent program must be codex or cursor") + return httpx.Fail(http.StatusBadRequest, "bad_kind", "the agent program must be codex, cursor or antigravity") } return m.openProgram(w, r, p, prog, nil, b.Cols, b.Rows) } diff --git a/internal/dock/programs.go b/internal/dock/programs.go index 8eff580..42b2f83 100644 --- a/internal/dock/programs.go +++ b/internal/dock/programs.go @@ -30,6 +30,7 @@ var programs = []program{ {kind: "claude", bin: "claude", title: "Claude Code", install: "npm install -g @anthropic-ai/claude-code"}, {kind: "codex", bin: "codex", title: "Codex", install: "npm install -g @openai/codex"}, {kind: "cursor", bin: "cursor-agent", title: "Cursor", install: "curl https://cursor.com/install -fsS | bash"}, + {kind: "antigravity", bin: "agy", title: "Antigravity", install: "curl -fsSL https://antigravity.google/cli/install.sh | bash"}, } func programFor(kind string) (program, bool) { diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index ab4b8d9..f1800c4 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1106,7 +1106,7 @@ dependencies = [ [[package]] name = "formledger-desktop" -version = "0.15.0" +version = "0.15.1" dependencies = [ "objc2", "objc2-app-kit", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 67a63a9..66e35df 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "formledger-desktop" -version = "0.15.0" +version = "0.15.1" description = "FormLedger desktop app" authors = ["NodeAgentc, Inc."] license = "Apache-2.0" diff --git a/src-tauri/HASHOUT_LOG.md b/src-tauri/HASHOUT_LOG.md index 0337d8c..c51d0e8 100644 --- a/src-tauri/HASHOUT_LOG.md +++ b/src-tauri/HASHOUT_LOG.md @@ -2,7 +2,7 @@ Living log of all comment content, explainers, rationale, TODOs, & removed (hashed-out) code for the Tauri 2 desktop shell (`src-tauri`). Source files stay comment-free per dev-rules `sub-skills/hashout-log/SUB-SKILL.md`; everything they would have said lives here, indexed. This file is also the compressed contextual map of the shell: read it first, then edit code surgically. -Current build version: v0.15.0 +Current build version: v0.15.1 Last updated: 2026-11-26 (US Eastern) · the shell ported from form.md's src-tauri and renamed for FormLedger --- @@ -353,3 +353,23 @@ Edits, one hand edit per region, removed lines quoted: - main.rs: `generate_handler![reveal::app_ready]` became `generate_handler![reveal::app_ready, menu::zoom]`. - build.rs: the app manifest's commands `&["app_ready"]` became `&["app_ready", "zoom"]`, which makes the `allow-zoom` permission. - capabilities/main.json (the remote capability for `http://127.0.0.1:*`): `"permissions": ["allow-app-ready"]` became `allow-app-ready`, `allow-zoom`, `core:menu:default` (build and set the app menu, set enabled and checked), and `core:window:allow-minimize`, `allow-toggle-maximize`, `allow-set-fullscreen`, `allow-is-fullscreen`, `allow-close` for the in-window Window menu and File > Close Window. The description says the same. + +### src/main.rs, capabilities/main.json · the overlay title bar on macOS +- refers-to: src/main.rs :: open_main (the `WebviewWindowBuilder` chain); capabilities/main.json :: main-ready +- kind: rationale, removed-code, warning-context +- logged: v0.15.1 · 2026-12-01 (EST) + +The Form shell standard, line 5: on macOS the top-left content starts right of the traffic lights, 78 px in, set before first paint and dropped in full screen. FormVis, FormPortal and FormCite draw their own top row under the lights with `TitleBarStyle::Overlay` and `hidden_title(true)`; FormLedger 0.15.0 kept the system title bar, so its window had a grey title strip above the page that no other Form app has. The builder is now bound to `builder`, and under `#[cfg(target_os = "macos")]` it gets the overlay style and a hidden title before `build()`. Windows and Linux are unchanged. The page's side is in `web/HASHOUT_LOG.md`: the pre-paint `data-fl-lights` attribute, the 78 px inset, and `data-tauri-drag-region` on the top bar, the sidebar head and the in-window menu bar. + +The window can only be moved by those drag regions now, so the remote capability gains `core:window:allow-start-dragging` (the drag) and `core:window:allow-internal-toggle-maximize` (Tauri's drag script zooms the window on a double click). `allow-is-fullscreen` was already there and is what the page asks on resize to drop the inset in full screen. + +Not ported: FormVis's `traffic_lights.rs`, which moves the lights with AppKit so they sit centred in its 38 px title row. Without it the lights keep AppKit's overlay position, near the top left of FormLedger's 44 px sidebar head, which the 78 px inset clears whatever their height. Verified: `cargo check` on Linux after the change (the macOS lines are not compiled there). Not verified: a macOS build and launch. + +Removed: `let window = WebviewWindowBuilder::new(handle, "main", WebviewUrl::External(url))` (now `let builder = ...`) and the chain's closing `.build()?;`, now `let window = builder.build()?;` after the macOS line. + +### src/menu.rs · the first menu bar matches the page's list +- refers-to: src/menu.rs :: build +- kind: rationale +- logged: v0.15.1 · 2026-12-01 (EST) + +`menu::build` is the macOS menu bar from launch until the page has built its own from `web/src/ui/menus.ts` (`MENUS`, through `NativeMenus.build` and `setAsAppMenu`), and the one left if that build fails. It lacked three items the page's list has: FormLedger > Account (`cmd:nav.account`), View > Agent Dock (`cmd:view.dock`, Cmd+J) and View > Menus in Window (`cmd:view.menus-in-window`). They are added in the page's order and run through `window.__formledgerRun` like every other `cmd:` item. Menus in Window is a plain item here, not a check item, because the shell cannot read the page's `localStorage` choice; the page's menu, which replaces this one, shows the check. Checked with `cargo check` on Linux. The page's own build was checked in a stand-in macOS shell: 7 menus (FormLedger, File, Edit, View, Go, Window, Help), the 5 Go submenus, 55 command items and the predefined items, set as the app menu once. diff --git a/src-tauri/capabilities/main.json b/src-tauri/capabilities/main.json index 2a84b18..38a2e59 100644 --- a/src-tauri/capabilities/main.json +++ b/src-tauri/capabilities/main.json @@ -1,7 +1,7 @@ { "$schema": "../gen/schemas/desktop-schema.json", "identifier": "main-ready", - "description": "The main window shows the page the bundled server serves on 127.0.0.1, a remote origin to Tauri. It may call app_ready, which tells the shell the page has drawn its first content, and zoom, which steps the window's zoom for the View menu. It may build the macOS menu bar from the page's menu list (core:menu:default) and, for the in-window Window menu, minimize, maximize, go full screen and close its own window.", + "description": "The main window shows the page the bundled server serves on 127.0.0.1, a remote origin to Tauri. It may call app_ready, which tells the shell the page has drawn its first content, and zoom, which steps the window's zoom for the View menu. It may build the macOS menu bar from the page's menu list (core:menu:default) and, for the in-window Window menu, minimize, maximize, go full screen and close its own window. On macOS the title bar is an overlay, so the top bar, the sidebar head and the in-window menu bar are drag regions: the page may start a window drag and toggle maximize on a double click, and it asks whether the window is full screen to drop the traffic-light inset.", "windows": ["main"], "remote": { "urls": ["http://127.0.0.1:*"] }, "permissions": [ @@ -12,6 +12,8 @@ "core:window:allow-toggle-maximize", "core:window:allow-set-fullscreen", "core:window:allow-is-fullscreen", - "core:window:allow-close" + "core:window:allow-close", + "core:window:allow-start-dragging", + "core:window:allow-internal-toggle-maximize" ] } diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 19ff8cc..f61dea2 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -137,7 +137,7 @@ fn open_main(handle: &AppHandle, port: u16, key: &str) -> tauri::Result<()> { .download_dir() .unwrap_or_else(|_| data_dir(handle)); let finished = handle.clone(); - let window = WebviewWindowBuilder::new(handle, "main", WebviewUrl::External(url)) + let builder = WebviewWindowBuilder::new(handle, "main", WebviewUrl::External(url)) .title("FormLedger") .inner_size(width, height) .min_inner_size(MIN_LOGICAL.0, MIN_LOGICAL.1) @@ -176,8 +176,10 @@ fn open_main(handle: &AppHandle, port: u16, key: &str) -> tauri::Result<()> { true } _ => true, - }) - .build()?; + }); + #[cfg(target_os = "macos")] + let builder = builder.title_bar_style(tauri::TitleBarStyle::Overlay).hidden_title(true); + let window = builder.build()?; reveal::conceal(&window); Ok(()) } diff --git a/src-tauri/src/menu.rs b/src-tauri/src/menu.rs index bb310a0..7344414 100644 --- a/src-tauri/src/menu.rs +++ b/src-tauri/src/menu.rs @@ -60,6 +60,7 @@ pub fn build(app: &AppHandle) -> tauri::Result> { .about(None) .separator() .item(&item(app, "cmd:app.preferences", "Preferences...", Some("CmdOrCtrl+,"))?) + .item(&item(app, "cmd:nav.account", "Account", None)?) .separator() .services() .separator() @@ -98,6 +99,8 @@ pub fn build(app: &AppHandle) -> tauri::Result> { let view = SubmenuBuilder::new(app, "View") .item(&item(app, "cmd:shell.toggleSidebar", "Toggle Sidebar", Some("CmdOrCtrl+\\"))?) .item(&item(app, "cmd:shell.theme.toggle", "Toggle Dark Mode", Some("CmdOrCtrl+Shift+L"))?) + .item(&item(app, "cmd:view.dock", "Agent Dock", Some("CmdOrCtrl+J"))?) + .item(&item(app, "cmd:view.menus-in-window", "Menus in Window", None)?) .separator() .item(&item(app, "cmd:nav.back", "Back", Some("CmdOrCtrl+["))?) .item(&item(app, "cmd:nav.forward", "Forward", Some("CmdOrCtrl+]"))?) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index df17a0a..941ac4c 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "FormLedger", "mainBinaryName": "formledger-desktop", - "version": "0.15.0", + "version": "0.15.1", "identifier": "ai.nodemode.formledger", "build": { "frontendDist": "splash" }, "app": { diff --git a/web/HASHOUT_LOG.md b/web/HASHOUT_LOG.md index dc0ef99..e200474 100644 --- a/web/HASHOUT_LOG.md +++ b/web/HASHOUT_LOG.md @@ -2,7 +2,7 @@ Living log of all comment content, explainers, rationale, TODOs, & removed (hashed-out) code for the web client. Source files stay comment-free per dev-rules `sub-skills/hashout-log/SUB-SKILL.md`; everything they would have said lives here, indexed. This file is also the compressed contextual map of the web side: read it first, then edit code surgically. -Current build version: v0.15.0 +Current build version: v0.15.1 Last updated: 2026-11-26 (US Eastern) · account screens, and the fixes from the throttled browser check --- @@ -960,3 +960,76 @@ Checked by script, opening a copy of each committed folder in this branch's engi - Receivables, payables and the stock ledger all agree with their ledger accounts. The 48 templates were each posted with a write-scope app token to a fresh company with the starter chart, as `templates/README.md` says. All 48 answered 201 and all 48 are listed. Each `POST /api/templates/{id}/use` answer was then saved as a real draft through `/api/sales/docs` or `/api/purchase/docs`, and all 48 drafts were saved. + +### index.html, src/styles/shell.css, src/ui/app.ts · the agent and gear buttons at the top right +- refers-to: index.html :: .topbar__tools; src/styles/shell.css :: .topbar, .topbar__tools; src/ui/app.ts :: bindTools +- kind: rationale +- logged: v0.15.1 · 2026-12-01 (EST) + +The Form shell standard, line 1: the top bar ends with FormPortal's icon buttons, the agent (robot) button and then the gear. Both SVGs are FormPortal's `index.html` lines 39 and 59 byte for byte (checked with a string compare), and the button style is FormPortal's `.top .icon-btn` (30 px square, 1 px raised edge, 7 px radius, 6 px gap, 16 px glyph at stroke 1.7), mapped to FormLedger's tokens. The top bar grid gains a third `auto` column, so the crumbs keep their `minmax(0, 1fr)` and nothing in the first two columns moves. The right padding goes from `--space-4` to `--space-3` so the gear sits as close to the edge as FormPortal's. + +The robot button runs `view.dock`, the same command as View, Agent Dock and Ctrl or Cmd+J. Its pressed look is CSS on `:root[data-ft-dock="open"]`, which `reserveDock` sets before the dock mounts, so a dock saved open shows the pressed button on the first app frame with no class change after. `aria-pressed` follows the `formledger:dock` event the adapter already sends. The gear carries `data-prefs-open` and `aria-haspopup="dialog"`, as FormPortal's does; one delegated click listener runs `app.preferences` for every `[data-prefs-open]`, so the Home button and the user menu item can carry the same attribute. The sidebar head is unchanged: icon, name and version only. + +### src/ui/prefs-dialog.ts, src/styles/prefs-dialog.css · Preferences as FormVis's floating dialog with the wire +- refers-to: src/ui/prefs-dialog.ts :: mountPrefsDialog; src/ui/prefs.ts :: prefSections; src/ui/views.ts :: apply; src/ui/app.ts :: app.preferences; index.html :: [data-prefs-open] +- kind: rationale, removed-code +- logged: v0.15.1 · 2026-12-01 (EST) + +The Form shell standard, line 2: Preferences is a floating dialog, never a page. Ported by hand from FormVis 2.9.0 `ui/app-dialogs.ts` (`SettingsDialog`, `markSection`, `drawWire`) and `styles/dialogs.css` 155 to 195, through FormPortal's port in `extensions/prefs/index.ts`, which uses a native `` with `showModal()`. The native dialog gives the dimmed window (`::backdrop`, `--bg-scrim`), the top layer (no z-index needed for the frame, so the one scale is untouched), an inert window behind it and Esc through the `cancel` event. A Tab and Shift+Tab handler wraps focus inside the dialog, so the browser chrome is never reached either. A click whose target is the dialog itself (the backdrop) closes it. So do the close button, Done, a route change and leaving the app screen (sign out, lock). + +The rail floats 28 px left of the panel (`inset-inline-end: calc(100% + var(--space-7))`), FormVis's 232 px, and folds to 76 px icons below 1040 px wide, where the panel moves in to 112 px. The wire is FormVis's: an SVG at the frame's origin with a shade path and a line path, from the active tab's right edge along a trunk in the gap to the port on the panel's left edge at the header divider. It is redrawn on rAF from a ResizeObserver on the frame, window resize and every section change, and only the two `d` attributes and the port's `transform` change, each only when its value differs. FormVis and FormPortal stack every section and scroll-spy them; the standard asks for one section at a time, so each card is `hidden` unless current and the pages scroll back to the top on a switch. The frame has a fixed size (`min(780px, 100vw - 300px)` by `min(86vh, 620px)`), so switching sections changes nothing outside the pages box. FormVis opens and closes its dialogs with no transition (`Dialog.open` and `close` only flip `hidden`), and this does the same. + +Every setting stays: Appearance (theme, accent), Menus in Window (macOS only), Agents ("Show the agent dock", the `formledger.agentDock` state the dock already restores before it mounts) and Security (the app lock, which goes through the engine's `account.lock` command, and the Account link). `prefs.ts` keeps the section builders and exports `prefSections(engine)`; `security` takes the engine instead of a view context. Every way in opens the dialog: the gear, Ctrl or Cmd+comma, the FormLedger menu (macOS) or Edit menu (Windows, Linux) Preferences item, the palette, Home's Preferences button and the user menu item (both now `button[data-prefs-open]` instead of links), and an old `#/preferences` link, which `views.ts` turns back into the hash of the view showing and then opens the dialog. + +Removed from `src/ui/prefs.ts`, the page view and its scroll spy: + +``` +export function prefsView(): ViewDef { + return { + id: "preferences", + title: "Preferences", + group: "Setup", + nav: false, + icon: "settings", + mount(host, ctx) { + ... + host.append(h("div", { class: "prefs" }, nav, pages)); + const scroller = host.closest("[data-ref='views']"); + const spy = new IntersectionObserver( +``` + +Removed from `src/ui/views.ts`: `import { prefsView } from "./prefs";` and `const defsAll = [...ALL_VIEWS, ...HUB_VIEWS, prefsView()];`. Removed from `src/ui/app.ts`: `"app.preferences": go("preferences"),`. Removed from `src/styles/prefs.css`: the page layout rules `.prefs`, `.prefs__nav`, `.prefs__tab` and its states, `.prefs__tabicon`, `.prefs__tablabel`, `.prefs__pages` (with `padding-block-end: 40vh`), `.prefs__sec`, `.prefs__sechead` and the `max-width: 760px` media query. Removed from `index.html`: `Preferences` and ``. + +### src/dock-adapter.ts · the Antigravity tab +- refers-to: src/dock-adapter.ts :: PROGRAMS, KINDS, record, formledgerDock +- kind: rationale, removed-code +- logged: v0.15.1 · 2026-12-01 (EST) + +The dock module (FormVis's, under `src/dock/`) already carries Antigravity: its row in `agents.ts`, its glyph and its strings, and the `K` type parameter FormVis's adapter uses (`DockAdapter<'antigravity'>`). FormLedger's adapter left it out, so the shell standard's line 3 (Claude Code, Codex, Cursor and Antigravity tabs when installed) failed. The adapter now names `Extra = 'antigravity'`, adds it to the built-in tabs, to the status it reads from `/api/agent/status` and to the terminal kinds it accepts back, and opens it through `POST /api/terminal/agent` like Codex and Cursor. The engine side is in `internal/HASHOUT_LOG.md`. Removed: `const PROGRAMS: readonly DockProgram[] = ['claude', 'codex', 'cursor'];`, `const KINDS: readonly PtyKind[] = ['shell', 'claude', 'codex', 'cursor', 'agent'];`, `tabs: () => ({ builtin: ['shell', 'claude', 'codex', 'cursor'] })` and the tour lines "Codex and Cursor each get a button of their own here", which now name Antigravity too. + +### src/ui/prefs-dialog.ts · the rail first in focus order, and the trap's list +- refers-to: src/ui/prefs-dialog.ts :: mountPrefsDialog, FOCUSABLE +- kind: warning-context, removed-code +- logged: v0.15.1 · 2026-12-01 (EST) + +Found in the throttled check: Tab from the active rail tab left the dialog for the page body. Two causes. The rail was appended after the footer, so the active tab was the last tabbable node in DOM order; and the trap's selector counted the inactive rail tabs (`tabindex="-1"`, roving focus), so its "last" was a tab that Tab never lands on and the wrap never fired. The rail is now the dialog's first child (it is absolutely placed, so the grid of head, pages and foot is unchanged), giving the order rail, close, section, Done, and the selector drops anything with `tabindex="-1"`. After: 25 Tabs and 10 Shift+Tabs all stayed inside, at 1440 by 900 and 1000 by 700. Removed: `h("dialog", { ... }, head, pages, foot, rail, port)` and `"button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])"`. + +### index.html, src/ui/traffic-lights.ts, src/styles/shell.css, src/styles/home.css · the traffic-light inset +- refers-to: index.html :: pre-paint script, [data-tauri-drag-region]; src/ui/traffic-lights.ts :: watchTrafficLights; src/ui/theme/tokens.css :: --fl-traffic-w, --fl-sidebar-w-lights; src/styles/shell.css :: .sidebar__head; src/styles/home.css :: .fl-menubar-host +- kind: rationale +- logged: v0.15.1 · 2026-12-01 (EST) + +The Form shell standard, line 5, with the overlay title bar the shell now asks for on macOS (`src-tauri/HASHOUT_LOG.md`). The pre-paint script sets `data-fl-lights="inset"` in the macOS Tauri window, on the same test it already uses for `data-menus` (`__TAURI_INTERNALS__` and a Mac platform), so the inset is in the first frame. The server hashes the inline script for its CSP when it serves the page, so the longer script needs no other change. `--fl-traffic-w` is 78 px, FormVis's `--cv-traffic-w`. With the menus in the macOS menu bar it is the sidebar head's start padding; with Menus in Window it is the in-window menu bar's start padding instead, because that bar is then the top row. `watchTrafficLights` asks `isFullscreen()` on every resize (the later answer wins) and sets `full`, which drops the padding, or `inset` again. That is FormCite's `traffic-lights.ts`, renamed. + +With the inset, the head had 33 px too little for the icon, "FormLedger" and the version, and the name was cut with an ellipsis (measured in a stand-in macOS shell). With native menus the sidebar is `--fl-sidebar-w-lights`, 312 px instead of 264 px. It keys on the attribute being present, not on its value, so entering or leaving full screen does not change the sidebar's width. Measured after: icon and name from 86 to 215 px, version from 234 to 296 px, nothing cut; in full screen the head starts at 8 px. Windows, Linux and the browser have no `data-fl-lights` and keep 264 px. + +The window is moved by `data-tauri-drag-region="deep"` on the top bar, the sidebar head and the in-window menu bar. In Tauri 2.12.7's `drag.js` (the locked version), a bare attribute drags only on a press on that element itself, so the crumbs, the title, the brand and the version would not move the window; `deep` drags on any press in the row, and a button, link or other clickable element without the attribute still blocks the drag, so they keep clicking. In a browser the attribute does nothing. + +### src/styles/account.css, src/styles/prefs.css · the Form apps' toggle switch for every on/off setting +- refers-to: src/styles/account.css :: .switch, .switch__text, .switch input[type="checkbox"]; src/styles/prefs.css :: .prefs__switch +- kind: rationale, removed-code +- logged: v0.15.1 · 2026-12-01 (EST) + +The coordinator's review of the 0.15.1 captures: "Show the agent dock" drew as a plain checkbox, and so did the app lock in Preferences > Security and on the Account page. The Form apps use a toggle switch. FormPortal styles the checkbox itself (`main.css` `.switch`: `appearance: none`, a 36 by 20 px track with radius 10 px, `--bg-tertiary` with a 1 px `--border-light` inset edge, a 16 px knob drawn by `::after` 2 px in, `--text-primary` with `--shadow-sm`, the accent track and a 16 px knob move when checked, and the focus outline). FormVis draws the same sizes with a track span and a knob span (`dialogs.css` `.cv-toggle`). FormLedger's markup is already `

Window

A list for every document type · one form with a line grid for sales and purchase documents · payments with allocation · setup lists · a dashboard of revenue, expenses, profit, cash and top customers by month · a command palette that reaches every screen · light, dark or system theme · from 0.15.0, a menu bar (in the window on Windows and Linux, the system menu on macOS), a Home start screen and Preferences (theme, accent, the agent dock and the app lock). See docs/window/

Window

A list for every document type · one form with a line grid for sales and purchase documents · payments with allocation · setup lists · a dashboard of revenue, expenses, profit, cash and top customers by month · a command palette that reaches every screen · light, dark or system theme · from 0.15.0, a menu bar (in the window on Windows and Linux, the system menu on macOS), a Home start screen and Preferences (theme, accent, the agent dock and the app lock), from 0.15.1 a floating dialog opened by the gear at the top right. See docs/window/

Reports

Trial balance · general ledger · profit and loss · balance sheet · receivables and payables aging · stock balance and value

Taking figures out

CSV of every list and report · PDF of quotes, orders, invoices, purchase documents and customer statements · a read-only SQLite snapshot of the books. See docs/EXPORT.md, docs/PRINT.md and docs/SNAPSHOT.md