Repository navigation
fix(app): show Open in only in file and review headers - #62174
Conversation
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.
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]Changes
packages/gui-plugins/src/file/renderer.tsx: removes thesession.panel.endslot contribution and the per-screen header counter that hid it. Thesession.panel.endslot stays for other plugins.packages/gui-plugins/src/file/browser.tsx: renders the button in the file panel'stoolbarEnd, or in the tree header while the tree is open.packages/session-ui/src/v2/components/session-review-v2.tsx:SessionReviewV2Sidebartakesactions, 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
Visual
Added by the opencode bot (AI-generated).
Related: #55858, #61678