Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

fix: bound the Recently closed list and match the sidebar's own chrome

Mina Sameh08ca1b85e6d5
diff --git a/src/renderer/components/ClosedHistorySection.test.tsx b/src/renderer/components/ClosedHistorySection.test.tsx
index 868b9196a..f27491c83 100644
--- a/src/renderer/components/ClosedHistorySection.test.tsx
+++ b/src/renderer/components/ClosedHistorySection.test.tsx
@@ -63,6 +63,16 @@ describe('ClosedHistorySection', () => {
expect(host.textContent).toContain('closed-proj')
})
+ it('renders a project row glyph with the sidebar\'s own monogram class', async () => {
+ // ProjectGlyph carries no box CSS of its own — "every wired call site passes its own
+ // className" — so without this the monogram fallback is a bare colored span, not the 18px
+ // circular badge every other project row in this sidebar shows.
+ await render(<ClosedHistorySection {...baseProps} projects={projects} />)
+ const projectRow = Array.from(host.querySelectorAll('.sessions-sidebar__history-item'))
+ .find((el) => el.textContent?.includes('closed-proj'))
+ expect(projectRow?.querySelector('.ss-group__monogram')).toBeTruthy()
+ })
+
it('calls onReopenSession with projectId+entryId on click', async () => {
const onReopenSession = vi.fn()
await render(<ClosedHistorySection {...baseProps} projects={projects} onReopenSession={onReopenSession} />)
diff --git a/src/renderer/components/ClosedHistorySection.tsx b/src/renderer/components/ClosedHistorySection.tsx
index d50d4a6bc..3ae92d215 100644
--- a/src/renderer/components/ClosedHistorySection.tsx
+++ b/src/renderer/components/ClosedHistorySection.tsx
@@ -54,12 +54,18 @@ export function ClosedHistorySection(props: ClosedHistorySectionProps): JSX.Elem
if (e.key === 'Enter' || e.key === ' ') props.onReopenProject(row.projectId)
}}
>
+ {/* Same className the sidebar's own project rows pass (SessionsSidebar's
+ ss-group__head). ProjectGlyph deliberately carries no box CSS of its own —
+ "every wired call site passes its own className" — so omitting it renders the
+ monogram fallback as a bare colored span instead of the 18px circular badge
+ every other project row shows. `size` is not the substitute: it only sets the
+ EMOJI font-size and is inert for the monogram variant. */}
<ProjectGlyph
icon={row.project.icon}
color={row.project.color}
name={row.project.name}
variant="monogram"
- size={15}
+ className="ss-group__monogram"
/>
<span className="sessions-sidebar__history-name">{row.project.name}</span>
<span className="sessions-sidebar__history-age">
diff --git a/src/renderer/styles.css b/src/renderer/styles.css
index ca7c4bd98..4df83193d 100644
--- a/src/renderer/styles.css
+++ b/src/renderer/styles.css
@@ -7112,7 +7112,7 @@ button.group-node__setup:disabled {
/* "Recently closed" — merged closed-projects/closed-sessions history at the bottom of the
sidebar. Same head layout as .sessions-sidebar__head, just smaller/muted (it is a secondary
section, not the panel's own header). */
-.sessions-sidebar__history { border-top: 1px solid var(--border); }
+.sessions-sidebar__history { border-top: 1px solid var(--border); flex: 0 0 auto; }
.sessions-sidebar__history-head {
display: flex;
align-items: center;
@@ -7123,7 +7123,33 @@ button.group-node__setup:disabled {
}
.sessions-sidebar__history-head:hover { background: var(--panel-header); }
.sessions-sidebar__history-title { font-size: 11px; font-weight: 600; color: var(--muted); }
-.sessions-sidebar__history-list { display: flex; flex-direction: column; padding: 0 6px 6px; }
+/* Same 18px muted box as the project/group disclosure toggle (.ss-group__chev) — the section head
+ sits beside an 11px muted title, and an unstyled glyph inherits body size and --text, reading
+ louder than the label it belongs to. */
+.sessions-sidebar__chevron {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ flex: 0 0 auto;
+ width: 18px;
+ height: 18px;
+ margin: -3px -2px -3px -3px;
+ font-size: 9px;
+ line-height: 1;
+ color: var(--muted);
+}
+/* This section is a sibling of .sessions-sidebar__body inside a max-height flex column, so it must
+ scroll on its OWN — .sessions-sidebar__body earns an automatic min-size of 0 from its
+ `overflow-y: auto` and therefore shrinks, while a list with visible overflow would keep its full
+ content height and squeeze the session list toward zero. The cap is 20 entries PER PROJECT, so
+ the row count is unbounded across projects. */
+.sessions-sidebar__history-list {
+ display: flex;
+ flex-direction: column;
+ padding: 0 6px 6px;
+ max-height: 30vh;
+ overflow-y: auto;
+}
.sessions-sidebar__history-item {
display: flex;
align-items: center;