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(chat): keep the answer fields visible — scope the composer's borderless input

reviewa1b84741f21b
diff --git a/src/renderer/lib/keyContext.ts b/src/renderer/lib/keyContext.ts
index 9cda9779a..5a5e9ee03 100644
--- a/src/renderer/lib/keyContext.ts
+++ b/src/renderer/lib/keyContext.ts
@@ -29,9 +29,9 @@ export interface ContextElement {
}
/** The ⌘M chat composer's box (nodes/ChatComposer.tsx carries this attribute). Matched
- * STRUCTURALLY, never by the textarea's class: `term-chat__input` is shared with the plan
- * "Revise…" textarea and the question "Other" input (ChatAnswerControls), which sit OUTSIDE the
- * box — and dictation fired there typed into the hidden pane showing that very dialog. */
+ * STRUCTURALLY, never by a class: a class-keyed rule once matched the plan "Revise…" textarea and
+ * the question "Other" input (ChatAnswerControls, OUTSIDE the box), and dictation fired there went
+ * to the hidden pane showing that very dialog. */
export const CHAT_COMPOSER_BOX_SELECTOR = '[data-chat-composer-id]'
/** Focus inside the ⌘M composer box: a TYPING target like any other, with one exception the
diff --git a/src/renderer/nodes/ChatComposer.tsx b/src/renderer/nodes/ChatComposer.tsx
index d7c4fd8c2..8dbbb3de0 100644
--- a/src/renderer/nodes/ChatComposer.tsx
+++ b/src/renderer/nodes/ChatComposer.tsx
@@ -259,7 +259,7 @@ export function ChatComposer({
>
<textarea
ref={inputRef}
- className="term-chat__input"
+ className="term-chat__composer-input"
value={value}
onChange={(e) => onChange(e.target.value)}
onKeyDown={onKeyDown}
diff --git a/src/renderer/styles.chat-view.test.ts b/src/renderer/styles.chat-view.test.ts
index 6ad9fc04f..96fdb65a8 100644
--- a/src/renderer/styles.chat-view.test.ts
+++ b/src/renderer/styles.chat-view.test.ts
@@ -77,3 +77,28 @@ describe('⌘M thread: claude.ai look', () => {
expect(CSS).toMatch(/\.term-chat__msg:hover \.term-chat__actions,\s*\n?\s*\.term-chat__actions:focus-within,\s*\n?\s*\.term-chat__actions--latest\s*{[^}]*opacity:\s*1;/)
})
})
+
+describe('the shared .term-chat__input (plan "Revise…", question "Other") keeps a visible field', () => {
+ it('the base rule is a bordered, padded, tinted field', () => {
+ const base = ruleBody('.term-chat__input')
+ expect(base).toMatch(/padding:\s*8px;/)
+ expect(base).toMatch(/border:\s*1px solid/)
+ expect(base).toMatch(/border-radius:\s*8px;/)
+ expect(base).toMatch(/background:\s*rgba\(var\(--tint-rgb\)/)
+ })
+
+ it('it shows focus (the accent border) — a borderless reset here was an a11y regression', () => {
+ expect(ruleBody('.term-chat__input:focus')).toMatch(/border-color:\s*var\(--accent\);/)
+ })
+
+ it('only the COMPOSER textarea drops its border (the box around it owns the focus ring)', () => {
+ const composer = ruleBody('.term-chat__composer-input')
+ expect(composer).toMatch(/border:\s*none;/)
+ expect(composer).toMatch(/background:\s*transparent;/)
+ expect(ruleBody('.term-chat__composer:focus-within')).toMatch(/border-color:\s*var\(--accent\);/)
+ })
+
+ it('the last paragraph of an assistant message has no trailing margin (specificity over the generic rule)', () => {
+ expect(ruleBody('.term-chat__msg--assistant .term-chat__text > p:last-child')).toMatch(/margin-bottom:\s*0;/)
+ })
+})
diff --git a/src/renderer/styles.css b/src/renderer/styles.css
index a154ed009..73f3c8854 100644
--- a/src/renderer/styles.css
+++ b/src/renderer/styles.css
@@ -3217,6 +3217,9 @@ body,
.term-chat__msg--assistant .term-chat__text p {
margin: 0 0 0.75em;
}
+.term-chat__msg--assistant .term-chat__text > p:last-child {
+ margin-bottom: 0;
+}
/* Consecutive lines of one assistant turn (text, each tool call, more text) sit close together:
they are one answer, and the thread's gap is for the space BETWEEN turns. */
.term-chat__msg--assistant + .term-chat__msg--assistant {
@@ -3531,7 +3534,30 @@ body,
border-color: var(--accent);
border-style: dashed;
}
+/* A text field in the ⌘M view: the plan "Revise…" textarea and the question "Other" input
+ (ChatAnswerControls) — a visible, bordered field with an accent border on focus. */
.term-chat__input {
+ box-sizing: border-box;
+ width: 100%;
+ resize: none;
+ padding: 8px;
+ font-family: inherit;
+ font-size: 13px;
+ color: var(--text-strong);
+ background: rgba(var(--tint-rgb), 0.06);
+ border: 1px solid rgba(var(--tint-rgb), 0.12);
+ border-radius: 8px;
+}
+.term-chat__input:focus {
+ outline: none;
+ border-color: var(--accent);
+}
+.term-chat__input:disabled {
+ opacity: 0.5;
+}
+/* The COMPOSER's textarea only (its own class): borderless inside the rounded box, which owns the
+ focus ring (`.term-chat__composer:focus-within`). Scoped so the answer fields above keep theirs. */
+.term-chat__composer-input {
box-sizing: border-box;
width: 100%;
resize: none;
@@ -3543,10 +3569,10 @@ body,
border: none;
border-radius: 0;
}
-.term-chat__input:focus {
+.term-chat__composer-input:focus {
outline: none;
}
-.term-chat__input:disabled {
+.term-chat__composer-input:disabled {
opacity: 0.5;
}
.term-chat__toolbar {