Skip to content

Add an opt-in PDF download opener - #3700

Closed
banjerluke wants to merge 6 commits into
get-bb:mainfrom
banjerluke:feat/pdf-download-opener
Closed

banjerluke wants to merge 6 commits into
get-bb:mainfrom
banjerluke:feat/pdf-download-opener

Conversation

@banjerluke

Copy link
Copy Markdown

Human comments

On my Android 13 eInk tablet (Boox Note Max), PDF links would open a side panel browser but wouldn't display, I assume due to platform limitations. The ideal flow on that device is to download the PDF, which sends it right into the Notes app where I can review and/or annotate it. (Re-submission of #2689)

What was wrong

The file-opener system could select the built-in preview or a plugin viewer, but had no download action. Users whose browsers could not display PDFs lacked a persistent preference or one-off action to download them instead.

What changed

  • Added Download as a built-in opener choice for .pdf files under Settings → File openers, preserving existing default opener behavior.
  • Added one-off Download PDF and Open preview actions to thread file-link context menus, including long-press menus.
  • Applied the saved preference to file-opening flows while allowing explicit preview actions to override it.
  • Implemented downloads entirely in the app: fetch the existing file-content endpoint, create a browser blob URL, and supply the filename through the download link.
  • Validated HTTP responses and showed an error toast instead of saving failed responses as PDFs.
  • Explained unsupported file locations with a toast and allowed callers to fall back to preview.

This is an app-only change. It adds no server endpoint or contract changes, host-daemon protocol changes, or public Plugin SDK surface.

How you verified

  • pnpm exec turbo run typecheck --filter=@bb/app
  • pnpm exec turbo run test --filter=@bb/app -- file-download useThreadFileTabs FileOpenersSettingsSection plugin-slot-resolvers
  • All 48 focused tests across four files passed.
  • Coverage includes saved and one-off download selection, explicit preview overrides, workspace/host/thread-storage routing and filenames, failed HTTP responses, unsupported host targets, and unresolved workspace routing.
  • git diff --check origin/main...HEAD passed.

AGENT GENERATED

@lukes-clanker
lukes-clanker Bot force-pushed the feat/pdf-download-opener branch from 277578e to 90a922a Compare September 29, 2026 00:13
@SawyerHood

Copy link
Copy Markdown
Collaborator

This is an automated message. We have closed this pull request because it has been open for more than two weeks.

@SawyerHood SawyerHood closed this Sep 29, 2026
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