Skip to content

fix: activity back navigation + preserve reel scroll on sheet close#154

Merged
GraysonCAdams merged 2 commits intomainfrom
fix/activity-back-to-activity
Apr 14, 2026
Merged

fix: activity back navigation + preserve reel scroll on sheet close#154
GraysonCAdams merged 2 commits intomainfrom
fix/activity-back-to-activity

Conversation

@GraysonCAdams
Copy link
Copy Markdown
Collaborator

Summary

  • Tapping a notification in /activity opened the clip via `goto('/?clip=X')`, which pushed the feed entry and then the overlay's own entry. One back press only popped the overlay, leaving the user on the feed instead of returning to /activity. The activity link is now tagged with `from=activity`; the overlay reads it and on dismiss pops the extra feed entry so the user lands directly back on /activity.
  • MeReelView's mount effect re-ran whenever a nested sheet (e.g. CommentsSheet) pushed/popped state, and the `tick()` scroll-to-startIndex call fired each time — snapping the reel back to the originally-tapped clip. Guard the initial scroll with a one-shot flag so only the first mount positions the reel.

Test plan

  • Tap an activity notification → clip opens → tap back arrow (or swipe right) → lands on /activity, not the feed
  • From Me → Uploads, tap a clip several rows down in the grid → scroll down through several clips in the reel → open comments → close comments → reel stays at the clip you were viewing (not back to the originally tapped one)
  • Normal feed: open comments on a clip mid-list → close comments → feed stays on that clip

Activity notifications navigate to /?clip=X which pushed one feed entry
plus the overlay's own entry, so closing the overlay only popped one
level (back to the feed) and required a second press to return to the
activity list. Now the activity page tags the link with from=activity;
the overlay reads it and, on dismiss, pops the extra feed entry too so
the user lands directly back where they tapped the notification.
MeReelView's mount effect re-attached its overlay-history entry whenever
a nested sheet (e.g. CommentsSheet) pushed/popped state, and the
tick() scroll-to-startIndex call ran every time — snapping the reel
back to the clip the user originally tapped. Guard the initial scroll
with a one-shot flag so only the first mount positions the reel; later
effect re-runs leave scroll alone.
@GraysonCAdams GraysonCAdams enabled auto-merge (squash) April 14, 2026 02:46
@GraysonCAdams GraysonCAdams merged commit d79b200 into main Apr 14, 2026
20 checks passed
@GraysonCAdams GraysonCAdams deleted the fix/activity-back-to-activity branch April 14, 2026 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants