Skip to content

fix(tasks): download artifacts without pop-ups - #3790

Merged
trunk-io[bot] merged 1 commit into
mainfrom
posthog-code/fix-artifact-download-popup
Jul 24, 2026
Merged

fix(tasks): download artifacts without pop-ups#3790
trunk-io[bot] merged 1 commit into
mainfrom
posthog-code/fix-artifact-download-popup

Conversation

@tatoalo

@tatoalo tatoalo commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Problem

Artifact downloads were blocked in the desktop and web hosts because opening a new tab requires pop-up permission. Follow-up to #3788.

Changes

Fetch the presigned artifact directly and trigger a local blob download with the original filename. This avoids pop-ups and keeps image artifacts from replacing the app.

How did you test this?

  • pnpm --filter @posthog/ui exec vitest run src/features/sessions/components/CloudArtifactDownloads.test.tsx
  • pnpm --filter @posthog/ui typecheck
  • pnpm biome check packages/ui/src/features/sessions/components/CloudArtifactDownloads.tsx packages/ui/src/features/sessions/components/CloudArtifactDownloads.test.tsx

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

@trunk-io

trunk-io Bot commented Jul 24, 2026

Copy link
Copy Markdown

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

@tatoalo tatoalo self-assigned this Jul 24, 2026
@tatoalo
tatoalo marked this pull request as ready for review July 24, 2026 13:55
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 5080706.

@greptile-apps

greptile-apps Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
Fix 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:73
**Desktop blocks the blank popup**

When a user downloads an artifact in the Electron app, the desktop window handler unconditionally denies this `window.open` call, causing the function to return with an “Allow pop-ups” toast instead of opening the file.

Reviews (1): Last reviewed commit: "fix(tasks): preserve user activation for..." | Re-trigger Greptile

Comment thread packages/ui/src/features/sessions/components/CloudArtifactDownloads.tsx Outdated
@tatoalo
tatoalo force-pushed the posthog-code/fix-artifact-download-popup branch from 99c078f to b9b5675 Compare July 24, 2026 14:01
Generated-By: PostHog Code
Task-Id: 0a111328-1757-4b88-aec3-0725e3733bdb
@tatoalo
tatoalo force-pushed the posthog-code/fix-artifact-download-popup branch from b9b5675 to 5080706 Compare July 24, 2026 14:02
@tatoalo tatoalo changed the title fix(tasks): preserve user activation for artifact downloads fix(tasks): download artifacts without pop-ups Jul 24, 2026
@tatoalo
tatoalo enabled auto-merge (squash) July 24, 2026 14:08
@trunk-io
trunk-io Bot merged commit 7e8e4da into main Jul 24, 2026
32 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/fix-artifact-download-popup branch July 24, 2026 14:10
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.

2 participants