Repository navigation
Conversation
Found while testing crates/engine/src/cmd/sheet.rs:216-238 (rewrite never updates Chart.source); used by crates/engine/src/cmd/insert.rs:849 (chart_switch) Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Independent verification, since this had no review. Applied cleanly on current
Same family of gap as #1711 and #1731, which I also verified today — |
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.
Found while testing
crates/engine/src/cmd/sheet.rs:216-238 (rewrite never updates Chart.source); used by crates/engine/src/cmd/insert.rs:849 (chart_switch)(no existing issue): chart.switchRowColumn rebuilds the chart from a stale source range after rows or columns are inserted or deleted.Cause
rewrite()insheet.rsfixed series, sparkline and anchor references when rows or columns were inserted or deleted, but never updatedChart.source.chart.switchRowColumnpreferssource, so it rebuilt the series from the old, stale range.Fix
rewrite()now adjustsChart.sourcewith the same reference adjuster used for the series formulas. If the structural edit deletes the whole source block, the source is cleared, so Switch Row/Column falls back to the block the series span.Verified
switch_row_column_follows_inserted_and_deleted_lines: fails onmainwithout the fix and passes with it (cargo test -p gridcraft-engine --lib switch_row_column_follows_inserted_and_deleted_lines).cargo xtask cipasses.Not changed
I did not change
chart_switchor how the series references are rewritten. I did not touch the behaviour of charts that have no stored source, such as charts read from a file.🤖 Generated with Claude Code