You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add entity-level (semantic) diff review to the Code Review panel, so that diffs are understood in terms of code entities — functions, classes, structs, methods — rather than raw lines.
Today, Warp's code review panel shows diffs the same way git diff does: as a series of line-level hunks with ±4 lines of context around each change. This works, but it doesn't understand code structure. A one-line change inside a 30-line function still shows just the changed line and a few neighbors — you can't see the whole function without manually expanding. A renamed function shows as "5 deletions, 5 additions" rather than "renamed." A formatting-only change (e.g. cargo fmt, prettier) is indistinguishable from a logic change.
What this would enable:
Entity-scoped context — Instead of ±4 lines around a hunk, show the entire function or class that changed. Unchanged entities between changes are collapsed. You read diffs at the level of "what function changed," not "what lines changed."
Entity-level change classification — The file header and sidebar can say things like:
fn validateToken (modified) instead of +3 -1
processOrder → processRequest (renamed) instead of +5 -5
struct Config (added) / fn oldHelper (deleted)
Smarter filtering — Formatting-only or whitespace-only entity changes can be collapsed by default, letting reviewers focus on logic changes. This is especially valuable after running formatters (cargo fmt, prettier, gofmt).
Entity-aware sidebar — The file sidebar (Code Review: Add tree/directory grouping for changed files #8821 requests tree view) could show a hierarchy: ▸ src/auth.rs → fn validateToken (modified), fn processRequest (renamed), letting reviewers jump directly to the entity they care about.
Better AI context — When attaching diffs to the AI agent, sending entire changed entities (with their names and types) instead of raw line hunks gives the agent more structured understanding of what changed and why.
Why Warp is well-positioned for this:
Warp already ships all the building blocks in-process:
Computes green/red decorations between base and current content
The missing piece is an entity-matching algorithm that takes entities extracted from two versions of a file and classifies each as modified, renamed, moved, added, or deleted. This is roughly 500–800 lines of new Rust that:
Parses both the base and current file content with the existing tree-sitter infrastructure
Extracts entities using the existing identifiers.scm queries (extended slightly to capture entity end-line and body hash)
Matches entities across versions using three-tier matching: exact name match → structural hash match (same body, different name = rename) → fuzzy similarity
Classifies each match as modified / renamed / moved / added / deleted / unchanged
This would be a new module (e.g. crates/languages/src/semantic_diff.rs) that feeds into the existing code review pipeline — specifically into hidden_lines.rs (entity-scoped context) and code_review_view.rs (entity-level UI). No external dependencies needed; no new tree-sitter grammars needed; works on all platforms including WASM.
Is your feature request related to a problem? Please describe.
When reviewing diffs with many changes — especially after a formatter run — the signal-to-noise ratio is low. Line-based diffs with fixed context windows don't align with how humans read code (by function, by class). Reviewers have to manually expand regions and mentally reconstruct which entity they're looking at. This is a quality-of-life issue rather than a blocker, but it makes code review meaningfully slower and more fatiguing on large changesets.
Tools in this space: Sem (entity-level diff CLI, 26 languages via tree-sitter), Difftastic (structural diff, 30+ languages), SemanticDiff (VS Code + GitHub App). Warp's advantage is that it already has the parser infrastructure in-process.
Pre-submit Checks
Describe the solution you'd like?
Add entity-level (semantic) diff review to the Code Review panel, so that diffs are understood in terms of code entities — functions, classes, structs, methods — rather than raw lines.
Today, Warp's code review panel shows diffs the same way
git diffdoes: as a series of line-level hunks with ±4 lines of context around each change. This works, but it doesn't understand code structure. A one-line change inside a 30-line function still shows just the changed line and a few neighbors — you can't see the whole function without manually expanding. A renamed function shows as "5 deletions, 5 additions" rather than "renamed." A formatting-only change (e.g.cargo fmt,prettier) is indistinguishable from a logic change.What this would enable:
Entity-scoped context — Instead of ±4 lines around a hunk, show the entire function or class that changed. Unchanged entities between changes are collapsed. You read diffs at the level of "what function changed," not "what lines changed."
Entity-level change classification — The file header and sidebar can say things like:
fn validateToken (modified)instead of+3 -1processOrder → processRequest (renamed)instead of+5 -5struct Config (added)/fn oldHelper (deleted)Smarter filtering — Formatting-only or whitespace-only entity changes can be collapsed by default, letting reviewers focus on logic changes. This is especially valuable after running formatters (
cargo fmt,prettier,gofmt).Entity-aware sidebar — The file sidebar (Code Review: Add tree/directory grouping for changed files #8821 requests tree view) could show a hierarchy:
▸ src/auth.rs → fn validateToken (modified),fn processRequest (renamed), letting reviewers jump directly to the entity they care about.Better AI context — When attaching diffs to the AI agent, sending entire changed entities (with their names and types) instead of raw line hunks gives the agent more structured understanding of what changed and why.
Why Warp is well-positioned for this:
Warp already ships all the building blocks in-process:
crates/languages/(arborium)crates/languages/grammars/*/identifiers.scm+crates/ai/src/index/file_outline/crates/ai/src/index/full_source_code_embedding/chunker/semantic.rsapp/src/code/editor/diff.rs(similar crate, Patience algorithm)The missing piece is an entity-matching algorithm that takes entities extracted from two versions of a file and classifies each as modified, renamed, moved, added, or deleted. This is roughly 500–800 lines of new Rust that:
identifiers.scmqueries (extended slightly to capture entity end-line and body hash)This would be a new module (e.g.
crates/languages/src/semantic_diff.rs) that feeds into the existing code review pipeline — specifically intohidden_lines.rs(entity-scoped context) andcode_review_view.rs(entity-level UI). No external dependencies needed; no new tree-sitter grammars needed; works on all platforms including WASM.Is your feature request related to a problem? Please describe.
When reviewing diffs with many changes — especially after a formatter run — the signal-to-noise ratio is low. Line-based diffs with fixed context windows don't align with how humans read code (by function, by class). Reviewers have to manually expand regions and mentally reconstruct which entity they're looking at. This is a quality-of-life issue rather than a blocker, but it makes code review meaningfully slower and more fatiguing on large changesets.
Additional context
Related issues this would improve:
Tools in this space: Sem (entity-level diff CLI, 26 languages via tree-sitter), Difftastic (structural diff, 30+ languages), SemanticDiff (VS Code + GitHub App). Warp's advantage is that it already has the parser infrastructure in-process.
Operating system (OS)
All
How important is this feature to you?
3