Fix M9.8c review findings in the engineering client
Resolve pointer ownership per SDL event so same-batch panel clicks, wheel and click-to-focus typing never reach the world; keep the Tab toggle independent of idempotent external capture release; own launcher phase and remote session together so Local fixture ends any remote attempt; wrap notices beside a reserved close column within a bounded stack. Adds client-panels test and host/session, same-batch and host-order Tab regressions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -58,8 +58,10 @@ click without dragging selects the topmost organism, else the habitat cell, for
|
||||
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
|
||||
UI capture (fixture or remote view): the bottom-left bar turns orange and
|
||||
navigation/movement input is suppressed until Tab is pressed again. Leaving
|
||||
capture/focus loss requires fresh presses. Choosing Local fixture ends any remote
|
||||
attempt; nothing connects or sends behind the LOCAL FIXTURE banner. 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
|
||||
|
||||
@@ -43,10 +43,30 @@ Toolkit-independent models (src/client/ui, tested by `client-ui-model`):
|
||||
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
|
||||
Native adapter (`Application`): toolkit events are processed first. Keyboard focus
|
||||
in a widget (reported by the toolkit's last frame) captures world keys. Pointer
|
||||
ownership is resolved per event against the panel rectangles retained from the
|
||||
last frame (and any open popup), so a move onto a panel followed by a press or wheel
|
||||
in the same SDL batch never reaches the world; a press that begins on a panel owns
|
||||
the button until release. After a press on a panel, world key-downs in the same
|
||||
batch are dropped (releases still pass) because that press may focus a text field
|
||||
before the toolkit can report it; those keys need a fresh press. A click is a left
|
||||
press and release within 4 pixels, both outside any panel. Capture changes from
|
||||
toolkit focus release world actions and require fresh presses. External capture
|
||||
(launcher, modal) and the Tab toggle are independent: Tab is ignored while external
|
||||
capture holds, and an external release (sent every host frame outside a modal) does
|
||||
not cancel the toggle. 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).
|
||||
|
||||
Host ownership (`session_host.hpp`): the launcher phase and the remote session
|
||||
change together. Entering the local fixture, Cancel, Disconnect or a launcher
|
||||
failure drops the session at once (unresolved intentions become unknown); the
|
||||
session is serviced, and intentions sent, only while connecting or connected, so
|
||||
nothing runs behind a LOCAL FIXTURE banner. Retry opens a new session.
|
||||
|
||||
Notices (app panels): newest at the bottom right, at most 320 logical pixels wide
|
||||
(narrower viewports shrink them), text wrapped beside a reserved close column. The
|
||||
stack stops at 60 % of the viewport height and shows how many notices are not drawn
|
||||
and how many were discarded. `client-panels` renders the production panels through
|
||||
the adapter and checks notice geometry and close-button dismissal.
|
||||
|
||||
@@ -3715,3 +3715,44 @@ screen reader or accessibility review; the remote review used one connect withou
|
||||
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.
|
||||
|
||||
|
||||
## 2026-10-02 — M9.8c review corrections (.cache/reviews/m98c-review.md)
|
||||
|
||||
1. Same-batch panel input: pointer ownership is now resolved per SDL event from the
|
||||
toolkit's retained window rectangles/popup stack (pinned internal API, ADR-0084);
|
||||
a press on a panel owns the button until release and drops world key-downs for
|
||||
the rest of that batch. Regressions without settling frames: world->panel move +
|
||||
press/release (no world click, button still activates), move + wheel (no zoom;
|
||||
world wheel still zooms), click-to-focus + W in one batch (no movement; field
|
||||
captures; fresh press after unfocus moves).
|
||||
2. Fixture/live distinction: `SessionHost` owns launcher phase and remote session;
|
||||
fixture, cancel, disconnect and failure drop the session; it is serviced only
|
||||
while connecting/connected. `client-ui-model` uses a fake session/server:
|
||||
connecting->fixture and failed->fixture followed by an available server produce
|
||||
no steps, Welcome (grant use) or intentions; ordinary connect still works.
|
||||
3. Tab capture: an external release no longer cancels it. Regression drives the
|
||||
host order (poll, set_ui_capture(false), sample, present) over several frames,
|
||||
requires capture until the second toggle and a fresh, non-repeat press after.
|
||||
4. Notices: wrapped text beside a reserved 22-pixel close column, width min(320,
|
||||
viewport-16), stack bounded to 60 % of the height with a not-shown/discarded
|
||||
count. New `client-panels` renders the production panels through the adapter:
|
||||
the three real session notices and a 240-byte message fit (content width and no
|
||||
horizontal scroll), the close button clicked in one batch dismisses exactly that
|
||||
notice with no world click; a full stack stays on screen.
|
||||
|
||||
Negative checks: the new lifecycle test fails against the previous adapter (same-
|
||||
batch click), the panel test against the previous notice layout (content width),
|
||||
and the host-order Tab test with the former clearing restored (Windows MSVC).
|
||||
A GCC-only failure in the new fake-session test was a test bug (by-value argument
|
||||
alive until the full expression ends); split the assertion.
|
||||
|
||||
Executed: Windows MSVC client 8/8 and client-network 9/9 (final). Linux: clang-19
|
||||
client-probe build with clang-tidy enabled (keep-going, no owned diagnostics) and
|
||||
CTest 12/12; Xvfb/X11 lifecycle and panel tests; Clang ASan/UBSan client CTest 12/12
|
||||
and Xvfb lifecycle/panels; GCC 14 client-network build, client|network CTest 9/9;
|
||||
clang-tidy on app main/panels (client-network); repository format check. Visual:
|
||||
live WSL dev region showing the wrapped connection notice with its close button.
|
||||
|
||||
Limits unchanged: no physical mouse/keyboard session, DPI or accessibility review;
|
||||
the live screenshot sent no intentions. No Docker/Gitea, packaging or deployment.
|
||||
|
||||
Reference in New Issue
Block a user