Repository navigation
Calc: SUBTOTAL 109 recalculates when Row Height, AutoFit or Ungroup reveal rows - #796
Merged
h-a-n-a-s-h-i merged 2 commits intoOct 13, 2026
Merged
Conversation
…or Ungroup reveal rows home.rowHeight, home.autofitRowHeight and data.ungroup change row hidden state without marking the edit structural, so SUBTOTAL(101-111) kept a stale value. Found by the command-sequence fuzz (seed 3). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Oct 12, 2026
# Conflicts: # ROADMAP.md # crates/engine/src/tests.rs
Member
|
Merged — thank you @vangel76 for the contribution! I merged main into your branch to resolve conflicts with other PRs that landed first. |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause:
home.rowHeight(non-zero height unhides, zero hides),home.autofitRowHeight(clears hidden) anddata.ungroup(unhides rows of removed groups) change row hidden state without settingcx.structural, so SUBTOTAL(101-111) cells stay stale in memory (incremental recalc) and differ from a full recalc. Found by the command-sequence fuzz (seed 3); minimal repro:selection.set E8:F13,home.hideRows 9:11,home.rowHeight 60with=SUBTOTAL(109,Sales[Q1]). Pre-existing on main (the new regression test fails there), not caused by WordArt (#789), whose changed command mix only exposed it.Change: mark these three commands structural, like
home.hideRowsalready does.Tests:
tests::subtotal_109_recalculates_when_row_height_or_autofit_reveals_rows(fails before, passes after).cargo test -p gridcraft-engine --lib(230 ok),--test command_sequence_fuzz(default seeds and GRIDCRAFT_FUZZ_SEEDS=40 all green), clippy -D warnings, fmt on gridcraft-engine.Not done: no regression test for the ungroup path specifically; other hide paths (filter apply, outline) already set structural.
🤖 Generated with Claude Code