Skip to content

feat(session): allow session ID as direction in navigate_session_tree - #370

Merged
sudo-tee merged 3 commits into
sudo-tee:mainfrom
jensenojs:fix/task-direct-child-switch
May 7, 2026
Merged

feat(session): allow session ID as direction in navigate_session_tree#370
sudo-tee merged 3 commits into
sudo-tee:mainfrom
jensenojs:fix/task-direct-child-switch

Conversation

@jensenojs

Copy link
Copy Markdown
Collaborator

When direction is not a known tree direction, treat it as a session ID and switch directly. Task action now passes metadata.sessionId so S key opens the exact child session.

jensenojs added 2 commits May 5, 2026 22:10
When direction is not a known tree direction, treat it as a session
ID and switch directly. Task action now passes metadata.sessionId
so S key opens the exact child session.
Move session ID detection above tree-navigation active check
so invalid inputs get clear feedback via empty_policy=notify.
Update tests to match new behavior.
@jensenojs
jensenojs force-pushed the fix/task-direct-child-switch branch from 15b74c9 to fad6fe5 Compare May 5, 2026 14:38

@sudo-tee sudo-tee left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks good to me,

Only left 2 minor comments about removing obvious comments in the code

Comment thread lua/opencode/commands/handlers/session.lua Outdated
Comment thread lua/opencode/commands/handlers/session.lua Outdated
@sudo-tee

sudo-tee commented May 7, 2026

Copy link
Copy Markdown
Owner

Thanks

@sudo-tee
sudo-tee merged commit 33657e1 into sudo-tee:main May 7, 2026
5 checks passed
@jensenojs
jensenojs deleted the fix/task-direct-child-switch branch May 7, 2026 16:17
disrupted pushed a commit to disrupted/opencode-native.nvim that referenced this pull request Jul 23, 2026
…sudo-tee#370)

* feat(session): allow session ID as direction in navigate_session_tree

When direction is not a known tree direction, treat it as a session
ID and switch directly. Task action now passes metadata.sessionId
so S key opens the exact child session.

* fix(session): validate session ID path and update tests

Move session ID detection above tree-navigation active check
so invalid inputs get clear feedback via empty_policy=notify.
Update tests to match new behavior.

* remove unnessary comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants