Repository navigation
fix(web, native): make the image viewer work in Rune and on phones - #491
Confidence 6/10 · 1 issue to address
🟡 Confidence 6/10 · needs attention. Held at 6 because a correctness warning is open.
1 warning −1
Findings
🟠 Warning · F1 · pending ??= active on resize makes a mid-swipe resize undo the swipe
correctness · apps/web-foldkit/src/chat/viewer/gestures.ts:676-679
A resize during a swipe (a phone's address bar showing or hiding) sets pending to the slide active held before the swipe, and syncActive then stops following the track (gestures.ts:155). At the settle jump(asked) drags the track back to that slide: the swipe is undone and the counter never moves.
// A phone's toolbar showing or hiding resizes the viewer mid-swipe: a jump then would
// yank the slide back under the finger, so only a settled track is realigned; the
// track's own snap settles it, and the next settle syncs the selection to it.
if (!isScrolling) jump(active)
8d87961 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Annotations
Check warning on line 679 in apps/web-foldkit/src/chat/viewer/gestures.ts
maple-review-bot / Maple / review
correctness: `pending ??= active` on resize makes a mid-swipe resize undo the swipe
A resize during a swipe (a phone's address bar showing or hiding) sets `pending` to the slide `active` held before the swipe, and `syncActive` then stops following the track (`gestures.ts:155`). At the settle `jump(asked)` drags the track back to that slide: the swipe is undone and the counter never moves.