Skip to content

Fix colSpan called as a summary row on column group header rows - #4220

Merged
nstepien merged 4 commits into
mainfrom
fix-colspan-group-header-rows
Oct 22, 2026
Merged

nstepien merged 4 commits into
mainfrom
fix-colspan-group-header-rows

Conversation

@nstepien

Copy link
Copy Markdown
Collaborator

Found while working on #4219.

In a grid with column groups and bottom summary rows, moving the active cell into a column group header row called the user's colSpan with { type: 'SUMMARY', row: undefined }.

getCellColSpan checks for the main header row, then top summary rows, then data rows. Any other rowIdx fell through to the bottom summary rows branch, and that included column group header rows above the main header row. So bottomSummaryRows[rowIdx - rows.length] read a negative index. A colSpan that reads args.row for summary rows would throw, and one that returns a span for summary rows would move the active cell to the wrong column.

The bottom summary rows branch now also requires rowIdx >= rows.length. Column group header rows fall through to return undefined, which is what we want because column group header cells don't use colSpan.

The new test failed in Chromium, Firefox, and WebKit before the fix.

🤖 Generated with Claude Code

When navigating to a column group header row, `getCellColSpan` fell through
to the bottom summary rows branch and called `colSpan` with
`{ type: 'SUMMARY', row: undefined }`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Oct 22, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.41%. Comparing base (5ff7a38) to head (19502ee).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4220      +/-   ##
==========================================
+ Coverage   98.36%   98.41%   +0.05%     
==========================================
  Files          45       45              
  Lines        1955     1955              
  Branches      727      727              
==========================================
+ Hits         1923     1924       +1     
+ Misses         32       31       -1     
Files with missing lines Coverage Δ
src/utils/activePositionUtils.ts 100.00% <100.00%> (+1.07%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

nstepien and others added 3 commits October 22, 2026 01:05
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nstepien
nstepien merged commit db095b8 into main Oct 22, 2026
6 checks passed
@nstepien
nstepien deleted the fix-colspan-group-header-rows branch October 22, 2026 00:56
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