Skip to content

[mac] Show parent folder for Cmd+P recents and disambiguate same-name tabs#294

Merged
Shpigford merged 1 commit into
mainfrom
cmdp-paths-and-tabs
Apr 29, 2026
Merged

[mac] Show parent folder for Cmd+P recents and disambiguate same-name tabs#294
Shpigford merged 1 commit into
mainfrom
cmdp-paths-and-tabs

Conversation

@Shpigford

Copy link
Copy Markdown
Owner

Summary

  • Cmd+P recents now show the same tertiary-gray parent-folder hint that search results already render — recents were being created with relativePath: url.lastPathComponent, which made the row's displayPath empty. In-vault recents now use VaultIndex.relativePath; orphan recents fall back to the immediate parent folder name.
  • Tabs gain a parent/filename qualifier (parent in tertiary) only when two open tabs share a filename, via a new WorkspaceManager.tabLabel(for:) helper modeled on the existing wikiLinkTarget collision pattern.

Fixes #254

Test plan

  • Cmd+P with no query: recent files show parent folder on the right (e.g. SKILL Notes).
  • Open two SKILL.md files in different folders: tabs render Notes/SKILL.md and Projects/SKILL.md with the folder portion in tertiary.
  • Open a third uniquely-named file: its tab stays bare (no prefix).
  • Close one of the colliding tabs: the survivor reverts to plain SKILL.md.
  • Untitled tabs unaffected; window title still uses the plain filename.

… tabs

Cmd+P recents now show the same tertiary-gray parent folder hint that
search results already render — they were getting `relativePath:
url.lastPathComponent`, which made the row's `displayPath` empty.
Recents inside an open vault use `VaultIndex.relativePath`; orphan
recents fall back to the immediate parent folder name.

Tabs gain a `parent/filename` qualifier (parent in tertiary) only when
two open tabs share a filename, via a new `WorkspaceManager.tabLabel`
helper that mirrors the collision pattern from `wikiLinkTarget`.

Fixes #254
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying clearly with  Cloudflare Pages  Cloudflare Pages

Latest commit: 462fddd
Status: ✅  Deploy successful!
Preview URL: https://afa05252.clearly-cjz.pages.dev
Branch Preview URL: https://cmdp-paths-and-tabs.clearly-cjz.pages.dev

View logs

@Shpigford
Shpigford merged commit b523ae3 into main Apr 29, 2026
4 checks passed
@Shpigford
Shpigford deleted the cmdp-paths-and-tabs branch April 29, 2026 13:12
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.

An way to distinguish files with the same name

1 participant