Skip to content

Add session position indicator in header and refactor sibling logic#5309

Open
terakael wants to merge 1 commit intoanomalyco:devfrom
terakael:feat/session-position-indicator
Open

Add session position indicator in header and refactor sibling logic#5309
terakael wants to merge 1 commit intoanomalyco:devfrom
terakael:feat/session-position-indicator

Conversation

@terakael
Copy link
Contributor

I often get lost when switching between subagents. This just adds a simple indicator so that we can see at a glance where we're at.

  • Add [current/total] indicator in session header to show position among parent/siblings
  • Extract duplicate sibling-finding logic into sync.session.siblings() helper
  • Update header.tsx to display position indicator for sessions with siblings
  • Refactor moveChild() in index.tsx to use centralized siblings() method
  • Improves navigation awareness when working with multiple subagent sessions
image

@terakael
Copy link
Contributor Author

@rekram1-node any chance of a review on this? Relatively minor change for a pretty convenient feature

@terakael terakael force-pushed the feat/session-position-indicator branch 2 times, most recently from cee6fbd to d516ff1 Compare December 18, 2025 05:52
@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

lgtm

@terakael
Copy link
Contributor Author

Hmm this PR merged last night has slightly modified the logic: #5680

The PR changed the ordering to be backwards and I'm trying to understand why - it felt fine to me previously. But the merge has made it so the parent node is now N/N instead of 1/N. I can modify the logic of this PR to reflect the ordering change, but I want to get a better understanding of why it changed before I do that.

Until then I don't think this is ready to merge

@terakael
Copy link
Contributor Author

@rekram1-node

On my quick investigation:

PR #5680 changed subagent navigation from chronological (oldest→newest) to reverse-chronological (newest→oldest).

Before the merge:

  • Array sorted descending by ID: [main, sub1, sub2] (oldest first)
  • Pressing "Next" from main → goes to sub1, then sub2
  • Position indicator would show: main=1/3, sub1=2/3, sub2=3/3

Now:

  • Subagent IDs use descending timestamps (newer session = smaller ID)
  • Array sorted ascending by ID: [sub2, sub1, main] (newest first)
  • Pressing "Next" from main → jumps to sub2 (newest)
  • Position indicator shows: main=3/3, sub1=2/3, sub2=1/3

I understand the idea of switching from main directly to the newest agent by pressing right, as it's likely the most relevant.

It sort of breaks my mental model of having a list of agents though where right moves forward in time - maybe it's personal preferene.

Which navigation order provides better UX I wonder? Personally I prefer the previous logic.

@terakael terakael force-pushed the feat/session-position-indicator branch from d516ff1 to 8b6f1ff Compare December 23, 2025 05:58
- Add [current/total] indicator in session header to show position among siblings
- Extract sibling-finding logic into sync.session.siblings() helper
- Use descending sort (chronological order: main, sub1, sub2, ...)
- Navigation: shift-right goes main → sub1 → sub2 → main
- Display: main shows [1/N], first subagent [2/N], etc.

This reverts the navigation order change from PR anomalyco#5680 (commit 1b39199)
which had reversed subagent navigation to newest-to-oldest. The original
chronological ordering is more intuitive for tracking subagent hierarchy.
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

Comments