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
27 changes: 26 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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 `<dialog>`. 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.

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</p>

<p align="center">
<img alt="version v0.15.0" src="https://img.shields.io/badge/version-v0.15.0-eef0f4?style=flat-square">
<img alt="version v0.15.1" src="https://img.shields.io/badge/version-v0.15.1-eef0f4?style=flat-square">
<img alt="Go 1.26+" src="https://img.shields.io/badge/Go-1.26%2B-00ADD8?style=flat-square&logo=go&logoColor=white">
<img alt="TypeScript and Vite" src="https://img.shields.io/badge/TypeScript-Vite-3178c6?style=flat-square">
<img alt="License: Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-3a3a3a?style=flat-square">
Expand Down Expand Up @@ -94,9 +94,9 @@
<td width="50%" valign="top">
<picture>
<source media="(prefers-color-scheme: light)" srcset="assets/screens/preferences-light.webp">
<img src="assets/screens/preferences.webp" alt="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" width="100%">
<img src="assets/screens/preferences.webp" alt="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" width="100%">
</picture>
<br><sub>Preferences, from 0.15.0: theme, accent, the agent dock and the app lock.</sub>
<br><sub>Preferences, from 0.15.1 a floating dialog: theme, accent, the agent dock and the app lock.</sub>
<h3>Preferences</h3>Dark, light or the system's theme, six accents that leave debit, credit and chart colours alone, the agent dock and the app lock.
</td>
</tr>
Expand All @@ -106,7 +106,7 @@

<table>
<tr>
<td width="33%" valign="top"><h4>Window</h4>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 <a href="docs/window/README.md"><code>docs/window/</code></a></td>
<td width="33%" valign="top"><h4>Window</h4>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 <a href="docs/window/README.md"><code>docs/window/</code></a></td>
<td width="33%" valign="top"><h4>Reports</h4>Trial balance · general ledger · profit and loss · balance sheet · receivables and payables aging · stock balance and value</td>
<td width="33%" valign="top"><h4>Taking figures out</h4>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 <a href="docs/EXPORT.md"><code>docs/EXPORT.md</code></a>, <a href="docs/PRINT.md"><code>docs/PRINT.md</code></a> and <a href="docs/SNAPSHOT.md"><code>docs/SNAPSHOT.md</code></a></td>
</tr>
Expand All @@ -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

Expand Down
Binary file modified assets/screens/preferences-light.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/screens/preferences.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion cmd/HASHOUT_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

---
Expand Down
9 changes: 8 additions & 1 deletion internal/HASHOUT_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

---
Expand Down Expand Up @@ -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"`.
2 changes: 1 addition & 1 deletion internal/app/version.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package app

var Version = "v0.15.0"
var Version = "v0.15.1"

const Product = "FormLedger"
2 changes: 1 addition & 1 deletion internal/dock/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
1 change: 1 addition & 0 deletions internal/dock/programs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
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 = "formledger-desktop"
version = "0.15.0"
version = "0.15.1"
description = "FormLedger desktop app"
authors = ["NodeAgentc, Inc."]
license = "Apache-2.0"
Expand Down
22 changes: 21 additions & 1 deletion src-tauri/HASHOUT_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

---
Expand Down Expand Up @@ -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.
6 changes: 4 additions & 2 deletions src-tauri/capabilities/main.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand All @@ -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"
]
}
Loading
Loading