[PR #13465] feat(app): add before/after review modes #14681

Open
opened 2026-02-16 18:19:27 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13465

State: open
Merged: No


What does this PR do?

Closes #13466

This PR adds two new review modes in the Session Review diff tool: Before and After, alongside the existing Unified and Split modes.

With these modes, developers can switch from line-based diff visualization to full-file snapshots of the previous and updated versions. This makes it much easier to understand broader file logic, context, and intent when a diff alone is too fragmented.

Why this is worth adding

Diffs are great for local edits, but they can hide architectural/contextual changes across a file. Full-file Before/After views reduce cognitive overhead when reviewing larger refactors, movement of logic, or context-heavy modifications. This improves review quality and speeds up understanding without removing existing diff workflows.

How did you verify your code works?

Added unit coverage for diff-style normalization, passed typecheck, and manually validated all four review modes plus line-comment behavior in before/after views.

Screenshots

Entire View
image

Close up
image

Before selected
image

After selected
image

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13465 **State:** open **Merged:** No --- ### What does this PR do? Closes #13466 This PR adds two new review modes in the Session Review diff tool: Before and After, alongside the existing Unified and Split modes. With these modes, developers can switch from line-based diff visualization to full-file snapshots of the previous and updated versions. This makes it much easier to understand broader file logic, context, and intent when a diff alone is too fragmented. *Why this is worth adding* Diffs are great for local edits, but they can hide architectural/contextual changes across a file. Full-file Before/After views reduce cognitive overhead when reviewing larger refactors, movement of logic, or context-heavy modifications. This improves review quality and speeds up understanding without removing existing diff workflows. ### How did you verify your code works? Added unit coverage for diff-style normalization, passed typecheck, and manually validated all four review modes plus line-comment behavior in before/after views. ### Screenshots Entire View <img width="2056" height="1290" alt="image" src="https://github.com/user-attachments/assets/983e3195-6ace-471b-b739-9c463591fe02" /> Close up <img width="398" height="130" alt="image" src="https://github.com/user-attachments/assets/847aad28-2cab-4ef6-97ca-c72d8708c6e9" /> Before selected <img width="1043" height="410" alt="image" src="https://github.com/user-attachments/assets/76a772e2-1bca-4e75-97a0-3ff073fc069f" /> After selected <img width="1037" height="340" alt="image" src="https://github.com/user-attachments/assets/1a1f1803-95c6-4748-b626-8f9796469705" />
yindo added the pull-request label 2026-02-16 18:19:27 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14681