Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 211821d and 2b0d218b88c6d5c206df0b467a0d8df10d095e25. 📒 Files selected for processing (28)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe change adds shared agent-specific image formatting, including OMP Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to Image pastes retain a safe portable representation when no agent is available, with no concrete merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 16.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 25 functions across 27 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Format desktop and mobile image uploads for the target agent, separating each OMP file mention from adjacent attachments and following text. Allow OMP clipboard chips, preserve native attachment paths for verified agents, and encode otherwise unquotable absolute paths as file URLs. Closes #20389 Co-authored-by: mmarabel <[email protected]>
2b0d218 to
01195e0
Compare
|
Stacking note: this PR now targets |
There was a problem hiding this comment.
Important
Mobile image paste can resolve the wrong agent: use-mobile-session-attachments.ts derives it inline and skips the 'unknown' filter and launchAgent fallback used elsewhere, so a Claude terminal can send @path (a file mention) instead of the raw path its TUI needs for an attachment.
Reviewed changes
- Shared agent image policy — new
src/shared/agent-image-paste.tscentralizesgetAgentImageHandling,formatNativeChatFileReference, and the newformatAgentImagePath/agentImagePasteWrites. OMP, which is not an attachment agent, now renders as a@pathmention (a file URL when the path has whitespace/@and both quote kinds). - Desktop composer — the
acceptsImagesgate and the unsupported-agent notice were removed, so every agent accepts clipboard images; native chat delivers references throughagentImagePasteWrites. - Mobile — clipboard, picker, and native-chat image sends thread the active tab's agent through the same formatter.
file-uri-path— a POSIX path beginning with/no longer has its backslashes rewritten.- Tests — shared formatter round-trip, mobile terminal/native-chat payloads, desktop OMP send order, and a hidden-Electron clipboard E2E.
ℹ️ Nitpicks
components.native-chat.composer.imageUnsupportedis added toen-runtime-required.json:2666while the only code reference to it is deleted in this PR, leaving a shipped English key that can never render. Either keep the notice or drop the catalog entry.UseNativeChatComposerPasteArgsstill declaresagent: AgentType, but the hook no longer reads it — the type now promises per-agent behavior it does not have.formatNativeChatFileReferencenow single-quotes paths containing a"(and quotes paths containing@), and it is shared with desktop non-image file drops for every agent, not just OMP. Worth confirming the other agents' mention parsers accept@'…'before relying on that branch.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| const agent = | ||
| activeSessionTab && 'agentStatus' in activeSessionTab | ||
| ? (activeSessionTab.agentStatus?.agentType ?? nativeChatController.nativeChatAgent) | ||
| : nativeChatController.nativeChatAgent |
There was a problem hiding this comment.
This derivation drops the 'unknown' filter and the launchAgent fallback that resolveMobileTerminalTabOwnedAgentId already implements. Before the first hook status (or on an unknown report) agentStatus?.agentType is empty and nativeChatAgent is null for a terminal tab in terminal view, so formatAgentImagePath falls through to formatNativeChatFileReference and the paste becomes @path — a file mention Claude's TUI reads as text (native-chat-send.ts:43), not the raw path that creates an image attachment. Mobile terminal paste always sent the raw path before this PR, so this is a regression in that window.
Technical details
# Mobile terminal image paste resolves the agent without the canonical resolver
## Affected sites
- `mobile/src/session/use-mobile-session-attachments.ts:42-45` — inline `agent` derivation.
- `mobile/src/session/use-mobile-terminal-paste.ts:139` — `buildMobileImagePastePayload(imagePath, agent)` now depends on that value.
- `mobile/src/session/mobile-terminal-tab-agent.ts:25-36` — `resolveMobileTerminalTabOwnedAgentId` already trims, drops `'unknown'`, and falls back to `launchAgent`.
## Required outcome
- A mobile terminal running an attachment agent (Claude/Codex/…) must send the raw path whenever its agent is known, including from the `launchAgent` hint before the first live status and when the live status reads `unknown`.
- Non-attachment agents (OMP and custom) keep receiving `@path` references.
## Suggested approach (optional)
- Use `resolveMobileTerminalTabOwnedAgentId(activeSessionTab)` for terminal tabs, falling back to `nativeChatController.nativeChatAgent` only when it returns null (the structured `agent-session` case, where terminal paste does not run anyway).There was a problem hiding this comment.
ℹ️ The head was force-pushed and the base retargeted since the last review; the diff against the new base is byte-identical, so the prior review's finding still stands. One scope note below.
Reviewed changes
- No PR-authored code delta — the branch was rebased (all three commit SHAs changed:
a229f10ad2,cd555ad136,01195e0f1d) and the base moved frommaintonwparker/omp-resume-test-contracts.diffPathagainst the new base is byte-identical to the previous review's, so nothing new was reviewed; theuse-mobile-session-attachments.tsagent-derivation finding from the prior review is unchanged.
ℹ️ PR base now targets a feature branch
Both pullfrog_checkout_pr and the REST API report the base as nwparker/omp-resume-test-contracts rather than main. The diff against that branch is byte-identical to the diff against main, so the retarget did not change any of this PR's files — but as configured, merging lands these 28 files on nwparker/omp-resume-test-contracts, not main.
Technical details
# Base retargeted to a feature branch
## Affected sites
- PR #21651 base ref — now `nwparker/omp-resume-test-contracts` (was `main` when this run started).
- `diffPath` vs the new base is byte-identical to the `main` diff (28 files), so no code changed.
## Required outcome
- Confirm the stack target is intentional; if not, retarget the PR back to `main`.
## Open questions for the human (optional)
- Is `nwparker/omp-resume-test-contracts` intended to reach `main` before or with this PR?DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
The stacked image PR run 35436107770 completed with all image-specific/E2E, typecheck, static analysis, packaging, mobile bundle, and runtime checks passing. Two generic test failures remain outside this diff: the pre-existing pane-title scan-budget assertion and (, expected 0 errors but received 2). I am not treating either as evidence against the image implementation. |
|
The stacked image PR run 35436107770 completed with all image-specific/E2E, typecheck, static analysis, packaging, mobile bundle, and runtime checks passing. Two generic test failures remain outside this diff: the pre-existing pane-title scan-budget assertion and browser-route-webrtc-egress.electron.test.ts (no result, expected 0 errors but received 2). I am not treating either as evidence against the image implementation. |

ELI5
When you paste an image into OMP chat, Orca now sends it as an image attachment that OMP understands. It keeps ordinary text paste unchanged and uses a safe file URL when an agent cannot consume a native attachment.
What changed
main.Proof
tests/e2e/omp-image-clipboard.spec.ts— 1 passed. It injected a real image clipboard event into the OMP composer, asserted the rendered image chip, and captured the screenshot below.pnpm tc:node— passed.pnpm --dir mobile typecheck— passed.pnpm --dir mobile typecheck:tests— passed.pnpm run check:code-quality:changed— 0 new findings across 27 changed files.Visual proof
Readiness checklist
/Users/nwparker/projects/oh-my-piwas read-only.Closes #20389.
Supersedes the stale #20608 head, which was based on an older
main.