Skip to content

feat: label session branches by first message - #449

Open
111-test-111 wants to merge 1 commit into
agegr:mainfrom
111-test-111:pr/session-tree-branch-labels
Open

feat: label session branches by first message#449
111-test-111 wants to merge 1 commit into
agegr:mainfrom
111-test-111:pr/session-tree-branch-labels

Conversation

@111-test-111

Copy link
Copy Markdown

What

Makes in-session branches recognizable in BranchNavigator:

  • Extracts the session-tree projection from app/api/sessions/[id]/route.ts into lib/project-tree.ts (identical iterative algorithm — no behavior change)
  • The projection additionally retains the first message entry of each diverging arm, so the UI can label a branch with the message it diverged with
  • BranchNavigator renders those labels and supports multi-root trees

Notes

  • 9 new tests (2 projection + 7 navigator). Full suite: 433 pass / 0 fail; tsc --noEmit and eslint clean.
  • Heads-up: this rewrites the inlined projection in app/api/sessions/[id]/route.ts, and the companion context-usage PR touches the same file's imports/response — the second one to land may need a trivial rebase.

Extract the session-tree projection into lib/project-tree.ts and keep the
first message entry of each diverging arm, so BranchNavigator can label each
branch with the message it diverged with. BranchNavigator renders those
first-message labels and supports multi-root trees.
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.

1 participant