Skip to content

Show only surviving commits in session inspector - #79

Merged
calvintvu merged 6 commits into
mainfrom
cvu/commits
Aug 17, 2026
Merged

Show only surviving commits in session inspector#79
calvintvu merged 6 commits into
mainfrom
cvu/commits

Conversation

@calvintvu

@calvintvu calvintvu commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Context

Session commit lists were derived from observed commands, so amendments, resets, and rebases could leave obsolete rows while compound commands could omit valid commits. This change reconciles successful commit observations with the recorded branch’s surviving Git history, with a fallback when the repository is unavailable.

Changes

  • Capture commit operations and output hashes across OpenCode, Codex, and Claude.
  • Remove superseded commits without collapsing distinct commits that share a subject.
  • Exclude failed operations and preserve amend behavior when Git history is unavailable.

Test

  • go test ./... — passed
  • Manual: verified amended OpenCode and Claude sessions report only surviving commits; exercised Codex success and failure records with native fixtures.

Screenshots

  • Session Inspector — rewritten session showing only surviving commits

before
Screenshot 2026-08-14 at 15 48 49

after
Screenshot 2026-08-14 at 15 49 13

@calvintvu calvintvu added the bug Something isn't working label Aug 14, 2026
@calvintvu
calvintvu force-pushed the cvu/commits branch 2 times, most recently from f0a1734 to 071cceb Compare August 15, 2026 01:03

@milanshen milanshen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I found four issues in the commit reconciliation path. The existing tests and CI pass, but these cases are not covered by the current suite.

Comment thread collector/internal/session/commits.go
Comment thread collector/internal/session/commits.go
Comment thread collector/internal/session/commits.go Outdated
Comment thread collector/internal/collector/collector.go Outdated
@calvintvu
calvintvu force-pushed the cvu/commits branch 2 times, most recently from f5ffbb3 to 4d5e6a3 Compare August 17, 2026 23:07
@calvintvu
calvintvu merged commit 482d750 into main Aug 17, 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.

2 participants