Repository navigation
fix(grid): tie edits to the result set on screen - #870
Merged
Merged
Conversation
Edits are keyed by row index, and their owner was the whole run, so switching to another of the run's result sets kept them and Save applied them to that set's rows and table. The owner is now the set shown. Fixes #869. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Merged
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.
Fixes #869.
Grid edits are keyed by row index. Their owner, the thing that decides when pending edits are dropped, was the run's whole
resultsarray. A script that returns several result sets keeps the same array while the user switches between them. So edits made on result set 1 stayed queued after switching to result set 2, and Save applied them to set 2's rows, and to set 2's table if it was a different one.ResultsGridnow passes the result set on screen (results[activeResultIndex]) as the owner, both touseGridEditingand to the per-tab grid memory from #866. Switching sets with unsaved edits now drops them and shows the existing "Discarded N unsaved change(s): the results changed" notice (#865). They no longer land on the wrong rows.Checks
tsc --noEmit, ESLint (0 errors, warnings unchanged) and dprint are clean.Generated by Claude Code