Skip to content

feat(web): the window's first screens, with profit and loss and a balance sheet (0.7.0) - #6

Merged
nodemode-ai merged 63 commits into
mainfrom
feat/window-0.7.0
Nov 27, 2026
Merged

nodemode-ai merged 63 commits into
mainfrom
feat/window-0.7.0

Conversation

@nodemode-ai

Copy link
Copy Markdown
Contributor

feat(web): the window's first screens, with profit and loss and a balance sheet (0.7.0)

Summary

  • The web client gets its first screens for the ledger, selling, buying and stock. Until now all of it was reachable only from the command line and the server's routes.
  • This is a first part, not the whole phase. The screens are built and several were run in a browser one at a time, but the phase's own bar (a twenty-line invoice entered, posted, and three screens opened with nothing moving on screen) has not been met in one run. The phase stays open in the plan.
  • A registry of views: a view declares its id, title and group, the sidebar and page sections are made once at start, a view is built the first time it is shown, and the address names the screen and its filters so a reload returns to it.
  • A table part that keeps rows by key and writes only the cells that changed; integer formatting for money, quantities and rates, so a float never appears in the client either.
  • A list for each kind of document; one form for sales and purchase documents with a line grid and pickers for the party, the items and the tax rates; payments with an allocation table; goods receipts and delivery notes with Post and Cancel; setup lists for customers, suppliers, items, tax rates, warehouses and accounts; trial balance, general ledger, ageing and stock screens.
  • New on the server: GET /api/reports/profit-and-loss and GET /api/reports/balance-sheet, built on the same posted journal lines as the trial balance, guarded by reports.read, with ./formledger cli statement pl and bs. There is no year-end close yet, so the balance sheet shows the result so far as "Unclosed result" inside equity.
  • The dev server's ports can be set from the environment.
  • Known and not fixed: the one run of a twenty-line invoice posted with nine lines, because Enter in the item picker did nothing when it arrived before the list was drawn; the picker was changed afterwards and checked on a stand-in page only. A table's totals row moves once when its rows arrive.
  • Not in this change: sidebar icons, printing, a party picker in the payment form, and the desktop app.

Commits

63 commits. The short hashes change when the commits are signed, so they are left out.

  • web (30): the scaffold (formatting, the table part, the view registry, the typed parts, dev ports), the lookups cache, the picker and the line grid with their fixes, the setup lists, the statements' calls and views, the ledger and position screens, and each slice's log entry
  • web/payments (10): calls, the two lists, the payment form with its allocation table, the receipt and delivery note views, styles, three fixes
  • doclists (8): the spec table and calls, the list view, styles, three fixes, the unused footer rules
  • docform (5): the specs and calls for both families, the form, its sizes, two fixes
  • reports (4), cli (1), ledger (1): the two statement builders, their routes, the command-line verbs, the page
  • window (1), agents (1), docs (1): the page that describes the screens, the harness skill, the readme
  • chore(release): 0.7.0

Version

v0.7.0 (release commit is last). Version sites bumped: internal/app/version.go, web/package.json and both fields of its lock, src-tauri/tauri.conf.json, src-tauri/Cargo.toml and the app's entry in src-tauri/Cargo.lock, the Makefile, and the four HASHOUT_LOG.md headers.

Checks

  • On go 1.26.9: go build ./..., go vet ./... and gofmt -l cmd internal were clean at the head. The web type check passed.
  • Each of the 63 commits was checked out in a copy and go build ./... was run: all 63 build.
  • The harness skill: validate_skill.py reported 0 FAIL and 0 WARN.

Not run by the person assembling this change: the window in a browser. Not run by anyone: the CI workflow on GitHub for these commits; tauri build; a twenty-line invoice in the real form after the picker change; purchase documents in the form; a payment made; a goods receipt or delivery note that posts; editing an existing setup row; a tax rate save. These were run by the build agents and not repeated: profit and loss equal to income minus expenses of the trial balance for a year and for one month, and a balance sheet that balances on two days, against a ledger seeded through the API; the document lists in a built copy with the machine and network slowed (paging adds exactly the new rows; movement on screen 0.0016 after a fix); the two statements in a built copy (correct numbers; 0.0121, not traced); the payment form (post, allocation and remainder correct; 0.005); the ledger screens (0.0095 on the trial balance, from the totals row); the grid on a stand-in page (twenty lines typed, nothing moving without input). No tests exist, by the owner's rule.

Merging

Merge with a merge commit so each commit and its signature stays. Do not squash.

Minor units, thousandths and basis points become text and back without a float.
Rows are kept by key; new data updates the text of the cells that changed, adds and removes single rows, and never rebuilds the table. The empty line, the error line and the totals row sit in reserved space.
The engine exposes its api client and a route is any view's id.
The two parts the document forms share, as typed handles with nothing behind them yet.
A view declares its id, title and group; the sidebar and the page sections are made once at start, a view is built the first time it is shown, and the address keeps the place across a reload.
FORMLEDGER_UI_PORT and FORMLEDGER_SERVER_PORT move the dev server and its proxy target, so two copies can run side by side.
Group posted and cancelled journal lines by account type into income, expense, asset, liability and equity sections with totals; the balance sheet carries the unclosed result into equity.
Serve GET /api/reports/profit-and-loss and /api/reports/balance-sheet behind reports.read, mounted from the reports module.
Trial balance, general ledger, both ageings and stock valuation with its tie to the ledger, as plain calls with no DOM.
…t type

The seven document lists share one spec each: route, kind, party side, form to open and the right to make a draft. loadPage maps each server shape to one row type.
Describes the six setup lists as specs and adds the list, create and update calls plus the form-to-body conversion, with no DOM.
Adds the engine module for both payment families: list, read, draft, post, allocate and cancel, plus the party list, deposit accounts and open invoices.
Fixed-size list and form panel layout for the setup views, with sizes declared on the root class.
Fetches each lookup list once, following pages, and filters it by code or name for the pickers.
The picker filters the cached list as you type, floats a fixed set of rows in an overlay layer, and takes arrow keys, Enter and Escape.
One spec per family names its routes, kinds, party and make steps; the calls load, save, confirm, cancel, amend and convert a document and read the server's totals as integers.
Reads a delivery note or a goods receipt into one shape with its lines, warehouse and party, and posts or cancels it.
Registers the six setup views in group Setup, each a keyed table filled once from the server on first show.
Own size properties on the root class, space tokens only, a bar and status line of reserved height.
Five read-only views on mountTable with a fixed filter bar; a filter change patches rows in place and a late answer is dropped.
Each spec becomes one view built once on mount on the shared table; the status filter lives in the address and a reload patches rows by key.
Every region of a list has its size before data arrives, declared as custom properties on the list root, so rows and counts never move the page.
Print profit and loss over a date range and the balance sheet as of a day from the new report routes.
Builds the form once per view, fills it in place from the opened row, marks the row, and locks the fields that cannot change after create.
Saves through the typed calls, sends only changed fields on edit, shows the server's sentence in a reserved line, and patches the one row in place.
Two keyed lists on the shared table with a status filter kept in the address, a totals row and a new payment button shown only to those who may draft.
Engine module with the statement shapes and the two report calls, no DOM.
Each row holds an item picker, description, quantity, unit price and tax picker, with total cells that only setTotals writes; rows are added and removed one at a time.
Column widths, row height and the error strip are custom properties on the grid root, so no row changes size when it gets text.
… tax

A line naming an item sends only the fields the person filled, so the server fills the rest from the item instead of overriding them with empty values.
The visible Status label now names its select for assistive technology, in place of a separate aria label.
Explains the per-list spec, how delivery notes get party names and amounts, and how the filter and paging patch rows.
Views delivery-note and goods-receipt show the document read-only with party, date, warehouse and keyed lines, with post and cancel enabled by status and a way back to the list.
Fixed field, header, error and action heights and column widths declared on the view's root class, so loading data and errors never move anything.
Routes, sign conventions, how the unclosed result reaches equity, and the IAS 1 source named for the layout.
Records the shared shell, the per-currency totals line and the two-place amount default.
Drop the hand-rolled replace helper in the statement query builder.
Why the unclosed result sits in equity and how the routes pick their default dates.
Fixed section heights, address-kept dates and stale-answer handling for the two statement views.
The balance sheet sections said no lines in this range; they are as of one day, so they now say on this day.
The document form mounts the grid before it knows the currency, so the totals block no longer reads a stray space.
The form learns the currency from the party or the saved document, so setCurrency rewrites the total label and price places in place.
Rows of invoices a post fully paid no longer jump to the end of the table; the list is ordered by invoice number so a refresh only rewrites cells.
The status mark no longer moves sideways when a draft gets its number, which the throttled browser check showed as a small layout shift.
The floating list follows its input on scroll and resize while open, and opens upward when there is no room below.
Records why the picker makes its own overlay layer, how lookups are cached and how setTotals maps to rows.
A delivery note's lines carry only item ids, so the item list is read once and cached to show each line's code.
Records why both payment directions share one family table, how the remainder is worked out, and how delivery note ids are turned into names.
Confirm or Post on an unsaved draft saves it first and then posts it, and the permission it needs follows the kind picked for the new draft.
Records the reasoning for the spec table, locked fields and typed account codes.
A footer under the table moved down each time rows arrived, which measured as layout shift under throttling; the count and Load more now sit in the fixed bar above the rows.
The count and the load-more button moved into the bar, leaving the footer's rules and its height unused.
What each screen shows, how to get around, and what is not there yet.
The harness skill no longer says there are no screens, and names the registry, the parts and the engine layer.
The status line lists the screens and says they are only partly checked.
Enter now picks an exact code match first, else the row shown for the current text, else the first match, waiting for the list when it has not loaded, so a fast Enter no longer leaves a row without its item.
Moves every version site to 0.7.0 and adds the 0.7.0 section to the changelog.
@nodemode-ai
nodemode-ai requested a review from gbarnai as a code owner November 27, 2026 06:48
@nodemode-ai
nodemode-ai merged commit 8a40000 into main Nov 27, 2026
2 checks passed
@nodemode-ai
nodemode-ai deleted the feat/window-0.7.0 branch November 27, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant