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(kanban): copy receipt + selection hint in the card modal terminal

enes1d8e9025c0ad
diff --git a/src/renderer/components/kanban/ModalTerminal.tsx b/src/renderer/components/kanban/ModalTerminal.tsx
index 14af2c8d3..d50cb84f6 100644
--- a/src/renderer/components/kanban/ModalTerminal.tsx
+++ b/src/renderer/components/kanban/ModalTerminal.tsx
@@ -14,6 +14,7 @@ import { clipboardImages, droppedPaths, pasteHasText, pastedFiles } from '../../
import { guardMiddleClickPaste } from '../../terminal/middle-click'
import { parseOsc52 } from '../../terminal/osc52'
import { activateUnicode11 } from '../../terminal/unicode-width'
+import { useCopyFeedback } from '../../terminal/useCopyFeedback'
import {
attachReplay,
cursorPlacementSeq,
@@ -88,6 +89,11 @@ export function ModalTerminal({ nodeId, spawn, searchOpen, onCloseSearch }: Moda
const visual = useXtermVisualSettings()
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.
+ const copy = useCopyFeedback({
+ hostRef,
+ hasSelection: () => !!termRef.current?.hasSelection()
+ })
// Same search machinery as the canvas node: capture-indexed matches + xterm highlight.
const readBuffer = useCallback((): string => {
@@ -161,7 +167,10 @@ export function ModalTerminal({ nodeId, spawn, searchOpen, onCloseSearch }: Moda
// can never read the local clipboard. Returning true swallows the sequence (also the read query).
term.parser.registerOscHandler(52, (data) => {
const text = parseOsc52(data)
- if (text !== null) window.nodeTerminal.clipboard.writeText(text)
+ if (text !== null) {
+ window.nodeTerminal.clipboard.writeText(text)
+ copy.notifyCopy(text)
+ }
return true
})
@@ -409,6 +418,11 @@ export function ModalTerminal({ nodeId, spawn, searchOpen, onCloseSearch }: Moda
onPasteCapture={onPaste}
>
{uploading && <div className="kanban-modal__upload">Uploading…</div>}
+ {copy.feedback && (
+ <div className={`kanban-modal__copied kanban-modal__copied--${copy.feedback.kind}`}>
+ {copy.feedback.label}
+ </div>
+ )}
{searchOpen && (
<FindBar
query={search.query}
diff --git a/src/renderer/styles.css b/src/renderer/styles.css
index d8031ed0e..55af779d6 100644
--- a/src/renderer/styles.css
+++ b/src/renderer/styles.css
@@ -9638,7 +9638,11 @@ body,
pointer-events: none;
z-index: 3;
}
-.kanban-modal__upload {
+/* The floating notices over the modal terminal: the upload spinner, and the copy receipt /
+ selection hint. One placement contract, one rule — the modal's header belongs to CardModal, so
+ transient per-terminal state stays inside the terminal. */
+.kanban-modal__upload,
+.kanban-modal__copied {
position: absolute;
left: 50%;
bottom: 14px;
@@ -9652,6 +9656,10 @@ body,
padding: 6px 12px;
}
+.kanban-modal__copied--copied {
+ color: var(--success);
+}
+
/* Shared browser surface (canvas node + kanban card modal): toolbar on top, webview fills. */
.browser-surface {
flex: 1;