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.

feat(glass): kanban board over the wallpaper; card modal terminal gets node glass

iceclatterWT50c7c4985297
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsx
index c2d8c426b..3d7d3a3a2 100644
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@ -646,7 +646,7 @@ import {
import type { CodexAccount } from '@shared/codex-account'
import { useSystemCodexAccount } from '../state/systemCodexAccount'
import { toKanbanSession } from './toKanbanSession'
-import { useWallpaperBackground } from '../state/wallpaper'
+import { useWallpaperBackground, wallpaperLayers } from '../state/wallpaper'
import { showCanvasDots } from '../lib/canvasDots'
const isMac = /Mac/i.test(navigator.platform || navigator.userAgent)
@@ -1048,17 +1048,7 @@ export function Canvas() {
// re-diff (and a multi-MB data: URL re-compare) the root's style each time.
const wallpaperStyle = useMemo<React.CSSProperties | undefined>(
() =>
- wallpaperBg
- ? {
- // A separate small longhand: folding the colour into the image's value is what hit
- // Chromium's ~2 MB var() limit (see state/wallpaper.ts).
- backgroundColor: 'var(--canvas-bg)',
- backgroundImage: wallpaperBg,
- backgroundSize: 'cover',
- backgroundPosition: 'center',
- backgroundRepeat: 'no-repeat'
- }
- : undefined,
+ wallpaperBg ? wallpaperLayers(wallpaperBg) : undefined,
[wallpaperBg]
)
const [nodes, setNodes, onNodesChange] = useNodesState<CanvasNode>([])
diff --git a/src/renderer/components/kanban/GlobalKanbanView.tsx b/src/renderer/components/kanban/GlobalKanbanView.tsx
index 73dbdbd8d..e3aeb9352 100644
--- a/src/renderer/components/kanban/GlobalKanbanView.tsx
+++ b/src/renderer/components/kanban/GlobalKanbanView.tsx
@@ -3,6 +3,7 @@ import type { ProjectKanban } from '@shared/types'
import { AGENT_CONFIG, BUILTIN_AGENT_IDS, type AgentId } from '@shared/agents/config'
import { useProjects } from '../../state/projects'
import { useSettings } from '../../state/settings'
+import { useBoardWallpaperStyle } from '../../state/wallpaper'
import {
addColumn, assignNode, assignedTo, boardLabels, cardMatchesLabelFilter, cardMeta, columnForNode,
deleteColumn, labelsForCard, moveColumn,
@@ -290,6 +291,7 @@ const Swimlane = memo(function Swimlane({
export const GlobalKanbanView = memo(function GlobalKanbanView() {
// Same rule as the per-project board: the canvas is covered but mounted underneath.
useEffect(() => markCanvasCovered(document.documentElement), [])
+ const boardStyle = useBoardWallpaperStyle()
const projects = useProjects(s => s.projects.filter(p => !p.closed))
const { api } = useSession()
const modalRef = useRef<string | null>(null)
@@ -367,7 +369,7 @@ export const GlobalKanbanView = memo(function GlobalKanbanView() {
if (projects.length === 0) {
return (
- <div className="kanban-overlay global-kanban">
+ <div className="kanban-overlay global-kanban" style={boardStyle}>
<div className="kanban-header"><span className="kanban-header__name">All Projects — Kanban</span></div>
<div className="kanban-empty">No projects yet. Create a project to see its swimlane.</div>
</div>
@@ -375,7 +377,7 @@ export const GlobalKanbanView = memo(function GlobalKanbanView() {
}
return (
- <div className="kanban-overlay global-kanban" ref={containerRef}>
+ <div className="kanban-overlay global-kanban" ref={containerRef} style={boardStyle}>
<div className="kanban-header">
<span className="kanban-header__name">All Projects</span>
<span className="kanban-swimlane__hint">{projects.length} projects — {mod}+1..{Math.min(9, projects.length)} to jump</span>
diff --git a/src/renderer/components/kanban/KanbanView.tsx b/src/renderer/components/kanban/KanbanView.tsx
index 73b4fa593..f550a72ef 100644
--- a/src/renderer/components/kanban/KanbanView.tsx
+++ b/src/renderer/components/kanban/KanbanView.tsx
@@ -5,6 +5,7 @@ import { AGENT_CONFIG, BUILTIN_AGENT_IDS, type AgentId } from '@shared/agents/co
import { useViewMode } from '../../state/viewMode'
import { useProjects } from '../../state/projects'
import { useSettings } from '../../state/settings'
+import { useBoardWallpaperStyle } from '../../state/wallpaper'
import {
addColumn, assignNode, assignedTo, boardLabels, cardMatchesLabelFilter, cardMeta, columnForNode,
deleteColumn, labelsForCard, moveColumn,
@@ -259,6 +260,7 @@ export const KanbanView = memo(function KanbanView({
}, [github, modalIssue])
const customAgents = useSettings((s) => s.settings.customAgents)
const disabledAgents = useSettings((s) => s.settings.disabledAgents)
+ const boardStyle = useBoardWallpaperStyle()
// "+ New" menu entries: the builtin agents, the user's custom agents, then terminal + sticky
// (same universe as the dock's add menu, minus canvas-only kinds). Memoized — a fresh array
// (with fresh icon elements) per render would re-render every memoized column.
@@ -555,7 +557,7 @@ export const KanbanView = memo(function KanbanView({
}
return (
- <div className="kanban-overlay">
+ <div className="kanban-overlay" style={boardStyle}>
{/* Title strip: names the board's project AND pushes the columns below the top-right
controls cluster, so column headers never sit under its icons. */}
<div className="kanban-header">
diff --git a/src/renderer/components/kanban/ModalTerminal.tsx b/src/renderer/components/kanban/ModalTerminal.tsx
index c9bdc3bf1..16f619729 100644
--- a/src/renderer/components/kanban/ModalTerminal.tsx
+++ b/src/renderer/components/kanban/ModalTerminal.tsx
@@ -20,6 +20,7 @@ import { useProjects } from '../../state/projects'
import { useSession } from '../../session/session'
import { useSettings } from '../../state/settings'
import { useTerminalSearch } from '../../terminal/useTerminalSearch'
+import { useTerminalGlass } from '../../lib/useTerminalGlass'
import { LocalTransport } from '../../terminal/local-transport'
import { clipboardImages, droppedPaths, pasteHasText, pastedFiles } from '../../terminal/file-drop'
import { guardMiddleClickPaste } from '../../terminal/middle-click'
@@ -123,6 +124,11 @@ export function ModalTerminal({ nodeId, spawn, searchOpen, onCloseSearch }: Moda
// answers a project×host attachment id for a session on a foreign host, which names no project at
// all — the per-project appearance would silently vanish for exactly those cards.
const visual = useXtermVisualSettings(owningProjectId())
+ // Liquid Glass: the same glass as the canvas node (a second view of one session must look like
+ // it). The DOM renderer keeps app-painted cell backgrounds opaque (see CLAUDE.md).
+ const { glass, vars: glassVars } = useTerminalGlass(visual.terminalTheme)
+ const glassRef = useRef(glass)
+ glassRef.current = glass
const [dropping, setDropping] = useState(false)
const [uploading, setUploading] = useState(false)
// Same copy feedback as the canvas node — a copy here is the same act as a copy there, including
@@ -177,7 +183,7 @@ export function ModalTerminal({ nodeId, spawn, searchOpen, onCloseSearch }: Moda
// Appearance comes from the SAME source as the canvas node's terminal — this modal is a second
// view of one session, and a card that renders it in different colours reads as a different
// terminal. (It used to hardcode its own background, which is exactly what happened.)
- const term = new Terminal(xtermOptionsFromSettings(s))
+ const term = new Terminal(xtermOptionsFromSettings(s, glassRef.current))
// Without a handler xterm answers an OSC 8 click with a window.confirm — the one surface
// where this session's links would prompt instead of opening like the canvas node's.
term.options.linkHandler = createOsc8LinkHandler((uri) =>
@@ -423,12 +429,12 @@ export function ModalTerminal({ nodeId, spawn, searchOpen, onCloseSearch }: Moda
useEffect(() => {
const term = termRef.current
if (!term) return
- const { metricsChanged } = applyLiveOptions(term, visual)
+ const { metricsChanged } = applyLiveOptions(term, visual, glass)
if (!metricsChanged) return
fitRef.current?.fit()
const sid = sessionIdRef.current
if (sid) transportRef.current?.resize(sid, term.cols, term.rows)
- }, [visual])
+ }, [visual, glass])
// File drop → paste the path(s) into the co-attached session, just like the canvas node.
const onDragOver = (e: React.DragEvent) => {
@@ -508,7 +514,10 @@ export function ModalTerminal({ nodeId, spawn, searchOpen, onCloseSearch }: Moda
return (
<div
- className={`kanban-modal__termwrap${dropping ? ' kanban-modal__termwrap--drop' : ''}`}
+ className={`kanban-modal__termwrap${glassVars ? ' kanban-modal__termwrap--glass' : ''}${
+ dropping ? ' kanban-modal__termwrap--drop' : ''
+ }`}
+ style={glassVars ?? undefined}
onDragOver={onDragOver}
onDragLeave={onDragLeave}
onDrop={onDrop}
diff --git a/src/renderer/lib/useTerminalGlass.ts b/src/renderer/lib/useTerminalGlass.ts
new file mode 100644
index 000000000..180761535
--- /dev/null
+++ b/src/renderer/lib/useTerminalGlass.ts
@@ -0,0 +1,41 @@
+import { useMemo } from 'react'
+import type React from 'react'
+import { useSettings } from '../state/settings'
+import { resolveTerminalTheme } from '../terminal/themes'
+import { isLiquidGlass } from './appTheme'
+import { glassTint, resolveGlassSlider, type GlassTint } from './glassContrast'
+import { useGlassA11y } from './useGlassA11y'
+
+/**
+ * Glass for one terminal view (a canvas node, or the kanban card modal — both are views of a
+ * session and must look alike): xterm paints no background and the view supplies a translucent
+ * tint of ITS effective theme — project override included — at the alpha that keeps its foreground
+ * at 4.5:1 over any backdrop (glassContrast.ts). `vars` are the inline custom properties the
+ * `.term-node--glass` / `.kanban-modal__termwrap--glass` rules read; null when not Liquid Glass.
+ */
+export function useTerminalGlass(terminalTheme: string): {
+ glass: boolean
+ tint: GlassTint | null
+ vars: React.CSSProperties | null
+} {
+ const glass = isLiquidGlass(useSettings((s) => s.settings.appTheme))
+ const glassSlider = resolveGlassSlider(useSettings((s) => s.settings.glassTint))
+ const glassA11y = useGlassA11y()
+ const tint = useMemo(
+ () => (glass ? glassTint(resolveTerminalTheme(terminalTheme).theme, glassSlider, glassA11y) : null),
+ [glass, glassSlider, glassA11y, terminalTheme]
+ )
+ const vars = useMemo(
+ () =>
+ tint
+ ? ({
+ '--term-glass-bg': tint.background,
+ '--term-glass-header-bg': tint.header,
+ '--term-glass-chip-wash': tint.chipWash,
+ '--term-glass-fg': tint.foreground
+ } as React.CSSProperties)
+ : null,
+ [tint]
+ )
+ return { glass, tint, vars }
+}
diff --git a/src/renderer/nodes/TerminalNode.tsx b/src/renderer/nodes/TerminalNode.tsx
index d422b774d..7e742003f 100644
--- a/src/renderer/nodes/TerminalNode.tsx
+++ b/src/renderer/nodes/TerminalNode.tsx
@@ -180,10 +180,8 @@ import { useCopyFeedback } from '../terminal/useCopyFeedback'
import { ContextMeter } from '../components/ContextMeter'
import { isZoomModifierHeld } from '../lib/zoomModifier'
import { isHidden } from '../lib/ui-visibility'
-import { glassTint, resolveGlassSlider } from '../lib/glassContrast'
-import { useGlassA11y } from '../lib/useGlassA11y'
+import { useTerminalGlass } from '../lib/useTerminalGlass'
import { isLiquidGlass } from '../lib/appTheme'
-import { resolveTerminalTheme } from '../terminal/themes'
import { readsClaudeTranscript } from '../lib/transcriptGates'
import { liveProjectJumpTarget } from '../lib/projectJump'
import { pushSessionRename } from '../lib/sessionRename'
@@ -1248,27 +1246,8 @@ export function TerminalNode({
// global settings for this node, and for no other project's nodes.
const visual = useXtermVisualSettings(owningProjectId())
// Glass terminals (Settings → Appearance): xterm paints no background and the node supplies a
- // translucent tint of THIS node's effective theme — project override included — at the alpha
- // that keeps its foreground at 4.5:1 over any backdrop (lib/glassContrast.ts).
- const glass = isLiquidGlass(useSettings((s) => s.settings.appTheme))
- const glassSlider = resolveGlassSlider(useSettings((s) => s.settings.glassTint))
- const glassA11y = useGlassA11y()
- const tint = useMemo(
- () => (glass ? glassTint(resolveTerminalTheme(visual.terminalTheme).theme, glassSlider, glassA11y) : null),
- [glass, glassSlider, glassA11y, visual.terminalTheme]
- )
- const glassVars = useMemo(
- () =>
- tint
- ? ({
- '--term-glass-bg': tint.background,
- '--term-glass-header-bg': tint.header,
- '--term-glass-chip-wash': tint.chipWash,
- '--term-glass-fg': tint.foreground
- } as React.CSSProperties)
- : null,
- [tint]
- )
+ // translucent tint of THIS node's effective theme (lib/useTerminalGlass.ts).
+ const { glass, tint, vars: glassVars } = useTerminalGlass(visual.terminalTheme)
// The alpha app-painted cell backgrounds follow on this node (null = not glass, stock rendering).
// A ref too, because `acquireWebgl` (inside the lifecycle closure) syncs every fresh addon to it.
const glassCellAlphaRef = useRef<number | null>(null)
diff --git a/src/renderer/state/wallpaper.ts b/src/renderer/state/wallpaper.ts
index c8c7d1138..9c695447b 100644
--- a/src/renderer/state/wallpaper.ts
+++ b/src/renderer/state/wallpaper.ts
@@ -1,4 +1,6 @@
-import { useEffect, useState } from 'react'
+import { useEffect, useMemo, useState } from 'react'
+import type React from 'react'
+import { isLiquidGlass } from '../lib/appTheme'
import { gradientCss, normalizeWallpaper, type DesktopWallpaper } from '@shared/wallpaper'
import { useSettings } from './settings'
@@ -64,3 +66,30 @@ export function useWallpaperBackground(): string | null {
if (sync !== undefined) return sync
return async?.key === key ? async.bg : null
}
+
+/** The wallpaper layers for a `background-image` value: a separate small longhand for the colour —
+ * folding it into the image's value is what hit Chromium's ~2 MB var() limit (see above). */
+export function wallpaperLayers(bg: string): React.CSSProperties {
+ return {
+ backgroundColor: 'var(--canvas-bg)',
+ backgroundImage: bg,
+ backgroundSize: 'cover',
+ backgroundPosition: 'center',
+ backgroundRepeat: 'no-repeat'
+ }
+}
+
+/**
+ * The kanban board's background under Liquid Glass: the SAME wallpaper as the canvas, fixed to the
+ * viewport so it lines up with `.canvas-root`'s pixel for pixel. The board stays opaque (the canvas
+ * under it is covered, and the covered-canvas animation gate stays valid). Other looks: undefined,
+ * the board's own background as before.
+ */
+export function useBoardWallpaperStyle(): React.CSSProperties | undefined {
+ const glass = isLiquidGlass(useSettings((s) => s.settings.appTheme))
+ const bg = useWallpaperBackground()
+ return useMemo(
+ () => (glass && bg ? { ...wallpaperLayers(bg), backgroundAttachment: 'fixed' } : undefined),
+ [glass, bg]
+ )
+}
diff --git a/src/renderer/terminal/terminal-config.ts b/src/renderer/terminal/terminal-config.ts
index 47762489a..4b517058f 100644
--- a/src/renderer/terminal/terminal-config.ts
+++ b/src/renderer/terminal/terminal-config.ts
@@ -361,7 +361,7 @@ export function glassTheme(theme: ITheme): ITheme {
*/
export function xtermOptionsFromSettings(
s: XtermVisualSettings,
- /** Glass terminal node (canvas only — the card modal and the settings preview never pass it). */
+ /** Glass terminal (canvas node and kanban card modal; the settings preview never passes it). */
glass = false
): XtermVisualOptions & { allowProposedApi: true; macOptionClickForcesSelection: true } {
const theme = resolveTerminalTheme(s.terminalTheme).theme