Repository navigation
fix(ios): assistant files are not downloadable in chat - #155195
Conversation
|
Codex review: needs changes before merge. Reviewed September 21, 2026, 10:56 PM ET / September 22, 2026, 02:56 UTC (Revision 7). ClawSweeper reviewWhat this changesThe PR makes managed document attachments downloadable in native chat, adds iOS sharing and macOS saving, and covers decoding, downloads, cleanup, and native validation. Merge readiness⛔ Needs changes before merge - 1 item remains This remains a useful, protected fix for a gap still present on main. No introduced correctness defect was found; the iOS evidence resolves the earlier screenshot follow-ups, while macOS export verification remains outstanding. Priority: P2 Review scores
Verification
How this fits togetherNative chat receives attachment metadata from Gateway conversation history and retrieves files through session-scoped artifact downloads. The shared Apple chat interface then hands downloaded documents to the platform’s file exporter. flowchart TD
A[Gateway conversation history] --> B[Native attachment decoder]
B --> C[Document download button]
C --> D[Session scoped artifact retrieval]
D --> E[Bounded temporary file]
E --> F[iOS system share sheet]
E --> G[macOS save panel]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +23, Docs +1, Config +13, Other +579. Total +616 across 23 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Native chat should export managed documents through the existing scoped download owner, with safe filenames, owned temporary files, and verified platform exporters. Do we have a high-confidence way to reproduce the issue? Yes: current main drops nested document metadata and lacks a document action, matching the supplied native baseline failure. This review did not execute current main. Is this the best way to solve the issue? Yes: extending the existing decoder and scoped artifact loader is a focused repair; the separate macOS exporter still needs its platform result verified. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against eac221ae78bd. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
Decode managed document envelopes, reuse scoped artifact downloads, and hand files to the native system exporter with owned temporary copies. Co-authored-by: Takhoffman <[email protected]>
Register baseline-compatible decode and real-app loopback Gateway tests in the existing iOS lifecycle lane. Retain exact-baseline behavioral failures, candidate assertions, simulator screenshots, xcresults, and full logs without changing production renderers or transport owners. Co-authored-by: Tak Hoffman <[email protected]>
86010be to
823c597
Compare
Keep fixture imports before executable declarations and require the registered attachment proof plus all native evidence paths in the workflow contract test. Both CI failures reproduced locally and now pass without weakening existing assertions. Co-authored-by: Tak Hoffman <[email protected]>
Native document download proofInspected real iPhone 18 Pro / iOS 27.0 simulator captures from CI 35673180468, attempt 1. The native iOS job passed. Overall CI failed in separate checks; this is not a landing clearance. Behavioral red/green: the actual baseline decoder failed on lost Only the loopback Gateway is synthetic. The app, decoder, transport, HTTP loader, system exporter and alert are real. The composer upgrade warning reflects the minimal fixture's omitted model-selection capability. The system-share check proves the handoff and availability of Save to Files, not a subsequent user-selected destination write. Before
After
Provenance: PR head Timing: candidate decode/cache test 0.010 s; 28 loader/typography Swift tests 4.197 s (four document types 0.044 s; denied/missing/expired cases 0.076 s); end-to-end UI case 95.757 s. The complete baseline/candidate proof step, including builds, startup and failure diagnostics, took 54m03s—not an isolated test cost. Raw logs, four xcresults/summaries, exports, and provenance are retained in artifact 10673697996, |
Honor measured native test budgets: keep the 95-second pairing/share UI flow in the existing full-manual tests phase, while adding decoder, loader, and typography regressions to the existing mandatory PR smoke invocation. Preserve all voice/lifecycle/watch checks and retained evidence; contract tests verify both tiers. Co-authored-by: Tak Hoffman <[email protected]>
Require all seven executed smoke selectors: preserve the original voice cleanup suites and add the approved decoder, document loader, and typography regressions. Keep the single invocation and normal Debug simulator signing assertions. Co-authored-by: Tak Hoffman <[email protected]>
|
Merged via squash.
|
* commit '80b9608a25e191a17e1466d750c2f76a38a38507': fix(tooling): declare tsx CLI shim exports test(gateway): reuse session PR access state fixtures (#155626) test(heartbeat): await wake registration before advancing coalescing time refactor(status): share plugin health section assembly (#155390) fix: CLI and MCP tool completions skip plugin hooks (#155206) fix(update): preserve failures and retain running worker code (#153764) fix(sqlite): drain idle coordinators at lifecycle teardown fix(test): prepare SQLite compile-cache probes before launch fix(test): preserve owned compiler caches in Vitest workers fix(ios): assistant files are not downloadable in chat (#155195) fix(heartbeat): avoid timeouts for busy scheduled polls (#148333) test(gateway): hold SSH approval until pending assertions finish test(update): cover launcher permission rollback on Linux (#155615) fix(edit): avoid duplicate replacements from legacy arguments (#155513) feat(browser): support Lightpanda connection-scoped CDP replies (#154342) improve(ci): speed up compatible Control UI tests with Bun (#154585) test(gateway): prepare remaining approval fixtures before requests (#155589) fix(doctor): exclude retained agents from automatic session import
* fix(ios): make assistant file attachments downloadable Decode managed document envelopes, reuse scoped artifact downloads, and hand files to the native system exporter with owned temporary copies. Co-authored-by: Takhoffman <[email protected]> * test(ios): prove managed file downloads through native sharing Register baseline-compatible decode and real-app loopback Gateway tests in the existing iOS lifecycle lane. Retain exact-baseline behavioral failures, candidate assertions, simulator screenshots, xcresults, and full logs without changing production renderers or transport owners. Co-authored-by: Tak Hoffman <[email protected]> * test(ios): fix attachment proof CI contracts Keep fixture imports before executable declarations and require the registered attachment proof plus all native evidence paths in the workflow contract test. Both CI failures reproduced locally and now pass without weakening existing assertions. Co-authored-by: Tak Hoffman <[email protected]> * test(ios): keep document UI proof in full validation Honor measured native test budgets: keep the 95-second pairing/share UI flow in the existing full-manual tests phase, while adding decoder, loader, and typography regressions to the existing mandatory PR smoke invocation. Preserve all voice/lifecycle/watch checks and retained evidence; contract tests verify both tiers. Co-authored-by: Tak Hoffman <[email protected]> * test(ios): align executed smoke suite contract Require all seven executed smoke selectors: preserve the original voice cleanup suites and add the approved decoder, document loader, and typography regressions. Keep the single invocation and normal Debug simulator signing assertions. Co-authored-by: Tak Hoffman <[email protected]> --------- Co-authored-by: Takhoffman <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>




Closes #155189
What Problem This Solves
Fixes: assistant-generated documents appear as inert attachments instead of downloadable files in native iOS chat, even when the same conversation works on the web.
User Impact
Users can tap Download file, then use the system share sheet to Save to Files or send the file to another app. The shared macOS native chat uses its save panel. Existing image, audio, and video presentation remains separate.
Validation: real native red/green and inspected screenshots are complete, including original-chat delivery. Exact-head CI and native landing checks passed. Squash-merged to main as
65821c2c48692648d3006cc08293c2918318b7ebon 2026-09-22 at 10:01 UTC; issue #155189 closed. No release or deployment was performed.Why This Change Was Made
The Gateway already supplies managed documents in a nested attachment envelope. Native decoding discarded that envelope's file metadata, and the renderer only offered actions for image/audio/video attachments.
Decode the existing envelope and extend the existing scoped artifact download owner for files. Preserve ticket renewal, Gateway-route checks, custom ingress headers, TLS pinning, and bounded transfers (the existing Gateway document limit is 100 MiB). Never open assistant-supplied local paths or arbitrary URLs. Reuse one system file-sharing view for attachments, transcripts, and workspace files; uniquely owned temporary copies are removed when export releases them. Added production code owns the previously missing download control and export lifecycle, not a competing network or authorization implementation. No protocol, schema, or credential changes.
Evidence
823c597170fff80b93dae568f2af7dbddd4cac9d, tested merge treee25fc1f4c686c3d8ce25fdc0b80cf78603048f82, baseline46375679b7cc9ef787f50fe21af345db0f665ca4, iPhone 18 Pro / iOS 27.0. Raw lifecycle artifact 10673697996 retains logs, all four xcresult summaries/bundles, exported images, and fixture digest.aa6d4bf32014e3d3b64ee543593674fa0526ea0d; CI 35680541911 passed. Follow-up commits change only CI/test wiring and fixture import placement; production Swift and captured UI code are unchanged. Current-head CI completed successfully; screenshot inspection, PR rendering, and original-chat delivery are complete.Review disposition / coverage limit: macOS compilation and package/shared temporary-file byte-lifecycle tests passed, but interactive
NSSavePaneland bytes written to a user-selected destination were not exercised. The scoped iOS defect has actual native red/green proof and independent source review with no correctness or security findings. We are retaining this explicit gap rather than expanding this repair into a separate macOS UI-proof harness; no macOS interactive proof is claimed. The fixture scripts produce named test artifacts only and introduce no runtime database, schema, or protocol migration.Worked on by
Work sessions
View the OpenClaw team session