github / github/copilot-cli

Conversation-tree navigation: keybindings + TUI overview for forked/branched sessions (depends on #2058 / #1313)

Open
#3,091 0 comments 0 reactions 0 assignees View on GitHub
area:input-keyboard area:sessions
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

### Describe the feature or problem you'd like to solve

Once Copilot CLI gains the ability to fork or branch sessions (#2058, #1313), users will accumulate a **tree** of related sessions sharing common ancestry. Today there is no way to:

- see that tree
- jump back to a parent or sibling fork
- navigate among forks without copy-pasting session GUIDs from `~/.copilot/session-state/`

I'm filing this as a separate issue because it is downstream of #2058 / #1313 — it has no value until at least one of those lands — but it would be a shame for the navigation gap to surface only after fork/branch ships and people start asking "now what?". This issue is the placeholder so the design can be considered alongside the fork/branch work.

### Proposed solution

Three primitives, each useful independently:

**1. `Ctrl + [` — jump to previous fork (in-order tree traversal)**
**2. `Ctrl + ]` — jump to next fork (in-order tree traversal)**

In-order traversal means: walking the conversation tree as a depth-first sequence, the bindings move you one step left/right through that sequence. From any node, `Ctrl + [` takes you to the most recently visited sibling/ancestor; `Ctrl + ]` advances to the next.

**3. `Ctrl + |` (or any equivalent chord) — show the conversation tree as a navigable TUI**

A full-screen tree view where each node is a session, edges show fork-points, the current node is highlighted, and arrow keys + Enter let you navigate to any session. Bonus: show summary, last activity, and turn count next to each node.

The exact key bindings are a bikeshed detail — what matters is that all three primitives exist (left, right, overview).

### Example prompts or workflows

1. **Fork-and-return.** I'm 30 turns into a refactor; I `/fork` to debug an unrelated NuGet issue. After fixing it, `Ctrl + [` takes me back to the parent without me digging through `--resume ` history.

2. **Compare two approaches.** I `/branch` twice to spike Approach A and Approach B from the same starting point. `Ctrl + [` and `Ctrl + ]` flip me between them so I can A/B compare without losing context.

3. **Recover from disorientation.** I've been forking liberally for an hour and have lost track of where the "main thread" of work actually lives. `Ctrl + |` shows me the whole tree, I navigate to the trunk, and pick up where I left off.

### Additional context

- Depends on #2058 (`/fork`) and/or #1313 (`/branch`). Without one of those landing, this issue is moot.
- Prior art: Vim's jump list (`Ctrl + o` / `Ctrl + i`) is the closest existing keybinding model for "back/forward through positions".
- The TUI overview is the navigation analogue to `git log --graph` for conversation context.
- Today the workaround is `ls ~/.copilot/session-state/` + manually inspecting checkpoint files. Functional, but fundamentally not navigation.

Contributor guide

Open the contributing guide

Research direction

Start by reading the dependent fork/branch issues #2058 and #1313, then review the session-state workaround under ~/.copilot/session-state/ and the --resume workflow. Done means users can move to previous and next forks and open a navigable conversation-tree overview, with the current session highlighted and navigation to another session available.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.