Iris's phone: typing newlines into the composer with the keyboard up dropped the caret flush against the bar's bottom edge, eating the 12dp padding, and closing the keyboard fixed it. `Scroll::draw` offers its child last frame's content length on purpose, so an ordinary scroll tick is an O(1) move rather than a redraw. The comment claimed the lag self-corrects on the next frame; nothing asked for that frame. A keystroke dirties the field, that frame draws it in a box one line short of its text, and the tree is clean afterwards -- so the stale placement is the last one drawn. The composer's text is centred in its box, so one line short hung half a line past each end and put the caret's line box a whole padding low. Closing the keyboard rewrote the bar's inset, dirtied it, and forced the missing redraw. `Scroll::draw` now calls `Painter::draw_again` when what it measured differs from what it offered, and a frame that leaves anything dirty asks for another frame on both backends -- `draw_again` sets its mark during the update, after the input path's own check has run, so nothing asked before this (which applied to `List::clamp_to_content` too). Verified at layer 1 (the new test fails on the old code with the caret exactly on the bar's edge) and on the emulator: the caret's bottom moved from 1535 -- the bar's own bottom edge -- to 1509, 26px inside a 31px padding, the remainder being parley's line box overhanging its line height. `phone.rs` grew `--typed TEXT`, which enters text over frames rather than preloading it; only that reproduces this. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
34 lines
1.5 KiB
TOML
34 lines
1.5 KiB
TOML
[package]
|
|
name = "transcript-fixture"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
|
|
# The bench fixture, opened as a real transcript screen with no server --
|
|
# docs/RUST.md's "Three test layers". It was `iris-android-app`'s
|
|
# `bench_client.rs` alone until 2026-09-07; the fixture-loading and
|
|
# fold-driving half moved here so the headless harness (layer 1), the
|
|
# phone-shaped desktop window (layer 2) and the Android bench (layer 3)
|
|
# all open the *same* screen from the same bytes, per AGENTS.md's rule
|
|
# that nothing UI-shaped lives in a platform crate.
|
|
|
|
[dependencies]
|
|
iris = { path = ".." }
|
|
transcript-ui = { path = "../transcript-ui" }
|
|
client-core = { path = "../../client-core" }
|
|
event-model = { path = "../../event-model" }
|
|
# `float_roundtrip` for the same reason `server/Cargo.toml` has it: a `ts`
|
|
# read back must be the one that was written (AGENTS.md).
|
|
serde_json = { version = "1", features = ["float_roundtrip"] }
|
|
|
|
[dev-dependencies]
|
|
winit = { workspace = true }
|
|
# `examples/phone.rs`'s `--typed` only: it spaces its insertions out over
|
|
# real frames, and a task spawned through `iris`'s own runtime
|
|
# (`iris/src/task.rs`) is where the sleep has to happen. Same version the
|
|
# workspace already pins for `iris-android-app`.
|
|
tokio = { workspace = true, features = ["time"] }
|
|
# For the `iris::input`/`iris::frame` round-trip test: a capturing `log::Log`
|
|
# to read back what `iris::diagnostics::log_frame`/`sense::log_input_event`
|
|
# wrote, pinned to the same version `iris/Cargo.toml` already carries.
|
|
log = "0.4.34"
|