Quick switch: a new request retargets the switch in flight instead of waiting

Peek taps, chords and programmatic activations during a mobile quick
switch start the next switch at once from what is on screen. Swap styles
continue from each card's current rect, pose, opacity and bar reveal;
the tape takes a fresh picture of the frame above the incoming chat and
continues its loop. The incoming chat keeps its speed and brakes once.
The arriving peek takes pointers while it moves; leaving cards do not.
The capture kit's film step gains a taps option for rapid-tap reviews.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-26 15:20:47 +00:00
parent daf290e39e
commit fd5d4b783c
14 changed files with 714 additions and 82 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ Both chats move upward as one joined tape. The old active exits above the
incoming live pane as a bounded snapshot; its single retained live tree loops
in from below with a real small scroll viewport. This avoids duplicating live
chat state. The default is 560 ms, globally scaled by the animation setting.
Repeated activations queue the latest role until the current loop finishes.
Repeated activations retarget the switch in flight (see quick-switch-retarget.md).
Reduced motion, first layout, or an unavailable fresh picture settle directly.
The crossing-card rounded/shadow effect and its source file are removed.
+40
View File
@@ -0,0 +1,40 @@
# Quick switch retargets mid-animation
Operator report: on mobile, a second peek tap did nothing until the first
switch finished. The workspace used to hold the old active pane while the
motion ran and take the latest request afterwards. Now every request (peek
tap, keyboard chord, programmatic `activate`) starts its switch at once,
from what is on screen.
- Swap family (`chat_pane_switch_start.dart`): each card's `from` is its
current rect; its current opacity, bar reveal and paint pose carry into the
new run and decay (`QuickSwitchPose.carry`, rect residual for paths such as
a deck's that do not start where the card is). Retained cards that are
neither requested nor the previous active fade out within the first third
and never take pointers; the newly active chat turns opaque in that third.
Shrinking cards keep their viewport until they settle; growing ones lay
out at their destination. A fresh switch is unchanged.
- Tape: a fresh picture of the current frame (everything above the incoming
chat) replaces the old one and keeps moving up; the incoming live chat
continues from where it is, the next peek follows joined below it. An
unseen target starts at the peek's place. A failed capture settles at once.
- The incoming chat keeps its current speed (`ChatSwitchEase` launch slope,
clamped to avoid overshoot) and brakes once; a reversal starts from rest.
- Pointers follow the requested layout: the arriving peek is tappable while
it moves; cards on their way off ignore pointers. Reduced motion settles
each request directly, as before.
Checks: `chat_switch_retarget_test.dart` (five rapid peek taps for tape, swap,
arc swap, card deck, crossfade over four chats; programmatic reversal for
tape, swap, deck slide; reduced motion; ease); tape test in
`chat_mobile_panes_test.dart` now asserts the reversal retarget. Suites
`test/features/chat/` 1448, `test/application/` 193, `test/ui/motion` 30 pass;
analyze clean.
Browser films (capture kit `taps` option, 560x1000, four fixture chats,
five taps ~180 ms apart at the peek): `/tmp/review/retarget/v2-tape`,
`v2-swap`, `v3-cardStack`, `v3-arcSwap` (sheets `02-rapid-*-sheet.png`).
Headless input is delivered late and unevenly, so not every tap lands on the
arriving peek; each landed tap visibly started a new switch mid-motion and
the runs settled to one active chat and one peek. Browser evidence only; no
device run.