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
@@ -18,6 +18,31 @@ class QuickSwitchPose {
final Offset translation;
final double scale, rotationX, rotationY, rotationZ, depth, opacity, shadow;
/// This pose plus [weight] of [residual]'s departure from rest. A switch
/// that interrupts another carries the card's current pose and lets it
/// decay, so the card neither snaps flat nor jumps to the new path.
QuickSwitchPose carry(QuickSwitchPose residual, double weight) =>
QuickSwitchPose(
translation: translation + residual.translation * weight,
scale: scale * (1 + (residual.scale - 1) * weight),
rotationX: rotationX + residual.rotationX * weight,
rotationY: rotationY + residual.rotationY * weight,
rotationZ: rotationZ + residual.rotationZ * weight,
depth: depth + residual.depth * weight,
opacity: opacity * (1 - (1 - residual.opacity) * weight),
shadow: (shadow + residual.shadow * weight).clamp(0.0, 1.0),
);
bool get isRest =>
translation == Offset.zero &&
scale == 1 &&
rotationX == 0 &&
rotationY == 0 &&
rotationZ == 0 &&
depth == 0 &&
opacity == 1 &&
shadow == 0;
Matrix4 transform(Size size) {
// A flat card at constant depth projects to a uniform 2D scale. Keep it
// affine so backdrop filters do not enter the renderer's 3D path.