Skip to content

fix: scope nested child-session navigation correctly#23365

Open
doer-ee wants to merge 1 commit intoanomalyco:devfrom
doer-ee:fix/nested-child-session-navigation
Open

fix: scope nested child-session navigation correctly#23365
doer-ee wants to merge 1 commit intoanomalyco:devfrom
doer-ee:fix/nested-child-session-navigation

Conversation

@doer-ee
Copy link
Copy Markdown

@doer-ee doer-ee commented Apr 19, 2026

Issue for this PR

Closes #15972

Type of change

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

What does this PR do?

This fixes nested child-session navigation in the TUI.

The bug was that child-session descent was computed from the wrong level once already inside a child session. As a result, <leader>down could enter a first-level child session, but it would fail to descend again into that child's own child session.

This change scopes child descent to the currently focused session's direct children and keeps sibling cycling at the current depth. It also adds focused tests for nested child descent and sibling navigation behavior.

How did you verify your code works?

  • Ran targeted session navigation tests for the new navigation helpers
  • Manually reproduced the bug locally in the patched clone:
    • enter first child with Ctrl+X, Down
    • create a child inside that child
    • confirm Ctrl+X, Down now enters the sub-subagent
  • Confirmed parent and sibling navigation still works at the correct depth

Screenshots / recordings

N/A - TUI navigation bug fix, no screenshot included

Checklist

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

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Apr 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found one potentially related PR:

#15993

  • Title: fix(tui): restore nested subagent navigation without changing inline task UI
  • Reason: This PR directly addresses nested subagent navigation in the TUI, which overlaps with the scope of PR fix: scope nested child-session navigation correctly #23365. Both deal with navigating through nested sessions/subagents.

The other PRs found (like #7756) are older feature additions for hierarchical session navigation but appear to be foundational work rather than duplicates of the current fix.

@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@doer-ee doer-ee force-pushed the fix/nested-child-session-navigation branch 2 times, most recently from 7bcf1d3 to 6a46b4d Compare April 24, 2026 02:57
@doer-ee doer-ee force-pushed the fix/nested-child-session-navigation branch from 6a46b4d to 812695d Compare April 27, 2026 12:57
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.

bug(tui): subagent navigation broken for nested sessions and imprecise for multiple concurrent tasks

1 participant