Skip to content

fix(app): keep location shortcut working after tooltip hover - #59680

Merged
usrnk1 merged 2 commits into
devfrom
location-shortcut
Oct 27, 2026
Merged

usrnk1 merged 2 commits into
devfrom
location-shortcut

Conversation

@usrnk1

@usrnk1 usrnk1 commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix Command–Option–L becoming unusable after hovering the local-location icon.
  • Keep a stable path in the keyed Show so an open tooltip cannot read a stale accessor when switching to a new worktree.
  • Add a regression covering local → new worktree → local → hover icon → new worktree, with composer focus preserved.

Verification

  • App typecheck: passed.
  • Pre-push repository checks: passed (lint warnings only; all 35 typecheck tasks passed).
  • Workspace selection unit tests: 16 passed.
  • New hover/shortcut regression: failed before the fix; passed 10/10 after the fix with 5 workers and no retries.
  • Before/after screenshots reviewed; fixed interaction produced no browser errors.
  • Full new-session suite: 25 passed, 1 failed on the separate caret-position assertion in “the title and message stay stable through worktree creation” (Also: is appended instead of prepended on local macOS).
  • E2E typecheck reports errors in untouched regression/performance files; none in the changed test.

Screenshots

Same shortcut after hovering the local-location icon:

Before

The tooltip remains and the location is stuck on local.

Before: shortcut leaves the location stuck on local

After

The tooltip closes and the location switches to New worktree.

After: shortcut switches to New worktree

@usrnk1
usrnk1 enabled auto-merge (squash) October 27, 2026 18:06

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The fix works. I reproduced the stuck location with the new e2e test against the base view.tsx: after hovering the icon, the shortcut leaves the location on local. With this change the test passes, and it passed 8 more times in a row with no retries. The full new-session.spec.ts suite passes (26/26 on Linux, including the caret-position test), and tsc -b in packages/app is clean.

Using a keyed Show is a sound, local fix: the path row and its tooltips are rebuilt when the path changes, so an open tooltip can't read an outdated value. The test is short and doesn't rely on fixed waits.

Public API: unchanged (web app UI only).

No blocking concerns.

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The new commit only merges dev and doesn't touch this change, so the earlier review still applies. The new regression test still passes at the new head. Public API: unchanged. No new concerns.

@usrnk1
usrnk1 merged commit 3f74f03 into dev Oct 27, 2026
20 checks passed
@usrnk1
usrnk1 deleted the location-shortcut branch October 27, 2026 19:47
alsuren pushed a commit to alsuren/opencode that referenced this pull request Oct 28, 2026
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