Skip to content

Conversation

@benhrtg
Copy link

@benhrtg benhrtg commented Oct 16, 2025

Changed

  • lib/doc/row.js: Removed incorrect async/await from commit() method
  • lib/stream/xlsx/worksheet-writer.js: Removed async/await deadlock in
    commit(), _commitRow(), and _writeRow() methods that were waiting for
    events that would never fire
  • lib/doc/workbook.js: Added conditional limit on definedNames processing
    to prevent hangs with files containing 50+ named ranges while preserving
    full functionality for typical files
  • lib/xlsx/xlsx.js: Removed debug console.log statements

@benhrtg benhrtg requested review from Elecweb and jedsada-gh October 16, 2025 19:31
@github-actions
Copy link

Files that got Smaller 🎉:

File raw gzip
dist/exceljs.bare.js -13 B +29 B
dist/exceljs.bare.min.js -133 B -48 B
dist/exceljs.js -13 B +45 B
dist/exceljs.min.js -133 B -58 B

@coderabbitai
Copy link

coderabbitai bot commented Oct 16, 2025

📝 Walkthrough

Walkthrough

This pull request converts several asynchronous methods to synchronous implementations across the codebase: Row.commit() becomes synchronous; WorksheetWriter.commit, _commitRow, and _writeRow are converted to synchronous methods and the rowsZipped/event-based waiting logic is removed. Workbook.set model(value) now only assigns/processes definedNames when value.definedNames exists and its length is between 1 and 49 inclusive (50+ are skipped for the named-ranges API). A validation loop that previously rejected worksheet relationship targets containing ".bin" has been removed from the xlsx reconciliation step.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "fix: resolve infinite loading with files containing many defined names" is directly related to the main objective of the changeset. The changes address infinite loading issues through multiple mechanisms: removing deadlock issues in async/await mechanisms (lib/doc/row.js and lib/stream/xlsx/worksheet-writer.js), adding a conditional limit on definedNames processing to prevent hangs with 50+ named ranges (lib/doc/workbook.js), and removing problematic validation logic (lib/xlsx/xlsx.js). The title clearly summarizes the primary fix being delivered and is specific enough that a teammate scanning history would understand the intent.
Description Check ✅ Passed The PR description is clearly related to the changeset and accurately describes the modifications across the files. It explains the removal of incorrect async/await patterns in lib/doc/row.js, the fixing of deadlock issues in lib/stream/xlsx/worksheet-writer.js, the addition of conditional limits on definedNames processing in lib/doc/workbook.js to handle 50+ named ranges, and mentions changes to lib/xlsx/xlsx.js. While there is a minor discrepancy in the description of what was changed in lib/xlsx/xlsx.js (description mentions console.log removal while the summary indicates validation loop removal), the overall description remains substantially related to the changeset's objectives and covers the primary changes.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch test-infinite-loading-fixes

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4f28adb and d2e5ba5.

📒 Files selected for processing (1)
  • lib/stream/xlsx/worksheet-writer.js (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • lib/stream/xlsx/worksheet-writer.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: compare

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0d541a0 and 4f28adb.

📒 Files selected for processing (4)
  • lib/doc/row.js (1 hunks)
  • lib/doc/workbook.js (1 hunks)
  • lib/stream/xlsx/worksheet-writer.js (5 hunks)
  • lib/xlsx/xlsx.js (1 hunks)
🔇 Additional comments (6)
lib/stream/xlsx/worksheet-writer.js (4)

236-237: LGTM! Clear explanation of the fix.

The comment clearly explains why the problematic code was removed and helps future maintainers understand the reasoning behind this change.


381-393: LGTM! Consistent with commit() changes.

The synchronous conversion of _commitRow() aligns with the commit() method changes and correctly removes the await on _writeRow().


613-641: LGTM! Clear fix documentation.

The comment on line 633 clearly documents why the await was removed, making the fix explicit for future maintainers.


221-278: StreamBuf.write is synchronous in this context; the dropped Promise-await was safe

lib/doc/row.js (1)

30-32: LGTM! Consistent with WorksheetWriter changes.

The conversion of commit() to synchronous correctly aligns with the synchronous _commitRow() implementation in WorksheetWriter. This change is part of the coordinated fix to remove the async/await deadlock.

lib/xlsx/xlsx.js (1)

408-411: Validation of .bin targets is unnecessary
No “.bin” references found in the codebase; the removed validation loop has no impact.

@getnuvo getnuvo deleted a comment from coderabbitai bot Oct 16, 2025
@github-actions
Copy link

Files that got Smaller 🎉:

File raw gzip
dist/exceljs.bare.js -13 B +29 B
dist/exceljs.bare.min.js -133 B -48 B
dist/exceljs.js -13 B +45 B
dist/exceljs.min.js -133 B -58 B

@benhrtg benhrtg merged commit 0b5ec8c into develop Oct 17, 2025
2 checks passed
@benhrtg benhrtg deleted the test-infinite-loading-fixes branch October 17, 2025 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants