build(shell): name Crafter.Graphics at a commit of its master, and answer a compositor's resize with a frame

The app was built against a checkout of Crafter.Graphics given with
--graphics=, because the text-input purposes it asks the input method for
were uncommitted work in one checkout. They are on Crafter.Graphics' master
since a9ce1a0, so project.cpp names the library as a GitProject at that
commit, as it names Crafter.Network and Crafter.DB. --graphics= is gone, and
with it $NOSTRO_GRAPHICS in build-aarch64.sh and the workflow's step that
cloned the branch claude/nostro-app, which the forge never had: neither job
of the workflow could have built the app.

That master also has 89111e0, which the window was not written against. A
size the compositor configures is no longer taken in the configure's
listener. The listener keeps it and fires onFrameOwed, and the next Render()
makes the swapchain again, fires onResize from inside itself, and answers
the configure with that frame's buffer. The window draws on demand, so:

- Shell::Window asks for a frame from onFrameOwed. Without it nothing draws
  the frame that answers the configure, and the window keeps its old size
  until something else changes on it.
- Canvas::Reconcile no longer turns the compositor's sizes into
  Resize(pixels). The library takes the size asked for last, whoever asked,
  so that call took the configured size's place, and with it came back the
  surface a dp larger than configured that 89111e0 had ended
  (Crafter.Graphics #201). It now sizes the window only where the library
  does not: the app's own size (--size, SetSize, --scale); the size that
  comes with a new window (#166), handed over in deferredLogicalWidth, where
  the library's listener keeps every later one; and a scale the display
  changes to by itself (#165), through RebuildSwapchain. The last two reach
  into the library's own state, and go once the library does them.

The text-input API on master is the one the app was written against:
nothing changed there.

Looked at on 2026-11-20 on the made-up system, on a desktop (KWin at a
scale of 1.85), with WAYLAND_DEBUG=1 on the app:

- The accounts at 420x760: the start, and resize:600,800 from --poke, the
  app's own size. Each size reaches the surface once, with the first buffer
  drawn for it.
- The same window given 760x532 by the compositor (a KWin script that sets
  its frameGeometry): the configure is kept, a frame is asked for, and
  set_destination(760, 532), the acknowledgement and the first buffer of
  1406x985 go out together. A temporary probe had that frame's draw list
  reach 1406x985: it is laid out for the new size.
- 421x761, whose pixels at 1.85 are no whole number: it opens as 422x762,
  since the app's own size goes through Resize in pixels. The notes say so.
- --scale 2 --size 360x760, the cards and the pay form filled in from
  --poke, with resize:400,700: the compositor's sizes are passed over.
- The --debug-api build driven with crafter-debug: Window_Resize, Ui_Tap,
  ui.texts and a screenshot.

The two paths that are a phone's, a size in the first configure and a scale
named after the first frames, were tried only with the values put in by
hand in a temporary probe. Nothing was looked at on a phone, and what the
input method is told was not read off the wire: the test window never had
the keyboard.

17 tests pass and the four lint passes report nothing. The app, its
--debug-api build, the fake system, the x86_64 Flatpak bundle and both
aarch64 Flatpaks (build-aarch64.sh) build.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Jorijn van der Graaf 2026-11-21 06:00:54 +01:00
commit 3cf9e091a9
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
8 changed files with 94 additions and 89 deletions

View file

@ -12,7 +12,7 @@ Everything is in `namespace Nostro`: the OpenSSL helpers in `Nostro::Crypto`, th
- `GitProject` with nostro's repository, or `LocalProject({ .projectFile = "<checkout>/project.cpp", .args = nostroArgs })` for a checkout, into `cfg.dependencies`. `nostroArgs` is your own `ProjectArgs()` plus `--lib` and `--banks=bunq`, built once inside `CrafterBuildProject`: without `--lib` nostro's `project.cpp` returns the CLI executable configuration (with the library as its dependency, which you cannot import from), and without `--banks=` it throws "must enable atleast one bank" and the whole build stops at load. `--banks=` is a comma-separated list and `bunq` is the only name it accepts.
- `--dbus` with `--lib` adds the partitions that talk to nostrod, `:Bus`, `:Client` and `:Daemon`, and links `-lsystemd` (sd-bus) for you; it needs bunq on, since the wire carries bunq's types. Without it the library does not depend on libsystemd. `--product=checkout` instead returns the `nostro-checkout` library alone: the module `Nostro.Checkout`, needing neither `--lib` nor `--banks=`, and linking libsystemd and nothing else of nostro's (no OpenSSL, Crafter.Network or Crafter.DB).
- nostro strips its own args (`--lib`, `--banks=`, `--dbus`, `--product=`, `--graphics=`, `--debug-api`, `--coverage`, `--profile-runtime=`) from what it hands its dependencies and forwards the rest, adding `--no-quic` for Crafter.Network: nostro speaks HTTP/1.1 only, and msquic would tie the binary to the building user's cache. A consumer that also loads Crafter.Network gives it that same list, `--no-quic` included, and Crafter.DB the list without it, or the build stops with two loads that disagree on their args.
- nostro strips its own args (`--lib`, `--banks=`, `--dbus`, `--product=`, `--debug-api`, `--coverage`, `--profile-runtime=`) from what it hands its dependencies and forwards the rest, adding `--no-quic` for Crafter.Network: nostro speaks HTTP/1.1 only, and msquic would tie the binary to the building user's cache. A consumer that also loads Crafter.Network gives it that same list, `--no-quic` included, and Crafter.DB the list without it, or the build stops with two loads that disagree on their args.
- nostro's `project.cpp` loads two build helpers by `#pragma crafter dependency`, Crafter.LintRules and, at a pinned commit, Crafter.Debug's: loading nostro fetches and builds both for the host, whatever is built of it. Crafter.Debug's library itself is only in nostro's own app, under `--debug-api`.
- What comes with it: Crafter.Network (with Crafter.Thread behind it), Crafter.DB, `-lssl -lcrypto`, and with `--dbus` `-lsystemd`, all as link flags you do not declare. Nothing in nostro uses the thread pool, so `ThreadPool::Start()` is not needed for it.
- Defines do not cross a dependency. nostro compiles with `NOSTRO_BUNQ_ENABLED`, `NOSTRO_OPENSSL_ENABLED` and, under `--dbus`, `NOSTRO_DBUS_ENABLED`, and the PCMs carry the result: `import Nostro;` exports `BunqConnector` and `Client`, and `EnabledBanks` lists bunq, whatever your configuration defines (nostro's own CLI compiles without them). Your own `#ifdef NOSTRO_BUNQ_ENABLED` sees it only when you push the same `Define` into your `cfg.defines`, as nostro's CLI configuration does with `execfg.defines = libcfg.defines`.