Skip to content

fix(ui): keep sidebar scroll when switching emails#3677

Open
ivenuss wants to merge 1 commit into
resend:canaryfrom
ivenuss:ivenus/fix-sidebar-scroll-position
Open

fix(ui): keep sidebar scroll when switching emails#3677
ivenuss wants to merge 1 commit into
resend:canaryfrom
ivenuss:ivenus/fix-sidebar-scroll-position

Conversation

@ivenuss

@ivenuss ivenuss commented Jul 22, 2026

Copy link
Copy Markdown

Issue

Navigating between emails remounted Shell on every page, so the sidebar lost its scroll position.

Fix

Move Shell into the root layout so it stays mounted across routes, and derive the active email from useParams() instead of passing currentEmailOpenSlug down the tree.

Demonstration of the issue

ui.mov

Summary by cubic

Preserves the sidebar scroll position when switching between emails by keeping the shell mounted and deriving the active email from the route.

  • Bug Fixes
    • Moved Shell to app/layout.tsx so the sidebar stays mounted across routes.
    • Removed per-page Shell wrappers in app/page.tsx and app/preview/[...slug]/page.tsx.
    • Sidebar reads the open email slug from useParams() (decodes joined slug); removed the currentEmailOpenSlug prop.
    • Small cleanup in shell.tsx and sidebar.tsx.

Written for commit 9538435. Summary will update on new commits.

Review in cubic

@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@ivenuss is attempting to deploy a commit to the resend Team on Vercel.

A member of the Team first needs to authorize it.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ivenuss
ivenuss force-pushed the ivenus/fix-sidebar-scroll-position branch from 2a0d5ef to 9538435 Compare July 22, 2026 22:03
@changeset-bot

changeset-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9538435

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added the linear-synced PR has been synced to Linear label Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linear-synced PR has been synced to Linear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant