Add M9.8c launcher, legend, labelled inspector and click selection

Toolkit-independent launcher, selection, label and outcome-log models with
bounded inputs and fixed error text; Dear ImGui overlay in the native adapter
with toolkit-first event routing and capture; engineering panels for fixture vs
dev region, legend, inspector, session outcomes, notices and dialog. Additive
SessionClient::unreachable_attempts() bounds unreachable connects. Docs, CI
targets and validation evidence updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-02 10:09:11 -04:00
co-authored by Claude Opus 5.5
parent a6e8094f57
commit 897055883a
36 changed files with 2106 additions and 200 deletions
+34 -17
View File
@@ -1,18 +1,29 @@
# Native engineering client (M9.2–M9.7)
# Native engineering client (M9.2–M9.8c)
This opens a resizable native window showing camera-controlled environment habitats
and biology-derived organisms (M9.5) from a local in-memory fixture authority.
It does not run an ecosystem,
connect to a server or implement cellular gameplay.
and organisms either from a local in-memory fixture authority or from one dev
region over an authenticated dev session. It does not run an ecosystem locally,
predict remote state or implement cellular gameplay.
Contract: [client architecture](../architecture/CLIENT_ARCHITECTURE.md), ADR-0078.
Camera/input: [contracts and limits](CAMERA_INPUT.md), ADR-0079.
Environment: [presentation and encodings](ENVIRONMENT_RENDERING.md), ADR-0080.
Organisms/inspector: [encodings and budget](ORGANISM_RENDERING.md), ADR-0081.
Remote dev region: [operations](../networking/DEV_SESSION_OPERATIONS.md), ADR-0083.
`--connect HOST:PORT --server-name NAME --ca FILE --grants FILE` (preset
`client-network`) replaces the local fixture with a dev session: views come from the
region, WASD sends intentions, and chips at y=72 show the connection (green/amber/red)
and the last intention (white admitted, green durable, red rejected, grey unknown).
Engineering panels and launcher: [UI state](CLIENT_UI_STATE.md), ADR-0084.
Without arguments a launcher opens. **Local fixture** is labelled as an in-memory
stand-in, never as a server or ecosystem. **Connect** (preset `client-network`)
reads the endpoint, server name, dev CA file and grant bundle file when pressed;
nothing is saved and no path, certificate or grant byte is shown or logged. Errors
use fixed wording. A connection with no Welcome after three failed attempts
(refused, TLS failure or timeout) or a refused grant fails with Retry/Cancel.
`--fixture` or `--connect HOST:PORT --server-name NAME --ca FILE --grants FILE`
skip the launcher (an unreadable file then exits 1). While running, a banner names
the mode (LOCAL FIXTURE or DEV REGION with its phase); Disconnect asks for
confirmation. The Session panel shows session/epoch, server tick, durable
watermark, grants left and the last ten intentions with their outcome (sent,
admitted, rejected, durable, not committed, unknown). That list is the record;
short notifications expire and can be dismissed.
## Build and run
@@ -36,18 +47,24 @@ one explicit backend, without fallback. `--frames N` exits after N bounded steps
window and pauses drawing. These options permit unattended smoke checks.
`--layer NAME` selects the displayed field or `moisture`; `--refresh-every N`
(1..1000 fixture authority ticks) delays view refresh so the stale state is visible.
`--inspect` shows biology gauges for the organism under the pointer.
`--pick X,Y` performs one scripted world click at window coordinates and
`--screenshot FILE.bmp` (requires `--frames`) saves the last frame; both exist for
unattended visual review.
Usage errors exit 2, lifecycle/fixture failures exit 1, orderly exit returns 0.
Engineering controls: arrow keys pan, mouse wheel zooms around the pointer, WASD
updates the small intention indicator without moving the world fixture. Tab
toggles UI capture: the top-left bar turns orange and navigation/movement input
is suppressed. Leaving capture/focus loss requires fresh presses. This is a
focus exercise, not the final player UI. The host's input tick is a local fixture
counter and is never interpreted as authoritative server time. The top-right
chips show environment then organism freshness (green current, amber stale, red
none; magenta marker: organisms truncated); the bottom-left legend shows the ramp.
The organism cluster is near (410 mm, 480 mm); zoom in with the wheel to see it.
updates the small intention indicator (sent as intentions in remote mode). A left
click without dragging selects the topmost organism, else the habitat cell, for the
Inspector; a click that lands on a panel or dismisses a notification never selects
through it. Toolkit events are processed first: while a text field is focused or
the pointer is over a panel, keys/wheel/clicks do not reach the world. Tab toggles
UI capture: the bottom-left bar turns orange and navigation/movement input is
suppressed. Leaving capture/focus loss requires fresh presses. The host's input
tick is a local fixture counter and is never interpreted as authoritative server
time. The top-right chips show environment then organism freshness (green current,
amber stale, red none; magenta marker: organisms truncated); the Legend panel
explains the layer scale and missing/zero/not-requested/stale encodings.
The fixture organism cluster is near (410 mm, 480 mm); zoom in to see it.
For native X11 regression on a CI host:
+33 -3
View File
@@ -1,4 +1,4 @@
# M9.8b UI state and event bounds
# M9.8b/c UI state, launcher and event bounds
Owned, toolkit-independent state; all calls on the client main thread. No authority
or simulation state. Time is explicit monotonic milliseconds supplied by the host.
@@ -18,5 +18,35 @@ Unprocessed wire outcomes remain unknown, never assumed failed or committed.
The native adapter's externally requested capture cannot be disabled by the legacy
Tab toggle. Releasing capture drains already queued input before new world actions.
Rendering dialogs/toasts and wiring toolkit capture occur with the launcher in
M9.8c; these contracts and their tests precede that integration.
M9.8c renders these through the toolkit overlay (below).
## M9.8c launcher, selection and panels
Toolkit-independent models (src/client/ui, tested by `client-ui-model`):
- **Launcher** (`launcher.hpp`): phases choosing, fixture, connecting, connected,
failed. Fields are at most 1024 bytes; endpoint is `host:port` with port 1-65535.
Files are read only when Connect is pressed: the CA at most 64 KiB and PEM-shaped,
the grant bundle 1-64 whole 108-byte records. Nothing is persisted; material lives
only in the session client. Errors are an enum with fixed text that never contains
paths or file bytes. Before the first Welcome, three losses (including refused
TCP/TLS attempts, counted by `SessionClient::unreachable_attempts()`) fail as
unreachable; a refused grant or exhausted bundle fails at once. Failed offers
Retry/Cancel; Cancel drops the session (its unresolved intentions become unknown).
- **Selection** (`selection.hpp`): topmost organism under the click, else the
habitat cell, else none. A selected organism absent from the latest view is
cleared; with no view at all the selection is kept but shows nothing.
- **Labels** (`labels.hpp`): value, present zero, missing (requested, no value), not
requested and undefined moisture are distinct kinds and texts. Freshness is
printed as current, stale or none.
- **Outcome log** (`outcome_log.hpp`): last 64 intentions by sequence with sent,
admitted, rejected, durable, not committed or unknown. It is the visible record;
notifications are not.
Native adapter (`Application`): toolkit events are processed first; while the
toolkit wants the keyboard or pointer, keys, wheel and clicks do not reach world
input. A click is a left press and release within 4 pixels that began outside any
panel. Capture changes from toolkit focus release world actions and require fresh
presses; the Tab toggle keeps its earlier ordering. The overlay callback runs after
world drawing; `request_screenshot` saves the next frame as BMP (engineering review).
Toolkit settings files and logs are disabled (`IniFilename`/`LogFilename` null).
+3 -2
View File
@@ -1,7 +1,8 @@
# M9.8 delivery plan
Status: M9.8a probe and M9.8b owned state/capture/event bounds complete, 2026-10-02;
remaining segments planned.
Status: M9.8a probe, M9.8b owned state/capture/event bounds and M9.8c launcher,
legend, labelled inspector and click selection complete, 2026-10-02; remaining
segments planned.
No application UI or deployment completion is claimed. See ADR-0084 for the toolkit boundary.
## Confirmed scope
+13 -9
View File
@@ -59,18 +59,22 @@ marker left of it means organisms were not drawn because of the frame budget.
marker). If every visible organism fits at 10 rectangles, full detail is used;
otherwise each visible organism is a single body; beyond the budget, organisms are
counted as visible but not drawn and the marker appears. The engineering app
budgets 4096 - 2313 (environment) - 25 (inspector) - 5 (host UI) = 1753, so 1024
organisms always fit as bodies. No textures, caches or history are kept.
budgets 4096 - 2313 (environment) - 6 (host UI: capture bar, intention dot and a
four-sided selection outline) = 1777, so 1024 organisms always fit as bodies. No textures, caches or history are kept.
## Engineering inspector
`--inspect` enables hover inspection: the topmost organism whose drawn (floored)
box contains the pointer gets a white highlight, and a bottom-right panel shows
ten gauges in order: extent (log10 over 3 decades um), total mass (12 decades fg),
membrane share, maintenance (12 decades pJ/tick), movement speed (5 decades),
ingestion rate (6 decades), conversion, realized growth, damage, thermal shortfall
(5 decades mK). The panel darkens to brown for remnants. Rectangles only: there is
no text, ImGui or input capture; this is engineering UI, not player UI.
M9.8c: a non-drag left click selects the topmost organism whose drawn (floored)
box contains the point, else the habitat cell (include/evo/client/selection.hpp).
The selection gets a white outline and the toolkit Inspector shows labelled rows
with units (include/evo/client/labels.hpp): state, voxel, offset, extent, masses,
surface, maintenance, movement, ingestion, conversion, growth, damage and thermal
shortfall. The organism id is never shown. A selection whose organism disappears
from the latest view is cleared; while no view exists it is kept. Habitat cells
list every field as a value, present zero, MISSING (requested, no value) or not
requested, and moisture as undefined when there is no capacity. The previous
rectangle gauge inspector (`--inspect`) remains a tested library component but is
no longer wired into the app. This is engineering UI, not player UI.
## Fixture population
+45
View File
@@ -3670,3 +3670,48 @@ Final additional checks: Linux GCC state/network/lifecycle 3/3; Clang ASan/UBSan
native lifecycle 1/1; clang-tidy19 on owned state/session implementation,
state/network tests and native adapter/lifecycle tests passed with no owned
diagnostics. Final changed-file formatting passed.
## 2026-10-02 — M9.8c launcher, legend, labelled inspector and click selection
Implemented toolkit-independent launcher, selection, label and outcome-log models
(src/client/ui) and the toolkit overlay in the native adapter (events routed to the
toolkit first; its keyboard/pointer capture suppresses world keys, wheel and clicks).
The app panels show a labelled local fixture vs dev region, legend, inspector,
session status with the last ten intention outcomes, notifications and a disconnect
dialog. `--inspect` is replaced by click selection; `--pick`/`--screenshot` support
unattended review. Added `SessionClient::unreachable_attempts()` (additive).
Tests: `client-ui-model` (endpoint/field bounds, file size/shape limits, fixed error
text without paths, launcher phases incl. cancel/retry, three-loss bound, refused
grant, exhausted bundle; selection topmost/cell/none, disappearance clears, missing
view keeps; value/zero/missing/not-requested/undefined distinct; outcome log bounds).
Lifecycle `toolkit_capture`: widget click is not a world click, drag is not a click,
focused text field captures keys, release needs fresh presses, screenshot hook.
Network `unreachable_server`: refused connects emit no events, spend no grant, count.
Executed: Windows MSVC `client` 7/7, `network` 1/1, `client-network` 8/8 (final run
after all fixes). Linux: clang-19 client-probe with clang-tidy enabled (keep-going
build of all client targets, no owned diagnostics after fixes) and CTest 11/11;
Xvfb/X11 lifecycle, fixture (`--pick`) and launcher runs; Clang ASan/UBSan client
CTest 11/11, Xvfb lifecycle and fixture; GCC 14 client-network build and client|network
CTest 8/8; Clang ASan/UBSan network tests; clang-tidy on session client, network tests,
app main/panels (client-network); repository format check.
Visual review (dummy driver, software renderer, BMP screenshots): launcher; fixture
with organism selected; fixture cell on the nitrogen layer (missing, present zero and
not-requested rows distinct); connect to a closed port; live dev region (WSL
development-v1 server via the M9.7 rehearsal script) with the cell inspector and
Session panel. Review found and fixed: inspector values clipped (now wrapped),
legend hint clipped, launcher error line overflow, Session table column mismatch,
and a closed port staying "Connecting" indefinitely because pre-session failures
produced no event (now bounded via the new counter; observed failing with Retry/
Cancel). Windows reports a refused loopback connect after about two seconds.
Static tidy findings fixed: implicit widening in a lifecycle test, by-value lambda
parameter in the UI-model test.
Limits: no manual interactive session with physical mouse/keyboard, DPI matrix,
screen reader or accessibility review; the remote review used one connect without
WASD intentions, so the outcome list was empty in the screenshot (outcome states are
covered by unit tests). No Docker/Gitea run, packaging, deployment or cluster test.
No simulation version, wire format or golden changed.