Skip to content

fix(app): restore desktop open menu#31993

Open
PatrickLarocque wants to merge 2 commits into
anomalyco:devfrom
PatrickLarocque:restore-open-menu
Open

fix(app): restore desktop open menu#31993
PatrickLarocque wants to merge 2 commits into
anomalyco:devfrom
PatrickLarocque:restore-open-menu

Conversation

@PatrickLarocque

@PatrickLarocque PatrickLarocque commented Jun 12, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #29875
Closes #29951

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Restores the desktop session header's Open in control in both titlebar layouts.

Two regressions overlapped:

  1. The V2 titlebar introduced in feat(app): refine desktop v2 home and session controls #28788 rendered only status and review actions, leaving the existing Open-in control in the legacy branch.
  2. feat(app): allow toggling tabs layout #29526 changed isDesktopV2 from a boolean to a Solid memo, but the <Show> condition still passed the accessor itself. Since the function reference is always truthy, disabling the new layout could not reach the legacy fallback.

This PR:

  • calls isDesktopV2() so the legacy fallback works again;
  • renders the existing open-app workflow beside SessionHeaderV2Actions using V2 menu/button primitives;
  • keeps the menu in SessionHeader, where its app detection, persisted selection, request state, and callbacks already live, instead of expanding SessionHeaderV2ActionsState with pass-through fields;
  • adds the V2 copy icon used by the Copy path menu item.

The restored menu supports the native file manager, detected editors/terminals, and Copy path. The underlying openPath integration is unchanged.

Acknowledgements:

Related reports: #29829, #29867, #31101, #31214, #31458, #31507, and #31878.

How did you verify your code works?

  • Ran the Electron desktop app against this repository.
  • Reproduced the original state: V2 showed only the review action and had no Open options control.
  • Verified V2 now shows the selected app action and dropdown.
  • Disabled New layout and designs and verified the legacy Open-in, terminal, status, and file-tree controls render again.
  • Opened the dropdown and verified Finder, detected applications, and Copy path.
  • Invoked Open in Finder successfully with no error toast.
  • Ran the full packages/app unit suite: 376 tests passed across 66 files.
  • Ran the full packages/ui suite: 27 tests passed across 6 files.
  • Ran bun typecheck in packages/app and packages/ui.
  • Ran the app production build.
  • Passed the repository pre-push workspace typecheck: 23 tasks passed.

Screenshots / recordings

Before, the V2 session header had no Open-in control:

V2 session header before the fix

After, the V2 Open-in menu is restored:

V2 Open-in menu after the fix

Both screenshots were captured from the local Electron verification for this PR.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found two related PRs that are directly referenced in your PR:

  1. fix(app): add open folder button to V2 desktop session header #29888 - fix(app): add open folder button to V2 desktop session header

    • This PR implements the missing V2 Open-in control that your PR carries forward onto current dev with a smaller state boundary.
  2. fix(session-header): call isDesktopV2() memo in Show when predicate #31875 - fix(session-header): call isDesktopV2() memo in Show when predicate

    • This PR identifies and fixes the Solid memo accessor bug that made the legacy fallback unreachable. Your PR includes the same one-line correction.

Both of these are directly acknowledged in your PR description as related work that your PR builds upon or incorporates. Since your PR (31993) is the current PR being checked, it is not a duplicate of itself. The other two PRs are predecessors/related fixes that your PR consolidates.

@PatrickLarocque PatrickLarocque marked this pull request as ready for review June 12, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant