Skip to content

feat(datagrid): jump to a column by name in a wide result - #2611

Open
datlechin wants to merge 1 commit into
mainfrom
feat/jump-to-column
Open

feat(datagrid): jump to a column by name in a wide result#2611
datlechin wants to merge 1 commit into
mainfrom
feat/jump-to-column

Conversation

@datlechin

Copy link
Copy Markdown
Member

Fixes #2495

What

A Jump to Column panel for the data grid. Cmd+Shift+J, Edit > Find > Jump to Column…, or Jump to Column… at the foot of the Columns popover opens a fuzzy search over the columns of the result on screen. Each row shows the column's name, its type and its position among the presented columns; Return scrolls the column into view and puts the cell cursor in it. A hidden column is listed too, marked Hidden, and jumping to it shows it first.

How

  • The panel is the same floating panel Open Quickly uses (QuickSwitcherPanelController), which now records the identity of what it presents so Cmd+Shift+J toggles its own panel and never closes an Open Quickly it did not open. The row chrome the two panels share (bold matched characters, footer key hints) moved into QuickSwitcherRowChrome.
  • GridColumnCatalog builds one GridColumnEntry list from the result's columns and types, the tab's hidden set, the grid's live display order and the columns the visibility picker already offered. The Columns popover and the jump panel both render it, so hiding and jumping read one list. The popover rows now show the column type beside the name.
  • TableViewCoordinator.jumpToColumn(dataIndex:) resolves the column through tableColumnIndex(for:) and presentsColumn, then goes through KeyHandlingTableView.focusCell, the one path a keystroke moves the cell cursor by, so the row selection, the repaint and the accessibility notice all follow. A hidden column parks the jump on pendingColumnJump and showColumn runs; the grid's next update pass consumes it once the column is presented, the same shape as the scroll anchor restore.
  • ShortcutAction.jumpToColumn is a data-grid action with default Cmd+Shift+J, rebindable in Settings > Keyboard. The menu item is validated through MenuValidationContext.canJumpToColumn: a connected window whose selected tab shows the data grid with columns to list. A query tab's result counts as much as a table's.

Tests

  • GridColumnCatalogTests: display positions after a reorder, hidden result columns, schema-only hidden columns, duplicate names, picker order.
  • ColumnJumpViewModelTests: fuzzy ranking with matched indices, empty-query order, cursor preselection, selection reset on a new query, clamped movement, list height.
  • TableViewCoordinatorColumnJumpTests: a jump seeds the cursor on the first row, keeps a selected row, refuses a hidden column, a parked jump lands once the column is presented and keeps its index across duplicate names, a table tab's parked jump waits for the refetched result, a replacement without the column drops it, a landed jump supersedes it, a jump against another table is dropped, a result with no rows still scrolls, releaseData drops it.
  • KeyboardShortcutTests, MainMenuBuilderTests, QuickSwitcherPanelControllerTests, JumpToColumnMenuValidationTests: the default chord, the menu placement, the panel identity, the validation gate.
  • ColumnJumpUITests: a 60-column query, the shortcut, the menu item and the popover button each open the panel, a fuzzy match lists the column with its position, and Return brings the last column's header into the viewport.

Verification

All through .claude/skills/fix-issue/scripts/verify.sh on the worktree, logs under .analysis/feat-jump-to-column/logs/:

Step Verdict
generate PASS
build (build-TablePro-221902.log) PASS
test on the 14 touched suites (test-GridColumnCatalogTests-221936.log) PASS, 125 cases
uitest ColumnJumpUITests OpenQuicklyCommandUITests ResultStatusBarUITests (test-ColumnJumpUITests-222052.log) PASS
swiftlint lint --strict on every touched file 0 violations
docs/scripts/check-writing-style.sh, check-docs-against-source.py, check-links.py clean

Codex read the diff cold. The review pass returned seven findings: five fixed (the docs images, a mounted-grid gate on every entry point, a commit fenced to the tab and grid it opened over, a parked jump that keeps its data index across duplicate names, an Open Quickly panel identity) and two dismissed below. The adversarial-review pass returned five: four fixed (a commit also proves the column at that index still carries the entry's name, a landed jump supersedes a parked one and a replacement result without the column drops it, a table tab's parked jump waits for the refetched result rather than the interim update that unhides an already-fetched key column, and the Columns popover counts one row per name) and one reported as a pre-existing defect in the collateral register rather than fixed here.

Dismissed: the suggestion to classify the shortcut .global. Jump to Column is dispatched by its menu item and validated by grid state, the same as Previous Page, Copy with Headers and every other .dataGrid action; .global is for the find commands, which route to whichever surface holds focus. The documented limitation that a user can rebind an editor action onto a grid chord is unchanged. Also dismissed: retrying a hidden-column jump when a query is already running. That is showColumn's existing behaviour for the popover too, and the parked jump lands whenever the column arrives.

Before / After

The panel over a 60-column join in the sample database, typed post, light and dark. These are the two files the docs page ships (docs/images/column-jump*.png); the display attached during capture was 1x, so they are 1512x861 rather than the 3024x1722 the other docs images carry.

Before After
A 60-column result: PostalCode is column 41 and can only be reached by scrolling. Cmd+Shift+J, post, Return: the grid scrolls to PostalCode and the cell cursor sits in it on the selected row.

Jump to Column, light

Jump to Column, dark

https://claude.ai/code/session_0128vQ6G1kKX83UFyY3Ct5uT

@mintlify

mintlify Bot commented Sep 2, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
TablePro 🟢 Ready View Preview Sep 2, 2026, 3:26 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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.

Jump to Column in a wide result

1 participant