Add runpane panes focus command (#401) - #461
Open
ilijachrchev wants to merge 1 commit into
Open
Conversation
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.
Description
Adds
runpane panes focuscommand. Raises the Pane window, selects a pane, and optionally selects a specific panel within it.Closes #401.
Follows the same pattern as
panes rename/panes archive: contract.json -> generated artifacts -> CLI dispatch -> daemon handler -> renderer event.New pieces: window-raising plumbing (
show/restore/focuson BrowserWindow) and apane:focus-requestedIPC event that tells the renderer to callsetActiveSessionandsetActivePanel.Usage:
runpane panes focus --pane [--panel ] --source user|agent --yes [--json]
Requires
--yes. Accepts--source agent|user. Archived/missing panes and mismatched panels return clear errors, never falls back to focusing something else. Doctrine text added to contract: agents invoke this only on explicit user request, never proactively.Type of Change
Checklist
pnpm typecheckandpnpm lintlocallypnpm electron-devCritical Areas Modified
Screenshots (if applicable)
N/A. CLI command with no UI changes. The renderer-side change is a new IPC listener that calls existing store actions (
setActiveSession,setActivePanel).Additional Notes
5 new tests in
runpane.test.ts: happy path, minimized window restore + panel selection, archived pane rejection, unknown pane rejection, panel-not-belonging rejection. All 64 existing tests pass (1 pre-existing skip).Contract artifacts regenerated via
pnpm run generate-runpane-contract. The 6 generated files were not hand-edited.The handler sends
pane:focus-requestedviawindow.webContents.send()directly rather than throughsendRendererEventinevents.ts, since the handler already holds the raised window reference. This matches howwindow:focus-changedis dispatched inindex.ts.