Repository navigation
🐛 fix(keymap): check the grid keys the SQL results grid reads against SQL-tab keys (#141) - #148
Merged
Merged
Conversation
… SQL-tab keys The read-only results grid of a SQL tab takes grid.rowDetails and grid.copyCells in its keydown, and grid.setValue through Glide's activateCell, though all three are tableTab actions: Settings accepted one of them on Ctrl+S (query.save) and the grid then ate the save. The registry declares them with `alsoIn: ["queryTab"]`; conflictFor treats such an action as overlapping that scope's own actions (not the editor's, whose keys never reach the grid; the #90 shadows pairs stay exempt). A parity test in DataGrid.test.tsx renders ResultsPanel and checks that the actions its grid takes equal actionsAlsoIn("queryTab"). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…eys (#141) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Closes #141
Summary
Since #115, the read-only results grid of a SQL tab reads some
tableTabgrid actions, but the Settings conflict check only compared actions in overlapping scopes. A binding such asgrid.rowDetailson Ctrl+S was therefore accepted, and in the results grid it silently took overquery.save.alsoIn: ["queryTab"]on the three grid actions the results grid reads:grid.rowDetailsandgrid.copyCells(matched in DataGrid's keydown), andgrid.setValue(Alt+Enter, given to Glide as itsactivateCellkey, which Glide also takes on read-only cells).actionsAlsoIn(scope).conflictFor: an action now also conflicts with the own actions of the scopes in itsalsoIn, in both directions.shadowsexemption is unchanged.conflictFor. They now refuse or flag these bindings, and never rewrite a saved one.results_grid_actions_parityrenders the realResultsPanel, gives each registry action a unique key and records which ones the grid takes. It asserts the list equalsactionsAlsoIn("queryTab"), so a grid action added to the results grid later can't drift.grid.rowDetails= Mod+S is flagged and not rewritten.No action id changed, so there is no Rust change.
How it was tested
The full suite was not run locally because the dev machine was short on RAM. CI runs it.
Manual check list
"Show or hide the row details". Expect it to be refused with the Save query conflict
message.
table tab's grid Ctrl+D still duplicates rows. Then reset Save query.
"grid.rowDetails": "Mod+S"and"grid.commit": "Alt+S":the Row details row shows the collision note naming Save query, and the file is not
rewritten.
still toggles the row details. Ctrl+S in a SQL tab still saves.
Checklist
pnpm testgreen (touched files locally; full suite in CI)pnpm lintgreen (tsc; no Rust change, clippy in CI)pnpm test:rustgreen (not applicable: nosrc-tauri/change)src/lib/strings.ts<emoji> <type>(<scope>): <description>🤖 Generated with Claude Code