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.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
feat(claude): polished notification-consent dialog (REF-style)
enes60f5b6357265
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsxindex e24c85103..3b678da55 100644--- a/src/renderer/canvas/Canvas.tsx+++ b/src/renderer/canvas/Canvas.tsx@@ -48,6 +48,7 @@ import { ShortcutsPanel } from '../components/ShortcutsPanel'import { UpdateBanner } from '../components/UpdateBanner'import { AnnouncementBanner } from '../components/AnnouncementBanner'import { ConfirmDialog } from '../components/ConfirmDialog'+import { NotifyConsentDialog } from '../components/NotifyConsentDialog'import { ExplorerPanel } from '../components/ExplorerPanel'import { transport } from '../terminal/local-transport'import { useProjects } from '../state/projects'@@ -94,6 +95,7 @@ export function Canvas() {} | null>(null)// Node to center once its project finishes loading (cross-project notification click).const pendingFocusRef = useRef<string | null>(null)+ const [consentOpen, setConsentOpen] = useState(false)const settings = useSettings((s) => s.settings)const viewportRef = useRef<Viewport>({ x: 0, y: 0, zoom: 1 })const nodesRef = useRef<CanvasNode[]>(nodes)@@ -860,29 +862,12 @@ export function Canvas() {}}, [paletteOpen])- // First-launch consent: ask once whether to enable Claude completion notifications. On- // accept we fire a forced notification to trigger the macOS permission prompt. Declining- // leaves them off — re-enable any time from Settings.+ // First-launch consent: ask once whether to enable Claude completion notifications+ // (shown via the dedicated NotifyConsentDialog). Default off until accepted.useEffect(() => {if (useSettings.getState().settings.notifyConsentAsked) returnuseSettings.getState().update({ notifyConsentAsked: true, notifyOnClaudeDone: false })- setConfirm({- message:- 'Notify you when Claude Code finishes while nodeterm is in the background? You can change this any time in Settings.',- confirmLabel: 'Enable notifications',- cancelLabel: 'Not now',- danger: false,- onConfirm: () => {- useSettings.getState().update({ notifyOnClaudeDone: true })- void window.nodeTerminal.notify({- title: 'Notifications enabled',- body: "You'll be told when Claude Code finishes in the background.",- nodeId: '',- force: true- })- setConfirm(null)- }- })+ setConsentOpen(true)}, [])const addProject = useCallback(() => {@@ -1133,6 +1118,22 @@ export function Canvas() {/>)}+ {consentOpen && (+ <NotifyConsentDialog+ onEnable={() => {+ useSettings.getState().update({ notifyOnClaudeDone: true })+ void window.nodeTerminal.notify({+ title: 'Notifications enabled',+ body: "You'll be told when Claude Code finishes in the background.",+ nodeId: '',+ force: true+ })+ setConsentOpen(false)+ }}+ onDismiss={() => setConsentOpen(false)}+ />+ )}+<Dockdirty={dirty}zoomPct={zoomPct}diff --git a/src/renderer/components/NotifyConsentDialog.tsx b/src/renderer/components/NotifyConsentDialog.tsxnew file mode 100644index 000000000..bf395fc47--- /dev/null+++ b/src/renderer/components/NotifyConsentDialog.tsx@@ -0,0 +1,52 @@+import { useEffect } from 'react'+import { createPortal } from 'react-dom'++interface Props {+ onEnable: () => void+ onDismiss: () => void+}++/** A polished one-time prompt asking to enable Claude completion notifications. */+export function NotifyConsentDialog({ onEnable, onDismiss }: Props) {+ useEffect(() => {+ const onKey = (e: KeyboardEvent) => {+ if (e.key === 'Escape') {+ e.preventDefault()+ onDismiss()+ } else if (e.key === 'Enter') {+ e.preventDefault()+ onEnable()+ }+ }+ window.addEventListener('keydown', onKey)+ return () => window.removeEventListener('keydown', onKey)+ }, [onEnable, onDismiss])++ return createPortal(+ <div className="consent-overlay" onClick={onDismiss}>+ <div className="consent-card" onClick={(e) => e.stopPropagation()}>+ <div className="consent-icon">+ <svg viewBox="0 0 24 24" width="26" height="26" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">+ <path d="M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9" />+ <path d="M13.7 21a2 2 0 0 1-3.4 0" />+ </svg>+ </div>+ <h2 className="consent-title">Get notified when Claude finishes</h2>+ <p className="consent-desc">+ nodeterm can ping you when a Claude Code turn finishes while the app is in the+ background — so you don't have to babysit a running session. You can change this+ any time in Settings.+ </p>+ <div className="consent-actions">+ <button className="consent-btn ghost" onClick={onDismiss}>+ Not now+ </button>+ <button className="consent-btn primary" autoFocus onClick={onEnable}>+ Enable notifications+ </button>+ </div>+ </div>+ </div>,+ document.body+ )+}diff --git a/src/renderer/styles.css b/src/renderer/styles.cssindex 08642e475..0be82bbf1 100644--- a/src/renderer/styles.css+++ b/src/renderer/styles.css@@ -2129,6 +2129,93 @@ body,padding: 18px;}+/* ---- Notification consent dialog (polished, icon + title + actions) ---- */+.consent-overlay {+ position: fixed;+ inset: 0;+ z-index: 72;+ display: flex;+ align-items: center;+ justify-content: center;+ background: rgba(8, 8, 10, 0.6);+ backdrop-filter: blur(3px);+ -webkit-app-region: no-drag;+}++.consent-card {+ width: 400px;+ max-width: 90vw;+ padding: 28px 26px 22px;+ text-align: center;+ background: #1c1c1e;+ border: 1px solid var(--border);+ border-radius: 18px;+ box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);+}++.consent-icon {+ width: 56px;+ height: 56px;+ margin: 0 auto 16px;+ display: flex;+ align-items: center;+ justify-content: center;+ border-radius: 16px;+ color: #fff;+ background: linear-gradient(135deg, #a38dff, #7a4bd0);+ box-shadow: 0 8px 24px rgba(122, 75, 208, 0.45);+}++.consent-title {+ margin: 0 0 8px;+ font-size: 18px;+ font-weight: 700;+ letter-spacing: -0.01em;+ color: var(--text);+}++.consent-desc {+ margin: 0 0 22px;+ font-size: 13.5px;+ line-height: 1.55;+ color: var(--muted);+}++.consent-actions {+ display: flex;+ gap: 10px;+}++.consent-btn {+ flex: 1;+ padding: 10px 14px;+ border-radius: 10px;+ font-size: 13.5px;+ font-weight: 600;+ cursor: pointer;+ border: 1px solid transparent;+ transition: background 0.15s, border-color 0.15s;+}++.consent-btn.ghost {+ background: transparent;+ border-color: var(--border);+ color: var(--text);+}++.consent-btn.ghost:hover {+ background: rgba(255, 255, 255, 0.06);+}++.consent-btn.primary {+ background: var(--accent);+ color: #fff;+}++.consent-btn.primary:hover {+ background: var(--accent-hover);+}+.confirm__msg {margin: 0 0 16px;font-size: 13px;