Repository navigation
[CTX-1335] fix(ui): evict only bounds-only tweens and carry painted bounds on re-arm - #2232
Conversation
CodeRabbit PR #2231 findings 1 and 2: - Carry the painted frame forward when a gesture (Move/Resize/Drag) re-arms its ring, so the next present retargets from the currently painted bounds instead of snapping back to the last committed target. Close keeps its existing bounds-drop behavior. - Evict only bounds-only entries in `drop_one_bounds`; a ring entry that hosts bounds (a reused Move slot or the Alt-drag Drag entry) keeps its accepted fade. With no bounds-only entry the trigger is refused, which matches the documented ring priority. Adds a consecutive Alt-drag continuity regression and a full-budget ring-priority test.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Summary
Follow-up to #2231 for the two CodeRabbit inline findings that were not part of
the squashed merge (
3ec20bed, main8da9df0d). This is a fix-only branch; itdoes not re-introduce the panel-geometry feature.
Findings addressed
PanelAnimator::triggerpreviously dropped an in-flight bounds tween forMove/Resize/Dragand created a ring entry withbounds: None, so the next present started from the last committed target instead of the painted frame. Continuous Alt+drag could snap on every update. The replacement entry now carries the current interpolated frame plus the previous destination; the next present retargets from the painted bounds.Closebehavior is unchanged.drop_one_boundsselected any entry with bounds, including a reusedMovering or the Alt-dragDragentry, deleting an accepted ring fade. It now evicts onlybounds.is_some() && !ringentries; when none exists the trigger is refused, preserving the documented ring priority.Scope
crates/bitty-runtime/src/runtime/animations.rs— the two fixes and two animator regressions.crates/bitty-runtime/tests/panel_animations.rs— consecutive Alt-drag continuity regression.Diff vs
origin/main: 2 files, +159/−7. No other product code.Verification
cargo fmt --all -- --check— passRUSTFLAGS="-D warnings" cargo clippy -p bitty-runtime -p bitty-ui --all-targets --locked— passcargo nextest run -p bitty-runtime --locked— 2519 passed, 1 skippedcargo test -p bitty-runtime --lib runtime::animations:: --locked(debug, overflow checks) — 22 passedcargo check --target x86_64-pc-windows-gnu --workspace --all-targets --locked— passRegression proof: removing the carried bounds makes
consecutive_alt_drag_updates_carry_painted_bounds_forwardsnap to the previous target; restoring the old eviction predicate makesoverflow_preserves_a_ring_entry_that_hosts_boundsdelete the drag ring. Both fail without the fixes.Priority: P2 | Area: area:ui | Labels: fix,P2,area:ui | Milestone: v0.1.0 | RFC: RFC-0002 panel animation contract | Task: CTX-1335
Summary by CodeRabbit