Skip to content

fix(app): show Open in only in file and review headers - #62174

Merged
Hona merged 1 commit into
devfrom
open-in-file-header
Nov 5, 2026
Merged

Hona merged 1 commit into
devfrom
open-in-file-header

Conversation

@Hona

@Hona Hona commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

The desktop Open in button no longer sits in the side panel's tab strip for every tab. It now shows only in the header of the tab it acts on.

  • File tabs: the right end of the header under the strip. With the file tree open, that header row is gone, so the button moves to the right end of the tree's header (next to the project name). No empty toolbar row is added.
  • Review: unchanged with diffs (preview toolbar). With no diffs and the tree open, the preview has no toolbar, so the button moves to the tree's header.
  • Terminal, browser, New tab and other tabs: no Open in button. The session location menu still offers Open in for the workspace.
flowchart LR
  T[Selected tab] -->|file / review| H{Preview header shown?}
  H -->|yes| P[Preview header, end]
  H -->|no, tree open| S[Tree header, end]
  T -->|other| N[No button]
Loading

Changes

  • packages/gui-plugins/src/file/renderer.tsx: removes the session.panel.end slot contribution and the per-screen header counter that hid it. The session.panel.end slot stays for other plugins.
  • packages/gui-plugins/src/file/browser.tsx: renders the button in the file panel's toolbarEnd, or in the tree header while the tree is open.
  • packages/session-ui/src/v2/components/session-review-v2.tsx: SessionReviewV2Sidebar takes actions, shown at the end of the tree header.
  • packages/gui-plugins/src/review/panel.tsx: passes the button to the tree header when there are no diffs.

Screenshots

Case Before After
File tab, tree closed
File tab, tree open
Markdown tab, tree open —
Review, no diffs, tree open
Review, tree closed
New tab

Visual

<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72" fill="none" stroke="currentColor">
  <style>
    .strip{animation:strip 4s ease-in-out infinite}
    .head{animation:head 4s ease-in-out infinite}
    @keyframes strip{0%,20%{opacity:.9}35%,85%{opacity:0}100%{opacity:.9}}
    @keyframes head{0%,20%{opacity:0}35%,85%{opacity:.9}100%{opacity:0}}
    @media (prefers-reduced-motion:reduce){.strip,.head{animation:none}.strip{opacity:0}.head{opacity:.9}}
  </style>
  <rect x="4.5" y="4.5" width="231" height="63" rx="6" opacity=".35"/>
  <line x1="4.5" y1="22.5" x2="235.5" y2="22.5" opacity=".25"/>
  <line x1="4.5" y1="40.5" x2="235.5" y2="40.5" opacity=".25"/>
  <rect x="10.5" y="8.5" width="54" height="10" rx="3" opacity=".5"/>
  <rect x="16" y="28" width="30" height="6" rx="2" fill="currentColor" stroke="none" opacity=".45"/>
  <g opacity=".3" stroke="none" fill="currentColor">
    <rect x="16" y="47" width="90" height="4" rx="2"/><rect x="16" y="56" width="60" height="4" rx="2"/>
  </g>
  <g class="strip"><rect x="198.5" y="8.5" width="22" height="10" rx="3"/></g>
  <g class="head" opacity="0"><rect x="198.5" y="26.5" width="22" height="10" rx="3"/></g>
</svg>

Added by the opencode bot (AI-generated).

Related: #55858, #61678

Copilot AI balanced review requested due to automatic review settings November 5, 2026 19:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I found no problems with this change, but I couldn't run it: the button only renders in the desktop app, which I can't run here. I traced the placement logic instead.

  • File tabs: the preview toolbar only exists while the tree is closed and the tree header only while it is open, so there is always exactly one button.
  • Review: the toolbar already shows whenever there are diffs or the tree is closed, so the new tree-header action for the no-diffs case fills the only gap.

tsc -b passes for gui-plugins, session-ui and plugin. The packages' typecheck script runs bun check, which isn't available in the Bun version here. The src/file and src/review tests in gui-plugins pass. I'm relying on your screenshots for the visual check.

Public API: nothing breaks. session.panel.end stays. OpenInApp.Button keeps its signature and only loses its old side effect of hiding the tab strip's button, which no longer exists. SessionReviewV2Sidebar gets a new optional actions prop.

Related: #55858, #61678

@Hona
Hona merged commit e23d54c into dev Nov 5, 2026
34 of 38 checks passed
@Hona
Hona deleted the open-in-file-header branch November 5, 2026 20:18
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