feat(local): add PDF thumbnails on macOS - #3017
Open
flyingrtx2333 wants to merge 1 commit into
Open
Conversation
- add an opt-in Local driver setting for PDF thumbnails - render PDF first pages with macOS Quick Look - preserve unsupported-platform behavior and cover the renderer with tests Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
flyingrtx2333
marked this pull request as ready for review
September 1, 2026 12:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 摘要
pdf_thumbnailsetting to the Local driver. It is disabled by default./usr/bin/qlmanage).Operational notes:
The existing
thumbnailmaster switch must also be enabled.Rendering invokes the macOS Quick Look process for each cache miss; configuring
thumb_cache_folderis recommended.Because PDF parsing consumes local resources, administrators should enable this selectively for untrusted or public storage.
The setting is visible on all platforms but only advertises PDF thumbnail URLs on Darwin builds.
This PR has breaking changes.
/ 此 PR 包含破坏性变更。
This PR changes public API, config, storage format, or migration behavior.
/ 此 PR 修改了公开 API、配置、存储格式或迁移行为。
This PR requires corresponding changes in related repositories.
/ 此 PR 需要关联仓库同步修改。
Related repository PRs / 关联仓库 PR:
Testing / 测试
go test ./...mainbaseline in unrelated packages, including Go 1.27 format-string vet failures indrivers/123,drivers/189, anddrivers/189pc, plus an existing nil-pointer failure indrivers/onedrive_sharelink.GOTOOLCHAIN=local go test -race ./drivers/local— 8 tests passed.GOTOOLCHAIN=local go vet ./drivers/local— passed.CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go test -c ./drivers/local— produced a Linux ELF test binary.CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go test -c ./drivers/local— produced a Windows PE test binary.bash build.sh dev webfollowed by a native Darwin arm64 build — passed with the rolling frontend embedded./api/fs/listreturned a signedthumb; fetching it returned HTTP 200,Content-Type: image/png, valid PNG magic bytes, and one disk-cache entry.cupsfilter, renders it with Quick Look, and decodes the output dimensions.Checklist / 检查清单
/ 我已阅读 CONTRIBUTING。
/ 我确认此贡献符合仓库许可证、贡献规范和行为准则。
gofmt./ 我已使用
gofmt格式化变更。/ Draft 阶段暂未指定维护者审查。
AI Disclosure / AI 使用声明
/ 此 PR 包含 AI 辅助内容。
Tools used / 使用工具:
Usage scope / 使用范围:
Code generation / 代码生成
Refactoring / 重构
Documentation / 文档
Tests / 测试
Review assistance / 审查辅助
I have reviewed and validated all AI-assisted content included in this PR.
/ The human collaborator will review the draft before it is marked ready.
I have ensured that all AI-assisted commits include
Co-Authored-Byattribution./ AI 辅助提交包含
Co-Authored-By归属信息。I can reproduce all AI-assisted content included in this PR without any AI tools.
/ This remains for the human collaborator to confirm before marking the PR ready.
The feature request and implementation were prompted and validated by the human collaborator on a real native macOS OpenList deployment. The submitted code, tests, PR text, and pre-submission review were prepared with Codex assistance. No private deployment paths, credentials, media filenames, or screenshots are included.