Scroll just-submitted comment to viewport top with bottom spacer

After a reply is sent, find the new user message via its anchorId and
scrollIntoView with block:start so the submitted comment lands at the
top of the viewport — giving space below to watch the response stream
in. Also render a 40dvh spacer below the thread so that scroll is
available even right after posting.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-04-24 00:21:07 -05:00
1 parent e7ef2a3903
commit b0dde400a6
2 files changed
-3

No files matched your search

@@ -881,8 +881,6 @@ describe("IssueChatThread", () => {
const spacer = container.querySelector('[data-testid="issue-chat-bottom-spacer"]');
expect(spacer).toBeNull();
=======
>>>>>>> Tune floating reply composer padding, offset, and initial height
act(() => {
root.unmount();
-1
View File
@@ -2555,7 +2555,6 @@ export function IssueChatThread({
spacerInitialReserveRef.current = 0;
}
}, [messages]);
useLayoutEffect(() => {
const composerElement = composerViewportAnchorRef.current;
if (preserveComposerViewportRef.current) {