main, utilities: bench helpers and a fake imsd

--prefill types into the opened conversation's field (App::Prefill, the
bench's typing, comes with it), --send-draft taps Send 1.5 s after start
and --screenshot-after chooses the moment of the capture, so a machine
can exercise the compose path and look at the result; --prefill and
--send-draft are window flags as --screenshot is — refused beside --send
and --quit, and beside a running instance (--screenshot-after acts
through --screenshot, refused there, its seconds checked as
--quit-after's are) — and a --prefill text that is not UTF-8 is refused
as --send's is. utilities/fake-imsd.py owns net.catcrafts.IMS1 on the
session bus with the answers chosen on its command line: a registered
daemon (its GetStatus answers name the subscriber's number, --ppi; the
Messaging one and every text the SIM's operator, --operator) that
accepts sends and reports them sent (the stamp in imsd's ISO 8601 form,
at the host's offset) and delivered, a store to list and delete, texts
injected at start or delivered as unicast Received while the app runs,
the refusals (AccessDenied, NotSupported, failed sends) and a Subscribe
answered late (--subscribe-delay: the app before imsd's status is in).
It runs on the host (python3-gi), the app in the sandbox, both on the
same session bus.
This commit is contained in:
Jorijn van der Graaf 2026-10-18 00:35:39 +02:00
commit 8a03a4ed49
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
4 changed files with 164 additions and 5 deletions

View file

@ -199,6 +199,13 @@ export namespace ImsdMessages::Ui {
Dirty();
}
// Puts text into the open conversation's field (the bench's typing).
void Prefill(std::string_view text) {
if (!view) return;
ComposeInsert(view->compose, text);
Dirty();
}
// The address a text from the open conversation is sent to (Model's
// SendAddress: as the user typed or a link gave it, else the latest
// message's, never the key); "" when none is known or it belongs to