Repository navigation
fix(autosum): stop the guessed range at a blank cell - #3309
Conversation
The single-cell AutoSum guess stepped over one blank cell when a number sat above it, so a second block of numbers below a gap was summed together with the first block. It now stops at the first non-number, as Excel does. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
FredApps
left a comment
There was a problem hiding this comment.
Reviewed current head 1ff10df55756d3823bcf91e3d3fc31462b6276b4. No findings. I checked the complete diff, guessed_range and its caller: the upward scan now stops at the first nonnumeric cell, preserves row-zero bounds and the existing leftward fallback, and does not change explicit-range AutoSum. The new regression exercises separate blocks with a prior subtotal and verifies 30 rather than double-counting that earlier block.
The current-head cargo xtask ci log includes the new autosum_of_a_single_cell_stops_at_a_blank_cell test passing; 3,374 tests passed with 1 skipped. I relied on that CI execution rather than claiming a new local run. Approved.
|
Merged reviewed head Review: #3309 (review) |
Fixes #3291
AutoSum on a single cell guessed its range upward and stepped over one blank cell when a number sat above the gap. With a block of numbers, a total, a blank row and a second block, the second total therefore summed both blocks (and the first total). The guess now stops at the first cell that isn't a number, as Excel does and as the leftward guess already did.
Tested: new engine test
autosum_of_a_single_cell_stops_at_a_blank_cell(issue layout; failed before with 42 instead of 30, passes now). Engine crate tests (831) and clippy -D warnings pass; workspace nextest passes except UI tests that panic on missing glyphs in this environment (no CJK fonts).🤖 Generated with Claude Code
Summary by CodeRabbit