Skip to content

feat: implement pass 1 desktop-first tauri/pdf vertical slice#37

Merged
gitgrahamdunn merged 1 commit intomainfrom
codex/implement-desktop-first-app-initial-pass
Mar 9, 2026
Merged

feat: implement pass 1 desktop-first tauri/pdf vertical slice#37
gitgrahamdunn merged 1 commit intomainfrom
codex/implement-desktop-first-app-initial-pass

Conversation

@gitgrahamdunn
Copy link
Copy Markdown
Owner

Motivation

  • Implement the approved desktop-first Pass 1 vertical slice to verify the core architecture (Tauri shell, renderer abstraction, PDF.js adapter, local SQLite, and managed storage) works end-to-end.
  • Provide a renderer-agnostic viewer foundation so PDF.js can be swapped for a native renderer later without UI changes.
  • Establish local-first persistence and a predictable developer experience with a single root dev command to launch the desktop app.

Description

  • Refactored the repo into an npm workspace and added apps/desktop (Tauri + React + TypeScript) and foundational packages under packages/* (shared-types, viewer-core, viewer-pdfjs, persistence-core).
  • Implemented a renderer abstraction (@gitplant/viewer-core) and a PDF.js adapter (@gitplant/viewer-pdfjs) that produces image data for pages and exposes the required renderer contract.
  • Added a React UI with import flow, recent documents panel, viewer area (page prev/next, zoom, fit width), and an ErrorBoundary, plus a small tauriGateway to invoke native commands.
  • Implemented native Tauri/Rust commands to open a native PDF picker, copy the file into app-managed storage, initialize and use a local SQLite DB (documents, document_revisions, recent_documents), persist metadata, return document bytes, and update page counts.
  • Added unit/integration test files: UI smoke tests (apps/desktop/src/App.test.tsx and apps/desktop/src/components/PdfViewer.test.tsx) and a Rust SQLite schema test in apps/desktop/src-tauri/src/lib.rs, and updated README.md with quickstart scripts including npm run desktop:dev and npm run desktop:build.

Testing

  • Tests added: apps/desktop/src/App.test.tsx and apps/desktop/src/components/PdfViewer.test.tsx (UI smoke/unit tests), and a Rust unit test sqlite_schema_supports_document_and_recent_persistence in apps/desktop/src-tauri/src/lib.rs to validate schema/insert/select basics.
  • Attempted to run JS dependency install and test commands (npm install, npm test), but npm install failed due to registry access (HTTP 403) so JS tests and typecheck could not be executed in this environment.
  • Attempted to run Rust tests (cd apps/desktop/src-tauri && cargo test), but cargo test failed due to network access errors while fetching crates index (HTTP 403), so Rust tests could not complete here.
  • Summary: tests are present and runnable locally; automated test attempts in this environment were blocked by external registry/network restrictions (see npm install and cargo test failures).

Codex Task

@gitgrahamdunn gitgrahamdunn merged commit 74a4914 into main Mar 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant