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(claude): proper labels on the notification-consent dialog

enes687012d9749b
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsx
index c4e830d41..e24c85103 100644
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@ -85,7 +85,13 @@ export function Canvas() {
const [scOpen, setScOpen] = useState(false)
const [shortcutsOpen, setShortcutsOpen] = useState(false)
const [explorerOpen, setExplorerOpen] = useState(false)
- const [confirm, setConfirm] = useState<{ message: string; onConfirm: () => void } | null>(null)
+ const [confirm, setConfirm] = useState<{
+ message: string
+ onConfirm: () => void
+ confirmLabel?: string
+ cancelLabel?: string
+ danger?: boolean
+ } | null>(null)
// Node to center once its project finishes loading (cross-project notification click).
const pendingFocusRef = useRef<string | null>(null)
const settings = useSettings((s) => s.settings)
@@ -863,6 +869,9 @@ export function Canvas() {
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({
@@ -1116,6 +1125,9 @@ export function Canvas() {
{confirm && (
<ConfirmDialog
message={confirm.message}
+ confirmLabel={confirm.confirmLabel}
+ cancelLabel={confirm.cancelLabel}
+ danger={confirm.danger}
onConfirm={confirm.onConfirm}
onCancel={() => setConfirm(null)}
/>
diff --git a/src/renderer/components/ConfirmDialog.tsx b/src/renderer/components/ConfirmDialog.tsx
index 557f0996a..5bba9449e 100644
--- a/src/renderer/components/ConfirmDialog.tsx
+++ b/src/renderer/components/ConfirmDialog.tsx
@@ -4,6 +4,7 @@ import { createPortal } from 'react-dom'
interface ConfirmDialogProps {
message: string
confirmLabel?: string
+ cancelLabel?: string
danger?: boolean
onConfirm: () => void
onCancel: () => void
@@ -13,6 +14,7 @@ interface ConfirmDialogProps {
export function ConfirmDialog({
message,
confirmLabel = 'Delete',
+ cancelLabel = 'Cancel',
danger = true,
onConfirm,
onCancel
@@ -37,7 +39,7 @@ export function ConfirmDialog({
<p className="confirm__msg">{message}</p>
<div className="confirm__actions">
<button className="confirm__btn" onClick={onCancel}>
- Cancel
+ {cancelLabel}
</button>
<button
className={`confirm__btn${danger ? ' danger' : ' primary'}`}