Skip to content

feat(terminal): add rich input composer - #12932

Open
mmarabel wants to merge 3 commits into
stablyai:mainfrom
mmarabel:feat/terminal-rich-input-refresh
Open

mmarabel wants to merge 3 commits into
stablyai:mainfrom
mmarabel:feat/terminal-rich-input-refresh

Conversation

@mmarabel

@mmarabel mmarabel commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Writing long prompts straight into a terminal is clumsy: pressing Enter sends each line immediately, pasting images is unreliable, and referencing files means typing exact paths. This adds an optional rich text box for terminal panes — toggle it from the pane's header or with a shortcut (⌘I on Mac). You can write multi-line prompts freely until ready to send, insert files as tidy chips, paste or drop images inline, and get command suggestions tuned to coding agents like Claude Code or Codex. Unfinished drafts are remembered. It's opt-in per pane; ordinary terminals behave exactly as before.

This matters most on remote and SSH workspaces. Typing into a remote agent TUI sends every keystroke to the host and waits for the echo to come back, so the lag you feel is a full network round trip per character. The composer keeps the draft on your own machine and sends it once, so composing costs nothing over the wire.

Summary

Supersedes #9227. This rebuilds the terminal rich-input composer on current main and incorporates the prior review feedback, current terminal architecture, and a broader cross-agent reliability pass.

Terminal panes now have an optional, Orca-native composer for prompts that are difficult to author safely in a raw TUI. It supports multiline editing, @file search, agent-specific slash commands, inline images, mixed file/image drops, draft restoration, and copy/paste between rich-input panes. Enter submits through the owning PTY; Shift+Enter inserts a newline; Escape closes the composer.

Why this matters on remote workspaces

On a remote runtime every keystroke is a round trip: the character travels to the host, the agent TUI redraws, and the repaint travels back before anything appears. Local echo is process-local, so the same typing costs nothing.

Measured on a 63ms link (direct, no relay): this repo's own budget in tests/e2e/terminal-codex-local-typing-latency.spec.ts puts local Codex composer typing at p50 ~22ms, and the same typing against a remote runtime lands near ~88ms. The composer removes the per-character cost entirely — the draft is local, and the network sees one write on submit.

This is the approach VS Code Remote-SSH, Cursor, and Orca's own Native Chat all take: the input widget lives on the client, and only finished text crosses the wire. Mosh's predictive echo is the alternative, and it declines to predict inside full-screen TUIs — which is exactly where agents live.

User-visible behavior

  • Toggle rich input from the terminal header or its remappable shortcut.
    • macOS default: ⌘I
    • Windows/Linux default: Ctrl+Shift+M
  • Compose multiline prompts without sending intermediate lines to the TUI.
  • Insert files and folders as compact Orca file-type chips.
  • Paste or drop images as inline atomic chips with previews, opening, removal, undo, and draft restoration.
  • Select and copy mixed text/file/image drafts. Orca-to-Orca paste preserves rich chips; plain-text consumers receive portable @path references.
  • Discover curated slash commands for Claude Code, Codex, OpenCode, Kimi Code, Pi, and Grok. Plain terminals remain free of agent-only autocomplete.
  • Use agent-appropriate image submission:
    • Claude Code, Codex, and Grok receive native image paths.
    • OpenCode, Kimi Code, and Pi receive inline @file references.
    • Plain terminals receive target-shell-escaped paths.

Reliability and design decisions

  • Editor JSON is authoritative for attachment order, deletion, undo, retries, and drafts.
  • Image chips are atomic Tiptap nodes with an editor-only caret anchor. The anchor is never sent to the PTY or copied as plain text.
  • Async image pastes map their insertion positions through intervening ProseMirror transactions, including rapid consecutive pastes.
  • Submission is staged and ownership-aware. Partial writes remove only content that reached the PTY; later attachments remain available for retry.
  • Submission waits for delivery evidence, bounded. It polls the terminal's onWriteParsed for the agent's redraw, settles once that redraw goes quiet, caps a chatty redraw, and times out at 2s reporting deliveryConfirmed: false instead of claiming success. Builds whose xterm lacks onWriteParsed keep the previous fixed delay.
  • An unconfirmed submit is shown in the composer status line as a caution rather than an error, because the prompt most likely did land and the agent simply never redrew inside the wait.
  • File/image opening and folder reveal retain the original local, SSH, WSL, or managed-runtime owner instead of following a replacement pane route.
  • Native drops stay claimed by the composer during submission and are ignored until the in-flight send settles.
  • Selection uses a continuous native-color wash, while file/image chips remain distinct outlined pills.
  • Preview and chip styling use Orca tokens and existing shadcn primitives.

Screenshots

Walkthrough

Orca.terminal-rich-input.walkthrough.and.submission.-.anonymized.mp4

Attachments

Orca terminal-rich-input attachments - anonymized

Composer

Orca terminal-rich-input composer - anonymized

Only these anonymized assets are attached; raw and intermediate captures remain local.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test — 47,155 tests passed in the full run. Three unchanged root-directory-guard tests fail locally because macOS /bin/bash 3.2 does not support the script's associative arrays. The other three transient full-run failures passed when rerun in isolation.
  • pnpm build
  • Added or updated high-quality tests that would catch regressions

Focused validation includes:

  • rich-input editor/model, autocomplete, ARIA, IME, Shift+Enter, draft, drop, submit, retry, clipboard, selection, image, navigation, and attachment tests;
  • clipboard IPC sender authorization, image bounds, local preview authorization, and runtime/SSH upload tests;
  • SFTP, raw SSH, POSIX system-SSH, and Windows system-SSH private-file propagation tests;
  • shortcut and slash-command catalog tests;
  • live macOS Electron checks for multiline scrolling, file/image opening, folder reveal, image previews, selection/copy/paste, and Claude submission;
  • post-review focused regression suite: 263 tests passed across 30 files.

AI Review Report

Multiple independent read-only reviews checked editor invariants, UI behavior, cross-platform compatibility, SSH/runtime ownership, performance, and security.

The reviews explicitly covered:

  • macOS, Linux, and Windows shortcuts, labels, path separators, POSIX/PowerShell escaping, and Electron differences;
  • local repositories, folder workspaces, WSL, direct SSH, relay/raw transfer, and managed runtimes;
  • Claude Code, Codex, OpenCode, Kimi Code, Pi, Grok, and plain-terminal behavior;
  • Git-provider neutrality;
  • paste ordering, selection, deletion, undo, copied image IDs, partial-submit reconciliation, route changes, and stale PTY ownership;
  • image size/resource bounds, object URL lifecycle, clipboard trust, IPC authorization, temp-file permissions, and command-injection risk.

Actionable findings were addressed before opening this PR:

  • rebased onto current upstream while retaining the newer Quick Open filename-priority work;
  • replaced plain-terminal path quoting with target-shell-aware escaping;
  • kept native-drop ownership in the composer while a submission is in flight;
  • normalized image-plus-caret-anchor copy, paste, cut, deletion, and undo behavior;
  • added a process-scoped rich-clipboard trust marker and converts forged external rich nodes to visible text references;
  • re-keyed pasted images to avoid duplicate attachment IDs;
  • moved local clipboard PNGs into unpredictable per-save 0700 directories with exclusive 0600 file creation;
  • propagated private file permissions through SFTP, relay/raw transfer, POSIX system SSH, and creation-time Windows FileSecurity ACLs;
  • added delayed web object-URL revocation after removal/submission while preserving short-window undo.

The post-open CodeRabbit pass raised 11 review threads plus nine review-body nits. Six threads and all nine nits produced code or test improvements. Five threads were resolved with code-backed explanations because the requested change was already satisfied or would break an explicit ownership invariant. A final independent review then found and fixed one additional late async blob-preview leak. No unresolved review thread or merge blocker remains.

Security Audit

Reviewed clipboard/drop input, HTML paste parsing, filesystem/path routing, command execution, PTY ownership, IPC sender validation, remote transfer permissions, secrets, dependencies, and resource exhaustion.

  • Image/file clipboard IPC is restricted to the trusted main renderer.
  • Image dimensions, encoded bytes, decoded bytes, and runtime upload chunks are bounded.
  • Plain-shell paths use the resolved POSIX or Windows shell escaper; filenames cannot inject command substitutions or metacharacters.
  • Rich clipboard nodes are trusted only when they carry Orca's process-scoped marker. Untrusted HTML becomes visible @path text instead of a navigable resource chip.
  • File/image chips preserve explicit connection/runtime ownership, and route changes are revalidated before navigation.
  • Local and remote clipboard PNGs are created with owner-only access; Windows system-SSH supplies an inheritance-disabled current-SID ACL when the file is created, before image bytes are written.
  • PTY submission revalidates the same leaf, transport, and PTY before sending Enter.
  • No secrets or new dependencies were added.

Residual follow-up: clipboard temp files still rely on OS/runtime temp cleanup rather than an Orca age-based sweep. Web blob previews are revoked after removal, unmount, and late async completion.

Notes

Rebase 2026-08-24

Merged current main (340 commits). Two conflicts:

  • clipboard-image-temp-file.ts — kept this PR's mkdtemp + exclusive 0600 creation on top of main's getAppEnvironment() accessor.
  • pty-connection.ts — main split the file into pty-connection/* and left a re-export barrel. This PR's TUI repaint-request listener moved onto the session bag: handler in pty-connection/tui-repaint-resize-reassert.ts, installed from pty-input-forward.ts, torn down in session-reconcile-dispose.ts.

Two max-lines gates tripped after the merge, resolved by extraction rather than a disable, per AGENTS.md:

  • pty-input-forward.ts — repaint handler extracted as above.
  • agent-status-types.ts — main sits at exactly the 300-line limit, so this PR's single | 'kimi' union member trips it. WellKnownAgentType/AgentType moved to src/shared/well-known-agent-types.ts and re-exported, leaving every existing import untouched.

pnpm lint, pnpm typecheck, the rich-input suite (85 tests / 18 files), and the conflict-touched suites (87 tests) pass. The full suite was not re-run.

Update 2026-08-24 — submit waits on delivery evidence

Replaces the fixed 500ms pre-Enter sleep with a bounded wait on the agent's redraw.

Case Before After
Local, agent redraws in ~20ms always 500ms ~80ms
Remote, 63ms RTT always 500ms ~145ms
Slow link, redraw at 900ms Enter at 500ms, prompt left unsent, reported submitted waits for the redraw, then sends
No redraw at all Enter at 500ms, reported submitted 2s timeout, reports deliveryConfirmed: false
xterm build without onWriteParsed 500ms 500ms, unchanged

TerminalRichInputSubmitResult's submitted variant now carries deliveryConfirmed. Existing callers test result.status !== 'submitted' and are unaffected.

An unconfirmed submit is no longer silent. The composer status line gains a third state — "Sent, but the agent did not confirm. Check the terminal." — worded as a caution rather than a failure, since the prompt most likely did reach the agent. TerminalRichInputSendError is renamed TerminalRichInputSendNotice so the type stops calling a caution an error, and the message selection moves into a pure terminalRichInputStatusText helper alongside the existing terminalRichInputNewlineShortcut, so the wording is testable without a render harness.

Localization: sync:localization-catalog adds sendUnconfirmed to en.json. The other four catalogs are left to fall back to English rather than machine-translated — each already carries ~1,400 untranslated keys, and #15875 had to repair five Korean strings whose meaning machine translation had changed.

New coverage: six tests in terminal-rich-input-delivery-wait.test.ts drive a virtual clock (no-signal fallback, local fast path returning under the old 500ms, a slow redraw held past 500ms, the unconfirmed timeout, the settle cap on a chatty redraw, unsubscribe on every exit path), plus four in TerminalRichInputStatus.test.ts pinning that the unconfirmed and failed wordings stay distinct.

pnpm lint, pnpm typecheck, and pnpm test (57,650 passed, 0 failed) pass on this branch.

Rebase 2026-09-05

Rebased the final reviewed feature onto main at af82126058, consolidating the feature commits and previous merge-resolution changes into 544734bc37. Pushed with an explicit lease against the previous PR head; this is a history rewrite, not a merge of this PR.

Conflict resolution preserves upstream refactors:

  • Rehomed the composer into the terminal controller/surface and keyboard event-handler modules, plus the split preload, web clipboard and keybinding modules. Per-leaf identity, attachment ownership, shell escaping, clipboard lifecycle and redraw-evidence submission remain intact.
  • Kept the newer clipboard thumbnail API and local-preview authorization alongside private temp-file creation. Kept upstream Quick Open behavior unchanged.
  • Kept Windows SSH SFTP-first staging, bounded stdin fallbacks and atomic publication. Private clipboard writes now establish an owner-only ACL on the staging file before any payload transfer, fail closed on ACL errors, and publish by exclusive rename. Private overwrite/append combinations are rejected; the private-image caller only requests exclusive creation.

Validation on Linux / Node 24: full pnpm lint, pnpm tc, and pnpm build passed; 4,659 tests passed across 492 focused test files (one file/two tests skipped), followed by a passing two-test clipboard authorization/security rerun including one additional regression. Added coverage for private Windows SFTP and both stdin fallbacks, ACL failure, cleanup, unsupported private-write combinations, per-leaf composer toggling, locked PTYs, and macOS/Linux/Windows shortcuts inside editable controls. The entire repository test suite was not rerun.

Scoped independent AI review of the rebase-specific diff found no actionable blocker. Cross-platform shortcuts, local/SSH/runtime ownership, folder workspaces, supported-agent identity, mixed-version optional fields, performance and security were considered. No new visual design is introduced by this rebase; existing PR media remains representative. Rendered Electron UI and live native Windows/SSH were not exercised in this environment. In particular, ACL retention across real Windows SFTP truncation and rename remains unverified live (covered by protocol/code reasoning and mocked regression tests).

Rebase 2026-09-12

Reopened and rebased onto main at 403b62a8d8 (previous base: af82126058, 2026-09-05). Four conflicts, all resolved to preserve upstream refactors rather than this branch's older shape:

  • agent-status-types.ts — dropped this branch's well-known-agent-types.ts extraction. Upstream now derives WellKnownAgentType from TuiAgent, which is a better single source of truth than the hardcoded union the extraction carried, and kimi is already in TuiAgent upstream. The extraction existed only to free lines for the max-lines gate, and nothing else imported it.
  • clipboard-ipc-handlers.ts — kept upstream's #17679 routing (a runtime owner always performs the save, with connectionId passed through) and layered this branch's includeLocalPreview behaviour on top. This branch's previous condition would have re-broken #17679 for the runtimeEnvironmentId && connectionId case.
  • use-terminal-pane-chat-state.ts — kept the rich-input hook, dropped the chatPaneDispatchStatus subscription the patch re-added. Upstream removed it along with the paused notice that read it, so it would have been dead code, and the hook-parity count below assumes it stays removed.
  • terminal-pane-hook-order-parity.test.ts — recomputed the ratchet for the merged tree: 213 hooks (209 upstream + the composer's one state and three callbacks), still 8 useMemo, hash e12c8105078da9c200887e7311e87c63fe738e28128eb8863beaeb2c22a34005.

One gate change: react-doctor(no-adjust-state-on-prop-change) now fires twice on TerminalRichInput.tsx — the rule is newer than this branch. It is a false positive here: the autocomplete state tracks the live Tiptap editor rather than a prop, it is recomputed on every editor update and selection change, and the agent is read through a ref, so a changed agent cannot leave a stale list on screen. The file is therefore added to SUPPRESSED_REACT_DOCTOR_DIAGNOSTICS in config/scripts/check-changed-code-quality.mjs with a rationale, following that list's existing convention. A source-level oxlint-disable is not usable: the base oxlint scan runs without this plugin and reports the directive as unused.

Verified on the rebased tip: pnpm tc:web, pnpm tc:node, pnpm tc:cli clean; the changed-code quality gate reports 0 new findings across 127 changed files; the max-lines, ts-nocheck and runtime-electron ratchets pass. Focused suites: 123 tests across the 27 rich-input and hook-parity files, plus the clipboard-IPC and chat-state suites (24 tests). The full repository suite was not re-run.

@mmarabel
mmarabel requested a review from brennanb2025 as a code owner August 6, 2026 16:36
@greptile-apps

greptile-apps Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

Too many files changed for review (134 files, 100 file limit).

Bypass the limit by tagging @greptile-apps to review.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting @coderabbitai full review.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This change adds private clipboard-image storage for local and remote files, including restrictive permissions and optional local previews. It introduces a Tiptap-based terminal rich-input composer with file mentions, image attachments, drafts, autocomplete, drag-and-drop, paste handling, submission states, and localized UI. It wires the composer into terminal panes, keyboard shortcuts, file routing, and native drops. It also adds TUI repaint resize handling and agent-specific command and image metadata.

Merge Risk: 🟡 Moderate · up to 54473

A mobile handoff during rich-input submission can send part of the composed input to a terminal now controlled by mobile. Guard each paste write before merging.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 48 functions across 53 files. (83 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely identifies the main change: adding a rich input composer for terminal panes.
Description check ✅ Passed The description is detailed and covers the feature, motivation, linked issue, visual proof, testing, security, review notes, and rebase validation. It uses a Summary heading instead of What Changed an…
Full details: Docstring Coverage

Explanation

Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 48 functions across 53 files. (83 skipped: 6 unsupported, 77 over the file limit.)


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 11

🧹 Nitpick comments (9)
src/renderer/src/components/terminal-pane/terminal-rich-input-image-support.test.ts (1)

19-30: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Add a 'windows' target-shell case for inline image text.

The escaping assertions cover only 'posix'. terminalRichInputInlineImageText accepts a target shell, and Windows quoting rules differ from POSIX quoting rules. A Windows case protects the plain-terminal path, which is the one that injects a raw path into a shell.

♻️ Suggested additional coverage
   it('serializes inline image paths only for shell and file-reference agents', () => {
     expect(terminalRichInputInlineImageText(null, '/tmp/$(touch pwned).png', 'posix')).toBe(
       "'/tmp/$(touch pwned).png' "
     )
+    expect(
+      terminalRichInputInlineImageText(null, 'C:\\Users\\me\\design image.png', 'windows')
+    ).toBe(/* expected Windows-quoted form */)

As per coding guidelines: "commands and scripts must work on macOS, Linux, and Windows" and "Keep platform-dependent behavior behind runtime checks for macOS, Linux, and Windows."

Source: Coding guidelines

src/renderer/src/components/terminal-pane/terminal-paste-overlay-target.test.ts (1)

6-14: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Assert on the descendant element, not the overlay wrapper.

querySelector('div, textarea, input') returns the first element in document order that matches any selector in the list. For all three markup cases that is the outer wrapper element. terminalPasteIsOwnedByOverlay then matches through closest() on the element itself, so the ancestor traversal is never exercised. Target the inner child to cover the real paste-event case, where the event target is a descendant of the overlay root.

♻️ Proposed change to test the descendant path
-  it.each([
-    '<div class="terminal-rich-input-dock"><div class="editor"></div></div>',
-    '<div data-native-chat-root="true"><textarea></textarea></div>',
-    '<div data-terminal-search-root><input></div>'
-  ])('keeps paste inside higher-level terminal editors', (markup) => {
-    const root = document.createElement('div')
-    root.innerHTML = markup
-    expect(terminalPasteIsOwnedByOverlay(root.querySelector('div, textarea, input'))).toBe(true)
-  })
+  it.each([
+    ['<div class="terminal-rich-input-dock"><div class="editor"></div></div>', '.editor'],
+    ['<div data-native-chat-root="true"><textarea></textarea></div>', 'textarea'],
+    ['<div data-terminal-search-root><input></div>', 'input']
+  ])('keeps paste inside higher-level terminal editors', (markup, innerSelector) => {
+    const root = document.createElement('div')
+    root.innerHTML = markup
+    expect(terminalPasteIsOwnedByOverlay(root.querySelector(innerSelector))).toBe(true)
+  })
src/renderer/src/components/terminal-pane/terminal-rich-input-model.ts (1)

230-266: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the duplicated tree-mapping body.

mapContent and mapContentNode share an identical child-mapping body. The only difference is the null result: mapContent substitutes an empty document, and mapContentNode propagates null. Delegate to mapContentNode and keep the empty-document fallback in one place.

♻️ Proposed refactor
 function mapContent(
   content: JSONContent,
   mapNode: (node: JSONContent) => JSONContent | null
 ): JSONContent {
-  const mapped = mapNode(content)
-  if (!mapped) {
-    return { type: 'doc', content: [{ type: 'paragraph' }] }
-  }
-  if (!mapped.content) {
-    return mapped
-  }
-  return {
-    ...mapped,
-    content: mapped.content
-      .map((child) => mapContentNode(child, mapNode))
-      .filter((child): child is JSONContent => child !== null)
-  }
+  return mapContentNode(content, mapNode) ?? { type: 'doc', content: [{ type: 'paragraph' }] }
 }
src/renderer/src/components/terminal-pane/terminal-rich-input-draft.test.ts (1)

42-48: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for image-only retention and bounded eviction.

writeTerminalRichInputDraft keeps an entry when the text is empty but the content holds an image attachment, and it evicts the least recently used entry above MAX_TERMINAL_RICH_INPUT_DRAFTS. Neither branch is tested. Both are cheap to assert and protect the draft-store contract.

♻️ Suggested additional tests
it('keeps an image-only draft when the text is empty', () => {
  const content = {
    type: 'doc',
    content: [
      {
        type: 'paragraph',
        content: [{ type: 'terminalImageAttachment', attrs: { id: 'image-1', path: '/tmp/i.png' } }]
      }
    ]
  }

  writeTerminalRichInputDraft('tab-1:leaf-a', '', content)

  expect(readTerminalRichInputDraftContent('tab-1:leaf-a')).toEqual(content)
})

it('evicts the least recently used draft past the bound', () => {
  for (let index = 0; index < 128; index += 1) {
    writeTerminalRichInputDraft(`tab-1:leaf-${index}`, `draft-${index}`)
  }
  // Refresh the oldest entry so the next write evicts leaf-1 instead.
  expect(readTerminalRichInputDraft('tab-1:leaf-0')).toBe('draft-0')
  writeTerminalRichInputDraft('tab-1:leaf-128', 'draft-128')

  expect(readTerminalRichInputDraft('tab-1:leaf-0')).toBe('draft-0')
  expect(readTerminalRichInputDraft('tab-1:leaf-1')).toBe('')
})
src/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.ts (1)

82-87: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Move the ref assignment out of the render body.

Line 83 writes syncAttachmentsRef.current during render. React 19 can discard a render pass, so a render-phase ref write can publish a closure from a render that never commits. Assign it in an effect instead. The stored callback stays current for the syncEditorAttachments identity you want to keep stable.

♻️ Suggested change
-  const syncAttachmentsRef = useRef(attachmentState.syncAttachments)
-  syncAttachmentsRef.current = attachmentState.syncAttachments
+  const syncAttachmentsRef = useRef(attachmentState.syncAttachments)
+  useEffect(() => {
+    syncAttachmentsRef.current = attachmentState.syncAttachments
+  }, [attachmentState.syncAttachments])

Add useEffect to the React import on Line 1.

src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.ts (3)

139-141: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

Clear the pending timer and animation frame on unmount.

pendingTimer and the requestAnimationFrame(focusEditor) call at Line 108 survive unmount. The finally block clears the timer only when the save settles, and it then calls setAttachmentBusy and setAttachmentPending on an unmounted hook. React 19 does not warn for this, so the effect is limited to wasted work. Track the pending handles in a ref and clear them in a cleanup effect if you want deterministic teardown.

Also applies to: 173-186


238-266: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

Blob preview URLs are never revoked when the hook unmounts.

syncAttachmentPreviewUrls revokes a blob URL only when a later attachment update drops it. If the composer closes while attachments still hold blob previews, no update runs, so those object URLs stay alive for the session. Add a cleanup effect that schedules revocation for the retained blob previews on unmount.


233-234: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

An unstable syncAttachments identity forces a render-phase ref write downstream. useTerminalRichInputAttachments returns syncAttachments as a fresh inline arrow on every render. The consumer compensates by writing that callback into a ref during render, which React 19 can discard when a render does not commit. Fixing the identity at the source removes the need for the ref.

  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.ts#L233-L234: wrap the syncAttachments body in useCallback with [updateAttachments] as the dependency and return the memoized function.
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.ts#L82-L87: once the identity is stable, drop syncAttachmentsRef and call attachmentState.syncAttachments directly inside syncEditorAttachments with [attachmentState.syncAttachments] as the dependency.
src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.test.tsx (1)

216-220: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Derive the shifted position from the shared constant.

Line 220 hardcodes 7, which is 5 + TERMINAL_RICH_INPUT_IMAGE_INSERTION_SIZE. If the node size constant changes, this assertion keeps a stale literal and the test stops describing the contract. Import the constant and compute the expected value.

♻️ Suggested change
-    expect(onAttachmentsAdded.mock.calls.map(([, position]) => position)).toEqual([5, 7])
+    expect(onAttachmentsAdded.mock.calls.map(([, position]) => position)).toEqual([
+      5,
+      5 + TERMINAL_RICH_INPUT_IMAGE_INSERTION_SIZE
+    ])

Add the import:

import { TERMINAL_RICH_INPUT_IMAGE_INSERTION_SIZE } from './terminal-rich-input-model'

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7990c44a-9634-42f8-86f3-61f987134eae

📥 Commits

Reviewing files that changed from the base of the PR and between f713739 and 864d39f.

📒 Files selected for processing (105)
  • src/main/providers/filesystem-provider-contract.ts
  • src/main/providers/ssh-filesystem-base64-writer.test.ts
  • src/main/providers/ssh-filesystem-base64-writer.ts
  • src/main/providers/ssh-filesystem-file-upload.ts
  • src/main/providers/ssh-filesystem-provider.ts
  • src/main/ssh/sftp-upload.ts
  • src/main/ssh/ssh-connection.ts
  • src/main/ssh/ssh-relay-session.test.ts
  • src/main/ssh/ssh-relay-session.ts
  • src/main/ssh/ssh-system-fallback.test.ts
  • src/main/ssh/system-ssh-file-binary-transfer.ts
  • src/main/window/clipboard-image-temp-file.ts
  • src/main/window/clipboard-ipc-handlers.test.ts
  • src/main/window/clipboard-ipc-handlers.ts
  • src/main/window/clipboard-save-image-authorization-ipc.test.ts
  • src/preload/api-types.ts
  • src/preload/index.ts
  • src/renderer/src/assets/terminal.css
  • src/renderer/src/components/native-chat/native-chat-image-paste.ts
  • src/renderer/src/components/native-chat/native-chat-leaf-routing.test.ts
  • src/renderer/src/components/native-chat/use-native-chat-composer-paste.ts
  • src/renderer/src/components/terminal-pane/RichInputPlaceholder.tsx
  • src/renderer/src/components/terminal-pane/TerminalPane.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneHeaderOverlay.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneRichInputToggle.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInput.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputAttachmentPending.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputChipRemoveButton.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMention.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMention.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMenu.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMenu.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputImageAttachment.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputImageAttachment.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputSendButton.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputSlashMenu.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputSlashMenu.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputStatus.tsx
  • src/renderer/src/components/terminal-pane/expand-collapse-render-stability.test.ts
  • src/renderer/src/components/terminal-pane/keyboard-handlers-ime-enter-keyup.test.tsx
  • src/renderer/src/components/terminal-pane/keyboard-handlers-ime.test.tsx
  • src/renderer/src/components/terminal-pane/keyboard-handlers.ts
  • src/renderer/src/components/terminal-pane/pty-connection.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection.ts
  • src/renderer/src/components/terminal-pane/terminal-clipboard-paste.ts
  • src/renderer/src/components/terminal-pane/terminal-drop-handler.test.ts
  • src/renderer/src/components/terminal-pane/terminal-file-open-routing.ts
  • src/renderer/src/components/terminal-pane/terminal-link-handlers.test.ts
  • src/renderer/src/components/terminal-pane/terminal-native-file-drop.ts
  • src/renderer/src/components/terminal-pane/terminal-paste-overlay-target.test.ts
  • src/renderer/src/components/terminal-pane/terminal-paste-overlay-target.ts
  • src/renderer/src/components/terminal-pane/terminal-programmatic-text-paste.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-autocomplete.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-autocomplete.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-clipboard.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-clipboard.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-draft.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-draft.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-dropped-paths.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-dropped-paths.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-editor-submit.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-editor-submit.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-caret.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-caret.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-support.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-support.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-keydown.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-keydown.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-model.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-model.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-native-drop.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-node-removal.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-node-removal.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-path-navigation.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-path-navigation.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit-reconcile.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit-reconcile.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-types.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-global-effects.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-global-effects.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-animation.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.test.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-autocomplete-aria.test.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-autocomplete-aria.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-drop.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-path-insertion.test.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-path-insertion.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/pane-manager/pane-tui-repaint-request.ts
  • src/renderer/src/web/web-preload-api.ts
  • src/shared/agent-image-handling.ts
  • src/shared/agent-status-types.ts
  • src/shared/keybindings.test.ts
  • src/shared/keybindings.ts
  • src/shared/native-chat-slash-commands.test.ts
  • src/shared/native-chat-slash-commands.ts

Comment thread src/renderer/src/assets/terminal.css Resolved
@mmarabel

mmarabel commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Actionable comments posted: 11

Addressed the additional review-body items in cb3b32e: Windows inline-image quoting coverage, descendant overlay coverage, tree-mapping deduplication, image-only/LRU draft coverage, a stable attachment-sync callback, timer/rAF/queued-paste cleanup, delayed and late-result blob URL revocation, and insertion-size-derived expectations.

Docstring Coverage

Not adding blanket docstrings for this generic metric: Orca's contributor guidance prefers concise, non-obvious comments, and the changed TypeScript functions are already covered by focused names, types, and tests. Adding comments solely to satisfy an 80% generated threshold would reduce signal rather than improve maintainability.

@zhigang1992

Copy link
Copy Markdown
Contributor

This feature is also really useful when working in a bad network condition. The input otherwise would have to go through to the remote server and come back will now be locally until user sent. It's a much better user experience.

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@mmarabel

Copy link
Copy Markdown
Contributor Author

Rebased the branch onto current main via merge so the conflicts no longer block review.

The seven GitHub conflict files came from two sources:

  • Content conflicts in clipboard tests, preload API types, and terminal file-open routing. Kept both sides: the rich-input ownership/preview changes and main's newer WSL/opendir/staging-sweep behavior.
  • Modify/delete conflicts from refactor(tests): split every oversized test file off the max-lines suppression list #14728 splitting oversized test files. Deleted the old monoliths and ported this PR's coverage into the split files (pty-connection-hidden-snapshot-resize-signals, terminal-link-remote-runtime-ssh-open, use-terminal-pane-global-effects-file-drop, keybindings-terminal-context).

Also repaired auto-merge leftovers that typecheck caught: native-chat overlay paste/copy routing now uses terminalPasteIsOwnedByOverlay, markdown image paste unwraps the widened clipboard return type, and the new IME composing-chord test passes onToggleRichInput.

Local check: pnpm typecheck plus the focused rich-input / conflict-file suites (221 tests) passed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a014ba54-7d88-4969-adf3-ff53395b5cfa

📥 Commits

Reviewing files that changed from the base of the PR and between 5b7f442 and afb1082.

📒 Files selected for processing (112)
  • src/main/providers/filesystem-provider-contract.ts
  • src/main/providers/ssh-filesystem-base64-writer.test.ts
  • src/main/providers/ssh-filesystem-base64-writer.ts
  • src/main/providers/ssh-filesystem-file-upload.ts
  • src/main/providers/ssh-filesystem-provider.ts
  • src/main/ssh/sftp-upload.ts
  • src/main/ssh/ssh-connection.ts
  • src/main/ssh/ssh-relay-session.test.ts
  • src/main/ssh/ssh-relay-session.ts
  • src/main/ssh/ssh-system-fallback.test.ts
  • src/main/ssh/system-ssh-file-binary-transfer.ts
  • src/main/window/clipboard-image-temp-file.test.ts
  • src/main/window/clipboard-image-temp-file.ts
  • src/main/window/clipboard-ipc-handlers.test.ts
  • src/main/window/clipboard-ipc-handlers.ts
  • src/main/window/clipboard-save-image-authorization-ipc.test.ts
  • src/preload/api/ui-window-api.ts
  • src/preload/index.ts
  • src/renderer/src/assets/terminal.css
  • src/renderer/src/components/editor/rich-markdown-paste-image.ts
  • src/renderer/src/components/native-chat/native-chat-image-paste.ts
  • src/renderer/src/components/native-chat/native-chat-leaf-routing.test.ts
  • src/renderer/src/components/native-chat/use-native-chat-composer-paste.ts
  • src/renderer/src/components/terminal-pane/RichInputPlaceholder.tsx
  • src/renderer/src/components/terminal-pane/TerminalPane.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneHeaderOverlay.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneRichInputToggle.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInput.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputAttachmentPending.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputChipRemoveButton.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMention.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMention.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMenu.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMenu.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputImageAttachment.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputImageAttachment.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputSendButton.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputSlashMenu.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputSlashMenu.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputStatus.test.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputStatus.tsx
  • src/renderer/src/components/terminal-pane/expand-collapse-render-stability.test.ts
  • src/renderer/src/components/terminal-pane/keyboard-handlers-ime-composing-chord.test.tsx
  • src/renderer/src/components/terminal-pane/keyboard-handlers-ime-enter-keyup.test.tsx
  • src/renderer/src/components/terminal-pane/keyboard-handlers-ime.test.tsx
  • src/renderer/src/components/terminal-pane/keyboard-handlers.ts
  • src/renderer/src/components/terminal-pane/pty-connection-hidden-snapshot-resize-signals.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection.ts
  • src/renderer/src/components/terminal-pane/terminal-clipboard-paste.ts
  • src/renderer/src/components/terminal-pane/terminal-drop-handler.test.ts
  • src/renderer/src/components/terminal-pane/terminal-file-open-routing.ts
  • src/renderer/src/components/terminal-pane/terminal-link-remote-runtime-ssh-open.test.ts
  • src/renderer/src/components/terminal-pane/terminal-native-file-drop.ts
  • src/renderer/src/components/terminal-pane/terminal-paste-overlay-target.test.ts
  • src/renderer/src/components/terminal-pane/terminal-paste-overlay-target.ts
  • src/renderer/src/components/terminal-pane/terminal-programmatic-text-paste.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-autocomplete.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-autocomplete.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-clipboard.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-clipboard.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-draft.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-draft.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-dropped-paths.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-dropped-paths.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-editor-submit.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-editor-submit.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-caret.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-caret.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-support.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-support.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-keydown.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-keydown.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-model.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-model.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-native-drop.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-node-removal.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-node-removal.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-path-navigation.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-path-navigation.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-preview-revocation.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit-reconcile.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit-reconcile.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-types.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-global-effects-file-drop.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-global-effects.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-animation.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachment-lifecycle.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.test.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-autocomplete-aria.test.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-autocomplete-aria.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-drop.test.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-drop.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-path-insertion.test.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-path-insertion.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/pane-manager/pane-tui-repaint-request.ts
  • src/renderer/src/web/web-preload-api.ts
  • src/shared/agent-image-handling.ts
  • src/shared/agent-status-types.ts
  • src/shared/keybindings-terminal-context.test.ts
  • src/shared/keybindings.ts
  • src/shared/native-chat-slash-commands.test.ts
  • src/shared/native-chat-slash-commands.ts
🚧 Files skipped from review as they are similar to previous changes (97)
  • src/renderer/src/components/native-chat/native-chat-leaf-routing.test.ts
  • src/renderer/src/components/terminal-pane/keyboard-handlers-ime.test.tsx
  • src/renderer/src/components/terminal-pane/terminal-rich-input-dropped-paths.test.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputSlashMenu.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputAttachmentPending.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.test.ts
  • src/main/window/clipboard-image-temp-file.test.ts
  • src/shared/agent-image-handling.ts
  • src/renderer/src/components/terminal-pane/keyboard-handlers-ime-enter-keyup.test.tsx
  • src/main/ssh/sftp-upload.ts
  • src/renderer/src/components/terminal-pane/terminal-drop-handler.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-autocomplete-aria.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneRichInputToggle.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputSlashMenu.test.tsx
  • src/renderer/src/components/terminal-pane/terminal-clipboard-paste.ts
  • src/main/providers/ssh-filesystem-base64-writer.ts
  • src/main/ssh/ssh-relay-session.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-path-insertion.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-drop.test.tsx
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit-reconcile.test.ts
  • src/main/ssh/ssh-connection.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-caret.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-draft.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-path-insertion.test.tsx
  • src/renderer/src/lib/pane-manager/pane-tui-repaint-request.ts
  • src/main/ssh/system-ssh-file-binary-transfer.ts
  • src/shared/native-chat-slash-commands.test.ts
  • src/main/ssh/ssh-relay-session.test.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputStatus.test.ts
  • src/renderer/src/components/terminal-pane/terminal-paste-overlay-target.ts
  • src/main/providers/filesystem-provider-contract.ts
  • src/renderer/src/components/native-chat/use-native-chat-composer-paste.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-path-navigation.test.ts
  • src/main/providers/ssh-filesystem-base64-writer.test.ts
  • src/renderer/src/components/terminal-pane/RichInputPlaceholder.tsx
  • src/renderer/src/components/terminal-pane/keyboard-handlers.ts
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/components/terminal-pane/terminal-rich-input-autocomplete.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-autocomplete-aria.ts
  • src/renderer/src/components/terminal-pane/TerminalPaneHeaderOverlay.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-pane-global-effects.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-support.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputChipRemoveButton.tsx
  • src/renderer/src/assets/terminal.css
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMention.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputImageAttachment.tsx
  • src/shared/keybindings.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-types.ts
  • src/renderer/src/components/native-chat/native-chat-image-paste.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-caret.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-model.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit-reconcile.ts
  • src/main/providers/ssh-filesystem-file-upload.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMenu.test.tsx
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-support.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachment-lifecycle.ts
  • src/preload/index.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMenu.tsx
  • src/renderer/src/components/terminal-pane/terminal-rich-input-keydown.ts
  • src/renderer/src/components/terminal-pane/terminal-file-open-routing.ts
  • src/renderer/src/components/terminal-pane/expand-collapse-render-stability.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-preview-revocation.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputStatus.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMention.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInput.tsx
  • src/renderer/src/components/terminal-pane/terminal-rich-input-node-removal.ts
  • src/renderer/src/components/terminal-pane/terminal-native-file-drop.ts
  • src/main/window/clipboard-ipc-handlers.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-drop.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-animation.ts
  • src/renderer/src/components/terminal-pane/pty-connection.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-dropped-paths.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-editor-submit.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-draft.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-clipboard.test.ts
  • src/main/providers/ssh-filesystem-provider.ts
  • src/main/window/clipboard-ipc-handlers.test.ts
  • src/shared/native-chat-slash-commands.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputImageAttachment.test.tsx
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.ts
  • src/shared/agent-status-types.ts
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/components/terminal-pane/terminal-rich-input-editor-submit.test.ts
  • src/main/window/clipboard-save-image-authorization-ipc.test.ts
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/components/terminal-pane/terminal-rich-input-native-drop.ts
  • src/renderer/src/components/terminal-pane/terminal-programmatic-text-paste.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-keydown.test.ts
  • src/renderer/src/components/terminal-pane/TerminalPane.tsx
  • src/renderer/src/web/web-preload-api.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.test.tsx
  • src/main/ssh/ssh-system-fallback.test.ts

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@mmarabel

Copy link
Copy Markdown
Contributor Author

@nwparker Hey Neil sorry for the ping, this feature would be such a big improvement in my current workflow - please let me know if there's any way i can help with improving it to make it easier to review and consider merging at some point! Or if it would be viable to somehow make it a plugin I'd be open to that too - although I believe the plugin feature at the moment is too restrictive still to allow for this to happen.

I know y'all all super busy with all these PRs so no rush, just thought I'd bring it up your massive list of things to check

@nwparker nwparker removed the P2 label Aug 19, 2026
@mmarabel

Copy link
Copy Markdown
Contributor Author

This feature is also really useful when working in a bad network condition. The input otherwise would have to go through to the remote server and come back will now be locally until user sent. It's a much better user experience.

I haven't done much remote coding until the last few days as I've gotten a VPS and can now experience this. There's definitely a lag in the input when using Remote Servers and keeping the input local for those would make the experience a lot better.

Will rebase this / add some bits for the Remotes and push some updates

@mmarabel

Copy link
Copy Markdown
Contributor Author

@greptile-apps

@mmarabel

mmarabel commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 03ec5c98-2401-4359-8a20-1253026600f1

📥 Commits

Reviewing files that changed from the base of the PR and between 062db77 and 544734bc37739d7adc0f09323376fd5086ed5c13.

📒 Files selected for processing (133)
  • src/main/providers/filesystem-provider-contract.ts
  • src/main/providers/ssh-filesystem-base64-writer.test.ts
  • src/main/providers/ssh-filesystem-base64-writer.ts
  • src/main/providers/ssh-filesystem-file-upload.ts
  • src/main/providers/ssh-filesystem-provider.ts
  • src/main/ssh/sftp-upload.ts
  • src/main/ssh/ssh-connection.ts
  • src/main/ssh/ssh-relay-session.test.ts
  • src/main/ssh/ssh-relay-session.ts
  • src/main/ssh/ssh-system-fallback.test.ts
  • src/main/ssh/system-ssh-file-binary-transfer.ts
  • src/main/ssh/system-ssh-windows-file-write.ts
  • src/main/ssh/system-ssh-windows-private-write.test.ts
  • src/main/ssh/system-ssh-windows-write-strategy.ts
  • src/main/window/clipboard-image-temp-file.test.ts
  • src/main/window/clipboard-image-temp-file.ts
  • src/main/window/clipboard-ipc-handlers.test.ts
  • src/main/window/clipboard-ipc-handlers.ts
  • src/main/window/clipboard-save-image-authorization-ipc.test.ts
  • src/preload/api/ui-bridge-clipboard-and-window-controls.ts
  • src/preload/api/ui-window-api.ts
  • src/renderer/src/assets/terminal.css
  • src/renderer/src/components/editor/rich-markdown-paste-image.ts
  • src/renderer/src/components/native-chat/native-chat-image-paste.ts
  • src/renderer/src/components/native-chat/native-chat-leaf-routing.test.ts
  • src/renderer/src/components/native-chat/use-native-chat-composer-paste.ts
  • src/renderer/src/components/terminal-pane/RichInputPlaceholder.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneHeaderOverlay.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneRichInputPortal.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneRichInputToggle.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneSurface.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInput.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputAttachmentPending.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputChipRemoveButton.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMention.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMention.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMenu.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMenu.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputImageAttachment.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputImageAttachment.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputSendButton.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputSendButton.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputSlashMenu.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputSlashMenu.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputStatus.test.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputStatus.tsx
  • src/renderer/src/components/terminal-pane/expand-collapse-render-stability.test.ts
  • src/renderer/src/components/terminal-pane/keyboard-handlers-ime-composing-chord.test.tsx
  • src/renderer/src/components/terminal-pane/keyboard-handlers-ime-enter-keyup.test.tsx
  • src/renderer/src/components/terminal-pane/keyboard-handlers-ime.test.tsx
  • src/renderer/src/components/terminal-pane/pty-connection-hidden-snapshot-resize-signals.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/pty-input-forward.ts
  • src/renderer/src/components/terminal-pane/pty-connection/session-reconcile-dispose.ts
  • src/renderer/src/components/terminal-pane/pty-connection/tui-repaint-resize-reassert.ts
  • src/renderer/src/components/terminal-pane/terminal-clipboard-paste.ts
  • src/renderer/src/components/terminal-pane/terminal-drop-handler.test.ts
  • src/renderer/src/components/terminal-pane/terminal-file-open-routing.ts
  • src/renderer/src/components/terminal-pane/terminal-keyboard-dependencies.ts
  • src/renderer/src/components/terminal-pane/terminal-keyboard-event-handlers.ts
  • src/renderer/src/components/terminal-pane/terminal-keyboard-hook.ts
  • src/renderer/src/components/terminal-pane/terminal-link-remote-runtime-ssh-open.test.ts
  • src/renderer/src/components/terminal-pane/terminal-native-file-drop.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-hook-order-parity.test.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-paste-listeners.ts
  • src/renderer/src/components/terminal-pane/terminal-paste-overlay-target.test.ts
  • src/renderer/src/components/terminal-pane/terminal-paste-overlay-target.ts
  • src/renderer/src/components/terminal-pane/terminal-programmatic-text-paste.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-autocomplete.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-autocomplete.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-clipboard.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-clipboard.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-delivery-wait.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-delivery-wait.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-draft.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-draft.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-dropped-paths.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-dropped-paths.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-editor-submit.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-editor-submit.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-caret.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-caret.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-support.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-support.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-keydown.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-keydown.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-model.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-model.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-native-drop.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-node-removal.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-node-removal.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-path-navigation.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-path-navigation.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-preview-revocation.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit-reconcile.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit-reconcile.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-types.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-chat-state.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-global-effects-file-drop.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-global-effects.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-global-listeners.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-projection.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-rich-input.test.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-pane-rich-input.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-animation.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachment-lifecycle.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.test.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-autocomplete-aria.test.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-autocomplete-aria.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-drop.test.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-drop.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-path-insertion.test.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-path-insertion.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/pane-manager/pane-tui-repaint-request.ts
  • src/renderer/src/web/preload-api/web-clipboard-api.ts
  • src/renderer/src/web/preload-api/web-ui-api.ts
  • src/shared/agent-image-handling.ts
  • src/shared/agent-status-types.ts
  • src/shared/keybindings-terminal-context.test.ts
  • src/shared/keybindings/definitions-core-3.ts
  • src/shared/keybindings/types.ts
  • src/shared/native-chat-slash-commands.test.ts
  • src/shared/native-chat-slash-commands.ts
  • src/shared/well-known-agent-types.ts
🚧 Files skipped from review as they are similar to previous changes (95)
  • src/renderer/src/components/terminal-pane/terminal-paste-overlay-target.ts
  • src/shared/agent-image-handling.ts
  • src/renderer/src/components/editor/rich-markdown-paste-image.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputSendButton.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputChipRemoveButton.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.test.ts
  • src/shared/keybindings-terminal-context.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-path-insertion.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-autocomplete-aria.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-autocomplete.test.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputSlashMenu.test.tsx
  • src/renderer/src/components/terminal-pane/terminal-rich-input-node-removal.test.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputAttachmentPending.tsx
  • src/renderer/src/components/terminal-pane/terminal-rich-input-dropped-paths.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-native-drop.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-preview-revocation.ts
  • src/preload/api/ui-window-api.ts
  • src/renderer/src/assets/terminal.css
  • src/shared/native-chat-slash-commands.test.ts
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/components/terminal-pane/terminal-rich-input-model.test.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMenu.tsx
  • src/renderer/src/components/terminal-pane/terminal-rich-input-editor-submit.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit.test.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputSlashMenu.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMenu.test.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-animation.ts
  • src/renderer/src/components/terminal-pane/TerminalPaneRichInputToggle.tsx
  • src/shared/native-chat-slash-commands.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-caret.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-drop.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-support.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-clipboard.test.ts
  • src/main/ssh/sftp-upload.ts
  • src/renderer/src/components/terminal-pane/terminal-drop-handler.test.ts
  • src/renderer/src/components/terminal-pane/RichInputPlaceholder.tsx
  • src/renderer/src/components/terminal-pane/terminal-clipboard-paste.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-draft.test.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputSendButton.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-path-insertion.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneHeaderOverlay.tsx
  • src/renderer/src/components/terminal-pane/terminal-rich-input-editor-submit.ts
  • src/main/window/clipboard-ipc-handlers.test.ts
  • src/renderer/src/components/terminal-pane/terminal-link-remote-runtime-ssh-open.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-caret.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-types.ts
  • src/renderer/src/components/terminal-pane/expand-collapse-render-stability.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachment-lifecycle.ts
  • src/main/providers/ssh-filesystem-base64-writer.test.ts
  • src/main/ssh/ssh-relay-session.test.ts
  • src/renderer/src/i18n/locales/en.json
  • src/main/providers/ssh-filesystem-file-upload.ts
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMention.tsx
  • src/renderer/src/components/terminal-pane/terminal-rich-input-keydown.ts
  • src/renderer/src/components/native-chat/native-chat-image-paste.ts
  • src/renderer/src/components/native-chat/native-chat-leaf-routing.test.ts
  • src/main/providers/ssh-filesystem-base64-writer.ts
  • src/main/ssh/ssh-relay-session.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInput.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.ts
  • src/renderer/src/lib/pane-manager/pane-tui-repaint-request.ts
  • src/main/providers/filesystem-provider-contract.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-path-navigation.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-path-navigation.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputFileMention.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalRichInputImageAttachment.test.tsx
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit-reconcile.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-clipboard.ts
  • src/renderer/src/components/terminal-pane/keyboard-handlers-ime-enter-keyup.test.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-drop.test.tsx
  • src/renderer/src/components/terminal-pane/terminal-rich-input-dropped-paths.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-draft.ts
  • src/renderer/src/components/terminal-pane/terminal-programmatic-text-paste.ts
  • src/main/window/clipboard-ipc-handlers.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-global-effects-file-drop.test.ts
  • src/renderer/src/components/terminal-pane/keyboard-handlers-ime-composing-chord.test.tsx
  • src/renderer/src/components/terminal-pane/terminal-rich-input-submit-reconcile.test.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-image-support.test.ts
  • src/main/window/clipboard-save-image-authorization-ipc.test.ts
  • src/renderer/src/components/terminal-pane/terminal-native-file-drop.ts
  • src/main/providers/ssh-filesystem-provider.ts
  • src/renderer/src/components/terminal-pane/terminal-rich-input-node-removal.ts
  • src/renderer/src/components/terminal-pane/TerminalRichInputImageAttachment.tsx
  • src/main/ssh/ssh-connection.ts
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/components/terminal-pane/use-terminal-rich-input-autocomplete-aria.test.tsx
  • src/renderer/src/components/terminal-pane/terminal-rich-input-keydown.test.ts
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/components/terminal-pane/terminal-file-open-routing.ts
  • src/renderer/src/components/native-chat/use-native-chat-composer-paste.ts
  • src/renderer/src/components/terminal-pane/pty-connection-hidden-snapshot-resize-signals.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@mmarabel

Copy link
Copy Markdown
Contributor Author

Closing as superseded.

This PR rebuilt the terminal rich-input composer as one 134-file change. Since then the composer shipped natively in Orca: the Native Chat view now has the composer, draft persistence, @file references, image attachments, per-agent slash commands, delivery confirmation (an outbox unconfirmed state plus per-agent paste-readiness signals), and the per-pane toggle. Rebuilding this PR on top of that would be a rewrite rather than a rebase.

The one part of it that had not landed was the per-agent attachment form — which is the bug this PR was still carrying: Native Chat bracket-pasted a raw image path for every agent, and agents without a verified image-paste gesture (omp, which wraps Pi's TUI) received a naked path the model reads as prose.

That residual is now split into reviewable pieces:

Closing this in favour of that stack. The review work here was not wasted: the delivery-confirmation design and the per-agent submission behaviour the reviewers pushed on are what the replacement implements.

@mmarabel mmarabel closed this Sep 12, 2026
mmarabel and others added 2 commits September 12, 2026 19:14
Address PR stablyai#12932 review feedback by checking live mobile ownership through chunked pastes, deferred writes, attachment stages and final submission.
@mmarabel mmarabel reopened this Sep 12, 2026
@mmarabel
mmarabel force-pushed the feat/terminal-rich-input-refresh branch from 19918e4 to 5295a40 Compare September 12, 2026 17:15
@mmarabel

Copy link
Copy Markdown
Contributor Author

Reopened — my closure rationale was wrong, and it's worth correcting on the record.

I closed this as "superseded by Native Chat" on the assumption that the composer had shipped there. It hadn't. Native Chat is a different surface with a narrower scope: it is a separate view swapped in for the terminal (showChat / showTerminal), gated behind Settings → Experimental, and offered only for the agents isNativeChatSupportedAgent accepts — claude, openclaude, codex, grok, omp. Its own availability comment says plain shells and unsupported agents "never qualify".

This PR is an inline composer inside the pane, for any terminal pane: plain shells included (with target-shell-aware escaping), plus six agents with agent-appropriate image submission.

None of this PR's files exist on main — TerminalRichInput*, src/shared/agent-image-handling.ts, the delivery-wait module, the rich-clipboard trust marker. My close comment also claimed the "delivery-confirmation design and the per-agent submission behaviour the reviewers pushed on are what the replacement implements"; that was wrong too. Native Chat's outbox unconfirmed state is a different mechanism, and its per-agent attachment form covers fewer agents than this PR does.

Rebased onto current main (403b62a8d8) and pushed — conflict resolutions and verification are in the new "Rebase 2026-09-12" section below. No unresolved thread or merge blocker from the earlier review is affected by the rebase.

zhigang1992 pushed a commit to zhigang1992/orca that referenced this pull request Sep 13, 2026
Address PR stablyai#12932 review feedback by checking live mobile ownership through chunked pastes, deferred writes, attachment stages and final submission.
@mcxinyu

mcxinyu commented Sep 14, 2026

Copy link
Copy Markdown

Reopened — my closure rationale was wrong, and it's worth correcting on the record.

I was busy with other things when I saw you closed this RP over the weekend, and you can't imagine how disappointed I was about this action.

@mmarabel

Copy link
Copy Markdown
Contributor Author

Hey @mcxinyu I accidentally closed this when doing a declutter pass, I have since reopened as I also would have a lot of benefits from this feature!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants