Repository navigation
Conversation
|
Too many files changed for review (134 files, 100 file limit). Bypass the limit by tagging |
|
Important Review skippedWe 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 You can disable this status message by setting the Use the checkbox below for a quick retry:
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis 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 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)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation 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 |
There was a problem hiding this comment.
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 winAdd a
'windows'target-shell case for inline image text.The escaping assertions cover only
'posix'.terminalRichInputInlineImageTextaccepts 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 winAssert 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.terminalPasteIsOwnedByOverlaythen matches throughclosest()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 winRemove the duplicated tree-mapping body.
mapContentandmapContentNodeshare an identical child-mapping body. The only difference is the null result:mapContentsubstitutes an empty document, andmapContentNodepropagatesnull. Delegate tomapContentNodeand 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 winAdd coverage for image-only retention and bounded eviction.
writeTerminalRichInputDraftkeeps an entry when the text is empty but the content holds an image attachment, and it evicts the least recently used entry aboveMAX_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 valueMove the ref assignment out of the render body.
Line 83 writes
syncAttachmentsRef.currentduring 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 thesyncEditorAttachmentsidentity 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
useEffectto 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 valueClear the pending timer and animation frame on unmount.
pendingTimerand therequestAnimationFrame(focusEditor)call at Line 108 survive unmount. Thefinallyblock clears the timer only when the save settles, and it then callssetAttachmentBusyandsetAttachmentPendingon 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 valueBlob preview URLs are never revoked when the hook unmounts.
syncAttachmentPreviewUrlsrevokes 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 winAn unstable
syncAttachmentsidentity forces a render-phase ref write downstream.useTerminalRichInputAttachmentsreturnssyncAttachmentsas 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 thesyncAttachmentsbody inuseCallbackwith[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, dropsyncAttachmentsRefand callattachmentState.syncAttachmentsdirectly insidesyncEditorAttachmentswith[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 valueDerive the shifted position from the shared constant.
Line 220 hardcodes
7, which is5 + 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
📒 Files selected for processing (105)
src/main/providers/filesystem-provider-contract.tssrc/main/providers/ssh-filesystem-base64-writer.test.tssrc/main/providers/ssh-filesystem-base64-writer.tssrc/main/providers/ssh-filesystem-file-upload.tssrc/main/providers/ssh-filesystem-provider.tssrc/main/ssh/sftp-upload.tssrc/main/ssh/ssh-connection.tssrc/main/ssh/ssh-relay-session.test.tssrc/main/ssh/ssh-relay-session.tssrc/main/ssh/ssh-system-fallback.test.tssrc/main/ssh/system-ssh-file-binary-transfer.tssrc/main/window/clipboard-image-temp-file.tssrc/main/window/clipboard-ipc-handlers.test.tssrc/main/window/clipboard-ipc-handlers.tssrc/main/window/clipboard-save-image-authorization-ipc.test.tssrc/preload/api-types.tssrc/preload/index.tssrc/renderer/src/assets/terminal.csssrc/renderer/src/components/native-chat/native-chat-image-paste.tssrc/renderer/src/components/native-chat/native-chat-leaf-routing.test.tssrc/renderer/src/components/native-chat/use-native-chat-composer-paste.tssrc/renderer/src/components/terminal-pane/RichInputPlaceholder.tsxsrc/renderer/src/components/terminal-pane/TerminalPane.tsxsrc/renderer/src/components/terminal-pane/TerminalPaneHeaderOverlay.tsxsrc/renderer/src/components/terminal-pane/TerminalPaneRichInputToggle.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInput.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputAttachmentPending.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputChipRemoveButton.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputFileMention.test.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputFileMention.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputFileMenu.test.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputFileMenu.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputImageAttachment.test.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputImageAttachment.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputSendButton.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputSlashMenu.test.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputSlashMenu.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputStatus.tsxsrc/renderer/src/components/terminal-pane/expand-collapse-render-stability.test.tssrc/renderer/src/components/terminal-pane/keyboard-handlers-ime-enter-keyup.test.tsxsrc/renderer/src/components/terminal-pane/keyboard-handlers-ime.test.tsxsrc/renderer/src/components/terminal-pane/keyboard-handlers.tssrc/renderer/src/components/terminal-pane/pty-connection.test.tssrc/renderer/src/components/terminal-pane/pty-connection.tssrc/renderer/src/components/terminal-pane/terminal-clipboard-paste.tssrc/renderer/src/components/terminal-pane/terminal-drop-handler.test.tssrc/renderer/src/components/terminal-pane/terminal-file-open-routing.tssrc/renderer/src/components/terminal-pane/terminal-link-handlers.test.tssrc/renderer/src/components/terminal-pane/terminal-native-file-drop.tssrc/renderer/src/components/terminal-pane/terminal-paste-overlay-target.test.tssrc/renderer/src/components/terminal-pane/terminal-paste-overlay-target.tssrc/renderer/src/components/terminal-pane/terminal-programmatic-text-paste.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-autocomplete.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-autocomplete.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-clipboard.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-clipboard.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-draft.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-draft.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-dropped-paths.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-dropped-paths.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-editor-submit.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-editor-submit.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-image-caret.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-image-caret.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-image-support.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-image-support.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-keydown.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-keydown.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-model.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-model.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-native-drop.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-node-removal.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-node-removal.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-path-navigation.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-path-navigation.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-submit-reconcile.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-submit-reconcile.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-submit.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-submit.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-types.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-global-effects.test.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-global-effects.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-animation.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.test.tsxsrc/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-autocomplete-aria.test.tsxsrc/renderer/src/components/terminal-pane/use-terminal-rich-input-autocomplete-aria.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-drop.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.test.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-path-insertion.test.tsxsrc/renderer/src/components/terminal-pane/use-terminal-rich-input-path-insertion.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/pane-manager/pane-tui-repaint-request.tssrc/renderer/src/web/web-preload-api.tssrc/shared/agent-image-handling.tssrc/shared/agent-status-types.tssrc/shared/keybindings.test.tssrc/shared/keybindings.tssrc/shared/native-chat-slash-commands.test.tssrc/shared/native-chat-slash-commands.ts
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.
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. |
|
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. |
|
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. |
|
Rebased the branch onto current The seven GitHub conflict files came from two sources:
Also repaired auto-merge leftovers that typecheck caught: native-chat overlay paste/copy routing now uses Local check: |
There was a problem hiding this comment.
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
📒 Files selected for processing (112)
src/main/providers/filesystem-provider-contract.tssrc/main/providers/ssh-filesystem-base64-writer.test.tssrc/main/providers/ssh-filesystem-base64-writer.tssrc/main/providers/ssh-filesystem-file-upload.tssrc/main/providers/ssh-filesystem-provider.tssrc/main/ssh/sftp-upload.tssrc/main/ssh/ssh-connection.tssrc/main/ssh/ssh-relay-session.test.tssrc/main/ssh/ssh-relay-session.tssrc/main/ssh/ssh-system-fallback.test.tssrc/main/ssh/system-ssh-file-binary-transfer.tssrc/main/window/clipboard-image-temp-file.test.tssrc/main/window/clipboard-image-temp-file.tssrc/main/window/clipboard-ipc-handlers.test.tssrc/main/window/clipboard-ipc-handlers.tssrc/main/window/clipboard-save-image-authorization-ipc.test.tssrc/preload/api/ui-window-api.tssrc/preload/index.tssrc/renderer/src/assets/terminal.csssrc/renderer/src/components/editor/rich-markdown-paste-image.tssrc/renderer/src/components/native-chat/native-chat-image-paste.tssrc/renderer/src/components/native-chat/native-chat-leaf-routing.test.tssrc/renderer/src/components/native-chat/use-native-chat-composer-paste.tssrc/renderer/src/components/terminal-pane/RichInputPlaceholder.tsxsrc/renderer/src/components/terminal-pane/TerminalPane.tsxsrc/renderer/src/components/terminal-pane/TerminalPaneHeaderOverlay.tsxsrc/renderer/src/components/terminal-pane/TerminalPaneRichInputToggle.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInput.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputAttachmentPending.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputChipRemoveButton.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputFileMention.test.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputFileMention.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputFileMenu.test.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputFileMenu.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputImageAttachment.test.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputImageAttachment.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputSendButton.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputSlashMenu.test.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputSlashMenu.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputStatus.test.tssrc/renderer/src/components/terminal-pane/TerminalRichInputStatus.tsxsrc/renderer/src/components/terminal-pane/expand-collapse-render-stability.test.tssrc/renderer/src/components/terminal-pane/keyboard-handlers-ime-composing-chord.test.tsxsrc/renderer/src/components/terminal-pane/keyboard-handlers-ime-enter-keyup.test.tsxsrc/renderer/src/components/terminal-pane/keyboard-handlers-ime.test.tsxsrc/renderer/src/components/terminal-pane/keyboard-handlers.tssrc/renderer/src/components/terminal-pane/pty-connection-hidden-snapshot-resize-signals.test.tssrc/renderer/src/components/terminal-pane/pty-connection.tssrc/renderer/src/components/terminal-pane/terminal-clipboard-paste.tssrc/renderer/src/components/terminal-pane/terminal-drop-handler.test.tssrc/renderer/src/components/terminal-pane/terminal-file-open-routing.tssrc/renderer/src/components/terminal-pane/terminal-link-remote-runtime-ssh-open.test.tssrc/renderer/src/components/terminal-pane/terminal-native-file-drop.tssrc/renderer/src/components/terminal-pane/terminal-paste-overlay-target.test.tssrc/renderer/src/components/terminal-pane/terminal-paste-overlay-target.tssrc/renderer/src/components/terminal-pane/terminal-programmatic-text-paste.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-autocomplete.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-autocomplete.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-clipboard.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-clipboard.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-draft.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-draft.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-dropped-paths.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-dropped-paths.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-editor-submit.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-editor-submit.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-image-caret.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-image-caret.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-image-support.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-image-support.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-keydown.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-keydown.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-model.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-model.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-native-drop.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-node-removal.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-node-removal.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-path-navigation.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-path-navigation.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-preview-revocation.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-submit-reconcile.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-submit-reconcile.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-submit.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-submit.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-types.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-global-effects-file-drop.test.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-global-effects.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-animation.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-attachment-lifecycle.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.test.tsxsrc/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-autocomplete-aria.test.tsxsrc/renderer/src/components/terminal-pane/use-terminal-rich-input-autocomplete-aria.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-drop.test.tsxsrc/renderer/src/components/terminal-pane/use-terminal-rich-input-drop.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.test.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-path-insertion.test.tsxsrc/renderer/src/components/terminal-pane/use-terminal-rich-input-path-insertion.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/pane-manager/pane-tui-repaint-request.tssrc/renderer/src/web/web-preload-api.tssrc/shared/agent-image-handling.tssrc/shared/agent-status-types.tssrc/shared/keybindings-terminal-context.test.tssrc/shared/keybindings.tssrc/shared/native-chat-slash-commands.test.tssrc/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
|
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. |
|
@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 |
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 |
3fa55ab to
544734b
Compare
|
@coderabbitai review |
|
|
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. |
There was a problem hiding this comment.
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.tssrc/main/providers/ssh-filesystem-base64-writer.test.tssrc/main/providers/ssh-filesystem-base64-writer.tssrc/main/providers/ssh-filesystem-file-upload.tssrc/main/providers/ssh-filesystem-provider.tssrc/main/ssh/sftp-upload.tssrc/main/ssh/ssh-connection.tssrc/main/ssh/ssh-relay-session.test.tssrc/main/ssh/ssh-relay-session.tssrc/main/ssh/ssh-system-fallback.test.tssrc/main/ssh/system-ssh-file-binary-transfer.tssrc/main/ssh/system-ssh-windows-file-write.tssrc/main/ssh/system-ssh-windows-private-write.test.tssrc/main/ssh/system-ssh-windows-write-strategy.tssrc/main/window/clipboard-image-temp-file.test.tssrc/main/window/clipboard-image-temp-file.tssrc/main/window/clipboard-ipc-handlers.test.tssrc/main/window/clipboard-ipc-handlers.tssrc/main/window/clipboard-save-image-authorization-ipc.test.tssrc/preload/api/ui-bridge-clipboard-and-window-controls.tssrc/preload/api/ui-window-api.tssrc/renderer/src/assets/terminal.csssrc/renderer/src/components/editor/rich-markdown-paste-image.tssrc/renderer/src/components/native-chat/native-chat-image-paste.tssrc/renderer/src/components/native-chat/native-chat-leaf-routing.test.tssrc/renderer/src/components/native-chat/use-native-chat-composer-paste.tssrc/renderer/src/components/terminal-pane/RichInputPlaceholder.tsxsrc/renderer/src/components/terminal-pane/TerminalPaneHeaderOverlay.tsxsrc/renderer/src/components/terminal-pane/TerminalPaneRichInputPortal.tsxsrc/renderer/src/components/terminal-pane/TerminalPaneRichInputToggle.tsxsrc/renderer/src/components/terminal-pane/TerminalPaneSurface.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInput.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputAttachmentPending.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputChipRemoveButton.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputFileMention.test.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputFileMention.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputFileMenu.test.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputFileMenu.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputImageAttachment.test.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputImageAttachment.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputSendButton.test.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputSendButton.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputSlashMenu.test.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputSlashMenu.tsxsrc/renderer/src/components/terminal-pane/TerminalRichInputStatus.test.tssrc/renderer/src/components/terminal-pane/TerminalRichInputStatus.tsxsrc/renderer/src/components/terminal-pane/expand-collapse-render-stability.test.tssrc/renderer/src/components/terminal-pane/keyboard-handlers-ime-composing-chord.test.tsxsrc/renderer/src/components/terminal-pane/keyboard-handlers-ime-enter-keyup.test.tsxsrc/renderer/src/components/terminal-pane/keyboard-handlers-ime.test.tsxsrc/renderer/src/components/terminal-pane/pty-connection-hidden-snapshot-resize-signals.test.tssrc/renderer/src/components/terminal-pane/pty-connection/pty-input-forward.tssrc/renderer/src/components/terminal-pane/pty-connection/session-reconcile-dispose.tssrc/renderer/src/components/terminal-pane/pty-connection/tui-repaint-resize-reassert.tssrc/renderer/src/components/terminal-pane/terminal-clipboard-paste.tssrc/renderer/src/components/terminal-pane/terminal-drop-handler.test.tssrc/renderer/src/components/terminal-pane/terminal-file-open-routing.tssrc/renderer/src/components/terminal-pane/terminal-keyboard-dependencies.tssrc/renderer/src/components/terminal-pane/terminal-keyboard-event-handlers.tssrc/renderer/src/components/terminal-pane/terminal-keyboard-hook.tssrc/renderer/src/components/terminal-pane/terminal-link-remote-runtime-ssh-open.test.tssrc/renderer/src/components/terminal-pane/terminal-native-file-drop.tssrc/renderer/src/components/terminal-pane/terminal-pane-hook-order-parity.test.tssrc/renderer/src/components/terminal-pane/terminal-pane-paste-listeners.tssrc/renderer/src/components/terminal-pane/terminal-paste-overlay-target.test.tssrc/renderer/src/components/terminal-pane/terminal-paste-overlay-target.tssrc/renderer/src/components/terminal-pane/terminal-programmatic-text-paste.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-autocomplete.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-autocomplete.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-clipboard.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-clipboard.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-delivery-wait.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-delivery-wait.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-draft.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-draft.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-dropped-paths.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-dropped-paths.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-editor-submit.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-editor-submit.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-image-caret.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-image-caret.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-image-support.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-image-support.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-keydown.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-keydown.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-model.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-model.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-native-drop.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-node-removal.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-node-removal.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-path-navigation.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-path-navigation.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-preview-revocation.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-submit-reconcile.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-submit-reconcile.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-submit.test.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-submit.tssrc/renderer/src/components/terminal-pane/terminal-rich-input-types.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-chat-state.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-global-effects-file-drop.test.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-global-effects.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-global-listeners.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-projection.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-rich-input.test.tsxsrc/renderer/src/components/terminal-pane/use-terminal-pane-rich-input.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-animation.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-attachment-lifecycle.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.test.tsxsrc/renderer/src/components/terminal-pane/use-terminal-rich-input-attachments.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-autocomplete-aria.test.tsxsrc/renderer/src/components/terminal-pane/use-terminal-rich-input-autocomplete-aria.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-drop.test.tsxsrc/renderer/src/components/terminal-pane/use-terminal-rich-input-drop.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.test.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-editor-attachments.tssrc/renderer/src/components/terminal-pane/use-terminal-rich-input-path-insertion.test.tsxsrc/renderer/src/components/terminal-pane/use-terminal-rich-input-path-insertion.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/pane-manager/pane-tui-repaint-request.tssrc/renderer/src/web/preload-api/web-clipboard-api.tssrc/renderer/src/web/preload-api/web-ui-api.tssrc/shared/agent-image-handling.tssrc/shared/agent-status-types.tssrc/shared/keybindings-terminal-context.test.tssrc/shared/keybindings/definitions-core-3.tssrc/shared/keybindings/types.tssrc/shared/native-chat-slash-commands.test.tssrc/shared/native-chat-slash-commands.tssrc/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.
|
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, 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. |
Address PR stablyai#12932 review feedback by checking live mobile ownership through chunked pastes, deferred writes, attachment stages and final submission.
19918e4 to
5295a40
Compare
|
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 ( 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 Rebased onto current |
Address PR stablyai#12932 review feedback by checking live mobile ownership through chunked pastes, deferred writes, attachment stages and final submission.
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. |
|
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! |
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 (
⌘Ion 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
mainand 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,
@filesearch, 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.tsputs 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
⌘ICtrl+Shift+M@pathreferences.@filereferences.Reliability and design decisions
onWriteParsedfor the agent's redraw, settles once that redraw goes quiet, caps a chatty redraw, and times out at 2s reportingdeliveryConfirmed: falseinstead of claiming success. Builds whose xterm lacksonWriteParsedkeep the previous fixed delay.Screenshots
Walkthrough
Orca.terminal-rich-input.walkthrough.and.submission.-.anonymized.mp4
Attachments
Composer
Only these anonymized assets are attached; raw and intermediate captures remain local.
Testing
pnpm lintpnpm typecheckpnpm test— 47,155 tests passed in the full run. Three unchanged root-directory-guard tests fail locally because macOS/bin/bash3.2 does not support the script's associative arrays. The other three transient full-run failures passed when rerun in isolation.pnpm buildFocused validation includes:
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:
Actionable findings were addressed before opening this PR:
0700directories with exclusive0600file creation;FileSecurityACLs;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.
@pathtext instead of a navigable resource chip.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
@filebehavior are covered by unit tests rather than a live session.terminal-rich-input-delivery-wait.ts). An earlier revision of this PR slept a flat 500ms before sending Enter; becausepasteTextIntoTerminalPaneresolves when the transport accepts the write and not when the agent has rendered it, that constant was simultaneously too long for a local pane and too short for a slow remote one, where Enter could land before the agent had the prompt while the submit still reported success.Rebase 2026-08-24
Merged current
main(340 commits). Two conflicts:clipboard-image-temp-file.ts— kept this PR'smkdtemp+ exclusive0600creation on top of main'sgetAppEnvironment()accessor.pty-connection.ts— main split the file intopty-connection/*and left a re-export barrel. This PR's TUI repaint-request listener moved onto the session bag: handler inpty-connection/tui-repaint-resize-reassert.ts, installed frompty-input-forward.ts, torn down insession-reconcile-dispose.ts.Two
max-linesgates 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—mainsits at exactly the 300-line limit, so this PR's single| 'kimi'union member trips it.WellKnownAgentType/AgentTypemoved tosrc/shared/well-known-agent-types.tsand 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.
submittedsubmitteddeliveryConfirmed: falseonWriteParsedTerminalRichInputSubmitResult'ssubmittedvariant now carriesdeliveryConfirmed. Existing callers testresult.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.
TerminalRichInputSendErroris renamedTerminalRichInputSendNoticeso the type stops calling a caution an error, and the message selection moves into a pureterminalRichInputStatusTexthelper alongside the existingterminalRichInputNewlineShortcut, so the wording is testable without a render harness.Localization:
sync:localization-catalogaddssendUnconfirmedtoen.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.tsdrive 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 inTerminalRichInputStatus.test.tspinning that the unconfirmed and failed wordings stay distinct.pnpm lint,pnpm typecheck, andpnpm test(57,650 passed, 0 failed) pass on this branch.Rebase 2026-09-05
Rebased the final reviewed feature onto
mainataf82126058, consolidating the feature commits and previous merge-resolution changes into544734bc37. 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:
Validation on Linux / Node 24: full
pnpm lint,pnpm tc, andpnpm buildpassed; 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
mainat403b62a8d8(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'swell-known-agent-types.tsextraction. Upstream now derivesWellKnownAgentTypefromTuiAgent, which is a better single source of truth than the hardcoded union the extraction carried, andkimiis already inTuiAgentupstream. The extraction existed only to free lines for the max-lines gate, and nothing else imported it.clipboard-ipc-handlers.ts— kept upstream's#17679routing (a runtime owner always performs the save, withconnectionIdpassed through) and layered this branch'sincludeLocalPreviewbehaviour on top. This branch's previous condition would have re-broken#17679for theruntimeEnvironmentId && connectionIdcase.use-terminal-pane-chat-state.ts— kept the rich-input hook, dropped thechatPaneDispatchStatussubscription 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 8useMemo, hashe12c8105078da9c200887e7311e87c63fe738e28128eb8863beaeb2c22a34005.One gate change:
react-doctor(no-adjust-state-on-prop-change)now fires twice onTerminalRichInput.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 toSUPPRESSED_REACT_DOCTOR_DIAGNOSTICSinconfig/scripts/check-changed-code-quality.mjswith a rationale, following that list's existing convention. A source-leveloxlint-disableis 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:cliclean; 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.