fix(react): preserve top anchor reserve between turns#5085
fix(react): preserve top anchor reserve between turns#5085Gujiassh wants to merge 2 commits intoassistant-ui:mainassistant-ui/assistant-ui:mainfrom Gujiassh:fix/preserve-top-anchor-reserve-5038Gujiassh/assistant-ui:fix/preserve-top-anchor-reserve-5038Copy head branch name to clipboard
Conversation
馃 Changeset detectedLatest commit: 5ac02d6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Reviews (1): Last reviewed commit: "fix(react): preserve top anchor reserve ..." | Re-trigger Greptile |
| if (!anchor || !target || !clamp) { | ||
| observers.disconnect(); | ||
| if (reserve?.parentElement) reserve.parentElement.append(reserve); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Partial Unmount Retains Stale Space
When the registered user message unmounts independently while the target and viewport remain mounted, anchor becomes null through its separate registration callback. This branch now preserves the old reserve height indefinitely rather than treating that state as cleanup, leaving blank space in the thread until another complete target pair is registered.
Summary
Fixes #5038.
Validation
@assistant-ui/reactsuite passes (44 files, 459 tests)@assistant-ui/reactproduction build passes (928 entries)Standalone package
tsc --noEmitstill reports the existingComposerRoot.test.tsxsetMultilinediagnostics on current main; this change does not touch that test.