fix: v0.10.4 session list scrolls on its own
No cap on sessions existed, but only the whole Panels column scrolled, so many sessions pushed Ops Alerts and Repo/CI far down. The list now has its own scroll area (46vh), keeps its position across polls and brings the current session into view on switch. Closes #53 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WHRLCCdXYm41Qx5kNhehaP
This commit is contained in:
@@ -366,7 +366,15 @@ export class SessionsPanel {
|
||||
}, '×'))));
|
||||
}
|
||||
if (!items.length) items.push(el('li', { class: 'dd-empty' }, 'No sessions yet.'));
|
||||
const scroll = this.list.scrollTop;
|
||||
this.list.replaceChildren(...items);
|
||||
// Keep the scroll position across polls; bring the current session into view
|
||||
// when it changes.
|
||||
this.list.scrollTop = scroll;
|
||||
if (this.current !== this.shownCurrent) {
|
||||
this.shownCurrent = this.current;
|
||||
this.list.querySelector('.is-current')?.scrollIntoView({ block: 'nearest' });
|
||||
}
|
||||
|
||||
this.projectOptions(this.select);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user