Skip to content

feat(mobile): show compact chat attachments with a swipeable image viewer - #29642

Closed
niconicohu wants to merge 40 commits into
stablyai:mainfrom
niconicohu:codex/mobile-message-attachments
Closed

niconicohu wants to merge 40 commits into
stablyai:mainfrom
niconicohu:codex/mobile-message-attachments

Conversation

@niconicohu

@niconicohu niconicohu commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Phone chats show compact attachment previews. Tap an image to browse the gallery and zoom; tap a file to open its read-only preview on the conversation's host.

What Changed

User images and files are separated from message text and shown as compact previews, with the third image displaying the remaining count. Assistant image references use the same conversation gallery. The overlay stays with the conversation when a streaming row is replaced.

Stored user uploads retain their existing attachment authorization; assistant resources use the owning host's conversation grant. Late results from a different host or conversation are discarded. External web images remain behind a tap, code stays literal, and unsupported destinations do not enter the gallery. Existing full-message/item readers, reading anchors and tool disclosure remain available.

This head adopts main 220d56f4e4c1 through a clean normal merge. The only manual change maps the attachment-grant test's filesystem authorization mock to the existing relocated module. Attachment/gallery rendering, safe-area fixtures, resource context, prompt-card completion wrappers and the shortened-message regression are retained. No production logic or test assertion was manually changed.

Why

Reuse scoped host readers, existing grants, gesture components and the conversation overlay instead of opening arbitrary paths or adding another viewer. Extending the existing parser keeps Markdown and attachment extraction consistent.

Linked Issue

Fixes #29632

Visual Proof

Earlier actual mobile-web captures with controlled images are historical evidence; this source merge has no fresh rendered UI run.

Before After
Before After

Later assistant-image captures remain local; the previous upload returned HTTP 404, so they are not presented as attached.

Testing

  • Automated regressions retained and run.
  • Full required PR workflow passed for this exact commit.

This head normally merges upstream 220d56f4e4c192b3b37de870a7996e449eaa39f7. Main relocated filesystem-auth under ipc/filesystem; the sole manual edit updates the existing attachment-grant test's vi.mock target accordingly. Its two tests already passed before this edit, so this is a stale-mock compatibility correction, not a reproduced runtime regression. No production logic, assertion, timeout, rule, exclusion or baseline was manually changed.

Fresh validation on the committed tree: all four root typechecks; mobile application/test typechecks and lint; shared-dependency and test-runner checks; attachment/provenance/grant/RPC tests (32 passed in 4 inventoried files). Full mobile tests: 11,368 passed, 6 skipped and zero failed across 1,120 file results. Actual frozen root/mobile installs and normal commit hooks passed. Tested tree 608fdff4ddd3b41e3aab8ecb6efc81c069ed4cfa exactly matches the commit tree. Counts overlap.

Required pnpm check:changed --base=220d56f4e4c192b3b37de870a7996e449eaa39f7 --maxWorkers=2 ran on the committed 67-file PR diff: 26 of 27 checks passed, including the selected unit-test check. The flaky-test ratchet still failed with ENOBUFS because that subcheck independently diffs the fork's ancient origin/main. The complete local gate therefore remains failed. No gate or baseline was changed, and the exact-head required GitHub workflow remains necessary before readiness.

All tests used background launch. No fresh rendered Electron, physical-phone, Windows-machine or live-SSH validation was performed; installed delivery, profiles and services remain unchanged.

AI Disclosure

Implemented and verified with OpenAI Codex.

Review

Please check host/session ownership, user versus assistant authorization, literal Markdown references and conversation-scoped gallery lifetime. Exact-head bot review and the full required PR workflow remain separate from local validation.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer source was copied.

Checklist

  • Before/after behavior, mechanism and approach explained.
  • Cross-platform, folder workspace, SSH and older-peer behavior considered.
  • Existing assertions, exclusions, baselines and limits preserved.
  • Full required PR workflow passed for this exact commit.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8a74f430-f6f9-44c9-9521-e03f864ac9d1
Commits

Reviewing files that changed from the base of the PR and between eeb07ce and 5bd23f0.

Files selected for processing: 1
  • src/main/runtime/orca-runtime-files-user-attachment-grants.test.ts

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

Walkthrough

Mobile chat now extracts file references from prose and renders image and file galleries. It reads images through attachment or resource sources and provides a paged viewer with pinch zoom and panning. Shared zoomable previews are used for file and session images. Native-chat file handling adds provenance and path checks, and transcript conversion selects eligible attachment paths. Prompt cards add structured and terminal answer handling. The address bar changes its ArrowUp preview check.

Priority: Normal

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 5bd23

The attachment-grant tests add coverage without an identified defect, and the previously reported image-paging concern is not supported by the current code. Normal validation remains appropriate before merging.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Out of Scope Changes check Warning The whole-PR change summary includes an unrelated ArrowUp behavior change in src/renderer/src/components/browser-pane/assemble-chrome/BrowserAddressBar.tsx. It also includes prompt-card routing chan… Remove the BrowserAddressBar.tsx change and the prompt-card routing changes from this pull request, or move them to separate pull requests. Keep the attachment, gallery, viewer, file-preview, authorization, Markdown, RPC-routing, and rela…
Docstring Coverage Warning Docstring coverage is 15.91% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 44 functions across 65 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title is concise, specific, and accurately summarizes the main mobile attachment and image viewer changes.
Description check Passed The description covers the required sections, user-facing behavior, rationale, linked issue, visual proof, testing, AI disclosure, review notes, and checklist. It also clearly documents incomplete exa…
Linked Issues check Passed [#29632] coding requirements are met. The PR separates stored user images and files from message prose, renders compact previews with up to three image tiles and a remaining-count indicator, and opens…
Full details: Description check

Explanation

The description covers the required sections, user-facing behavior, rationale, linked issue, visual proof, testing, AI disclosure, review notes, and checklist. It also clearly documents incomplete exact-head workflow and device validation.

Full details: Linked Issues check

Explanation

[#29632] coding requirements are met. The PR separates stored user images and files from message prose, renders compact previews with up to three image tiles and a remaining-count indicator, and opens all images in a swipeable viewer. It routes stored attachment and assistant-resource reads through host-scoped sources and preserves literal Markdown and existing readers. The summary reports focused tests for extraction, host routing, authorization, stale results, gallery paging, and file previews.

Full details: Out of Scope Changes check

Explanation

The whole-PR change summary includes an unrelated ArrowUp behavior change in src/renderer/src/components/browser-pane/assemble-chrome/BrowserAddressBar.tsx. It also includes prompt-card routing changes in use-mobile-native-chat-prompt-cards.ts, use-mobile-native-chat-controller.ts, and related tests. These changes do not implement compact chat attachments, file previews, or the image gallery for [#29632]. The current description does not establish a connection to that issue.

Resolution

Remove the BrowserAddressBar.tsx change and the prompt-card routing changes from this pull request, or move them to separate pull requests. Keep the attachment, gallery, viewer, file-preview, authorization, Markdown, RPC-routing, and related regression-test changes.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

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: 2


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2d1655a6-061a-45ce-87c3-31fc539e42be
📥 Commits

Reviewing files that changed from the base of the PR and between dddad7d and 7eb0116.

📒 Files selected for processing: 18
  • mobile/src/session/MobileNativeChatFileAttachments.tsx
  • mobile/src/session/MobileNativeChatImage.tsx
  • mobile/src/session/MobileNativeChatImageGallery.tsx
  • mobile/src/session/MobileNativeChatImageViewer.tsx
  • mobile/src/session/MobileNativeChatMessage.android.test.ts
  • mobile/src/session/MobileNativeChatMessage.attachments.test.tsx
  • mobile/src/session/MobileNativeChatMessage.copy.test.tsx
  • mobile/src/session/MobileNativeChatMessage.subagent-group.test.tsx
  • mobile/src/session/MobileNativeChatMessage.test.ts
  • mobile/src/session/MobileNativeChatMessage.tool-result-availability.test.tsx
  • mobile/src/session/MobileNativeChatMessage.tsx
  • mobile/src/session/MobileNativeChatOverlay.tsx
  • mobile/src/session/mobile-native-chat-attachment-read.ts
  • mobile/src/session/mobile-native-chat-file-attachments.test.ts
  • mobile/src/session/mobile-native-chat-file-attachments.ts
  • mobile/src/session/mobile-native-chat-message-styles.ts
  • mobile/src/session/mobile-native-chat-message-visuals.test.ts
  • mobile/src/session/mobile-native-chat-stopped-before-start.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (3)

🟡 Minor · Gate the attachment read on agent-session.attachments.v1. · MobileNativeChatImage.tsx:49-71

mobile/src/session/MobileNativeChatImage.tsx:49-71
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Gate the attachment read on agent-session.attachments.v1.

MobileNativeChatImage starts readMobileNativeChatAttachment whenever a structured client exists. The reader sends agentSessionAttachment.read without a capability check.

The host contract says older hosts without agent-session.attachments.v1 return method_not_found. The component converts this failure to Image unavailable · Tap to retry. Pass the negotiated capability into this path and skip the RPC when it is absent.

🟡 Minor · Normalize dual-source historical image blocks before… · MobileNativeChatImageGallery.tsx:33-35

mobile/src/session/MobileNativeChatImageGallery.tsx:33-35
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Normalize dual-source historical image blocks before rendering.

imageRefBlock can emit both a direct url and an owning-host path. The gallery selects url, so MobileNativeChatImage treats the value as already renderable and skips readMobileNativeChatAttachment. The gallery can therefore show the URL instead of the stored attachment.

Normalize the historical producer to emit exactly one source, using the owning-host path when both fields are present. Do not change the gallery to path ?? url; the mobile preview projection can add an already-resolved file:/// URL to an existing path.

🟡 Minor · Add a safe opener path for stored file attachments. · MobileNativeChatFileAttachments.tsx:20-33

mobile/src/session/MobileNativeChatFileAttachments.tsx:20-33
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Add a safe opener path for stored file attachments.

onOpenFile(path) reaches openMobileNativeChatFileTap, but stored attachment paths outside the worktree fail the assistant-output provenance check before files.open. The existing attachment reader cannot replace this flow because it returns only image previews.

Add a server-authorized attachment-store resolution path for non-image files. Do not bypass provenance in the tile callback or treat the path-name check alone as authorization.


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: addb63ab-b113-4830-8565-1987a88c6657
📥 Commits

Reviewing files that changed from the base of the PR and between 7eb0116 and bd90ad4.

📒 Files selected for processing: 4
  • mobile/src/session/MobileNativeChatImage.tsx
  • mobile/src/session/MobileNativeChatMessage.attachments.test.tsx
  • mobile/src/session/mobile-native-chat-file-attachments.test.ts
  • mobile/src/session/mobile-native-chat-file-attachments.ts
🚧 Files skipped from review as they are similar to previous changes: 3
  • mobile/src/session/MobileNativeChatImage.tsx
  • mobile/src/session/mobile-native-chat-file-attachments.test.ts
  • mobile/src/session/MobileNativeChatMessage.attachments.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

@niconicohu

Copy link
Copy Markdown
Contributor Author

Addressed the three outside-diff findings in feff5fc:

  • The existing host capability probe now carries agent-session.attachments.v1 to the attachment provider. Hosts that omit it receive no stored-image read RPC.
  • Historical Claude image decoding emits the owning-host path as the single source when a record has both a path and a URL. Resolved mobile preview URLs still take precedence at rendering time.
  • Stored file tiles reuse the read-only file preview grant. The host checks the current tab/session, the exact user-message reference and its actual attachment-store boundary before minting a client-bound grant; symlink escapes are refused. No arbitrary-path authorization or new RPC was added.

Validation on this independent branch: 10,811 mobile tests, 55 focused host tests, application/test/node typechecks, changed-code quality gate, complete mobile-web bundle verification, and a rebuilt Android release APK with verified V2 signature. Live SSH and physical iOS coverage remain unverified.

@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: Advanced
  • Run ID: f2fd2dfe-11ad-4a18-b1ab-8758e0890d03
📥 Commits

Reviewing files that changed from the base of the PR and between bd90ad4 and feff5fc.

📒 Files selected for processing: 16
  • mobile/src/session/MobileNativeChatOverlay.tsx
  • mobile/src/session/mobile-native-chat-merged-snapshot-parity-hooks.test.tsx
  • mobile/src/session/mobile-native-chat-visual-read.test.ts
  • mobile/src/session/mobile-native-chat-visual-read.ts
  • mobile/src/session/mobile-structured-agent-session-host-support.test.ts
  • mobile/src/session/mobile-structured-agent-session-host-support.ts
  • mobile/src/session/use-mobile-structured-agent-session-prompt-cancel.test.tsx
  • mobile/src/session/use-mobile-structured-agent-session-queued.test-fixture.ts
  • mobile/src/session/use-mobile-structured-agent-session.ts
  • mobile/src/session/use-mobile-structured-turn-indicator.test.tsx
  • src/main/native-chat/native-chat-file-provenance.test.ts
  • src/main/native-chat/native-chat-file-provenance.ts
  • src/main/native-chat/transcript-record-blocks.test.ts
  • src/main/native-chat/transcript-record-blocks.ts
  • src/main/runtime/orca-runtime-files-terminal-artifact-grants.test.ts
  • src/main/runtime/terminal/artifacts/terminal-artifacts.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

@niconicohu

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@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: Advanced
  • Run ID: 4cf8b54a-2170-4907-9640-c06290c53b54
📥 Commits

Reviewing files that changed from the base of the PR and between dddad7d and 7e5d1da.

📒 Files selected for processing: 33
  • mobile/src/session/MobileNativeChatFileAttachments.tsx
  • mobile/src/session/MobileNativeChatImage.tsx
  • mobile/src/session/MobileNativeChatImageGallery.tsx
  • mobile/src/session/MobileNativeChatImageViewer.tsx
  • mobile/src/session/MobileNativeChatMessage.android.test.ts
  • mobile/src/session/MobileNativeChatMessage.attachments.test.tsx
  • mobile/src/session/MobileNativeChatMessage.copy.test.tsx
  • mobile/src/session/MobileNativeChatMessage.subagent-group.test.tsx
  • mobile/src/session/MobileNativeChatMessage.test.ts
  • mobile/src/session/MobileNativeChatMessage.tool-result-availability.test.tsx
  • mobile/src/session/MobileNativeChatMessage.tsx
  • mobile/src/session/MobileNativeChatOverlay.tsx
  • mobile/src/session/mobile-native-chat-attachment-read.ts
  • mobile/src/session/mobile-native-chat-file-attachments.test.ts
  • mobile/src/session/mobile-native-chat-file-attachments.ts
  • mobile/src/session/mobile-native-chat-merged-snapshot-parity-hooks.test.tsx
  • mobile/src/session/mobile-native-chat-message-styles.ts
  • mobile/src/session/mobile-native-chat-message-visuals.test.ts
  • mobile/src/session/mobile-native-chat-stopped-before-start.test.tsx
  • mobile/src/session/mobile-native-chat-visual-read.test.ts
  • mobile/src/session/mobile-native-chat-visual-read.ts
  • mobile/src/session/mobile-structured-agent-session-host-support.test.ts
  • mobile/src/session/mobile-structured-agent-session-host-support.ts
  • mobile/src/session/use-mobile-structured-agent-session-prompt-cancel.test.tsx
  • mobile/src/session/use-mobile-structured-agent-session-queued.test-fixture.ts
  • mobile/src/session/use-mobile-structured-agent-session.ts
  • mobile/src/session/use-mobile-structured-turn-indicator.test.tsx
  • src/main/native-chat/native-chat-file-provenance.test.ts
  • src/main/native-chat/native-chat-file-provenance.ts
  • src/main/native-chat/transcript-record-blocks.test.ts
  • src/main/native-chat/transcript-record-blocks.ts
  • src/main/runtime/orca-runtime-files-terminal-artifact-grants.test.ts
  • src/main/runtime/terminal/artifacts/terminal-artifacts.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@niconicohu

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Do not extract references from inline Markdown… · mobile-native-chat-file-attachments.ts:1-42

mobile/src/session/mobile-native-chat-file-attachments.ts:1-42
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not extract references from inline Markdown code.

mobileMarkdownCodeLines protects only fenced and indented code blocks. It does not protect code_inline spans. For example, Review \ @/root/.orca/agent-session-attachments/id/report.pdf `matches the attachment regex because whitespace surrounds the canonical reference. The splitter removes the reference from the code span and returns it infiles. MobileNativeChatMessage` then renders that path as a file tile.

Make splitMobileNativeChatFileAttachments skip attachment matches inside inline-code spans while continuing to extract references from ordinary prose. Do not skip the entire line, because a line can contain both inline code and a valid prose reference.


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0fc05cd3-a7b3-4be9-9078-67718b34bfb7
📥 Commits

Reviewing files that changed from the base of the PR and between 7e5d1da and 9489933.

📒 Files selected for processing: 3
  • mobile/src/session/MobileNativeChatMessage.attachments.test.tsx
  • mobile/src/session/mobile-native-chat-file-attachments.test.ts
  • mobile/src/session/mobile-native-chat-file-attachments.ts
🚧 Files skipped from review as they are similar to previous changes: 2
  • mobile/src/session/mobile-native-chat-file-attachments.ts
  • mobile/src/session/mobile-native-chat-file-attachments.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

@coderabbitai

coderabbitai Bot commented Oct 16, 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.

@niconicohu

Copy link
Copy Markdown
Contributor Author

Fixed the outside-diff inline-code finding from review 5550848615 in 457251c. Attachment matches are now checked against source ranges for both block and inline code. A mixed line can keep its literal example and still extract a real prose attachment; multiline spans, differing backtick widths, unmatched markers and separate paragraphs are covered. The delimiter scan and reference walk are bounded linear passes.

The new regression failed before the fix. The independent branch passes 10,821 mobile tests, app/test typechecks, changed-code checks, complete mobile-web verification and a rebuilt Android release with verified V2 signature. This does not change stored-file authorization. Physical Android/iOS and live SSH coverage remain unverified.

@niconicohu

Copy link
Copy Markdown
Contributor Author

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Reviews resumed and review finished.

@niconicohu

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@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: Advanced
  • Run ID: 7b097be2-dded-4ac8-a5c1-e14a863d22cc
📥 Commits

Reviewing files that changed from the base of the PR and between 9489933 and 457251c.

📒 Files selected for processing: 4
  • mobile/src/components/mobile-markdown-literal-ranges.ts
  • mobile/src/components/mobile-markdown-tree.ts
  • mobile/src/session/mobile-native-chat-file-attachments.test.ts
  • mobile/src/session/mobile-native-chat-file-attachments.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@coderabbitai

coderabbitai Bot commented Oct 16, 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 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: Advanced
  • Run ID: 1bccc0af-8ad3-4e7c-b6ed-258c107d501e
📥 Commits

Reviewing files that changed from the base of the PR and between a55c93b and f27ea0d.

📒 Files selected for processing: 53
  • mobile/src/session/MobileNativeChatImageGallery.tsx
  • mobile/src/session/MobileNativeChatImageViewer.tsx
  • mobile/src/session/MobileNativeChatMessage.android.test.ts
  • mobile/src/session/MobileNativeChatMessage.attachments.test.tsx
  • mobile/src/session/MobileNativeChatMessage.test.ts
  • mobile/src/session/MobileNativeChatMessage.tsx
  • mobile/src/session/MobileNativeChatOverlay.tsx
  • mobile/src/session/MobileNativeChatRowOverlaysHost.test.tsx
  • mobile/src/session/mobile-native-chat-merged-snapshot-parity-hooks.test.tsx
  • mobile/src/session/mobile-native-chat-row-overlays.ts
  • src/main/ai-vault/session-scanner-discovery.ts
  • src/main/ai-vault/structured-chat-cli-fork.ts
  • src/main/grok/grok-transcript-import.ts
  • src/main/native-chat/agent-session-journal/adopted-transcript-source.ts
  • src/main/native-chat/agent-session-journal/journal-legacy-import.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-client-delivery.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-mutation-context.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-open-child-work.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-feed.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-ownership.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-ownership.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-turns.test.ts
  • src/main/native-chat/agent-session-wire/structured-conversation-command-admission.test.ts
  • src/main/native-chat/codex-adoption-preparation.ts
  • src/main/native-chat/session-file-resolver.ts
  • src/main/native-chat/structured-agent-cli-conversations.ts
  • src/main/native-chat/structured-agent-cli-source.ts
  • src/main/native-chat/structured-agent-session-source-admission.test.ts
  • src/main/native-chat/transcript-opencode-sqlite-query.test.ts
  • src/main/native-chat/transcript-opencode-sqlite-query.ts
  • src/main/node-runtime/runtime-archive-download.test.ts
  • src/main/omp/omp-session-cwd-lookup.test.ts
  • src/main/runtime/agent-launch-scope-runtime.test.ts
  • src/main/runtime/orca-runtime-structured-agent-session-create-intent.test.ts
  • src/main/runtime/revisioned-state.ts
  • src/main/runtime/rpc/methods/managed-runtime-install.test.ts
  • src/main/runtime/rpc/methods/managed-runtime-install.ts
  • src/main/runtime/rpc/methods/structured-agent-session-adoption-replay.test.ts
  • src/main/runtime/rpc/methods/structured-agent-session-create.ts
  • src/main/runtime/runtime-pane-admission.ts
  • src/main/runtime/session-tabs/structured-session-create-support.ts
  • src/main/runtime/structured-agent-session-create-adoption.ts
  • src/main/runtime/terminal/launch/mobile-terminal-chat-fork-create.ts
  • src/main/runtime/terminal/launch/mobile-terminal-chat-fork.test.ts
  • src/main/runtime/terminal/launch/mobile-terminal-chat-fork.ts
  • src/main/runtime/terminal/launch/mobile-terminal-owned-create.ts
  • src/main/runtime/terminal/launch/mobile-terminal-renderer-create.ts
  • src/renderer/src/hooks/ipc-events/terminal-presentation-ipc-bridge.ts
  • src/shared/rpc-contract/session-tabs-schemas-params.ts
  • src/shared/session-tabs-runtime-capabilities.ts
  • src/shared/structured-agent-session-create.test.ts
  • src/shared/structured-agent-session-mutation.ts
  • tests/e2e/cross-version-wire/cross-version-stop-note-test-rig.ts
💤 Files with no reviewable changes: 1
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-ownership.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@niconicohu

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the incremental conflict resolution at 479fa8c after merging main f9aeb34. The overlay retains main's OMP terminal-answer route inside the attachment, resource and full-message reader contexts. The combined mounted regression failed when that route was omitted, then passed with both behaviors present; the full mobile suite passed 11,292 tests. The PR description records the current validation and limitations.

This is one incremental review request for the new head. No full review or resume is requested.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

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.

@niconicohu

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the increment at de5bfa9 after merging main 4ed095d. Both attachment and model-catalog capabilities remain, and asynchronous structured answers reuse the existing accepted-action hook. The mounted regression failed for accepted/refused answers before the routing fix and now passes. Updated test boundaries preserve all assertions after main’s scroll-anchor move and file-review change. The full mobile suite passed 11,411 tests; typechecks, quality and current-main ratchets passed. The PR description records details, equivalent browser line-limit fixes and source-only limitations.

This is one incremental request for this new head.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

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.

@niconicohu

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the increment at de29c03 after merging main 2a45fdc. The actual browser prop-type conflict is resolved by adopting main’s complete component unchanged. Existing attachments behavior is retained. The standard one-worker mobile suite passed 11,464 tests; desktop regressions, typechecks, current-main ratchets and PR-scoped quality passed. The updated description records current evidence and the source-only boundary.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

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 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.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Preserve host-path provenance before selecting a direct URI. · MobileNativeChatImage.tsx:45

mobile/src/session/MobileNativeChatImage.tsx:45
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Preserve host-path provenance before selecting a direct URI.

image.url ?? image.path passes a Claude host path such as file:///host/image.png as uri. isRenderableImageUri(uri) then marks it direct, so the host reader does not run. The device receives a path that exists only on the host and cannot load the image.

Preserve whether the value came from url or path. Keep direct handling enabled for device-local file URLs.

Suggested fix
 export function MobileNativeChatImage({
   uri,
+  isHostPath = false,
   alt,
...
   uri: string | undefined
+  isHostPath?: boolean
...
-  const direct = isRenderableImageUri(uri)
+  const direct = !isHostPath && isRenderableImageUri(uri)
           <MobileNativeChatImage
             uri={image.url ?? image.path}
+            isHostPath={typeof image.url !== 'string'}
             alt={image.alt}
           <MobileNativeChatImage
             uri={image.url ?? image.path}
+            isHostPath={typeof image.url !== 'string'}
             alt={image.alt}

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fc479f73-75c7-4926-b70d-257c1ec1fb75
📥 Commits

Reviewing files that changed from the base of the PR and between de5bfa9 and de29c03.

📒 Files selected for processing: 1
  • src/renderer/src/components/browser-pane/assemble-chrome/BrowserAddressBar.tsx

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

@niconicohu

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the increment at 04394c9, the normal merge of de29c03 and main 2570d8f. The sole conflict was the phone parser import list: both this PR's existing literal-range reader and main's CJK plugin are retained. Main's URL boundaries, remembered terminal identity/write locks and all existing attachment/resource/item readers, OMP terminal-answer route and accepted-action handling remain present. All package manifests and lockfiles exactly match main.

A combined regression exercises CJK bold, a code-literal attachment reference and an actual prose attachment together. Removing CJK caused that case and main's sentence case to fail; restoring it passed all 62 focused checks. Fresh full phone JSON: 11,420 passed, six skipped, zero failures, 1,117 files. Forty-six root provenance/grant/RPC checks in six files, all four root typechecks, phone app/test typechecks/lint, all ratchets, shared dependency check, frozen installs and final 67-file PR quality passed. Tested tree equals the normal commit tree. No assertions or limits weakened. No fresh rendered UI/app build/install/deployment/service/profile action.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

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.

@niconicohu

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the increment at 21f8844, the normal merge of 04394c9 and main a02a635. The sole conflict was the phone host-capability test: main's explicit item-detail assertion and this PR's independent attachment-read/phone-upload assertions are all retained. A legacy read capability does not grant phone uploads; the full-object expectations cover that boundary. No production code was manually changed. Main's strengthened visual-reader checks and the existing owner/client capability regression both remain.

Completed background validation: full mobile JSON 11,403 passed/six skipped/zero failures/1,120 file results; 46 host provenance/grant/mobile-RPC checks in six files; all four root typecheck projects using local incremental tsrs; mobile app typecheck/lint/test-typecheck ratchet; frozen root/mobile installs, all ratchets, shared dependencies and test collection. The actual 67-file PR quality gate and normal commit hooks passed. Tested tree df9a92b6ea7f100c36192a6bcbbbcee2054994ca exactly equals the commit tree. No assertions or limits were weakened. The description records this evidence and the lack of fresh rendered/physical-device validation. Installed integration and services remain unchanged.

This is one incremental request for this valid new-head conflict fix; no full review or resume is requested.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

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.

Keep the attachment grant regression aligned with the agent-session identity
module moved on main. Preserve all production behavior and test assertions.
@niconicohu

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review fd90376, the normal merge of 21f8844 and main a289c98. Main moved the conversation/message identity modules under src/shared/agent-session. The branch-only attachment-grant regression retained an old type import; the only manual edit follows its existing relocated module. No production logic or assertions changed.

The unchanged merged tree reproduces TS2307 at orca-runtime-files-user-attachment-grants.test.ts:5. After the one-line import correction, all four root typecheck projects pass using local incremental tsrs. Background validation also passed all 11,393 mobile tests (six skipped, zero failures, 1,120 file results), 41 host attachment/provenance/grant/mobile-RPC checks in five existing files, mobile app TC/lint/test-TC ratchet, frozen installs, all ratchets, shared dependencies and test collection. Actual PR quality passes all scans for 67 code files. Normal commit hooks passed and tested tree ee4915396f105ba0b80c74e030232bf158589c1c exactly equals the commit tree.

The updated description records the exact evidence and preserves the distinction from full required CI and rendered/device validation. Installed integration and services are unchanged. The fresh paused summary identifies this latest commit as not reviewed and shows no review in progress; this is one incremental request after the valid new-head fix.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

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.

Retain attachment contexts and the safe-area fixture alongside main's checked
React node queries. Use its existing host query in the shortened-message test.
@niconicohu

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review 771cef9, the normal merge of fd90376 and main 0fa161b. The only conflicts were the imports in MobileNativeChatMessage.test.ts and MobileNativeChatOverlay.test.ts. The resolution keeps the branch's safe-area mock and attachment/resource/item contexts alongside main's ReactNode type and existing host-node query functions. The shortened-message test also reuses findByHostType to fix its newly exposed TS2367. No production code, assertion, rule or baseline was manually weakened.

The two conflict suites pass all57 checks. Final full mobile JSON:11,387passed/sixskipped/zero failures/1,120file results. All4rootTC(local incremental tsrs),41host attachment/provenance/grant/mobileRPC checks in5files, mobile appTC/lint/testTCratchet(1,115programfiles/fiveintentionalexclusions/ZEROgrandfathered), empty E2Ebaseline ratchet, frozen installs, all other ratchets/shareddeps/testcollection passed. Actual67-file PRquality and normal commit hooks passed; tested tree bfca5fafe43ffef652705f715dc23ad0a9eb2c86 exactly equals the commit tree. All86message and29overlay assertion lines remain; only the branch regression's host-query line needed adaptation.

The description records the updated evidence and no fresh rendered/device validation or full required-CI success claim. Installed integration and services are unchanged. A fresh complete read shows the paused bot's latest771cef commit as not reviewed and the prior request settled; this is one incremental review request for the valid new-head conflict fix.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

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.

@niconicohu

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review eeb07ce after the normal merge of upstream 7d6603a. Eight real comment-cleanup conflicts were resolved while preserving attachment/gallery rendering, resource context, safe-area fixtures, prompt-card wrappers and the shortened-message regression. Fresh typechecks/mobile tests/host tests and the failed upstream-wide validation checks are described explicitly in the PR body. This is one request for the new fixed head; old 771cef coverage is historical.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

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.

@niconicohu

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review new head 5bd23f0, the normal merge of eeb07ce and upstream 220d56f. The sole manual edit maps the attachment-grant test mock to the existing relocated filesystem-auth module. No production logic or assertion changed. The original two tests already passed, so this is a stale-mock compatibility correction, not a claimed runtime RED/GREEN.

Fresh validation and limitations are in the updated body: all root/mobile typechecks and lint, 32 host checks in four files, full mobile 11,368 passed/six skipped/zero failed, normal hooks and exact tested commit tree. The 67-file unified gate passed 26/27 checks including unit tests; its flaky ratchet still fails ENOBUFS against the old fork base. Exact-head required CI and rendered/device validation remain separate. This is one request for this new head; previous eeb review coverage is historical.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

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.

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.

Show mobile chat images as compact previews with a swipeable viewer

1 participant