Skip to content

Add Download to previewable file actions - #5627

Merged
ymichael merged 1 commit into
mainfrom
bb/fix-preview-download-action-thr_h3nj2z96dy
Oct 16, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/fix-preview-download-action-thr_h3nj2z96dy

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

The shared preview header exposed copy and refresh controls but omitted Download. After #4554, unsupported files could be downloaded while previewable Markdown, JSON, and other files could not. This is the remaining behavior reported in #2697 and tracked in #5620.

What changed

Add Download to the wide file-preview header and compact File actions menu, using the existing save-file path and the original file URL and basename. This covers text, Markdown, CSV, HTML, images, videos, and empty files across the shared secondary-panel preview surfaces. Loading, missing, and stale previews do not expose a download target. Existing file routes and SDK/CLI access are reused; no wire contracts change.

How you verified

  • pnpm exec turbo run test typecheck lint --filter=@bb/app --: passed; 625 test files and 5,923 tests passed, with 4 tests skipped.
  • Eight added regression cases failed before the fix; all 42 FilePreview tests passed afterward. Coverage exercises both header layouts and verifies original URLs, filenames, and stale/missing-file behavior.
  • Isolated source Chromium: clicked Download from the Markdown compact menu and JSON wide header. Browser downloads completed and cmp confirmed exact original bytes and filenames, including Markdown CRLFs.
  • Started pnpm start:worktree and confirmed Download in the built app with a dedicated sample project.
  • Desktop and native mobile were not run.

Fixes #5620

AGENT GENERATED

@ymichael
ymichael merged commit 17f7a1f into main Oct 16, 2026
28 checks passed
@ymichael
ymichael deleted the bb/fix-preview-download-action-thr_h3nj2z96dy branch October 16, 2026 16:29
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.

Previewable files have no Download action

1 participant