fix(chat): dataKey instead of thread remount; legend-list 3.3.5, drop patch - #29526
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
key={datasetKey}on every centered load (search hit, reply-quote jump, pinned message). Switched to LegendList'sdataKeyprop.@legendapp/list3.3.4 → 3.3.5 and deletedpatches/@legendapp+list+3.3.4.patch— upstream now ships all three fixes we were carrying.Why
The remount was reinstated in #29519 because
useFreshDataTransitionVisibilityleftisTransitionPendingset 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.dataKeyexpresses 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,
.jsand.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)dataKeyverified 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.🤖 Generated with Claude Code