Skip to content

fix(chat): dataKey instead of thread remount; legend-list 3.3.5, drop patch - #29526

Merged
chrisnojima merged 2 commits into
masterfrom
nojima/HOTPOT-legend-desk
Aug 10, 2026
Merged

fix(chat): dataKey instead of thread remount; legend-list 3.3.5, drop patch#29526
chrisnojima merged 2 commits into
masterfrom
nojima/HOTPOT-legend-desk

Conversation

@chrisnojima

@chrisnojima chrisnojima commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

What

  1. Desktop chat thread was remounting via key={datasetKey} on every centered load (search hit, reply-quote jump, pinned message). Switched to LegendList's dataKey prop.
  2. Bumped @legendapp/list 3.3.4 → 3.3.5 and deleted patches/@legendapp+list+3.3.4.patch — upstream now ships all three fixes we were carrying.

Why

The remount was reinstated in #29519 because useFreshDataTransitionVisibility left isTransitionPending set after the fresh-data reset — the wrapper stayed at opacity 0 with the thread fully measured behind it. That was filed as LegendApp/legend-list#519 and patched locally later in the same PR, but the JSX was never flipped back and the comment describing the blocker went stale.

dataKey expresses the same intent as the key remount but keeps the measurement and position caches, so a centered load no longer re-measures the whole thread.

3.3.5 then landed all three of our patched fixes upstream:

Each was verified present in all six published entrypoints (react / react-native / react-native.web, .js and .mjs), so the patch file is gone rather than trimmed.

Test plan

  • yarn lint:all — clean on both commits (0 bailouts, 0 whole-props deps, tsc green)
  • Duplicate-install check clean; legend-list is JS-only, no pod install needed
  • dataKey verified live on desktop against 3.3.4 + patch: search-hit jump, reply-quote jump, pinned-message jump, conversation switch. No stuck-hidden thread, centering lands correctly.
  • Not yet re-run against 3.3.5 itself — the fixes are byte-equivalent to what the patch applied, but a smoke pass over the same four flows is worth doing before merge.

🤖 Generated with Claude Code

The centered-load remount was kept because useFreshDataTransitionVisibility
left isTransitionPending set after the fresh-data reset, leaving the wrapper
at opacity 0 with the thread measured behind it. The fix for that
(LegendApp/legend-list#519) is already carried in
patches/@LegendApp+list+3.3.4.patch, so dataKey works now.

dataKey expresses the same intent as the key remount but keeps the
measurement and position caches, so a centered load no longer re-measures
the whole thread.

Verified live across search-hit, reply-quote and pinned-message jumps and
conversation switches.
3.3.5 ships all three fixes we were carrying locally, so the patch file
goes away entirely:

- ScheduledWork.cancel receiver bug (LegendApp/legend-list#518)
- useFreshDataTransitionVisibility pending flag outliving the transition
  (LegendApp/legend-list#519)
- maintainScrollAtEnd ignoring first measurements
  (LegendApp/legend-list#520)

Verified each fix is present in all six published entrypoints
(react/react-native/react-native.web, .js and .mjs), not just the one
the desktop build pulls.

#519 landing upstream is what the dataKey switch in the previous commit
was waiting on; it now holds without a local patch.
@chrisnojima chrisnojima changed the title fix(chat): use dataKey instead of remounting the desktop thread fix(chat): dataKey instead of thread remount; legend-list 3.3.5, drop patch Aug 10, 2026
@chrisnojima
chrisnojima merged commit ad1feed into master Aug 10, 2026
1 check was pending
@chrisnojima
chrisnojima deleted the nojima/HOTPOT-legend-desk branch August 10, 2026 22:43
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