diff --git a/debian/changelog b/debian/changelog index 3d40a85..acfb206 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +devdesk (0.10.4) bookworm; urgency=medium + + * The Sessions panel's list scrolls on its own (#53). There is no cap on + sessions; with many of them, Ops Alerts and Repo/CI stay in reach below + the list. The current session is scrolled into view when you switch. + + -- Jared Vititoe Thu, 22 Oct 2026 20:53:00 -0400 + devdesk (0.10.3) bookworm; urgency=medium * No tmux right-click menus (#52). A stray click on one split a pane, or diff --git a/web/src/sessions.js b/web/src/sessions.js index a13877b..640adc9 100644 --- a/web/src/sessions.js +++ b/web/src/sessions.js @@ -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); } diff --git a/web/styles.css b/web/styles.css index 2cfad6e..6a4c603 100644 --- a/web/styles.css +++ b/web/styles.css @@ -239,6 +239,13 @@ body.dd-sidebar-open .dd-sidebar { flex-direction: column; gap: 2px; margin-bottom: var(--space-sm); + /* Any number of sessions: the list scrolls on its own so the panels below stay + in reach (devdesk#53). */ + max-height: 46vh; + overflow-y: auto; + overscroll-behavior: contain; + scrollbar-width: thin; + scrollbar-color: var(--bg-tertiary) transparent; } .dd-session-item {