feat: add session document viewers and PDF controls - #1139
Merged
Merged
Conversation
4 tasks done
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.
Related issue
None — internal same-repository change.
Problem / pressure
Session links could preview PDFs, but their reading controls were limited. DOCX,
XLSX, and PPTX fell back to the generic binary-file notice; CSV/TSV had only a
source-text view. Loading format engines with the file panel would also impose
work on sessions that never open these files.
Summary
expandable text search while retaining the 64 KiB local range transport and
8-megapixel canvas cap.
an active panel and an idle browser period, bounds reads to 25 MiB, and loads
only the selected format engine. Parsers use workers; inactive previews do not
request an engine.
Keep the existing editable Source tab and terminate its worker when hidden.
acceptance coverage, and update the bilingual Spec and implementation notes.
Visual explanation
flowchart TD A[Session file snapshot] --> B{File format} B -->|PDF| C[PDF.js page viewer] C --> D[64 KiB local ranges + bounded canvases] B -->|DOCX / XLSX / PPTX| E[Static Office preview entry] E -->|active + browser idle| F[Bounded read, then selected engine + worker] B -->|CSV / TSV| G{Preview or Source} G -->|Preview active + idle| H[Worker parse/search + virtual table] G -->|Source| I[Existing text editor] C --> J[Existing file actions] F --> J H --> JBefore / after
Test plan
pnpm format,pnpm lint,pnpm lint:i18n,pnpm check:public-boundary, andpnpm --filter @lody/components typecheck.including narrow PDF controls and inactive Office/CSV loading checks.
pnpm --filter @lody/components build-storybook; verified the Officeengines are split into on-demand resources.
pnpm checkis blocked at the pre-existing nestedpackages/acp-extension-claudecheckout because its ownnode_modulesand@tsconfig/node22are missing in this worktree. Component checks above pass.pnpm docs checkreports six existing links into uninitialized ACP extensionsubmodules; no changed-document link errors remain.
lody-resource://rendering remains unverified here.Context handoff
Internal same-repository branch; the external contribution handoff does not apply.