Skip to content

feat(app): add session location menu actions - #59607

Merged
usrnk1 merged 3 commits into
devfrom
session-location-actions
Oct 27, 2026
Merged

usrnk1 merged 3 commits into
devfrom
session-location-actions

Conversation

@usrnk1

@usrnk1 usrnk1 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

User-requested feature; no linked issue.

Type of change

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

What does this PR do?

  • Add branch actions to copy its name or open an integrated terminal in the session's worktree.
  • Add “Open in [selected app]” to the path submenu, using the existing app preference. Hide it for Finder to avoid duplicating the reveal action.
  • Keep these contributions in the built-in GUI plugin API.

How did you verify your code works?

  • Affected package typechecks, root bun run check, and changed-file lint.
  • Seven terminal/path unit tests and the targeted session-header browser tests.
  • Repeated the three new browser cases ten times without retries; reviewed before/after screenshots against dev.

Desktop behavior was exercised through the browser's mock platform and PTY harness, not a live Electron process.

Screenshots / recordings

Before: Path submenu before

After: Path submenu with selected-app action

Branch actions: Branch actions

Checklist

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

Added by the opencode bot (AI-generated).

Public API: adds built-in-only GUI slots session.location.branch.menu and session.location.path.menu (backwards compatible)

@opencode-agent opencode-agent 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.

Looks good. I ran the browser e2e harness on the base and on this PR. With the PR, the branch submenu copies the branch name, and "Open in terminal" starts a terminal in the session worktree and focuses it in the right panel. The path submenu shows "Open in VS Code" for the selected app and hides the item when Finder is selected. The location group of session-header.spec.ts (8/8), the terminal and path unit tests, and tsc -b for app and gui-plugins all pass. I did not test a live Electron process.

Public API: two slots are added to BuiltinSlotMap in @opencode/plugin/gui/builtin: session.location.branch.menu and session.location.path.menu. Only built-in plugins can fill them and nothing is removed or changed, so this is backwards compatible.

No blocking concerns.

Before

After

Before

After

@opencode-agent opencode-agent 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.

The new commit only makes the path-submenu browser test wait for the review panel to receive focus before opening the location menu, which removes a timing race. I ran both path-submenu cases three times each and all 6 runs passed. No app code changed, so the public API impact is the same as before: it adds two slots that only built-in plugins can fill, session.location.branch.menu and session.location.path.menu, and is backwards compatible. No new concerns.

@opencode-agent opencode-agent 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.

The only new commit merges dev into the branch. The PR's own changes are the same as in my last review. The location browser tests in session-header.spec.ts pass (8/8) on top of the merged dev, and tsc -b is clean for app and gui-plugins. The public API impact is unchanged: it adds two slots that only built-in plugins can fill, session.location.branch.menu and session.location.path.menu, and is backwards compatible. No new concerns.

@usrnk1
usrnk1 merged commit 4ba064f into dev Oct 27, 2026
22 checks passed
@usrnk1
usrnk1 deleted the session-location-actions branch October 27, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant