[FEATURE]: improved visual position indicator for subagent sessions #7174

Open
opened 2026-02-16 18:06:23 -05:00 by yindo · 2 comments
Owner

Originally created by @jakob1379 on GitHub (Jan 22, 2026).

Originally assigned to: @rekram1-node on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem
The header component facilitates navigation between subagent sessions but lacks visual context regarding the user's current position and the total number of sessions. Users cannot identify which specific subagent is active relative to others in the stack.

Proposed Solution
Enhance the header to include a position indicator and adjacent session metadata. This provides immediate orientation within the navigation cycle (Parent → Child 1 → Child 2 → Parent).

Technical Requirements
Modify the header component to derive the following state from existing session data:

  • Current Index: children().findIndex(s => s.id === route.sessionID) + 1
  • Total Count: children().length
  • Adjacent Metadata: Retrieve names for children[index - 1] and children[index + 1] to provide context for navigation buttons.

UI Specifications

  1. Indicator: Insert a "Current/Total" (e.g., "2 / 5") text element or a horizontal dot-based indicator.
  2. Placement: Position the indicator between the "Subagent session" label and the navigation buttons.
  3. Contextual Labels: Display the names of the previous and next agents near the navigation controls to clarify the destination of the "back" and "forward" actions.

Implementation Logic

const sessions = children();
const currentIndex = sessions.findIndex((s) => s.id === route.sessionID);
const total = sessions.length;

const prevAgent = currentIndex > 0 ? sessions[currentIndex - 1] : null;
const nextAgent = currentIndex < total - 1 ? sessions[currentIndex + 1] : null;
Originally created by @jakob1379 on GitHub (Jan 22, 2026). Originally assigned to: @rekram1-node on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request **Problem** The header component facilitates navigation between subagent sessions but lacks visual context regarding the user's current position and the total number of sessions. Users cannot identify which specific subagent is active relative to others in the stack. **Proposed Solution** Enhance the header to include a position indicator and adjacent session metadata. This provides immediate orientation within the navigation cycle (Parent → Child 1 → Child 2 → Parent). **Technical Requirements** Modify the header component to derive the following state from existing session data: * **Current Index:** `children().findIndex(s => s.id === route.sessionID) + 1` * **Total Count:** `children().length` * **Adjacent Metadata:** Retrieve names for `children[index - 1]` and `children[index + 1]` to provide context for navigation buttons. **UI Specifications** 1. **Indicator:** Insert a "Current/Total" (e.g., "2 / 5") text element or a horizontal dot-based indicator. 2. **Placement:** Position the indicator between the "Subagent session" label and the navigation buttons. 3. **Contextual Labels:** Display the names of the previous and next agents near the navigation controls to clarify the destination of the "back" and "forward" actions. **Implementation Logic** ```typescript const sessions = children(); const currentIndex = sessions.findIndex((s) => s.id === route.sessionID); const total = sessions.length; const prevAgent = currentIndex > 0 ? sessions[currentIndex - 1] : null; const nextAgent = currentIndex < total - 1 ? sessions[currentIndex + 1] : null; ```
yindo added the discussion label 2026-02-16 18:06:23 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 22, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #6101: [FEATURE]: indicator for the currently active subagent
  • #6183: Add interactive session switcher for navigating between subagent sessions

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 22, 2026): This issue might be a duplicate of existing issues. Please check: - #6101: [FEATURE]: indicator for the currently active subagent - #6183: Add interactive session switcher for navigating between subagent sessions Feel free to ignore if none of these address your specific case.
Author
Owner

@adamcbrewer commented on GitHub (Feb 13, 2026):

I've implemented this for the TUI here:
https://github.com/adamcbrewer/opencode/tree/feat/9989-subagent-session-pagination. However I'm pretty new to opensource contributions and need a bit of hand holding submitting my first one to this project. Should my PR target the branch from my fork to this project's dev ?

@adamcbrewer commented on GitHub (Feb 13, 2026): ~~I've implemented this for the TUI here: https://github.com/adamcbrewer/opencode/tree/feat/9989-subagent-session-pagination. However I'm pretty new to opensource contributions and need a bit of hand holding submitting my first one to this project. Should my PR target the branch from my fork to this project's `dev` ?~~
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7174