Skip to content

feat(favorites): copy the path of a linked SQL file or folder - #3711

Merged
datlechin merged 2 commits into
mainfrom
feat/2473-linked-favorite-copy-path
Oct 20, 2026
Merged

datlechin merged 2 commits into
mainfrom
feat/2473-linked-favorite-copy-path

Conversation

@datlechin

@datlechin datlechin commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Linked SQL file row menu: Copy Query, Copy Path, Copy Relative Path, Show in Finder.
  • Linked subfolder row gets its own menu: Show in Finder, Copy Path, Copy Relative Path. It used to show the background creation menu, whose items stay in the list's empty area and the + button.
  • Linked folder root keeps Copy Path and has no Copy Relative Path: relative to itself it is empty.
  • File > Copy Path and File > Copy Relative Path, enabled only while the Favorites list has focus on a linked row (FavoritesNSOutlineView.validateUserInterfaceItem).
  • Two rebindable shortcuts. Copy Path defaults to Shift-Option-Command-C, since Option-Command-C is already Copy with Headers. Copy Relative Path ships unbound. The context menu shows the same bindings.
  • Both items show at once instead of Copy Relative Path behind Option: the HIG keeps dynamic items out of contextual menus.
  • Subfolder nodes carry their URL (FavoriteNode.Content.linkedSubfolder(..., url:)), and Content.filePath gives each linked row its absolute and relative path.
  • Updated on purpose: ShortcutUniquenessTests.unboundActionsAreCounted goes from 21 to 22 for Copy Relative Path.

Not in this PR

  • One path per line for a multi-row selection: the Favorites outline is single-selection.
  • Copy Path for the file behind the active editor tab, and a file path in MCP list_recent_tabs.
  • No screenshots: the app could not be driven in that session. FavoritesMenuSpecTests and MainMenuStructureTests pin the menu contents and order.

Test plan

  • FavoritesMenuSpecTests: item order for a linked file, folder root and subfolder; saved queries and their folders offer no path; the path commands carry the File menu's shortcuts.
  • New FavoritesOutlinePathCommandTests: enabled state and copied text for a file, a folder root and a row with no file.
  • FavoriteNodeTests: nested subfolders know their own paths; the root has no relative path.
  • MainMenuStructureTests.fileMenuCopiesLinkedPaths: both File items, their selectors and key equivalents.
  • 147 of 147 cases across 13 suites, lint, l10n and docs checks passed locally.

Fixes #2473

@datlechin
datlechin enabled auto-merge (squash) October 20, 2026 17:57
@datlechin
datlechin merged commit fdb14d7 into main Oct 20, 2026
8 checks passed
@datlechin
datlechin deleted the feat/2473-linked-favorite-copy-path branch October 21, 2026 03:53
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.

Copy Path in the linked SQL favorite context menu

1 participant