fix(datagrid): Delete multi-select, filter panel redesign, Cmd+R refresh#1647
fix(datagrid): Delete multi-select, filter panel redesign, Cmd+R refresh#1647J2TeamNNL wants to merge 1 commit into
Conversation
…redesign, D14 refresh fix - Delete key now reads gridSelection.affectedRows first, mirroring the copy() pattern - rightMouseDown override preserves multi-row selection when right-clicking inside it - Filter panel: "Unset" -> "Clear" (clearAppliedFilters, keeps rows); per-row Apply buttons removed; "Apply Only This Filter" added to row context menu; tri-state checkbox in header toggles all rows enabled/disabled; "Remove All Filters" added to options menu (clearFilterState) - Refresh: cancel + nil currentQueryTask + reset isExecuting before runQuery so Cmd+R while a query runs always starts a fresh query
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2fa3e5703d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| currentQueryTask?.cancel() | ||
| currentQueryTask = nil | ||
| tabManager.mutate(at: tabIndex) { $0.execution.isExecuting = false } |
There was a problem hiding this comment.
Avoid clearing the running task before restarting
When Cmd+R is pressed while a table query is still running, these lines discard the only currentQueryTask reference and mark the tab idle before runQuery() starts the replacement. The canceled task can still be inside queryExecutor.executeQuery; when it later observes cancellation, executeQueryInternal calls resetExecutionState(...), which unconditionally sets isExecuting = false and currentQueryTask = nil for the tab, thereby clearing the newly-started refresh task's UI/task state. Because the task reference is nil before executeQueryInternal runs, its existing cancelQuery() path is also skipped for this refresh case.
Useful? React with 👍 / 👎.
|
Splitting into separate PRs per fix (D12, D13, D14). |
Summary
gridSelection.affectedRowsfirst before falling back toselectedRowIndexes, matching the existingcopy()pattern.validateUserInterfaceItemanddeleteSelectedRowsIfPossibleupdated accordingly.rightMouseDownoverride inKeyHandlingTableView: when the clicked row is already inside the selection, the override skipssuper(which would collapse the selection) and callsNSMenu.popUpContextMenudirectly.clearAppliedFilters()— keeps filter rows, returns table to unfiltered); per-row Apply/Applied buttons removed; "Apply Only This Filter" moved to each row's context menu; tri-state checkbox added to panel header to toggle all rows enabled/disabled; "Remove All Filters" added to the...options menu (callsclearFilterState()).currentQueryTask?.cancel(), immediately setcurrentQueryTask = niland resettab.execution.isExecuting = falsesorunQuery()is not blocked by the guard check.Test plan
...menu: click "Remove All Filters" — all filter rows removed, table reloads without filters