Skip to content

Feat/humanreadable2 - #828

Open
SharonStrats wants to merge 17 commits into
stagingfrom
feat/humanreadable2
Open

SharonStrats wants to merge 17 commits into
stagingfrom
feat/humanreadable2

Conversation

@SharonStrats

@SharonStrats SharonStrats commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Note to myself: fix html on mobile.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Active findings identify DOCX script-execution risks, unbounded PDF canvas memory use, and missing required lockfile peers, creating critical security, reliability, and installation concerns.

6 open issues
What changed in this PR

This PR consolidates document and media previews into the Human Readable pane, with dedicated PDF and iframe components and expanded format support.

Changes:

  • Adds DOCX and PDF rendering, enhanced Markdown, highlighted JSON, and shared image/video previews.
  • Refactors preview lifecycle, error handling, responsive styling, and accessibility tests.
  • Adds deep-link initialization and enables slideshows for single-image containers.
File Description
typings/​pdf-worker-url.d.ts Declares the PDF worker URL import.
test/​unit/​slideshowPane.test.ts Tests single-image slideshow availability.
test/​unit/​mediaPreview.test.ts Tests media rendering, errors, and cleanup.
test/​unit/​markdownPreview.test.ts Tests Markdown rendering and fetch failures.
test/​unit/​mainPage/​index.test.ts Tests deep-link initialization.
test/​unit/​imagePane.test.ts Removes standalone image-pane tests.
test/​unit/​humanReadablePane.test.ts Expands format and preview lifecycle coverage.
test/​unit/​humanReadable.accessibility.test.ts Adds automated preview accessibility checks.
test/​unit/​docxPreview.test.ts Tests DOCX detection and rendering.
test/​unit/​creationPromises.test.ts Adds Pad linked-list initialization assertions.
src/​video/​videoPane.js Removes the standalone video pane.
src/​slideshow/​slideshowPane.js Allows single-image slideshows.
src/​registerPanes.js Registers consolidated preview handling.
src/​mainPage/​index.ts Resolves deep links and updates the preview-frame guard.
src/​imagePane.ts Removes the standalone image pane.
src/​imagePane.css Removes standalone image styling.
src/​humanReadablePane.ts Removes the monolithic preview implementation.
src/​humanReadablePane.css Removes the previous stylesheet location.
src/​humanReadable/​textPreview.ts Extracts plain-text rendering.
src/​humanReadable/​previewHelpers.ts Shares preview constants and title helpers.
src/​humanReadable/​previewFrame.ts Shares preview container construction.
src/​humanReadable/​previewError.ts Centralizes dismissible preview errors.
src/​humanReadable/​previewBridge.ts Extracts the sandboxed Dokieli bridge script.
src/​humanReadable/​mediaPreview.ts Adds shared image/video rendering and cleanup.
src/​humanReadable/​markdownPreview.ts Adds lazy Markdown rendering and sanitization.
src/​humanReadable/​markdownIt.ts Provides the lazy Markdown parser entry point.
src/​humanReadable/​jsonPreview.ts Adds precision-preserving JSON highlighting.
src/​humanReadable/​index.ts Routes formats and coordinates previews.
src/​humanReadable/​humanReadablePane.css Styles consolidated document and media previews.
src/​humanReadable/​docxPreview.ts Adds lazy DOCX rendering.
src/​dokieli/​dokieliPane.ts Simplifies imports and uses shared logging.
src/​components/​pdf-viewer/​PdfViewier.styles.css Styles PDF pages and thumbnails.
src/​components/​pdf-viewer/​PdfViewer.ts Adds canvas-based PDF viewing and navigation.
src/​components/​pdf-viewer/​pdfJs.ts Provides the lazy PDF.js entry point.
src/​components/​pdf-viewer/​index.ts Exports the PDF viewer component.
src/​components/​iframe-preview/​index.ts Exports the iframe preview component.
src/​components/​iframe-preview/​IframePreview.ts Encapsulates authenticated iframe previews and cleanup.
src/​components/​iframe-preview/​IframePreview.styles.css Styles the iframe preview component.
package.json Updates rendering and accessibility-test dependencies.
package-lock.json Updates the locked dependency graph.

Review effort: Balanced

Comment thread src/components/pdf-viewer/PdfViewer.ts Resolved
Comment thread src/humanReadable/docxPreview.ts Resolved
Comment thread src/components/pdf-viewer/PdfViewer.ts Resolved
Comment thread src/humanReadable/index.ts Resolved
Comment thread src/mainPage/index.ts Resolved
Prompt: Help addressing PR feedback a few prompts

Co-authored-by: GPT-5.6 Luna <gpt-5.6-luna@openai.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In review

2 participants