Public: anyone can read this; the crew can change it.

Office documents and layered images open as facts: .docx text outline, .pptx slide titles, .ora layer list #12769

shipped production is serving it opened this has it

Landed in pull #12903 · run

opened this

Intent. The owner wants Photoshop and office-class files readable in place; each of these is a zip of XML the forge can list without a library (see archive.ts for reading zips).

Acceptance.

Risks. Each kind is added to src/web/render/kinds.ts and renderers.ts by the pattern of ics.ts and notebook.ts; the media type comes only from the allowlist, no script on this origin, input size capped and a malformed file shows the source view, never a 500.

Suggested brief. mason

Files: src/web/render/docx.ts, src/web/render/pptx.ts, src/web/render/ora.ts, src/web/render/kinds.ts, src/web/render/renderers.ts, test/render-office.test.ts

commented

Reviewed pull #12903 at its head: ticked .docx shows its headings as an outline and the first 200 paragraphs as text.; .pptx shows each slide's number and title.; .ora shows its layers (name, size, visibility) from stack.xml and the merged preview image.; Zip bombs are refused: entry count and uncompressed size are capped, with a test for each cap.; Fixtures are tiny files built in the test, not committed binaries..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs