iris: the fling curve was the identity function, and the keyboard was a targetSdk
Iris's 2026-09-07 phone report on ed04d4c: the resume glyph corruption is
fixed (item 4 closed with her evidence), flinging "seems to just be linear
velocity with an abrupt stop", and the keyboard still does not push
anything up. docs/RUST.md's new "The 2026-09-07 phone report" section has
the derivation and every number.
**The fling was arithmetically linear.** `android_fling_spline::
distance_fraction(t)` returned `t` for every `t`. Two halves of AOSP's
`SplineOverScroller` static initialiser had been transposed -- the
bisection solved the tension curve and the sample evaluated the P1/P2 one,
where AOSP does the opposite -- which made SPLINE_POSITION and SPLINE_TIME
identical; the lookup then bracketed `t` between SPLINE_TIME entries
instead of between even time steps, and the two cancelled to the identity.
Ported exactly now from OverScroller.java and androidx.compose.animation
1.12.0's SplineBasedDecay.kt, which agree line for line, as one table
indexed by even steps of time (AOSP's second table serves only
`adjustDuration`, which nothing here has, so it is deliberately not built
-- one array, one indexing rule). `FlingCalculator::velocity_at` is new
beside `position_at`, and `List::tick_fling` logs `iris fling tick:` with
the per-frame delta and speed.
Every existing test compared the calculator with itself -- monotonic,
signed, integrates to the closed form, deltas non-increasing -- and all of
them pass on a straight line. iris/benches/fling_spline_reference.py is an
independent hand transcription of both sources and supplies the numbers
now checked into `the_spline_matches_aosps_own_table` and
`a_flick_decelerates_the_way_aosp_says_it_does`;
`tick_fling_applies_shrinking_incremental_deltas` went from
"non-increasing" to "the last delta is under 80% of the first". Negative
control: with `sample` forced back to `t`, exactly those three fail.
Emulator (API 36, debug, force-gles): a released v=3750 decelerates
3746 -> 2624 -> 1834 -> 1144 -> 752 -> 449 -> 243 -> 83px/s over 32 frames
to t=0.664s; a flick into the end of the list stops there in one tick with
no overshoot; a tap 200ms into a fling ends it at 11 ticks.
**The keyboard: `targetSdk = 34`** in iris/android-app/app/build.gradle,
against compileSdk 37 and the Compose app's 37 -- and that app's keyboard
does push up on her phone. Below target 35 a window keeps the legacy
behaviour where adjustResize shrinks it for the IME, so
getInsets(ime()).bottom measures an already-shrunk window and is zero;
setDecorFitsSystemWindows(false) opts out of that and still takes on the
API 36 emulator here, which is why every test run passed. Now targetSdk 37.
That is a reading and not a measurement, so the other half is making the
phone able to answer it. MainActivity also registers a
WindowInsetsAnimation.Callback (onEnd re-reads getRootWindowInsets, so an
interrupted animation cannot freeze a value), which delivers the height
where only the animation path carries it and makes the push-up animate:
ime_bottom now arrives 509, 663, 833, 881, 883 instead of one jump.
`insets::Shared::updates` counts every dispatch and
`AndroidUiState::insets_report()` puts it in the Diagnostics pane --
screenshot-verified, `insets: dispatches=27 left=0 top=142 right=0
bottom=63 ime_bottom=0 ime_visible=false`. Iris has no logcat, and "the
listener never fired" and "it fired with a zero height" are otherwise the
same picture; dispatches=0 says so in words rather than showing defaults.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
7f4ea7e8fd
commit
73f956f8e0
11 files changed
+720
-120
No files matched your search
@@ -8,6 +8,42 @@ capability that moved. Small and trivial changes do not go here.
|
||||
An entry gives the date, what changed, why, and a short before/after where
|
||||
it helps judge the change without the session that made it. Newest first.
|
||||
|
||||
## 2026-09-07: the fling curve was the identity function
|
||||
|
||||
You said the fling "seems to just be linear velocity with an abrupt stop."
|
||||
It was, exactly: `android_fling_spline`'s lookup returned `t` for every
|
||||
`t`. Two halves of AOSP's spline build loop had been transposed, which made
|
||||
its two tables identical, and the lookup interpolated one against the
|
||||
other -- which reduces algebraically to `t`. So a fling coasted at its
|
||||
release speed for the whole (correctly computed) duration and stopped dead
|
||||
at the end of it.
|
||||
|
||||
Ported exactly now from `OverScroller.java` and Compose's
|
||||
`SplineBasedDecay.kt`, which agree line for line. One public addition:
|
||||
|
||||
**`FlingCalculator::velocity_at(velocity, elapsed) -> f32`**, beside the
|
||||
existing `position_at` -- AOSP's `mCurrVelocity` and Compose's
|
||||
`FlingInfo.velocity`. It is what makes "is this decelerating" answerable
|
||||
rather than inferred, and it is what `List::tick_fling`'s new
|
||||
`iris fling tick:` debug line reports each frame.
|
||||
|
||||
The lesson worth keeping, since it cost two builds on your phone: every
|
||||
test the calculator had compared it with itself -- monotonic, correctly
|
||||
signed, integrates to the closed form, per-tick deltas non-increasing --
|
||||
and **all of them pass on a straight line**. The numbers now come from
|
||||
`iris/benches/fling_spline_reference.py`, a separate hand transcription of
|
||||
the two sources, checked in beside the tests.
|
||||
|
||||
## 2026-09-07: the Android insets bridge counts its own dispatches
|
||||
|
||||
`AndroidUiState::insets_report() -> String` is new, and the bench app's
|
||||
Diagnostics pane shows it. It carries the last insets plus **how many times
|
||||
the platform has delivered any**, because "the keyboard did not push
|
||||
anything up" has two causes that look identical on screen -- the listener
|
||||
never fired, or it fired with a zero height -- and you have no logcat on
|
||||
the phone. `dispatches=0` prints a sentence saying so rather than the
|
||||
numbers, which would be defaults rather than measurements.
|
||||
|
||||
## 2026-09-07: widgets can animate, and a fling finally moves
|
||||
|
||||
Iris's phone said "fling still doesn't work" twice. The velocity was only
|
||||
|
||||
Reference in new issue
Block a user