Commit Graph
111 Commits
Author SHA1 Message Date
swaitsandClaude Fable 5.2 51a7607a82 feat: the window and the command line set up, save and show backups; the system's folder dialog
Admin requests set up the backup folder (journaled as the books' own
backup.folder setting, the owner the one who decided) and the passphrase, save
a backup as one file, and say how the backups stand; the Backups window, Save a
backup and Restore (a folder or a file, with the passphrase when it has one) use
them, and the command line has backup-setup, backup-status and backup-save
(the passphrase typed at a terminal, never on the command line).

New dependency: rfd (MIT) in ledger-gui, with pollster, for the system's own
folder and file dialogs (the portal on Linux, native on Windows and macOS). It
adds no other crate to the tree (zbus is already there through the window
toolkit); cargo deny passes and THIRD-PARTY-NOTICES.txt is regenerated.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 18:20:59 -07:00
swaitsandClaude Fable 5.2 a6cd89d2a6 refactor: the server, restore and the window's seams on the plain-folder backup; git removed from the store
Restore reads a destination folder, a set's folder, or a backup file with an
optional passphrase; the server cuts the books under the store's lock and
writes the folder outside it; the format upgrade proves a local backup in the
book's folder (the same form) before it moves the format. The old backup
(git processes, their locks, the output drain) and every test of it are gone;
what each test protected is held by the new form's tests (table in the
report). Old settings and an old history in a book's folder are said in the
status and left alone.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 17:42:05 -07:00
swaitsandClaude Fable 5.2 d7d3458501 fix(spec): rule parts cited in bookspec's words in the web tests
The sub-reference check reads 'INVARIANT n' as the old vocabulary and
WB-assist-6 has no numbered parts; the comments now cite what exists.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 16:01:35 -07:00
swaitsandClaude Fable 5.2 813042a7a6 Merge branch 't3/p15-c1-desktop-packages': packages for Windows, macOS and Linux, and the Claude desktop extension (P15 C1)
The two Connect page baselines are re-blessed on the merged code: the
page gained the extension row here and the stopped test clock on main.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:57:46 -07:00
swaitsandClaude Fable 5.2 f2eb0d29f0 test(gui): the assistants pictures run on a stopped clock and compare shapes rounded to a hundredth
The working mark's arc (connect.rs paint_mark) and every ui.spinner() turn
with the frame time, and the number of frames run before a picture depends
on how long threads take, so the arc's phase differed from machine to
machine. The window now runs on a clock that stands still, a second capture
a few frames later must match, and the shape text is rounded so a sin/cos
last-digit difference is not a changed picture. All assist_*.shapes are
re-blessed (the hash text changed; the pictures did not, but the arc sits at
phase 0).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:36:11 -07:00
swaitsandClaude Fable 5.2 90f663ed54 feat(app): the window tells when a newer version exists and where to get it (P15 C1)
Update is an ordinary app update: the newer package installed over the
old one. The program's part is to say one exists. Once a day, on a
thread of its own, it reads one small file a release publishes
(latest.json: only a version number is taken from it; where to get the
update is a fixed address in the program) and notes the answer in the
data root's updates folder. A higher x.y.z shows a standing notice with
a button that opens the download page and the words that books, keys
and connections stay. Check for updates does the same look at once on
every platform; where a program may replace itself with a signed release
it also stages one as before. A macOS app is never replaced one file at
a time (that breaks its signature): it is treated as managed, and says
to drag the new app over the old. Window prose names the product
Wanderbooks.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:35:17 -07:00
swaitsandClaude Fable 5.2 2bc442f795 feat(app): the Connect page's Claude desktop app row writes a one-click extension (P15 C1)
Claude's desktop extension format is the MCP Bundle: a .mcpb zip with a
manifest.json (manifest 0.3, github.com/anthropics/mcpb). The row's
button makes the company's agent key if there is none and writes
Documents/Wanderbooks/Extensions/wanderbooks-<id>.mcpb: a manifest whose
server is a binary running this program's own stable path as
mcp --book <id>, the 512 px icon and a short README as the entry point.
The package carries no program (the one executable is the installed
one), no key and no path of the data root. The page then says in plain
words where in Claude to pick the file and to keep Wanderbooks open, and
offers to show the file. The manifest is checked against Anthropic's
published schema (a test fixture) and its required fields. The blessed
Connect page pictures change by exactly the new row. The program's
version is now one value set by main for every platform, not only Unix.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:31:21 -07:00
swaitsandClaude Fable 5.2 ef1d6e573a Merge branch 't3/fix-github-check-failures': what GitHub's run on 8a6d731c3 found
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:27:38 -07:00
swaitsandClaude Fable 5.2 3b02e70794 feat(app): the Windows program opens no console window; the window is named Wanderbooks (P15 C1)
The installed program is one executable that is the window, the books
server's child and the assistants' bridge. Built for the Windows GUI
subsystem, a Start Menu launch shows no console; console.rs gives a
command run in a terminal its words back and never replaces a pipe an
assistant handed the bridge. The two console programs the window starts
(the agent's own list, the system's opener) get CREATE_NO_WINDOW. The
window title is the product name; the storage id and the Linux app id
stay lowercase so nothing already kept moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:18:18 -07:00
swaitsandClaude Fable 5.2 1b1d86622a fix(gui): one line when connected, and the Connect page says who can read what
Once web assistants are connected the three progress lines (address,
certificate, connected) collapse to a green dot and "Connected"; they are
shown while connecting and when a step is the trouble. The page no longer
says nobody can read what passes through, which was not true: the relay
that carries the connection cannot, but the assistant's own company reads
what it is sent.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:01:41 -07:00
swaitsandClaude Fable 5.2 38e95e9ea6 test(gui): the window says assistant, so the tests that read its words say it too
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 14:46:04 -07:00
swaitsandClaude Fable 5.2 13a3f1b519 feat(gui): the web half of the Connect page and the first run (P15 B3)
The Connect page gets "On the web": a switch "Allow web assistants" per company,
off by default; three lines of progress in plain words (getting an address,
getting a certificate, connected) with a spinner on the one under way; once it
works, the address for the company with Copy; the three steps for Claude on the
web that the plan stands behind (Settings, Connectors, Add custom connector,
paste, sign in and match the code); and, for ChatGPT and any other assistant,
"we haven't tested this yet" rather than steps nobody tried. What goes wrong is
in words and says whether the window and the assistants on this computer are
affected. A new address is asked for twice.

The first time a company is open and the server says no assistant was ever
connected, the Connect page opens by itself, once, remembered per installation.
The owner trait gains web_state, web_turn_on, web_turn_off and web_new_address;
an owner that does not offer them shows no switch. The tabs tests start with the
first run already done, since they are about tabs.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 13:40:00 -07:00
swaitsandClaude Fable 5.2 610e41d1d1 Merge branch 't3/wanderbooks-app-hosted-bridge': nothing on the desktop starts a detached host (P15 A5)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 12:32:59 -07:00
swaitsandClaude Fable 5.2 c47144a401 feat(gui): the notice for a host that holds the books has a button that closes it
Plan P15 unit A5, fix round. When an older build's detached host (or `wanderbooks
serve`) holds the books, the app's start is refused, and the notice said to run
`wanderbooks close`. A packaged Mac or Windows install may have no command line
on the path. The notice now says what will happen, and carries a "Close it"
button that asks the host to close the books and waits until it has
(`commands::close_the_host`, what `wanderbooks close` does, over the unchanged
lease protocol, which an older host speaks), then starts the app's own server
and takes the notice away. The line to type stays in the words as the fallback.
A close that fails says why and offers the button again; a start refused for any
other reason offers none. The `Owner` trait gets two methods with default bodies
(`serve_host_holds`, `serve_close_host`), so existing implementations, test mocks
included, are untouched.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 12:19:46 -07:00
swaitsandClaude Fable 5.2 32acdc1c44 fix(mcp): the remote door's limits, disk cost, names and front line after review (P15 B1)
Per-address limits count an IPv4 address or an IPv6 /64 (mapped addresses
as the IPv4 one) and the table evicts per-address entries only, never a
connection's own call limit; waiting requests give way to a new one (an
address's oldest, or the fullest address's) instead of filling the window;
a stale client document is used when the fetch budget is spent and nothing
is fetched from /token. Registrations nobody allowed live in memory only,
a redirect is at most 512 bytes and a client's together 4 KiB. An error of
a sign-in for a client nobody approved is a page, never a redirect.
Names lose invisible and direction-changing characters and are cut to
forty; a revoked key frees its place; calls refused for rate or another
company's books are counted, not written, the limit asked first. The
client document fetch refuses ::/96 and 2002::/16, uses no proxy; the host
is read from the request's authority under HTTP/2; remote.json is private
on Windows too; every connection must begin with a per-start secret before
the PROXY header, given to the app over the admin socket.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 12:16:15 -07:00
swaitsandClaude Fable 5.2 c4fd1580d8 fix(mcp): every web sign-in is asked in the window, with a matching code (P15 B1 review, D-90)
An approval is never reused for a new sign-in: the product's redirect host
is public, so a stranger registering a client with claude.ai's callback got
a code with no Allow. /authorize now always parks the request. Every Allow
is a new approval with exactly the permissions ticked, a revoke ends the
approval's tokens at once under the lock, and raising or lowering posting
swaps the token in one step (a revoke during it wins). The window shows a
short code the browser's page also shows, says what is known in neutral
words (where it is sent back to first), counts the requests beyond the
newest few, and no request is presented as a known product on the strength
of its host. Refresh checks and marks the token used in one hold of the
lock, so two refreshes at once cannot both succeed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 12:05:09 -07:00
swaitsandClaude Fable 5.2 c9b6614688 feat(gui): the person is asked when a web assistant wants to connect (P15 B1, D-83)
The window shows a card, over any page of the company and on the Connect page,
that says in plain words who is asking (the product by where it is sent back
to, never by what it calls itself), where it will be sent back to, the
internet address it asked from and what it will be able to do: read and draft,
and post only if the box is ticked. Allow and Don't allow answer through the
owner and the admin socket (ledger-host AppServer::web_decide); nothing on the
web page approves. Each web connection shows what it may do, with a button to
let it post or stop. Revoke stays the one row of 'Who can reach these books'.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 11:39:38 -07:00
swaitsandClaude Fable 5.2 8d2187bae7 refactor(gui): remove "Close the books": the app is the host and a company's tab closes the company
The menu item asked a host's lease socket, which the app does not have, and
under the app could only answer "the app has these books open". Closing a
company's tab closes that company in the app's server (WB-app-2) and closing
the window closes them all (WB-app-4), so the item had no job left. The
Owner trait loses close_books; the test owners lose their copies.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 11:03:23 -07:00
swaitsandClaude Fable 5.2 38647e2143 Merge branch 't3/transactional-mcp-writes': every write through the tools is one transaction, exactly once (P15 T1, D-88, D-89)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 10:40:34 -07:00
swaitsandClaude Fable 5.2 fd847701e8 fix(host,gui): the Connect page's keys: never replaced, no admin, revoked by id, a quoted command, a leftover file said
Make the key asks the server first and never replaces: a live key whose copy
is missing here may be in use, so it is said in words and left alone. A
page-made key carries read, write and post, not admin (the connect command
keeps its scopes). Revoke names the key's id, so a stale row cannot end a
newer key of the same name; a revoke that leaves the token file says the key
is dead and where the file is. The copyable command is single-quoted for a
POSIX shell and PowerShell, and refused when cmd.exe would act on a part.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 10:23:11 -07:00
swaitsandClaude Fable 5.2 e34b18ec73 feat(gui): one Another assistant card, a popover for Ask your assistant, one Books menu entry
The four untested tools shared one text four times: now one card. The
copied sentence no longer pushes the page down: a popover under the
button. The Books menu's two connect entries became one that opens the
Connect page. Link::Working has no glyph (it is a drawn arc). Shape
baselines re-blessed: assist_{working,none,connected,connect_page,ask}
in light and dark.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 10:16:26 -07:00
swaitsandClaude Fable 5.2 f58191c9de fix(gui): the word a person reads is assistant, with no tool names
The bottom panel, the welcome steps, empty states and notices said
agent, bookkeeper or a books.* tool name; they now say assistant.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 10:16:26 -07:00
swaitsandClaude Fable 5.2 d4c0036599 fix(store,gui,package): every reader that derives facts reads the committed journal (P15 T1 review)
A failed call's ids are handed out again (nothing it wrote counted), so a
reader of the raw journal pins dead lines on whatever takes the id next: a
failed books.create_bill for entry 42 then a manual entry 42 showed as a
Bill. One accessor, calls::committed (lines outside a call and of calls
that closed ok, the frame left out), now feeds the viewer's books (entry
events and origin, asset trails, party events), the package feed attention
reads, and the adopt preview's settings check. The journal page and
journal_history keep every line and say in words of each line of a call
that failed, never finished or is still running that it did not count.

A call's closing line is now bounded (ANSWER_CAP 4 KiB: above it, the
answer's SHA-256 and length), a call that wrote no line leaves no line (its
key and answer live in a bounded in-memory table), and the journaled
argument digest is an HMAC under the books' own call key, so two requests
that differ only in a tax id are two requests and nothing journaled lets a
guess of one be tested.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 10:09:17 -07:00
swaitsandClaude Fable 5.2 022c0c642f feat(gui): each company's assistants: three states, Ask your assistant, the Connect page, a warning before closing
P15 unit A4, plan 3.3 and D-79. The window only reads the books, so it
now says so by what it offers. Each company is in one of three states
(no assistant, connected, working) read from the books server's own
sessions answer, never waited for, drawn as a shape on its tab and said
in words with the last thing done at the right of the top bar; the
sidebar gives up no height, because the links must all fit at 1479x519.
Where a button that edits would be there is "Ask your assistant", which
copies a ready sentence. The Connect page has a row per local tool with
exact commands, the keys with who is on each, and Revoke through the
existing command path. Closing the window or a tab with an assistant
connected warns first, before and never beside the server's own close.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 10:03:35 -07:00
swaitsandClaude Fable 5.2 9f3f292bf5 fix(gui): a failed start can be tried again, and a close that was not whole stays on screen
The window retries a failed server start when the next tab opens or when the
person asks, says a server still starting is starting, tells the person which
wanted companies did not open, and when the close reports an incomplete last
backup or a bad exit it stays up with a Close anyway button. ViewerOwner only
forwards to AppHost now, and the format upgrade goes to the window's own server.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 09:21:20 -07:00
swaitsandClaude Fable 5.2 7357a30c73 test(app): the child's lifetime, tabs driving the server, and the bridge's two messages
The server child starts, closes on input close and on the window's death (a
killed stand-in window leaves no server and a whole book), a stop that runs out
of time leaves it closing and says so, a start is refused while a server or host
holds the books; a tab opened or closed opens or closes that company, in order,
with failures said in words; closing the window waits in view and asks the owner
once; the bridge answers 'Wanderbooks isn't running' and 'Company X isn't open'
in one running session, starting no host. Claims for WB-app-1 to WB-app-4 name
them.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 09:07:34 -07:00
swaitsandClaude Sonnet 5.5 13e676a101 fix(gui): the tab bar's pictures are compared as shapes, and no picture depends on a temporary name
The stored tab-bar images were compared pixel for pixel on every machine.
GitHub's software renderer rasterizes the same shapes differently from the
GPU that made them (thousands of faint pixels, dozens strong along glyph
edges); sidenav.rs already says so and compares shapes everywhere, pixels
only locally. The tab bar now does the same: a hash of the visible shapes
(tests/snapshots/<name>.shapes, TABS_BLESS=1 writes them), the pixels with
TABS_PIXELS=1. The images are unchanged and still pass locally.

The hash is of a description of each shape, not of its debug form, for
two things in the debug form depended on the run, not on the books: a
glyph's place in egui's font atlas changes with which tests ran in the
process before (the same view hashed differently alone and beside another
test), and the page under a short bar holds the current time, clipped
away, which no picture shows. Shapes whose clip is off the window are
left out.

A new test renders the same companies from two differently named
temporary folders, light and dark, and requires the same hue keys (the
book ids), the same shapes and the same pixels. The sidenav fixture's
copy outside a data root is in a folder of a fixed name, not the temporary
folder's random one, since that folder's name is its badge's hue key.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 21:48:18 -07:00
swaitsandClaude Sonnet 5.5 6f916f8bbd fix(gui): the status card's live word at its right edge, the event on hover, and no line ever wraps
The heading row is badge and name (elided) at the left, the live dot and word at the right edge; the event is the heading's hover and the live word's accessible label, not a printed row. The check lines are as before, with no event. Every text elides to one line; a test lays the card out in every state with a very long name and event 1,234,567. The heading is its badge's height and the card's vertical padding 8, so the sidebar still fits at 1479x519.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 20:29:23 -07:00
swaitsandClaude Sonnet 5.5 d8ff776a52 feat(gui): the status card's heading carries the live state; one row fewer, so the sidebar fits the owner's 519 again
The heading row is the badge and name with the live dot and word at the right; the event ends the journal chain line. Folded, the card is the heading alone (or the heading over the failure line). The rail's badge carries the dot. The four sidenav tests are at their original sizes, the minimum window height is 400, and the goldens and snapshots are regenerated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 19:39:01 -07:00
swaitsandClaude Sonnet 5.5 ec436cfc02 feat(gui): a tab owns its threads; kept state belongs to its books; one dock layout
An independent review of the tab work found that closing a tab did not
end what the tab started, that what the viewer keeps was filed under the
book id alone, and a few smaller things. All of it is the viewer's own
state: nothing here writes the books.

Threads: every thread a tab starts (loader, receipts' workers, export,
owner job, the dock's start and its agent's reaper) is counted in one
per-view registry (jobs.rs). Dropping the view tells them to stop and the
registry says, on a condition, when the last has ended. An owner job that
changes something (restore, format upgrade, new books, connect, close the
books, check for updates, update) is never abandoned: its tab's close
control is off with a hover text saying what runs, App::close refuses, and
the window's close request is cancelled with a dialog that offers only to
wait. Read-only jobs (an export, a backup, the restore's check) stop with
the tab: an export checks at its phase boundaries and saves nothing (the
save is one atomic write of a new file; one the stop reaches too late is
removed). The dock's agent is hung up on and, if it ignores that for two
seconds, killed and reaped; the window's drop waits for that.

Release on close: the loader checks "gone" before every retry and between
the phases of a load, its retry wait is woken by the drop, and the viewer
presence is let go in the drop itself, not when a refresh in flight ends.
A thumbnail for a closed tab is not written.

Kept state: filed under a hash of the data root's canonical path and the
id (books outside any root: under their folder), with the books' identity,
the SHA-256 of the journal's first line, taken once they load. A stored
state whose identity differs from the loaded books' is discarded with the
remembered name. Old unkeyed keys are read without error and not used. A
start that names a company never writes the list of open companies.

The dock's height is the app's one layout in every tab (said in the spec
block and tested); the sidebar, rail and top bar panels now take ids made
from their view's, since egui keys a panel's size by the id as given.

Every new test was seen to fail with its fix switched off. The four
sidenav tests keep their BAR_H: at the owner's 519 they fail by 15 points
(sidebar) and 11 (rail) without it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 19:03:26 -07:00
swaitsandClaude Sonnet 5.5 5cd0eded36 feat(gui): the eighth company badge hue is cyan, not slate; no hue may be a grey
A grey badge beside the others reads as disabled. Slate (475569 / 94A3B8)
is replaced in the same position, so no other company's colour moves, by
cyan (0E7490 / 22D3EE). The contrast test now prints every measured ratio
and asserts HSL saturation >= 0.4 for every hue.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 16:21:11 -07:00
swaitsandClaude Sonnet 5.5 1b28da26e6 feat(gui): the company is named once in the frame: a tab, with a hue; its card at the foot; no header, no heading
The tab, the sidebar's header and the Overview's heading all said the
company's name side by side. Now the tab is the company's identity (badge
and name); the sidebar header and the Overview heading are gone (the
summary sentence leads the page, at the theme's heading size); and the
status card at the foot of the sidebar opens with a heading row, the
badge and the name (the rail shows the badge alone, the name on hover), so
"these are this company's books: verified, live" is on every page, at the
opposite corner from the tabs. The top of the sidebar is an empty
`top_slot` for the assistant's connection state, a later unit.

Each company has one of eight badge hues (theme::BADGE_HUES, light and
dark) chosen by FNV-1a of the id of its books: a function of the id alone,
so it is the same on its tab and its card, after a restart, in any order of
opening and on every machine. A test computes the contrast of every hue in
both themes: letter 4.5:1, badge 3:1 on each surface it sits on.

No figure, date or amount changed. Regenerated: the tall sidebar's shapes
and pixel goldens (header gone, links moved up, card heading row, hue) and
the eight tabs_* snapshots (hue, Overview lead, the rail's badge).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 15:47:56 -07:00
swaitsandClaude Sonnet 5.5 dce7898e96 test(gui): the live viewer's "update" test waits for the line it asserts on
A newer wanderbooks writes its lines one at a time, and the viewer may look
between two of them. With the unknown line last, nothing can check it, so the
viewer says "newer or damaged" (BS-format-1); once the next line lands it
says "update". Both are right. The test took the first error it saw and held
it to the "update" wording, so a look that fell between the test's two
appends failed it. The loader is unchanged by the fault: the test read the
first of two correct messages. The loader path is the same on main (0 of 30
runs failed there, 0 of 30 on the branch: the natural failure is rare, and
shows on a loaded machine); the branch's load only makes the gap likelier.
Seen deterministically by pausing the test 300 ms between its two appends.

The test now waits for the "update" and holds every message before it to the
"newer or damaged" one; a new test pins the between-the-lines look by waiting
on the viewer's first error before it writes the second line.

The same shape was in the background-tab test: it waited for the tab's seq to
move, which an entry's first journal line does, then asserted the posted
cash. It now waits for the cash itself.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 13:35:51 -07:00
swaitsandClaude Sonnet 5.5 80a24a6262 feat(gui): the tab bar spans the window above the sidebar; tabs carry a badge and a name
A tab is the top level (D-78): the sidebar, with its badge, pages and
status, is the company in the tab, so the bar now runs across the whole
window above it. The bar's height (tabs::BAR_H) is taken from the window:
the four sidenav tests that size a window for the sidebar add it, through
that constant, and the smallest window is 400 points plus the bar. The
sidebar below the bar is pixel for pixel the old 1440x920 golden image;
only its shapes hash moved, with the shapes lower by the bar.

Tabs are as wide as badge plus name between a least and a greatest width,
the name elided with the full name in the hover; the one in front is the
lit surface with the accent bar, open at its foot. Room is left before the
close control for a later state mark. The + follows the last tab (at the
right edge, whole, when the tabs scroll), says 'Open a company' on hover,
and lists companies by remembered name with the id beside it; a name is
remembered when a company's books load (company.<id>.name) and titles a
tab before its books load.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 11:41:10 -07:00
swaitsandClaude Sonnet 5.5 dcf092e39e test(gui): tabs share nothing, follow their journals and end with their tab
A refactor that compiles and passes the old tests can still share state
between tabs, so these look for exactly that, on scratch data roots made
by Root::setup:

- two companies with different cash and rent show their own on the
  overview, the profit and loss and a register; a search, page, period,
  columns and comparison set in one leave the other's state and every
  text it paints as they were;
- a sidebar scrolled in one tab is at the top in the other (fails, as
  checked, when the view is not drawn inside push_id);
- a journal change in the tab behind is read while another is in front
  and is on screen on the first frames after it is shown; books.show
  moves its own tab only and brings nothing forward;
- closing a tab releases its viewer lock, ends its loader's thread and
  its dock's agent process (a stand-in agent on a real PTY, the tab's own
  owner), while the other tab's lock and loader are held;
- "+" lists only companies not open, none opens twice, the last tab
  closed leaves the empty window in plain words;
- start-up restores tabs, their order, the front one, and each one's page
  and period; a company that is gone or listed twice is skipped; the old
  per-app keys are still written;
- read-only: the demo's two companies made read-only on disk, one
  following live behind the other, every page rendered in it, the tabs
  shown in turn, every file's bytes, size and time as they were;
- pictures of the bar with one, two and ten tabs, of "+" open and of the
  empty window, light and dark.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 09:29:34 -07:00
swaitsandMuse Wonder 1.0 2463c10af9 test: display rounding and percent rules (K-U9)
Tests encode the display rules: half away from zero, no negative zero, no percent of a zero or negative base, plus a scoped source check that no round_dp or float conversion remains in the money display paths. view_model's pct_change(-100, -50) expectation moves from Some(50.0) to None under the new rule. docs/proofs/display.md is the unit note (no Kani, no Lean for display, per the audit).

Co-Authored-By: Muse Wonder 1.0
2026-11-09 18:54:30 -07:00
swaitsandDeepSeek V4.1 Flash b72ba2514a docs: SOURCE lines cite what states the rule now, not a retired record
Unit S-E4: 37 SOURCE clauses across ledger-core, ledger-gui, ledger-mcp
and ledger-store still cited records bookspec retired on 2026-11-08
(D-71). A retired id names what a rule was, not what governs now, so
each clause cites its successor: BS-ledger-13 is WB-ledger-16 (the
audit), BS-ledger-12 is WB-ledger-15 (evidence read from the bytes),
and BS-format-1, whose retirement names no successor, becomes the
WB-format rule that states each clause's fact: WB-format-1 (the format
gate), WB-format-2 (a journal feature declared before its first line),
WB-format-3 (the owner's format upgrade) or WB-format-4 (each projection
schema in a file of its own). No clause's fact was left without a live
rule, so no claim was added.

Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
2026-11-09 09:00:48 -07:00
swaitsandClaude Sonnet 5.5 e41cc3a161 docs: sub-references name bookspec's statements, invariants and scenarios
Unit S-E rewrote each `B-n` citation to its bookspec id but kept the
sub-reference after it ("item 7", "rule 11", "INVARIANT 2"). Those
numbers counted parts of the retired rules.md text, so `BS-statement-5
item 7` pointed at finished and abandoned projects, not at the snapshot
it meant. Bookspec numbers a record's parts from 1 as `statement`,
`invariant` and `scenario`; every sub-reference now says so.

The map was built by content, not by position: each old item,
INVARIANT or SCENARIO was read in `git show ca8d676d5^:docs/spec/rules.md`
(the last full rule text), found in the pinned records
(bookspec bc92cf3) and in docs/spec/claims/, and each reference was
read in its context before it was mapped. Where the old numbering still
survives as the "Rule n" labels inside bookspec's statements (the cash
flow, party totals) the new number is that statement's position; where
a record carries the whole rule differently (the asset depreciation, the
IIF file, the arap invariants) the reference follows the content. Where
bookspec keeps no counterpart, the product rule that states it is cited
instead: WB-statement-5 (a project's facts and names), -7 (the snapshot),
WB-arap-4 (the document_standing feature), -8 (the issued PDF), -15 (a
payment event names its line), WB-ledger-15 (BS-ledger-12 is retired).
A reference that had pointed at the wrong part is corrected, for example
the discount-reason references that said BS-arap-6 INVARIANT 2 (a
bound) now say invariant 6 (the discount cap and date).

Only the reference tokens and their sentence change; no paragraph is
reflowed. A reference wrapped across a comment prefix keeps its wrap.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 03:30:06 -07:00
swaitsandMuse Wonder 1.0 489360f598 refactor: rule references cite bookspec ids
Every B-n citation in crates/, docs/, deploy/, scripts/ and .github/ now names its bookspec id BS-<area>-<n> (D-68), via scripts/rewrite-rule-refs.py: the map is parsed from docs/spec/rules.md's index, rules.md-prefixed and bare forms are rewritten, sub-references (rule 11, item 7, INVARIANT 2) survive, and plan/, docs/spec/rules.md and docs/spec/claims/ are untouched. Program-output string literals that cited a rule were reverted by hand so user-visible output and its goldens are unchanged; DatedRule.catalog, metadata no output prints, now holds BS-1099-1. One SOURCE line that cited only 'R-?' now also cites BS-statement-5.

Co-Authored-By: Muse Wonder 1.0
2026-11-08 19:40:22 -07:00
swaits 53a233d687 feat: accept a staged update in the app
The host has staged a downloaded, signature-checked update since step 4,
but the only way to apply it was `wanderbooks update` at a terminal, and
nothing in the viewer or on an agent's first call said one waited. The
owner's accept is the name plan 8.0.3 allocated for it: the lease socket
gains `Intent::ApplyUpdate`, and the host installs the staged copy from a
thread and lets its existing watch for a replaced program (host.rs
INVARIANT 7) restart onto it once no call runs, so the books stay open and
every holder's session carries on. With no host running there is no call
to cut off, so the viewer applies it itself.

The viewer reads `<root>/updates/staged/meta.json` every few seconds and
shows a standing notice with "Update now"; Books gains "Check for updates"
(which looks at the feed at once, whatever the daily look last did) and
"Update to X". `books.start` gains the allocated `update_waiting` field
and a next step telling the agent to tell the human; no tool can accept.

`apply_staged` waits up to five seconds for the update lock: running the
new tests showed the host's own look can hold it for a moment after it
writes `meta.json`, and the owner's accept should wait that out rather
than answer "nothing waits".

Tests: `books_start_says_an_update_waits` and
`the_owner_accepts_a_staged_update_in_the_app` in
`crates/ledger-cli/tests/update.rs` (a bridge writes all through the
restart, each account in the chart exactly once);
`the_menu_checks_for_updates_and_a_waiting_update_shows_a_notice_that_accepts`
and `books_outside_a_data_root_have_no_update_notice` in
`crates/ledger-gui/tests/update_notice.rs`.
2026-11-05 08:29:11 -07:00
swaits 36a7ad517d Merge branch 'main' into P11c
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
2026-10-30 17:26:41 -06:00
swaitsandClaude Fable 5.1 7809ff818a test(viewer): the found book's expected path drops Windows' extended-length prefix
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
P11c run 15: Windows reached the viewer's tests; the expectation came
from `canonicalize`, which spells `\\?\C:\...` there, while the books
never keep that prefix.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
2026-10-30 17:26:22 -06:00
swaits a09008504d Merge branch 'main' into P11c 2026-10-29 21:55:54 -06:00
swaitsandClaude Fable 5.1 584ec9390d test(viewer): the book a viewer finds is compared as the system spells it (macOS: /private/tmp)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
2026-10-29 20:43:42 -06:00
swaitsandClaude Fable 5.1 a944d0f51b test(viewer): the fake agent waits a whole second (macOS's bash 3.2 takes no fraction)
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
The portable macOS job: `read -t 0.1` is "invalid timeout
specification" in /bin/bash 3.2, so the fake agent never said ready.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
2026-10-29 20:06:46 -06:00
swaitsandClaude Fable 5.1 4a2b327513 test: the servers two_user starts get a Windows environment (P11c)
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
two_user.rs started its flagged servers with env_clear plus a Unix PATH
and HOME, no SystemRoot: on Windows Winsock cannot start without it, so
the --http door failed to bind (the server says so on stderr and serves
its pipes only, which is why "ready" still came). The tests now use the
harness's clean_env, as do evidence.rs's extract and the viewer's
command_line test. main (a8ce2e7d) merged in.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
2026-10-29 18:56:46 -06:00
swaitsandClaude Fable 5.1 84cbe0359c merge: main into P11c (P11b's dock and books homes, the macOS harness root fix)
One conflict, ledger-host commands.rs: main moved the agent-program lookup
into find_agent_in; kept that and carried the Windows parts into it
(.exe/.cmd/.bat, npm's global folder). The harness already used
default_root, so main's fix and ours agree.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
2026-10-29 17:26:43 -06:00
swaitsandClaude Fable 5.1 8f2e3378e8 feat(viewer): the agent dock and the first-run page (P11b)
D-27: a terminal panel along the bottom of the viewer (alacritty_terminal over
a PTY) runs Claude Code (default) or Codex in the book's books home, resizable,
collapsible, the choice remembered. The agent is an ordinary child process the
owner describes (agent_start); the viewer stays read-only: the agent writes
through the server like any other. A missing agent is offered through its
vendor's installer (a command to copy), never bundled; no folder is marked
trusted (Q-7, recommended answer: let Codex ask). Windows is not offered until
its ConPTY checks are recorded.

P11a found that onboarding with no terminal was false: the viewer opened only an
existing book. With no books and an owner, wanderbooks gui now shows a first-run
page: the private folder, the owner passphrase (typed in the viewer, optional),
the first books, an agent, then the books open. connect and New books... make
the books home. Tests: dock.rs, welcome.rs, books_home.rs (host and cli).
Docs: testing.md record and For P12, architecture, parity, gui.md, README.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
2026-10-29 17:06:14 -06:00
swaitsandClaude Fable 5.1 7749afc557 fix: Windows reads of lock files, update paths cfg(unix), merge main again (P11c)
check / check (push) Canceled after 0s
check / portable (macos-latest) (push) Canceled after 0s
check / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
spec_vault swept every file under a book, lock files included; on Windows
a held LockFileEx lock is mandatory and the read failed. The locks are
already dedicated files (never data), so the test skips *.lock. Merged
main (P13 step 6, the macOS server.log assert, P11a's AppImage identity):
host.rs keeps main's five-field identity on Unix and size/last-write on
Windows; the update poll and set_program_version are Unix-only.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
2026-10-29 17:03:30 -06:00
swaitsandClaude Fable 5.1 6b7dccd1ee feat(audit): audit runs and attestations are journaled (P8)
A claim that someone checked the books is evidence the CPA handoff rests on,
so it is a journal fact and replays: audit.run (a programme run through a
day at the books' figure head, with the hashes that make it reproducible and
the two filed workpapers), receipt.attested, entry.reviewed and
period.attested. Behind the journal feature audits, schema 20; no figure
moves. The figure head is the last line that bears on a figure: filing a
workpaper, a run or an attestation never makes an audit stale, an entry,
document, close, settings or role change does, so a period is attested only
on an audit that still describes the books. A receipt reading that differs
from the entry is recorded as disagreeing and never counts; whether a claim
counts is derived against the bar when asked, never stored.

The store also reads what a ledger cannot: the chain, the database against
a replay, stored and extracted files, the access log, duplicate files, and
the backups' standing handed in by the server. Fixture old-books/p8_before
was written by the version before this one and opens to its figures.
period.attested was the tests' placeholder for an unknown event type; they
use ledger.not_yet_written now.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
2026-10-29 15:54:08 -06:00