Crafter.Graphics 079b6b0 replaced SaveFrame with CaptureNextFrame, and the app no longer built against its master. The copy is now recorded into the next frame before it is presented, where SaveFrame read back an image already handed to the display (validation reported both the layout transition and the missing acquire). The capture is armed first, so the Update that follows draws the frame and writes the file; a file the library cannot write (it throws from the Update) is logged and ends the run with exit 1. project.cpp pins Crafter.Graphics at 079b6b0 and Crafter.DB at bfd0cc2: a commit of either library must not change a build without a commit here. --local builds both from the sibling checkouts, now that the input branch is merged.
64 lines
3.3 KiB
Markdown
64 lines
3.3 KiB
Markdown
<!-- SPDX-License-Identifier: GPL-3.0-only -->
|
|
<!-- SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts® -->
|
|
|
|
# AGENTS.md — working on imsd-messages
|
|
|
|
For coding agents and anyone changing imsd-messages: what the repository
|
|
contains, how it is built and tested, and the conventions a change follows.
|
|
The README is for users. Where this file and the code disagree, the code is
|
|
right and this file has a bug — fix it in the same change.
|
|
|
|
## 1. What imsd-messages is
|
|
|
|
An SMS app for Linux phones (postmarketOS on the Fairphone 6 first; Plasma
|
|
Mobile and Phosh) whose transport is imsd's D-Bus object `/net/catcrafts/IMS1`
|
|
on the system bus: its `net.catcrafts.IMS1.Messaging` interface carries the
|
|
texts, the subscriber's own number and the SIM's operator (`GetStatus`'s
|
|
`ppi` and `operator`), and the frozen `net.catcrafts.IMS1` interface gives
|
|
the registration changes. imsd receives texts over IMS and keeps each one
|
|
it could store under `/var/lib/imsd/sms/` until the app deletes it; the app
|
|
subscribes to
|
|
imsd's signals, imports the stored messages into its own database and
|
|
deletes imsd's copy. The interfaces are documented in imsd's AGENTS.md §8.4
|
|
and §7.9 (Messaging) and §8.1 (the frozen one).
|
|
|
|
## 2. Repository layout
|
|
|
|
| Path | What it is |
|
|
|---|---|
|
|
| `project.cpp` | The build description for Crafter.Build: four products (below) and the tests. |
|
|
| `interfaces/ImsdMessages*.cppm` | `imsd-messages-core`: std + Crafter.DB, no GLib, no window — numbers, time, the model, word wrap, gestures, the message field's editing, the store, the sync logic. |
|
|
| `interfaces/ImsdMessages.Bus*.cppm` | `imsd-messages-bus`: GLib/GDBus — imsd's dictionaries, the client, notifications, the app's own bus name, the desktop portal's appearance settings. |
|
|
| `interfaces/ImsdMessages.Ui*.cppm` | `imsd-messages-ui`: the window on Crafter.Graphics, driven from the GLib main loop. |
|
|
| `implementations/main.cpp` | The executable `imsd-messages`. |
|
|
| `tests/<Name>/main.cpp` | One test per directory, declared in `project.cpp`. |
|
|
| `utilities/` | `fake-imsd.py`: imsd's Messaging interface on the session bus, for benches. |
|
|
| `assets/` | The bundled font (Noto Sans, OFL 1.1). |
|
|
| `packaging/` | `build-libevdev.sh` (libevdev into a prefix, for the Crafter.Graphics build), the desktop entry and the icon. |
|
|
|
|
## 3. Building and testing
|
|
|
|
```sh
|
|
crafter-build # the executable
|
|
crafter-build test # every test
|
|
crafter-build lint # the house-style rules (Crafter.LintRules)
|
|
crafter-build format --check # what CI gates on
|
|
```
|
|
|
|
A test is an ordinary `int main()`: exit 0 passes. Tests link the core (and
|
|
the bus library where they need GLib) and never need a bus, a phone or a GPU.
|
|
|
|
The build takes Crafter.DB and Crafter.Graphics from the forge at the
|
|
commits `project.cpp` pins; `crafter-build -- --local` builds them from
|
|
sibling checkouts in `../Crafter/` instead.
|
|
|
|
## 4. Making changes
|
|
|
|
- Commit messages: subject `area: what changes`, the body says why; no AI
|
|
attribution trailers; every commit GPG-signed with the repository's
|
|
configured identity.
|
|
- `format`, `lint` and `test` green before a push; every push goes through
|
|
the fp6 project's `/prepush` gates.
|
|
- Every source file starts with the two SPDX lines and a blank line — after
|
|
a shebang or an XML declaration where the file has one, as `#` comments in
|
|
a desktop entry.
|