Document preview - #45857
Conversation
- i18n: PDF iframe title and attachment filename fallback - document-preview: render-failure fallback for docx/markdown (T4 DoD) - plugin-invoke: abort timeout on listPlugins/pluginInvoke - session-ui: docx-preview via workspace catalog - tests: zero-plugins list case, invoke signal wiring - office-preview: shared bubble style, named openManaged
Extract duplicated table-building into buildXlsxTable helper: - Use actual Excel column widths from ws.colWidths/colWidthRanges/defaultColWidth - Handle ws.mergeCells with colspan/rowspan (skip consumed cells) - Freeze columns with sticky left positioning (ws.freezeCols) - Both initial render and sheet-tab switching use the same helper
- Fallback to wb.sheets.map(s.name) when wb.sheetNames is empty - Cap column widths at 400px to prevent absurd columns - Extract colPx() helper to deduplicate width resolution
- Remove sheetNames.length guard — always render tab bar - Fallback to 'Sheet1' when sheetNames is empty at runtime - Remove debug console.log
- Set explicit color on sheet tab buttons and zoom text - Was inheriting dark-mode text color from parent container
- DOCX: @silurus/ooxml WASM canvas (Word-fidelity) with docx-renderer fallback - XLSX: HTML table from XlsxWorkbook model with actual column widths, merge cells, freeze columns, sheet tab bar with tab switching - PPTX: PptxScrollViewer WASM with text selection - V2 composer accepts office MIME types for drag/drop/paste/file picker - Side panel tab routing for document previews (desktop) - Electron vite config: WASM assets, ooxml exclude from optimizeDeps - Fix: debug marker removed from file-picker.ts - Fix: hardcoded path replaced with path.resolve in electron config
- Remove 10 narrating comments that state obvious code behavior - Add OoxmlViewer interface to replace viewer: any in renderers - Remove CONTEXT.md (skills-repo glossary, doesn't belong in project root) - Update stories kind type to include xlsx/pptx
- Add XLSX_URL from EPC-Cashflow-Model (14K base64) - Add Xlsx story export - Fix Fallback story kind from xlsx to xyz (was misleading)
- Move test fixtures to fixtures/ directory (pdf, docx, xlsx, md) - Use Vite ?url imports instead of inline base64 data URLs - Stories load files at build time, cleaner source code
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search results, I found a potential duplicate: PR #45853: feat: offline document preview (docx/xlsx/pptx/pdf) This PR appears to be directly related to the current PR #45857 "Document preview" - they likely address the same feature for adding document preview functionality. PR #45853 is more specific, mentioning support for offline preview of various document formats (docx, xlsx, pptx, pdf). |
Issue for this PR
Closes #
Type of change
What does this PR do?
Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR.
If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!
How did you verify your code works?
Screenshots / recordings
If this is a UI change, please include a screenshot or recording.
Checklist
If you do not follow this template your PR will be automatically rejected.