Skip to content

Collapse background re-homed Claude sessions into one card - #121

Merged
calvintvu merged 3 commits into
mainfrom
cvu/claude-rehome
Aug 31, 2026
Merged

Collapse background re-homed Claude sessions into one card#121
calvintvu merged 3 commits into
mainfrom
cvu/claude-rehome

Conversation

@calvintvu

@calvintvu calvintvu commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Context

Claude Code can move a terminal session onto its background surface a short time after the session starts. It writes a second transcript that copies the conversation of the first, under a new session id. coSlash reads every root transcript as its own session, so one conversation renders as two identical cards and inflates the active-session count.

Changes

  • A background transcript that holds every conversation row of another root now supersedes that root. Only the newer card remains, and it keeps the session id that Resume needs.
  • The tokens of the superseded transcript fold into the survivor, so the cost of the pair does not change.
  • Subagent transcripts re-point to the surviving session, so they do not lose their parent.
  • A deliberate claude --resume branch keeps its own card. A re-home of such a branch supersedes only the branch, not the root it resumed from.

Test

  • go test ./... — passed
  • go vet ./... — passed
  • Manual: ran the pass over a local transcript store of 79 root transcripts. It collapsed two re-home pairs and left two claude --resume pairs separate.

Screenshots

  • Session list for a project with a re-homed session — BEFORE.
Screenshot 2026-08-28 at 12 54 40
  • Session list for a project with a re-homed session — AFTER.
Screenshot 2026-08-28 at 12 55 17

@calvintvu calvintvu added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Aug 28, 2026

@luhe19001 luhe19001 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the re-home collapse approach — the uuid-containment + bg-only successor rules, token fold after applyForkedUsage, and fixture coverage look solid for the board/list path.

One follow-up on the preview family path (inline); otherwise LGTM for the stated goal.

Comment thread collector/internal/vendors/claude/source.go
Comment thread collector/internal/vendors/claude/fork.go Outdated
@calvintvu
calvintvu merged commit a8a7beb into main Aug 31, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants