Skip to content

feat(sidebar): add New Query to Favorites plus menu#1838

Merged
datlechin merged 2 commits into
TableProApp:mainfrom
J2TeamNNL:feat/sidebar-new-query
Jul 10, 2026
Merged

feat(sidebar): add New Query to Favorites plus menu#1838
datlechin merged 2 commits into
TableProApp:mainfrom
J2TeamNNL:feat/sidebar-new-query

Conversation

@J2TeamNNL

Copy link
Copy Markdown
Contributor

Summary

  • Add New Query as the first item in the Favorites sidebar + menu; it opens an empty SQL query tab via the existing newTab() path (same as Cmd+T).
  • Update docs (favorites.mdx, tabs.mdx) and CHANGELOG.
  • Add localization strings for the new menu label and tooltip.

Autocomplete (table/column suggestions), execute shortcuts (Cmd+Enter), and optional auto-uppercase keywords are unchanged; this PR only adds a clearer entry point for creating a new query from the Favorites sidebar.

Test plan

  • Connect to a database, switch to the Favorites sidebar tab.
  • Click + > New Query and confirm an empty query tab opens with editor focus.
  • Confirm New Favorite, New Folder, and linked-folder actions still work.
  • Confirm Cmd+T still opens a new query tab.
  • Confirm Cmd+Enter still executes a query.
  • Confirm Settings > Editor still shows Auto-uppercase keywords (default off).

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@datlechin

Copy link
Copy Markdown
Member

Addressed the review findings and pushed to this branch (maintainerCanModify):

Rebased onto current main / CHANGELOG conflict resolved. The branch was based before 0.56.1/0.56.2. Merged main and put the New Query entry back under [Unreleased], above the released [0.56.2] section. PR is mergeable again; the effective diff is unchanged (5 files: CHANGELOG, string catalog, FavoritesTabView, favorites.mdx, tabs.mdx).

tabs.mdx SQL-button row removal is correct. I checked: there is no toolbar button that opens a new query tab (the only "SQL" references are queryLanguageName: "SQL" plugin metadata). That doc row was stale, so dropping it is a fix, not a regression.

Minor points from the review, resolved: FavoritesTabView lints clean under swiftlint --strict; the old "Add" help string is not orphaned (still used in CustomSlashCommandsSection and FavoriteEditDialog).

On test coverage: no automated test added, and here's why. The action is a single button wired to commandActions.newTab(), which is the same path as Cmd+T and is already exercised. The only end-to-end surface is the Favorites sidebar + menu, which is only reachable with an active connection window, and TableProUITests currently has just launch smoke tests with no connection-seeding harness. A UI test would mean building that harness (seed a SQLite connection at launch), which is out of scope for this change and would be flaky. If a connection-seeding UI harness lands later, this flow is a good candidate to cover then.

One design note for the maintainer, not blocking: putting New Query in the + (add to favorites) menu is slightly off the "add an item to this list" idiom, since it opens a tab rather than adding to the sidebar. The divider and updated tooltip mitigate it, and it's a reasonable convenience, but worth a conscious call.

@datlechin datlechin merged commit d5ba969 into TableProApp:main Jul 10, 2026
2 checks passed
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.

2 participants