Repository navigation
feat(ledger): write snapshot from the window, a key of its own, and a page drawn by FormTxt (0.12.0) - #11
Merged
Conversation
formledger encrypt now writes the plain database beside the new one under a dated name it never overwrites, and says where it is and that it is not encrypted.
…y route POST /api/snapshot writes a snapshot into the snapshots folder of the data folder and answers with its path and table row counts.
With FORMLEDGER_KEY_HOME set and no key file, the server makes an owner-only key there once, encrypts an existing plain ledger with a plain copy kept, and uses that key on every later start.
The card text grid now reserves a control-high name row, so the meta line no longer drops when names arrive and the gallery shifts zero.
writeSnapshot posts to the snapshot route and updates one toast in place with the path, table count and row count.
Search opens the command palette on Cmd or Ctrl+P, Print moves to Cmd or Ctrl+Alt+P, and Write Snapshot loses its ellipsis because it now acts at once.
The palette lists Print on Cmd or Ctrl+Alt+P to match the menubar.
Template lists, single templates and the use body now carry accountName looked up from the chart of accounts at read time, so screens can show 4100 Sales instead of a bare code. The name is never stored.
engine_start gives the env pair FORMLEDGER_KEY_HOME with the app's own data folder unless a key file is already configured; main.rs has to add it to the sidecar command.
Gallery cards gain a reserved line naming the accounts a template posts to, such as 4100 Sales, and each preview row carries its account as a tooltip.
…ckup ENCRYPTION.md now says the desktop app keeps its own key, that encrypt keeps a dated plain copy, that losing the key loses the books, and how to back the key up and restore it.
The desktop section now says the server side is done and the shell passes its folder once main.rs adds engine_start::key_home.
One entry in each log: why FORMLEDGER_KEY_HOME is the seam, how the copy is named and kept, and the main.rs line still owed.
Records why the card text rows are fixed and how account names are read from the chart on every template read.
Dashboard cards used the sheet radius; form.md cards use a smaller one, built here from the radius tokens.
The KPI figure moves from the 22 px size to the title size with weight 650 and tight tracking, as form.md sets its big numbers; the row is still fixed so nothing shifts.
A refusal, a missing template, a timeout or an empty answer from FormTxt now carries a sentence saying what happened and what to do, and the wait is 100 seconds so the person has time to answer the Allow outside agents question.
The vertical axis printed full two-decimal amounts that crowded the left gutter; it now prints compact figures such as 2K, as form.md does. Hover readouts keep the exact amount.
Records the measured differences, what changed and what was left.
When FormTxt refuses or fails and the plain renderer draws instead, the print route sends the reason in X-FormLedger-Renderer-Note and cli print writes it on standard error.
The 403 note now says the plain page was drawn and quotes FormTxt's own words before saying how to allow outside agents.
PRINT.md now says an invoice was drawn by FormTxt 0.38.0, gives the refusal note, the 100 second wait and the three set-up steps, and says where FormTxt saves the outside agents answer.
The waiting toast grew from one line to four when the answer came and moved by 0.00108; one toast at the end moves nothing.
Typing in the palette moved the group column by 0.0001 as rows changed; fixed columns with the group at the trailing edge keep every row still.
Records what the real FormTxt answered, why refusals now carry a note, the longer wait, and where FormTxt saves the outside agents answer.
The key hint sat centered in its fixed column; it now ends against the group column.
The sidecar now gets FORMLEDGER_KEY_HOME set to the app data folder unless a key file is configured, as engine_start::key_home asks.
Template lines and used lines carry accountName, read from the chart of accounts by the server.
Why the toast waits for the answer and why the palette columns have fixed widths.
What was checked in the menubar, what changed and how far cargo check got.
Write snapshot calls the new route. Ctrl or Cmd+P opens search, Ctrl or Cmd+Alt+P prints, and the shortcuts toast says so.
Data at rest now covers FORMLEDGER_KEY_HOME and where the desktop app is written to keep the key.
The key home line is in main.rs now; the doc no longer says it is still waiting.
Every version site moves to v0.12.0, the changelog gets its section and the README lists FORMLEDGER_KEY_HOME.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(ledger): write snapshot from the window, a key of its own, and a page drawn by FormTxt (0.12.0)
Summary
snapshotsinside the data folder, and says where it is and how many tables and rows it holds. Before, it only showed the command to run.FORMLEDGER_KEY_HOMEset and no key file, the server makes a key once, keeps it and encrypts the ledger, converting an existing plain one. The desktop shell is written to set it to its app data folder.formledger encryptkeeps a dated plain copy and never overwrites an earlier one.Commits
34 commits, oldest first, release commit last:
Version
v0.12.0 (release commit is last). Bumped:
internal/app/version.go,Makefileline 1,web/package.json, two fields inweb/package-lock.json,src-tauri/tauri.conf.json,src-tauri/Cargo.toml, theformledger-desktopentry insrc-tauri/Cargo.lock, the "Current build version" line in the fourHASHOUT_LOG.mdfiles, the README badge, and a newCHANGELOG.mdsection.Checks
go build ./...passed at each commit;go vet ./...,gofmtandnpm run checkinweb/passed at the head.encryptand the key home step run twice on seeded ledgers (key made once, database not readable as SQLite, 30 items back through the API).Not run: the desktop shell and its menubar were not compiled (one
cargo check --offlinestopped at dependency resolution); nothing ran on macOS or Windows; the 403 and 409 answers of the snapshot route; statements through FormTxt; the light theme on dashboards.Merging
Merge with a merge commit so each commit and its signature stays. Do not squash.