Skip to content

feat(coordinator): add result pagination to the Query menu for keyboard access (#1490)#1514

Merged
datlechin merged 1 commit into
mainfrom
a11y/pagination-menu
May 30, 2026
Merged

feat(coordinator): add result pagination to the Query menu for keyboard access (#1490)#1514
datlechin merged 1 commit into
mainfrom
a11y/pagination-menu

Conversation

@datlechin
Copy link
Copy Markdown
Member

Part of #1490 (keyboard, focus, accessibility). Menus & shortcuts surface.

The pagination shortcuts (Cmd+[ / Cmd+]) were bound only on the results-bar toolbar buttons, so they were not discoverable from the menu bar and First/Last Page had no menu home at all. This adds Previous / Next / First / Last Page to the Query menu, wired to the existing MainContentCoordinator paging methods through four thin MainContentCommandActions wrappers, with the existing .optionalKeyboardShortcut bindings. No new shortcut keys invented; First/Last stay unbound by default and are rebindable in Settings, Keyboard.

Makes the pager keyboard-discoverable and reachable from the menu bar. Lint clean, style gate clean.

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

https://github.com/TableProApp/TablePro/blob/98ea7831c35eb1344486c659e226caf19e84c5d7/TableProApp.swift#L440
P2 Badge Gate page commands to paginatable table results

With a connected window this registers and enables Cmd+] even when the selected tab is a normal SQL query tab. The existing pagination controls are only rendered for table tabs (MainStatusBarView checks snapshot.tabType == .table), and rebuildTableQuery(at:) returns without changing SQL when there is no tableContext.tableName; so for an arbitrary SELECT that loads at least one page, goToNextPage() advances the pagination state and reruns the same query instead of fetching an offset page. Please disable the menu shortcut unless the current tab can actually page, or add the same table/pagination guards before dispatching the action.

ℹ️ 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".

@datlechin datlechin merged commit dd2f1c6 into main May 30, 2026
4 checks passed
@datlechin datlechin deleted the a11y/pagination-menu branch May 30, 2026 10:40
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