fix(tasks): expose artifact downloads in task conversations - #3788
Conversation
Generated-By: PostHog Code Task-Id: 0a111328-1757-4b88-aec3-0725e3733bdb
|
😎 Merged directly without going through the merge queue, as the queue was empty and the PR was up to date with the target branch - details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Generated-By: PostHog Code Task-Id: 0a111328-1757-4b88-aec3-0725e3733bdb
Generated-By: PostHog Code Task-Id: 0a111328-1757-4b88-aec3-0725e3733bdb
Generated-By: PostHog Code Task-Id: 0a111328-1757-4b88-aec3-0725e3733bdb
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/ui/src/features/sessions/components/CloudArtifactDownloads.tsx:75-84
**Async download loses user activation**
When the preview and presigning requests outlive the click's transient user activation in the web host, `window.open` is treated as an unsolicited popup and blocked, causing the button to finish without opening the artifact or reporting an error.
Reviews (1): Last reviewed commit: "fix(tasks): fetch cloud artifact manifes..." | Re-trigger Greptile |
|
Note 🤖 stamphog reviewed Greptile flagged a substantive, unresolved P1 issue: the download button awaits a network round-trip before calling window.open, so browsers can treat it as an unsolicited popup and block it, silently failing the core feature the PR adds. This is unaddressed on the current head.
Gate mechanics and policy version
|
|
The issue is real and straightforward to fix. The standard fix is to open the window immediately (synchronously), then navigate it to the URL once the fetch resolves. If the fetch fails, close the window. Here's the corrected The key change: |
Problem
Cloud-task agents can upload durable output artifacts, but task conversations do not expose them. Users can be told that files exist without any way to find or download them.
Why: Generated reports, images, and other non-code deliverables need to remain accessible after the temporary task sandbox is released.
artifacts_good.mp4