Skip to content

Conversation

@severo
Copy link
Contributor

@severo severo commented Dec 11, 2025

If the last range ends at EOF, snap the row numbers of its cells to the estimated number of rows. We do it only when showing the results (getCell), not when checking which rows to fetch, because it can lead to gaps between rows.

@severo severo requested a review from Copilot December 11, 2025 23:00
@severo severo changed the title fix incoherency at the end of the table fix incoherence at the end of the table Dec 11, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an incoherency issue that occurs at the end of a CSV table when the last cached range ends at EOF (end of file). The fix ensures that row numbers in the final range are snapped to match the estimated total number of rows, but only during data retrieval (display), not during row fetching operations.

Key Changes:

  • Added snapEOFToNumRows parameter to getStatus() method to control when EOF snapping should be applied
  • Modified getCell() to pass snapEOFToNumRows: true, enabling the fix for display scenarios
  • Implemented conditional logic to calculate accurate row positions when the last range ends at EOF

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@severo severo merged commit da9cbc9 into main Dec 11, 2025
10 checks passed
@severo severo deleted the snap-eof-to-num-rows-only-in-getcell branch December 11, 2025 23:04
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.

2 participants