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.

test(worktrees): cover bounded picker

Darren Kattan8f26e155fc3f
diff --git a/src/renderer/styles.worktree.test.ts b/src/renderer/styles.worktree.test.ts
new file mode 100644
index 000000000..e3efc083b
--- /dev/null
+++ b/src/renderer/styles.worktree.test.ts
@@ -0,0 +1,15 @@
+import { readFileSync } from 'node:fs'
+import { join } from 'node:path'
+import { describe, expect, it } from 'vitest'
+
+const CSS = readFileSync(join(__dirname, 'styles.css'), 'utf8')
+const DIALOG = readFileSync(join(__dirname, 'components', 'WorktreeDialog.tsx'), 'utf8')
+
+describe('New Worktree existing-worktree list', () => {
+ it('keeps large repositories inside a viewport-bounded scrolling list', () => {
+ expect(DIALOG).toContain('className="bind-existing__list"')
+ const rule = CSS.match(/\.bind-existing__list\s*\{([^}]*)\}/)?.[1] ?? ''
+ expect(rule).toContain('max-height: min(260px, 32vh)')
+ expect(rule).toContain('overflow-y: auto')
+ })
+})