Skip to content

refactor(datagrid): column index helpers, metadata dedup, keyboard nav, overlay panel#917

Merged
datlechin merged 1 commit into
mainfrom
refactor/datagrid-audit-remaining
Apr 27, 2026
Merged

refactor(datagrid): column index helpers, metadata dedup, keyboard nav, overlay panel#917
datlechin merged 1 commit into
mainfrom
refactor/datagrid-audit-remaining

Conversation

@datlechin
Copy link
Copy Markdown
Member

Summary

  • Column index abstraction: replace raw "col_\(index)" string encoding and Int(dropFirst(4)) decoding with columnIdentifier(for:), tableColumnIndex(for:), dataColumnIndex(for:) helpers on DataGridView, rename columnIndex(from:) to dataColumnIndex(from:) for consistency (20+ sites)
  • ResultSet metadata dedup: replace 5 stored column metadata properties on ResultSet with computed properties proxying to the shared RowBuffer, remove redundant assignments in QueryHelpers
  • Delete DatabaseRowProvider: remove 137 lines of dead code (never instantiated)
  • VoiceOver: remove 5,000-row gate on accessibility labels so all datasets get screen reader announcements
  • Escape key: cancelOperation clears cell focus only, no longer deselects rows
  • Home/End/PageUp/PageDown: add 4 navigation key codes and handlers with Shift+selection support
  • Context menu key equivalents: remove Cmd+C/V/D and Backspace shortcuts from context menu (belong on menu bar only)
  • CellOverlayEditor: replace NSEvent.addLocalMonitorForEvents click-outside monitor with borderless CellOverlayPanel (NSPanel subclass), click-outside handled natively via resignKey()

Test plan

  • Open a table, verify column headers, sorting, and cell editing still work
  • Click a cell to focus, press Escape: focus clears but row selection stays
  • Press Home/End/PageUp/PageDown to navigate rows, with Shift held for range selection
  • Right-click a row: context menu shows no keyboard shortcuts
  • Double-click a multiline cell: overlay editor appears as a floating panel, click outside commits
  • Open a table with >5,000 rows, enable VoiceOver: cell labels are announced
  • Verify multi-statement query results display correctly (ResultSet metadata dedup)

🤖 Generated with Claude Code

…v, overlay panel (#917)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@datlechin datlechin force-pushed the refactor/datagrid-audit-remaining branch from f769971 to 6a76de7 Compare April 27, 2026 16:57
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f769971494

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

private func handlePageDown(isShiftHeld: Bool) {
guard numberOfRows > 0 else { return }
let visibleRows = max(1, Int(visibleRect.height / rowHeight) - 1)
let currentRow = selectedRow >= 0 ? selectedRow : 0
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Compute Shift+Page navigation from pivot, not selectedRow

When range-selecting with Shift held, selectedRow is always the first selected row, so using it as the base row causes repeated Shift+PageDown/Shift+PageUp presses to stop extending the selection after the first jump. In practice, once a range like 10...25 is selected, selectedRow stays at 10, so targetRow is recomputed from 10 every time instead of from the current pivot; this breaks expected keyboard range extension behavior for the new PageUp/PageDown handlers.

Useful? React with 👍 / 👎.

@datlechin datlechin merged commit 2324323 into main Apr 27, 2026
2 checks passed
@datlechin datlechin deleted the refactor/datagrid-audit-remaining branch April 27, 2026 16:58
datlechin added a commit that referenced this pull request Apr 27, 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.

1 participant