Skip to content

Show File Manager label on Linux for the Open Folder button#3622

Open
ivan-ottinger wants to merge 4 commits into
trunkfrom
fix-linux-file-manager-label
Open

Show File Manager label on Linux for the Open Folder button#3622
ivan-ottinger wants to merge 4 commits into
trunkfrom
fix-linux-file-manager-label

Conversation

@ivan-ottinger
Copy link
Copy Markdown
Contributor

@ivan-ottinger ivan-ottinger commented May 26, 2026

Related issues

How AI was used in this PR

Used Claude Code to locate the two label sites (the site-overview shortcut button and the site context menu) and add the Linux branch. I verified the changes, lint, typecheck, and ran the affected tests myself.

Proposed Changes

  • On Linux, show "File Manager" (instead of falling through to the macOS "Finder" label) for the Open Folder shortcut button on the site overview tab.
  • Same fix for the "Open in …" item in the site list context menu.
Before After
CleanShot 2026-05-27 at 12 15 04@2x CleanShot 2026-05-27 at 12 11 05@2x

Testing Instructions

  • On Linux, open Studio and select a site.
  • On the Overview tab, in the "Open in…" section, confirm the first button is labeled File Manager (was "Finder").
  • Right-click a site in the sidebar and confirm the menu shows Open in File Manager (was "Open in Finder").
  • Clicking either still opens the site folder in the system file manager.
  • Verify macOS still shows Finder and Windows still shows File Explorer.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@ivan-ottinger ivan-ottinger marked this pull request as ready for review May 27, 2026 09:55
@ivan-ottinger ivan-ottinger requested a review from Copilot May 27, 2026 09:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Linux-specific UI labeling by introducing a shared helper for the system file manager name and using it in both the Overview “Open in…” shortcut button and the site context menu label generation.

Changes:

  • Added getFileManagerLabel() to return “File Explorer” (Windows), “File Manager” (Linux), or “Finder” (macOS).
  • Updated ContentTabOverview and SiteMenu to use the new helper instead of a Windows-vs-mac fallback.
  • Updated affected component tests to mock the new helper.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
apps/studio/src/lib/file-manager.ts New helper that returns a localized platform-specific file manager label (adds Linux “File Manager”).
apps/studio/src/components/content-tab-overview.tsx Uses getFileManagerLabel() for the Overview “Open in…” section first shortcut button label.
apps/studio/src/components/site-menu.tsx Uses getFileManagerLabel() when building the context-menu payload label.
apps/studio/src/components/tests/content-tab-overview.test.tsx Mocks src/lib/file-manager to keep component tests deterministic.
apps/studio/src/components/tests/content-tab-overview-shortcuts-section.test.tsx Mocks src/lib/file-manager to keep component tests deterministic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/studio/src/components/site-menu.tsx
Comment thread apps/studio/src/lib/file-manager.ts
@ivan-ottinger ivan-ottinger requested a review from a team May 27, 2026 10:17
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