perf(ui): start streams at newest
Reverse the message stream scroll layout so the viewport naturally starts at the newest messages and keeps older content virtualized. Use sentinel-based edge chasing to make jump-to-top/bottom land reliably despite VirtualItem mounts.
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
.message-stream {
|
||||
@apply flex-1 min-h-0 overflow-y-auto flex flex-col gap-0.5;
|
||||
@apply flex-1 min-h-0 overflow-y-auto flex flex-col-reverse gap-0.5;
|
||||
background-color: var(--surface-base);
|
||||
color: inherit;
|
||||
/* Disable browser scroll anchoring; VirtualItem mounts can otherwise
|
||||
re-anchor the viewport and create "jumpiness" near the newest edge. */
|
||||
overflow-anchor: none;
|
||||
}
|
||||
|
||||
.message-stream-block {
|
||||
|
||||
@@ -215,6 +215,18 @@
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.message-stream-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
min-height: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.message-stream-overlay > * {
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.message-scroll-button {
|
||||
@apply inline-flex items-center justify-center;
|
||||
width: 2.75rem;
|
||||
|
||||
Reference in New Issue
Block a user