Stop ⌘K and notification clicks stealing the main tab - #74445
Merged
Conversation
newSessionOpensTab answers a question that isn't specific to the sidebar "+" — is there a conversation on main that must not be discarded — and the palette needs the same answer. Fold it into open-session as mainChatOccupied so both callers share one definition.
An unused draft tab is the one a user would have typed into, so give the tile store a way to name it (blankDraftTile) and hand it to another session in place (reuseBlankDraftTile). A blank-but-busy tab has its first turn in flight and an unbound tile is unknown rather than empty, so neither is a candidate.
Both surfaces passed the sidebar's in-place intent, which means "load it into main when it isn't already on screen" — right for a row you clicked in a list you were looking at, wrong for a chat opened from outside the workspace. Neither had a surface of its own, so they took the one you were using. Add a stack intent for that case. It focuses the session when it's already open, spends an unused draft tab when there is one, and only falls back to main while main is itself a blank draft. Modifiers still force a tab or window.
OutThisLife
enabled auto-merge
July 29, 2026 23:18
Contributor
૮ >ﻌ< ა ci reviewran on 93e5413 ℹ️ InfoDesktop E2E visual evidence · View test artifacts · View job1 visual diff. inline evidence is publishing... |
This was referenced Jul 29, 2026
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
…on-tab Stop ⌘K and notification clicks stealing the main tab
33hodl
pushed a commit
to 33hodl/hermes-agent
that referenced
this pull request
Aug 12, 2026
…on-tab Stop ⌘K and notification clicks stealing the main tab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Opening a chat from ⌘K or a native notification took over the main tab, discarding whatever conversation was loaded there.
Both surfaces went through
openSession— the shared door — but passed the sidebar'sin-placeintent. That intent means "focus it if it's on screen, otherwise load it into main," which is right for a row clicked in a list you're already looking at and wrong for a chat opened from outside the workspace. Neither surface had a home of its own, so both spent the one you were using.This adds a
stackintent for openers with no surface to come from. It focuses the session when it's already open, takes over an unused "New session" tab when one exists, and falls back to main only while main is itself a blank draft. Modifiers are unchanged: ⌘/⌃ still forces a new tab, ⇧⌘ still pops a window.newSessionOpensTabanswered the same question the new intent needed, so it moved into the door asmainChatOccupiedand the sidebar "+" now shares that one definition.Test plan