Skip to content

fix(mobile): attach files to the cloud workspace before a chat send imports them - #8480

Merged
saddlepaddle merged 1 commit into
mainfrom
superset/cloud-workspace-bd1f3d6c
Oct 14, 2026
Merged

saddlepaddle merged 1 commit into
mainfrom
superset/cloud-workspace-bd1f3d6c

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

On a cloud workspace, sending an attachment into an existing ACP chat on mobile fails with "Could not send — Attachment not found".

A cloud sandbox calling attachment.resolve only sees files anchored to its own workspace (attachments.parentKind = "cloud_workspace"). The chat send path in WorkspaceScreen.handleSubmit uploaded the file and called the host's attachments.importFromCloud without anchoring it first, so resolve filtered it out.

New chats from Home work, because workspace creation anchors the files. Terminal sessions work, because useWriteTerminalAttachments calls cloudWorkspace.attachFiles first. The chat path came in with #8238 and missed that step.

Fix

In a cloud workspace, call cloudWorkspace.attachFiles before importFromCloud on a chat send, the same way the terminal path does.

Validation

  • Biome passes on the changed file.
  • Mobile tsc reports the same error count before and after (185, none new). This checkout doesn't have the workspace packages built.
  • Not yet verified on device. JS-only, so it ships by EAS update.

Summary by cubic

Fixes sending attachments into an existing chat on a cloud workspace, which failed with "Attachment not found" because the cloud sandbox only resolves files attached to its own workspace.

  • Now calls cloudWorkspace.attachFiles before importFromCloud on chat sends, matching the terminal path.

Written for commit 3447cfa. Summary will update on new commits.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • Bug Fixes
    • File attachments in cloud workspaces are now linked to the workspace before they’re imported and sent with a chat message.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7a29624e-5b6e-4b9e-8b9d-5066f3444a81
📥 Commits

Reviewing files that changed from the base of the PR and between 7c06b83 and 77f4102.

📒 Files selected for processing: 1
  • apps/mobile/screens/(authenticated)/workspace/[id]/WorkspaceScreen/WorkspaceScreen.tsx
 __________________________________________________
< A bug in this PR is worth two in the repository. >
 --------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • 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.

…mports them

A cloud sandbox resolves only files attached to its workspace. The chat
send path imported uploads without attaching them first, so sends with
attachments into an existing chat on a cloud workspace failed with
"Attachment not found". The terminal path already calls
cloudWorkspace.attachFiles; the chat path now does the same.
@saddlepaddle
saddlepaddle force-pushed the superset/cloud-workspace-bd1f3d6c branch from 77f4102 to 3447cfa Compare October 14, 2026 00:44
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@expo

expo Bot commented Oct 14, 2026

Copy link
Copy Markdown

No installed development build can load this pull request as an update: its native fingerprint is cdf3c1367313 and no development build has it. Add the mobile-build label to build one.

@greptile-apps

greptile-apps Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; Cloud chat attachments are linked to the workspace before import.

Summary

Cloud chat sends now attach uploaded files to the workspace before the host imports them.

  • Cloud chat attachments are linked to the workspace before import.

Diagram

sequenceDiagram
    participant Mobile
    participant API
    participant Sandbox
    Mobile->>API: attachFiles(workspace ID, file IDs)
    API->>API: Save workspace attachment links
    API-->>Mobile: Attached
    Mobile->>Sandbox: importFromCloud(file IDs)
    Sandbox->>API: attachment.resolve(file IDs)
    API-->>Sandbox: Files attached to this workspace
    Sandbox-->>Mobile: Imported attachments
    Mobile->>Sandbox: Send chat message with attachments
Loading

Reviews (1) · Last reviewed commit: 77f4102 · Reviewed by Greptile

@saddlepaddle
saddlepaddle merged commit ca694e6 into main Oct 14, 2026
18 checks passed

This branch was previously deployed

1 inactive deployment
preview — 3447cfa4 Deployed Oct 14, 2026 by saddlepaddle via Deploy Docs #11896
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.

1 participant