|
|
|
|
@ -31,7 +31,7 @@ Five C++26 modules, and a sixth in one build:
|
|
|
|
|
| `implementations/nostro-app.cpp` | The app's `main`: the command line, the parts put together, the toolkit's gallery (`--gallery`) and a player of input scripts (`--poke`). |
|
|
|
|
|
| `interfaces/Nostro.DebugCommands.cppm`, `implementations/Nostro.DebugCommands.cpp` | The commands, watches, events and checks of the app's `--debug-api` build; see "Looking at the app". |
|
|
|
|
|
| `assets/` | Noto Sans Regular and Medium with their licence (`OFL.txt`); the app's build puts the fonts beside the executable. |
|
|
|
|
|
| `project.cpp` | The build description: reads `--banks=`, `--lib`, `--dbus`, `--product=`, `--graphics=`, `--debug-api`, `--coverage` and `--profile-runtime=`, forwards the other args to the dependencies (with `--no-quic` for Crafter.Network, except in the app's debug build), returns the product. It names each dependency at a commit ("Dev environment"). It also holds what the app is as a Flatpak (`app.flatpak`) and the `fake` run script. |
|
|
|
|
|
| `project.cpp` | The build description: reads `--banks=`, `--lib`, `--dbus`, `--product=`, `--debug-api`, `--coverage` and `--profile-runtime=`, forwards the other args to the dependencies (with `--no-quic` for Crafter.Network, except in the app's debug build), returns the product. It names each dependency at a commit ("Dev environment"). It also holds what the app is as a Flatpak (`app.flatpak`) and the `fake` run script. |
|
|
|
|
|
| `packaging/dbus/` | The published D-Bus interfaces, `net.catcrafts.Nostro1.xml` and `net.catcrafts.Nostro1.Checkout.xml`. |
|
|
|
|
|
| `packaging/system/` | What a Flatpak cannot install: the polkit policy, the D-Bus policy and activation files, `nostrod.service`, the sysusers entry, the `nostro` command, `install.sh` and `uninstall.sh`. |
|
|
|
|
|
| `.forgejo/workflows/flatpak.yaml` | The one workflow: the tests and both aarch64 Flatpaks for a pull request or a run by hand, and for a signed tag `X.Y.Z` their publication; see "Releasing". |
|
|
|
|
|
@ -124,16 +124,16 @@ The app end to end:
|
|
|
|
|
- Which bank an account is with makes no difference outside the settings. No screen there names a bank, or a way to connect to one, in the app's own words: it says "your bank". `ShouldDriveTheApp` fails on a frame that does, excepting what nostrod and the bank say themselves: a note about a connector, a refusal with the call it refused, a link the bank made. What does differ by bank is asked of `:Banks`: a connection that pays between the user's own accounts only, as bunq's through OAuth, is `Connection::ownAccountsOnly`. It is marked Limited, a payment from it to anyone else is saved as a draft, and it cannot pay a request or a shop.
|
|
|
|
|
- Adding a connection is three pages, from the settings and from the welcome alike: the banks (`add`), the bank's ways (`add:bunq`) and the way's form (`add:bunq:key`). The first two are built from `:Banks`. The form is the bank's own to draw and to check, in a file of the bank's (`Nostro.App-Bunq.cpp`), and its button ends in `App::Connect`, which is every bank's.
|
|
|
|
|
- **The screens** (`implementations/Nostro.App-Screens.cpp`, and a bank's own forms in that bank's file) are functions from that state to a frame. A window under 600 dp wide shows one page at a time, with the app's places along its bottom; a wider one has them down its left side, and from 900 dp the accounts too. A screen that shows the bank's own state (the accounts, an account, the cards) reads it again four ways, all one action (`Refresher`): Refresh in the bar, F5, Ctrl+R, and the page pulled down at its top. The README's "The app" says what each screen is for.
|
|
|
|
|
- **The window** (`Nostro.Ui.Shell`) is one sd-event loop that carries the compositor's connection, nostrod's bus, the desktop portal's bus and the timers. `Window` turns Crafter.Graphics' events into the `Context`'s, bringing time up to each and building a stale frame again first, and does what the `Context` wants afterwards (`Settle`, which the loop calls from a post source after every source that ran). A frame is drawn only when the compositor asks for one after something changed: an idle window draws nothing. `Canvas` turns a `DrawList` into Crafter.Graphics' items, one dispatch per batch, from a pool of buffers per frame in flight. `Portal` reads the desktop's colour scheme and accent, and asks the desktop to open an address.
|
|
|
|
|
- **The window** (`Nostro.Ui.Shell`) is one sd-event loop that carries the compositor's connection, nostrod's bus, the desktop portal's bus and the timers. `Window` turns Crafter.Graphics' events into the `Context`'s, bringing time up to each and building a stale frame again first, and does what the `Context` wants afterwards (`Settle`, which the loop calls from a post source after every source that ran). A frame is drawn only when the compositor asks for one after something changed, or when it waits for one itself, having asked for another size (`onFrameOwed`): an idle window draws nothing. `Canvas` turns a `DrawList` into Crafter.Graphics' items, one dispatch per batch, from a pool of buffers per frame in flight. `Portal` reads the desktop's colour scheme and accent, and asks the desktop to open an address.
|
|
|
|
|
- **`nostro-app`** puts them together, and has what looking at the window without a hand on it takes: `--size`, `--scale` (a phone's density on a desktop's display), `--theme`, `--route`, `--screenshot`, `--poke` and `--gallery`. It makes itself undumpable once the portal has seen it. Closing the window while a change is under way takes the window down and keeps the process until the answer has come.
|
|
|
|
|
|
|
|
|
|
## Dev environment
|
|
|
|
|
|
|
|
|
|
crafter-build is the only build tool. It compiles with its clang 23 and libc++, `-std=c++26` and `import std;`, and links `-lssl -lcrypto`, and `-lsystemd` for anything with D-Bus in it (libsystemd's `sd-bus.h` and `sd-event.h`; crafter-build's Flatpak SDK has them). nostrod's Flatpak is made by flatpak-builder, the app's by crafter-build itself (`--packaging=flatpak`; `project.cpp` was written against crafter-build 6.3.0), and the aarch64 ones by the two scripts in `packaging/flatpak/`.
|
|
|
|
|
|
|
|
|
|
- Every dependency `project.cpp` names is at a commit: Crafter.Network (nostro builds it `--no-quic`, so without msquic) and Crafter.DB are `GitProject`s with a `.commit`, and Crafter.LintRules and Crafter.Debug's build helper `#pragma crafter dependency` lines with `commit "<sha>"`. crafter-build clones each from `forgejo.catcrafts.net` once and builds from that clone, and the notes at the end of this file are those commits' notes. They were pinned on 2026-11-19, to what the tests had run against that day: a build runs each dependency's own `project.cpp` and links its code into the program that holds every user's bank keys. Moving one forward is a change to `project.cpp`, with the tests run again.
|
|
|
|
|
- Two things still follow a branch, so a build still needs the network. Crafter.Thread comes behind Crafter.Network, whose own project file names it without a commit: pinning it is Crafter.Network's to do. And the app's `--debug-api` build takes Crafter.Network without a commit, because Crafter.Debug does: with one library named two ways crafter-build stops with "module Crafter.Network is built twice for nostro-app", as tried on 2026-11-19.
|
|
|
|
|
- The app needs a Wayland compositor and a Vulkan device to run, and nothing else of nostro does. No test opens a window. `--product=app` takes `--graphics=<a Crafter.Graphics checkout's project.cpp>` for now: the app asks the input method for a field's purpose and hints (`TextInputPurpose`), which Crafter.Graphics' master does not have. The change is meant for its branch `claude/nostro-app`. On 2026-11-19 neither was on the forge: it was uncommitted work in one local checkout, so the app could be built on that machine and nowhere else, CI included. Once it is pushed, CI finds it by that branch's name; once it is merged, name Crafter.Graphics as a `GitProject` at a pinned commit in `project.cpp` and drop the flag, and the workflow's step that fetches it.
|
|
|
|
|
- Every dependency `project.cpp` names is at a commit: Crafter.Network (nostro builds it `--no-quic`, so without msquic), Crafter.DB and, for the app, Crafter.Graphics are `GitProject`s with a `.commit`, and Crafter.LintRules and Crafter.Debug's build helper `#pragma crafter dependency` lines with `commit "<sha>"`. crafter-build clones each from `forgejo.catcrafts.net` once and builds from that clone, and the notes at the end of this file are those commits' notes. They were pinned on 2026-11-19, to what the tests had run against that day: a build runs each dependency's own `project.cpp` and links its code into the program that holds every user's bank keys. Moving one forward is a change to `project.cpp`, with the tests run again. Crafter.Graphics was pinned on 2026-11-20, to its master of that day (`a9ce1a0`), the first with the text-input purposes the app asks the input method for. No test opens a window, so moving that one forward is checked by looking ("Looking at the app"): the window at its start, resized by the compositor and by the app, and at a `--scale`.
|
|
|
|
|
- Three things still follow a branch, so a build still needs the network. Crafter.Thread comes behind Crafter.Network, whose own project file names it without a commit: pinning it is Crafter.Network's to do. Crafter.Event, Crafter.Math, Crafter.Asset and the Khronos headers come behind Crafter.Graphics in the same way. And the app's `--debug-api` build takes Crafter.Network without a commit, because Crafter.Debug does: with one library named two ways crafter-build stops with "module Crafter.Network is built twice for nostro-app", as tried on 2026-11-19.
|
|
|
|
|
- The app needs a Wayland compositor and a Vulkan device to run, and nothing else of nostro does. No test opens a window. Until 2026-11-20 `--product=app` took a checkout of Crafter.Graphics to build against (`--graphics=`), for a change that was not on its master yet. The flag is gone: `project.cpp` passes one it is given on to the dependencies like any arg it does not know.
|
|
|
|
|
- The app's `--debug-api` build links Crafter.Debug, which talks QUIC: that one build has Crafter.Network with msquic (crafter-build builds it with CMake once, for minutes, and keeps it in its cache), and its binaries carry a runpath into that cache.
|
|
|
|
|
- Where the connectors live depends on who runs the library. nostrod's worker keeps each user's under `<state>/users/<uid>/`: `connectors.json`, the transaction tables, `checkouts.cdb`, `checkout-account` and `owner`, with `<state>` from `--state`, else `$XDG_DATA_HOME`, else `$HOME/.local/share`. Installed, that is `/var/lib/nostro/.var/app/net.catcrafts.Nostrod/data/`, readable by the user `nostro` alone. The library used directly reads `connectors.json` from `$XDG_CONFIG_HOME/.config/nostro/` (sic, see "Gotchas") or `$HOME/.config/nostro/`, and keeps the transaction tables under `$XDG_CACHE_HOME/nostro/transactions/` or `$HOME/.cache/nostro/transactions/`. A real connectors file holds a real API key: point every experiment elsewhere.
|
|
|
|
|
- No test uses the system bus: they run on `tests/Support/FakeBus.inc`. Running anything by hand that talks to `net.catcrafts.Nostro1` reaches the installed nostrod, if there is one, and its dialogs: the CLI, and the app, which reads the accounts as soon as it starts. A Flatpak sandbox with the system bus (`flatpak run`) sets `DBUS_SYSTEM_BUS_ADDRESS` itself, over an `--env` of yours: keep a sandboxed experiment off the bus with `--nosocket=system-bus`. To look at the app, run it on the made-up system, `nostro-fake-system`, which sets that address for what it starts ("Looking at the app").
|
|
|
|
|
@ -147,19 +147,19 @@ crafter-build --banks=bunq --product=daemon # nostrod: bin/nostrod-<variant>/n
|
|
|
|
|
crafter-build --product=checkout # the Nostro.Checkout library alone; no bank needed
|
|
|
|
|
crafter-build --banks=bunq --lib # the library alone (what a consumer builds), without D-Bus
|
|
|
|
|
crafter-build --banks=bunq --lib --dbus # the library with :Bus, :Client and :Daemon
|
|
|
|
|
crafter-build --banks=bunq --product=app --graphics=<Crafter.Graphics>/project.cpp # the app: bin/nostro-app-<variant>/nostro-app
|
|
|
|
|
crafter-build --banks=bunq --product=app # the app: bin/nostro-app-<variant>/nostro-app
|
|
|
|
|
crafter-build --banks=bunq --product=fake-system # nostro-fake-system: a fake bus and a fake bunq with nostrod on them
|
|
|
|
|
crafter-build --banks=bunq --product=app --graphics=… --debug-api # the app with Crafter.Debug, the fake system, and build/crafter-debug
|
|
|
|
|
crafter-build --banks=bunq --product=app --graphics=… --debug-api run fake [-- <the app's options>] # that app on the fake system
|
|
|
|
|
crafter-build --banks=bunq --product=app --debug-api # the app with Crafter.Debug, the fake system, and build/crafter-debug
|
|
|
|
|
crafter-build --banks=bunq --product=app --debug-api run fake [-- <the app's options>] # that app on the fake system
|
|
|
|
|
crafter-build --debug --banks=bunq # debug build
|
|
|
|
|
crafter-build -v --banks=bunq # with the compiler commands
|
|
|
|
|
crafter-build clean # delete bin/ and build/
|
|
|
|
|
crafter-build test --banks=bunq # the tests in tests/, against a fake bunq; none talks to bunq itself
|
|
|
|
|
tests/coverage.sh [profile runtime] # the tests with coverage: a report per file and every line no test ran
|
|
|
|
|
crafter-build lint --banks=bunq # the Crafter.LintRules lite rules project.cpp registers, report only
|
|
|
|
|
crafter-build lint --banks=bunq --product=app --graphics=… [--debug-api] # the same over the toolkit, the app and its window
|
|
|
|
|
crafter-build lint --banks=bunq --product=app [--debug-api] # the same over the toolkit, the app and its window
|
|
|
|
|
flatpak run --filesystem=<dir> org.flatpak.Builder --user --force-clean --repo=<dir>/repo --state-dir=<dir>/state <dir>/build packaging/flatpak/net.catcrafts.Nostrod.yaml
|
|
|
|
|
crafter-build --banks=bunq --product=app --graphics=… --packaging=flatpak --march=x86-64-v3 --mtune=generic bundle # the app's Flatpak as one file; `install` installs it for you instead
|
|
|
|
|
crafter-build --banks=bunq --product=app --packaging=flatpak --march=x86-64-v3 --mtune=generic bundle # the app's Flatpak as one file; `install` installs it for you instead
|
|
|
|
|
packaging/flatpak/make-aarch64-sysroot.sh && packaging/flatpak/build-aarch64.sh <repo> # both Flatpaks for aarch64, into a repository
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
@ -181,7 +181,6 @@ The workflow was written on 2026-11-19 and pushed without having run once: its f
|
|
|
|
|
- A runner, which it has. The `flatpak` runner is the Catcrafts organisation's and serves that organisation's repositories. The repository was first pushed to `jorijnvdgraaf/Nostro`, where no runner would have taken a job, and was moved to `Catcrafts/Nostro` the same day.
|
|
|
|
|
- The repository public by the time a tag is pushed. The release checks read the forge without a login, as imsd-messages' do, and a private repository answers them with a 404. After the move it was private.
|
|
|
|
|
- The runner's config has to allow the four volumes `publish` mounts. Three are the ones imsd-messages' job mounts; `crafter-flatpak-nostro-cache` is new.
|
|
|
|
|
- Crafter.Graphics' text-input change on the forge, as the branch the workflow's `GRAPHICS_REF` names ("Dev environment"). Until then the app's build fails in the step that fetches it, and with it both jobs.
|
|
|
|
|
|
|
|
|
|
Only aarch64 is published, a phone's architecture. An x86_64 machine builds its own Flatpaks with the commands above, which the README's "Installing" does not say yet. The system files are not in a release either: they come from a checkout (`packaging/system/install.sh`) or the Arch package.
|
|
|
|
|
|
|
|
|
|
@ -239,7 +238,7 @@ A bug fix comes with a test that fails without it, and states in its commit how
|
|
|
|
|
What a test cannot show (that the window draws what the frame says, in the right place, on a real display; the pointer, a finger, the keyboard, the input method) is looked at, on a made-up system so that nobody's bank is in it:
|
|
|
|
|
|
|
|
|
|
- `nostro-fake-system` (`--product=fake-system`, `tests/FakeSystem/main.cpp`) is the tests' fake bus and fake bunq with a real nostrod on them: `nostro-fake-system [--dir <directory>] [--port <port>] [--polkit allow|password|deny|dismiss|absent|silent|slow] [--empty] [--run <program> <arguments…>]`. It fills the bank with a made-up user (three accounts, three months of payments, three cards of which one is frozen and one virtual, a request sent and one received, a schedule, a draft, and a second connection through OAuth), and runs the program with `DBUS_SYSTEM_BUS_ADDRESS` pointing at the fake bus. `--empty` starts from the welcome and prints the made-up bank's API key; `--polkit` is what every request for a password is answered with; `--bank-delay <milliseconds>` is how long the made-up bank takes over each answer.
|
|
|
|
|
- Without a hand on it: `nostro-app --size 420x760 --theme light --route account:<IBAN> --poke "wait:2500;tap:110,200;shot:<file.png>"` plays input into the window library's own events, so the window's listeners run as for a real pointer, and writes screenshots. Steps are separated by `;` and positions are in dp: `tap:x,y`, `hold:x,y,ms`, `drag:x1,y1,x2,y2,ms`, `move:x,y`, `press:x,y` and `release` (a finger kept down between them), `right:x,y`, `wheel:x,y,detents`, `key:Name`, `text:…`, `preedit:…`, `delete:before,after`, `resize:w,h`, `wait:ms`, `shot:file`. `--scale 3 --size 360x760` draws a phone's screen on a desktop's display. `--gallery widgets|list|text` shows the toolkit's widgets in the app's place and asks nostrod nothing.
|
|
|
|
|
- Without a hand on it: `nostro-app --size 420x760 --theme light --route account:<IBAN> --poke "wait:2500;tap:110,200;shot:<file.png>"` plays input into the window library's own events, so the window's listeners run as for a real pointer, and writes screenshots. Steps are separated by `;` and positions are in dp: `tap:x,y`, `hold:x,y,ms`, `drag:x1,y1,x2,y2,ms`, `move:x,y`, `press:x,y` and `release` (a finger kept down between them), `right:x,y`, `wheel:x,y,detents`, `key:Name`, `text:…`, `preedit:…`, `delete:before,after`, `resize:w,h`, `wait:ms`, `shot:file`. `--scale 3 --size 360x760` draws a phone's screen on a desktop's display. `--gallery widgets|list|text` shows the toolkit's widgets in the app's place and asks nostrod nothing. The player stamps what it plays with the host's clock, and what a real pointer sends carries the compositor's: a pointer that crosses the window while a script runs can make the script's taps miss, as one did on 2026-11-20, so keep it off the window, and read a run that went wrong for a `wl_pointer.enter` (`WAYLAND_DEBUG=1`).
|
|
|
|
|
- With an agent's hand on it: the `--debug-api` build and `./build/crafter-debug` (the Crafter.Debug notes at the end of this file). `crafter-build … --debug-api run fake [the fake system's options] [-- the app's options]` starts the app on the fake system, in the background since it does not exit. Then:
|
|
|
|
|
- `get app.screen`, `get ui.texts` (every line the screen shows), `get ui.regions` (what can be pressed, by key, in dp), `get 'window.*'`;
|
|
|
|
|
- `call Ui_Tap key=account.pay`, `Ui_Type text=…` into the field that has the focus, `Ui_Key key=Tab`, `Ui_LongPress`, `Ui_Focus`, `Ui_TapAt`, `Ui_Drag`, `Ui_Wheel`, `App_Navigate route=cards`, `Ui_Theme scheme=dark`, `Window_Resize width= height=`;
|
|
|
|
|
@ -250,7 +249,7 @@ What a test cannot show (that the window draws what the frame says, in the right
|
|
|
|
|
|
|
|
|
|
## Code style
|
|
|
|
|
|
|
|
|
|
- `crafter-build lint --banks=bunq` reports nothing, and neither does it with `--product=app --graphics=…`, with `--debug-api` added, and with `--product=fake-system`: the first reaches the library, the CLI and the tests, and only the others the toolkit's, the app's and the window's sources. A finding at a C boundary (`main`'s `argv`, a `char*` an OpenSSL or POSIX call hands out) is suppressed with `// lint-disable-next-line <rule>` and a comment saying why; anything else is fixed. The rules that need an AST cannot parse a file that `#include`s a standard header before `import std;` (the twelve that include `json.hpp`: four in the library, seven tests and the fake system), because the lint's libclang does not find libc++'s headers, so lint exits 1 for those alone until Crafter.Build issue #46 is fixed. Until then, name the headers through the environment and every rule runs on every file: `CPLUS_INCLUDE_PATH=<libc++'s include directory>`, which is `/app/include/c++/v1` in crafter-build's Flatpak (`flatpak run --env=CPLUS_INCLUDE_PATH=/app/include/c++/v1 net.catcrafts.CrafterBuild lint …`). Prefer C headers (`<errno.h>`, not `<cerrno>`) elsewhere. Tests are linted like the rest. `const-local` sees `bool` and the built-in types, not `std::size_t` or `std::int32_t`: those are made `const` by hand. Lint a product after building it: the AST rules read that product's module files, and against ones from before a change they report nonsense, such as a vector of a type they do not find yet as a local that is never modified.
|
|
|
|
|
- `crafter-build lint --banks=bunq` reports nothing, and neither does it with `--product=app`, with `--debug-api` added, and with `--product=fake-system`: the first reaches the library, the CLI and the tests, and only the others the toolkit's, the app's and the window's sources. A finding at a C boundary (`main`'s `argv`, a `char*` an OpenSSL or POSIX call hands out) is suppressed with `// lint-disable-next-line <rule>` and a comment saying why; anything else is fixed. The rules that need an AST cannot parse a file that `#include`s a standard header before `import std;` (the twelve that include `json.hpp`: four in the library, seven tests and the fake system), because the lint's libclang does not find libc++'s headers, so lint exits 1 for those alone until Crafter.Build issue #46 is fixed. Until then, name the headers through the environment and every rule runs on every file: `CPLUS_INCLUDE_PATH=<libc++'s include directory>`, which is `/app/include/c++/v1` in crafter-build's Flatpak (`flatpak run --env=CPLUS_INCLUDE_PATH=/app/include/c++/v1 net.catcrafts.CrafterBuild lint …`). Prefer C headers (`<errno.h>`, not `<cerrno>`) elsewhere. Tests are linted like the rest. `const-local` sees `bool` and the built-in types, not `std::size_t` or `std::int32_t`: those are made `const` by hand. Lint a product after building it: the AST rules read that product's module files, and against ones from before a change they report nonsense, such as a vector of a type they do not find yet as a local that is never modified.
|
|
|
|
|
- The first two lines of every source are `// SPDX-License-Identifier: LGPL-3.0-only`, or `GPL-3.0-only` in a source of the app (design rule 13 says which is which), and `// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®`, then a blank line. `project.cpp` carries them too.
|
|
|
|
|
- Four-space indentation, LF, K&R braces with `} else {`, one declaration per statement. `if(`, `for(`, `while(`, `switch(` without a space in most files (`:Utils` has the space; match the file). Lines run long rather than wrap.
|
|
|
|
|
- `import std;` everywhere; `#include`s only in a global module fragment (`module;` first), and only for OpenSSL, the vendored `json.hpp`, sd-bus and sd-event, and the POSIX calls of `:File`, `:Connector` and nostrod. `namespace fs = std::filesystem;` where paths appear.
|
|
|
|
|
@ -317,7 +316,7 @@ The checklist, from the bunq connector:
|
|
|
|
|
- A write is never replayed by the transport (fresh connection) and only resent by nostro after a 429, which bunq refuses before acting. An IBAN's check digits are verified before anything is sent.
|
|
|
|
|
- TLS is Crafter.Network's default `TLSClientCredentials{}`: the chain against the system store and the hostname. Do not reach for `insecureNoServerValidation`.
|
|
|
|
|
- The private key signs every request body (`SignBody`, RSA SHA-256). Key material lives in `Crypto::Key`s (freed with the last copy) for the process's life; there is no zeroisation.
|
|
|
|
|
- `project.cpp` executes the `project.cpp` of each dependency on every build, and the Flatpak build does the same with the network on. Those it names itself are at a commit since 2026-11-19: Crafter.Network, Crafter.DB, Crafter.LintRules and Crafter.Debug's build helper ("Dev environment"). What still follows a branch, fetched from the Catcrafts Forgejo at HEAD: Crafter.Thread, which Crafter.Network names; in the app's build Crafter.Graphics, a checkout given with `--graphics=`, which brings Crafter.Event, Crafter.Math, Crafter.Asset and the Khronos headers, unpinned; and in its debug build Crafter.Debug's library with a Crafter.Network that has msquic in it. Pin those where they are named for a build that is reproducible and offline after the first fetch.
|
|
|
|
|
- `project.cpp` executes the `project.cpp` of each dependency on every build, and the Flatpak build does the same with the network on. Those it names itself are at a commit: Crafter.Network, Crafter.DB, Crafter.LintRules and Crafter.Debug's build helper since 2026-11-19, and Crafter.Graphics, for the app, since 2026-11-20 ("Dev environment"). What still follows a branch, fetched at HEAD: Crafter.Thread, which Crafter.Network names; in the app's build what Crafter.Graphics names, which is Crafter.Event, Crafter.Math and Crafter.Asset from the Catcrafts Forgejo and the Khronos headers from GitHub; and in its debug build Crafter.Debug's library with a Crafter.Network that has msquic in it. Pin those where they are named for a build that is reproducible and offline after the first fetch.
|
|
|
|
|
- `install.sh --repo` installs from an unsigned local repository, for a build of your own, and so does a bundle crafter-build made. A published Flatpak comes from the GPG-signed Catcrafts remote, which is how the README installs both: the remote `catcrafts`, added from `https://flatpak.catcrafts.net/catcrafts.flatpakrepo`, Crafter.Build's own remote. `install.sh` without `--repo` installs from that remote in the system installation, where nostrod runs from, and does not add it itself. On 2026-11-19 the remote did not carry nostro's two Flatpaks yet: the README describes the channel they are to be published on. The two `.flatpakref`s in `packaging/flatpak/` carry the same placeholder for the key as Crafter.Build's, for the publishing side to fill in, which is the workflow's `publish` job. The key it signs with lives on the runner's host and never in the forge, and a release is published only for a tag the owner signed ("Releasing").
|
|
|
|
|
- Input from the bank is parsed with nlohmann/json's `at()` and `get()`, which throw on a missing key or a wrong type: a malformed response is an exception, not undefined behaviour. `ParseAmount` and `ParseTimestamp` reject anything outside their grammar.
|
|
|
|
|
|
|
|
|
|
@ -329,6 +328,7 @@ The state of the code on 2026-11-19; each is a fact to work with.
|
|
|
|
|
- `crafter-build -r` passes the program it runs no arguments, and the app has a few: that is what the `fake` script is for, and `--poke` with `--screenshot` for a run without a hand on it.
|
|
|
|
|
- Crafter.Debug counts a frame each time it is given the loop's thread, every 50 ms, whatever the window drew: `wait --frames` measures time there. Wait for the event `FrameRendered` for a frame, and for a condition (`wait 'app.busy == false'`) for an answer: `wait --event AnswerArrived` only hears an answer that comes after it started, and nostrod's has often come by then.
|
|
|
|
|
- `crafter-debug screenshot -o <file>` writes inside the client's sandbox, whose `/tmp` is its own: leave `-o` out, for `build/crafter-debug-shots/`, or name a path the sandbox shares with the host.
|
|
|
|
|
- A size the compositor asks for (a dragged border, a tile, a phone's on-screen keyboard) is Crafter.Graphics' to take, and it takes it with a frame: the configure only keeps the size and fires `onFrameOwed`, and the next `Render()` makes the window's images again, fires `onResize` from inside itself, and answers the compositor with that frame's buffer. The window draws on demand, so `Shell::Window` asks for that frame from `onFrameOwed`: without it the compositor waits, and the window keeps its old size until something else changes on it. Its `onResize` listener lays the screens out again while that frame is being started, which is why `Canvas::Render` reads its list late. `Canvas::Reconcile` sizes the window only where the library does not, and two of the three reach into the library's own state, to be taken out again once the library does them: the size that comes with a new window, which is the whole screen on a phone (Crafter.Graphics #166; handed over in `deferredLogicalWidth`, where the library's listener keeps every later one), and a scale the display changes to by itself (#165; `RebuildSwapchain`). The third is the app's own size (`--size`, `SetSize`), which goes through `Resize`, in pixels: where dp times the scale is not a whole number the window comes out a dp larger than asked, 421 dp at a scale of 1.85 as 422. Looked at on 2026-11-20 on a desktop, KWin at a scale of 1.85, with the window resized by a KWin script and what the surface was sent read with `WAYLAND_DEBUG=1`. The two that are a phone's, the first size and a scale that comes late, were only tried there with the values put in by hand: on a phone they are still to be looked at.
|
|
|
|
|
- Crafter.Graphics' text size is the height from the top of the ascenders to the bottom of the descenders, not the em: the design's 16 dp body text is about 11.7 dp of em. `Nostro.Ui`'s sizes are in that measure, and a label drawn beside a larger text shares its baseline only when it is put there (`DialogSheet` does).
|
|
|
|
|
- Text on a screen cannot be selected: the toolkit has a selection inside a text field and nowhere else. What is worth taking along is copied whole by a press instead: a line of a sheet (`ValueRow`, `copy.<label>`), an account's IBAN, a request's link. Selecting part of a text would be a feature of the toolkit's own: text that knows where its glyphs are, a selection kept in the `Context`, a mouse's drag that selects where a finger's scrolls, and handles for a finger.
|
|
|
|
|
- The made-up bank answers at once, and a real one is a network away: a screen that asks the bank more than it has to looks fine on the fake system and is slow in use. That is how a search that asked the bank with every question went unnoticed until 2026-11-19. Look at anything that waits for the bank with `--bank-delay 300`, and count the bank's calls in a test (`bunq.Count`).
|
|
|
|
|
|