Skip to content

fix(grid): tie edits to the result set on screen - #870

Merged
EVWorth merged 1 commit into
mainfrom
claude/hopeful-bardeen-1k4d1h
Oct 23, 2026
Merged

EVWorth merged 1 commit into
mainfrom
claude/hopeful-bardeen-1k4d1h

Conversation

@EVWorth

@EVWorth EVWorth commented Oct 23, 2026

Copy link
Copy Markdown
Owner

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 results array. 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.

ResultsGrid now passes the result set on screen (results[activeResultIndex]) as the owner, both to useGridEditing and 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.
  • Vitest: 159 files, 3194 tests. The new test fails without the fix.
  • The browser suite passes: all 10 files.

Generated by Claude Code

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
@EVWorth
EVWorth merged commit a7d852d into main Oct 23, 2026
12 checks passed
@EVWorth
EVWorth deleted the claude/hopeful-bardeen-1k4d1h branch October 23, 2026 11:39
@EVWorth EVWorth mentioned this pull request Oct 23, 2026
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.

Switching result sets keeps the grid's pending edits

2 participants