iris: fix the intermittent touch-scroll dropout (missed ACTION_DOWN hit-test)

Root-caused via temporary logcat tracing (touch events, DragArbiter state,
Selection::drag dispatch), reproduced against a real sandbox session: a
gesture's ACTION_DOWN can land on a row's own padding/gap or its header,
which CursorSense has no sensor over, so the widget that ends up handling
the gesture only ever sees Pressing frames and DragArbiter never gets
press_start -- leaving it stuck in Idle (answers Undecided forever) for the
rest of that gesture. Not the previously-suspected coalesced first
ACTION_MOVE, which is now ruled out.

DragArbiter::is_idle() lets Selection::drag notice a Pressing frame with
no matching press_start and recover the press there instead. Four new unit
tests, one of which fails on the pre-fix code.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
irisandClaude Fable 5.1 committed 2026-09-05 21:05:03 -04:00
1 parent 68b48cfd14
commit e6924298bc
4 files changed
+168

No files matched your search

+18
View File
@@ -146,6 +146,24 @@ on a row's own rendered text now pans the list correctly instead of
always starting a selection. 8 new unit tests in `iris/src/sense.rs`'s
`drag_arbiter_tests` module.
### 2026-09-05, later: `DragArbiter::is_idle()`, recovering a missed `press_start`
Follow-up to the above, from a real touch-scroll dropout: a gesture's
`ACTION_DOWN` can land on a caller's own dead space (a row's padding, a
gap, a header with no handler) that never calls `press_start`, so the
first frame the arbiter actually sees is a `Pressing`-shaped `update`
with no matching start. Before this, `update`'s `Idle` arm had no way to
tell that apart from "nothing is happening" and answered `Undecided`
forever for the rest of that gesture. `is_idle(&self) -> bool` lets a
caller notice the gap and recover: if `is_idle()` is true on a frame the
caller knows a press is genuinely down (its own `Pressing`/equivalent
sense fired), call `press_start` right there instead of assuming one
already happened. `transcript-ui`'s `Selection::drag` is the reference
caller — one new match arm, checked before the ordinary `update`-only
case. Any other `DragArbiter` caller with the same "one sensor per
sub-region, no fallback for dead space" shape has the same gap and wants
the same recovery.
## 2026-09-05: `SpanStyle`, per-range text styling (RUST.md's I5)
A `TextBuffer` used to have exactly one style (`TextAttrs`: colour, size,
+14
View File
@@ -251,6 +251,20 @@ order and what "done" looks like. Tick and date them in place.
--workspace` and `cargo ndk` (both `iris` and `transcript-ui`) all
clean; `run-headless.sh` screenshot byte-identical to before the
change (38578 bytes). See RUST.md's I5 box, "Gap closed, 2026-09-05".
- [x] **Intermittent touch-scroll dropout — root-caused and fixed,
2026-09-05.** Not the coalesced-`ACTION_MOVE` hypothesis the earlier
pass suspected (ruled out): a gesture's `ACTION_DOWN` can land on a
row's own padding/gap or its header, which no `CursorSense` covers,
so `DragArbiter` never gets `press_start` and sits in `Idle`
(answers `Undecided` forever) for that whole gesture. Fixed via a new
`DragArbiter::is_idle()` that `Selection::drag`
(`transcript-ui/src/selection.rs`) checks to recover a missed press
on the next `Pressing` frame. Four new unit tests. See RUST.md's I5
box, "Touch-scroll dropout root-caused, 2026-09-05", for the trace and
what a peer session sharing this checkout's emulator mid-pass
prevented from being re-verified end-to-end (the aggregate
`iris-scroll.sh` three-run confirmation and a re-taken FrameReport
row) — a future pass should finish that once the emulator is free.
- [ ] **Row-level accessibility names.** The composer carries
`.label("Message")`; transcript rows do not carry a `.label()` of
their own yet, so `Widgets::named()` (I4) does not include them —