Repository navigation
Conversation
Carry rich-text runs through streamed cells and clone repeated headers safely.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Rich-text serialization src/xlsx/stream-writer.ts, test/xlsx-stream-rich-text.test.ts |
StreamStyledCell accepts richText runs, which the streaming serialization paths pass to the shared cell serializer. Tests cover five writer modes, rich-text formatting, formula-like text, and fallback to values or formulas when runs are empty. The addRow documentation lists rich text as supported content. |
Header snapshot preservation src/xlsx/stream-writer.ts, test/xlsx-stream-rich-text.test.ts |
Styled-cell detection recognizes richText. Captured rows deep-clone rich-text runs. Rollover tests check that later mutations do not change the captured header. |
Priority:
Estimated code review effort: 2 (Simple) | ~15 minutes
Change: Bug fix · Severity of issue fixed: Medium
Sequence Diagram(s)
sequenceDiagram
participant XlsxStreamWriter
participant serializeRow
participant serializeCell
participant SharedCellSerializer
XlsxStreamWriter->>serializeRow: Pass streamed row
serializeRow->>serializeCell: Pass cell and richText runs
serializeCell->>SharedCellSerializer: Pass ResolvedCell with richText
Possibly related PRs
- productdevbook/hucre#613: This PR’s shared-string serialization path uses the rich-text storage added by PR
#613.
Suggested reviewers: jlucaso1, productdevbook
Merge Risk: 
Minimal · up to fd59a
-
No issue requiring a fix before merge was identified.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Linked Issues check
-
Explanation
Issue
#637requires rich-text support forwriteXlsxStreamSheets,writeXlsxStream, andXlsxStreamWriter. The diff addsrichText?: RichTextRun[], recognizes rich-text-only cells, and passes runs to the shared serializer. The shared path covers inline and shared strings. The added tests cover fallback values, literal=text, formatting, empty runs, all three writer APIs, and header rollover.snapshotRowdeep-copies runs and nested fonts before reuse.
Full details: Out of Scope Changes check
-
Explanation
The changes stay within issue
#637. The source changes add the requested streaming rich-text plumbing and header snapshot isolation. The new tests validate the requested writer modes and edge cases. The documentation update describes the newaddRowcapability.
-
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Problem
Streaming XLSX writers drop rich-text runs: a cell containing only
richTextdisappears, while a cell with a fallbackvalueloses its run formatting. The buffered writer already supports these runs, butStreamStyledCelland the streaming serializer did not pass them through. Existing streaming tests covered styles and formulas, not rich-text runs.Change
richText?: RichTextRun[]toStreamStyledCelland recognize rich-text-only wrappers.Fixes #637.
Validation
main: 10 fail and 5 pass. With the fix: all 15 pass.--maxWorkers=1.git diff --checkpasses.Full-suite attempts did not finish cleanly under heavy concurrent machine load: unrelated stress/property/fuzz tests hit their five-second timeouts, and a reduced-worker run also hit the large-encryption test's 30-second timeout. Those runs were stopped; the full suite still needs CI verification. I did not open the output in Excel.
Summary by CodeRabbit