Skip to content

Key the sidebar conversation list and lazy-mount the mobile drawer#2415

Merged
gary149 merged 1 commit into
mainfrom
perf/sidebar-hydration
Jul 2, 2026
Merged

Key the sidebar conversation list and lazy-mount the mobile drawer#2415
gary149 merged 1 commit into
mainfrom
perf/sidebar-hydration

Conversation

@gary149

@gary149 gary149 commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

What

Two sidebar fixes:

  • NavMenu's conversation list {#each} was unkeyed while new conversations are prepended with unshift. Positional reconciliation can attach row-local state (open dropdown menu, inline rename, delete confirmation) to the wrong conversation when the list shifts. Keyed by String(conv.id) (ids can be ObjectId | string, and object identity is not stable across list rebuilds).
  • The mobile drawer renders a second full NavMenu that was always mounted (hidden via CSS transform), so every page load SSRs and hydrates the conversation list twice. The drawer content now mounts on first open (or swipe) and stays mounted afterward, preserving the slide animation and inner scroll position.

Verification

  • Drawer checked at runtime: 0 children before first open, content mounts on open, swipe and reopen behavior unchanged
  • svelte-check and full test suite green

Part of a performance series measured from a live profile of hf.co/chat. Each PR is file-disjoint and merges independently, in any order: #2409 (compression), #2410 (models payload), #2411 (markdown pipeline), #2412 (conversation switching), #2413 (stream update batching), #2414 (send handler DB), #2415 (sidebar hydration).

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.

1 participant