Skip to content

[codex] Improve desktop PDF reader#39

Draft
OmGuptaIND wants to merge 1 commit into
mainfrom
OmGuptaIND/pdf-reader-fix
Draft

[codex] Improve desktop PDF reader#39
OmGuptaIND wants to merge 1 commit into
mainfrom
OmGuptaIND/pdf-reader-fix

Conversation

@OmGuptaIND
Copy link
Copy Markdown
Contributor

Summary

Replaces the desktop PDF preview native Chromium embed with an app-native PDF.js reader so the bulky thumbnail/sidebar strip is removed and the preview has controlled, compact reader UI.

What changed

  • Added a PDF.js-backed PdfRenderer with page navigation, direct page jump, zoom, fit-width/fit-page, rotate, download, lazy page rendering, and a text layer for selection.
  • Added reader styling for centered pages, compact controls, responsive toolbar behavior, and per-page loading/error overlays.
  • Fixed the document preview loading state that spread the spinner and label far apart by restoring a centered flex layout for DOCX/PDF document loading overlays.
  • Added the desktop pdfjs-dist dependency pinned to a Node 20-compatible release.

Validation

  • pnpm --filter @anton/protocol build
  • pnpm exec biome check packages/desktop/src/index.css packages/desktop/src/components/artifacts/PdfRenderer.tsx packages/desktop/package.json
  • pnpm --filter @anton/desktop typecheck
  • pnpm --filter @anton/desktop build

Build succeeds. It still prints the pre-existing CSS minifier warnings for escaped file:* selectors and the existing chunk-size warning.

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.

1 participant