Skip to content

feat: per-session diff viewer#25

Open
Aleexc12 wants to merge 3 commits intomainfrom
diff-viewer
Open

feat: per-session diff viewer#25
Aleexc12 wants to merge 3 commits intomainfrom
diff-viewer

Conversation

@Aleexc12
Copy link
Copy Markdown
Collaborator

@Aleexc12 Aleexc12 commented Apr 16, 2026

Summary

  • Adds session.diffs daemon RPC that returns per-session file diffs from the OpenCode runtime
  • Wires the OpenCode SDK session.diff call through OpencodeRegistry + DaemonClient.sessionDiffs
  • New DiffViewer TUI component reachable from chat via ctrl+r (j/k nav, enter/space to expand, e toggles all)

Test plan

  • bun test in packages/daemon — protocol + handler tests pass
  • Launch TUI, open a session, run a prompt that edits files, ctrl+r → diffs render with +/- counts
  • Expand/collapse with enter and e; navigate with j/k; esc returns to chat
  • Empty session shows "No changes yet."
  • Invalid instance id surfaces not_found error

@chenxin-yan chenxin-yan requested review from chenxin-yan and removed request for chenxin-yan April 17, 2026 22:16
Keeps instance.status consistent with the registry subscription.
Matches the executeJob pattern so session.diffs is no longer the
only handler that creates a subscription without updating state.
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.

2 participants