mirror of
https://github.com/hanzoai/ide.git
synced 2026-10-30 18:33:54 +00:00
A ground-up desktop IDE: the Engram memory system, tree-sitter code intelligence, a sandboxed execution engine and a multi-agent coding engine, all in compiled Rust, on the VS Code workbench. Identity is Hanzo IAM (hanzo.id) through the Hanzo CLI, tools arrive over MCP from `hanzo-mcp`, models come from a local engine if one is running or api.hanzo.ai if not, and a running editor is a peer on the local ZAP bus at ~/.hanzo/ide.sock. The IDE and the CLI share one home at ~/.hanzo. Redistributed third-party software is listed in THIRD-PARTY-NOTICES.md.
3.0 KiB
3.0 KiB
Edit Review (A/B diff gate) — Plan & Status
The reviewable green/red diff is Hanzo's flagship differentiator vs Cursor (Cursor has shipped silent edits to unrelated files). Eli's report: "I don't see the A/B very often" — coders want to review every change before approving.
Root cause (code-verified 2026-06-09)
Two reasons the diff rarely appeared:
- New files were auto-approved with no diff. Both write paths
(
host_api.rs::file_writefor the execute_code sandbox, andtool_executor.rsfor direct ide_write_file) didif new file → write without review. The agent's most common action is creating files, so the most common change was never reviewable. (Was B203 — pulled back too far.) - The diff that did show "most users never noticed" (B203's own words): existing-file edits opened a Monaco diff but the floating toolbar was dim, hardcoded-colored, and easy to miss — leading to 600s timeouts.
Approval tiers, for reference: execute_code is NOT auto-approved at the
agent-loop tier (B198) except in Yolo. Existing-file edits already always went
through request_edit_review; only new files bypassed it.
Shipped (this change)
- New files now go through the diff gate — shown as an all-green addition,
with a "Create " header. Only
/tmp//var/foldersscratch paths bypass review. Both write paths updated. - Toolbar polished to VS Code grade: theme variables (was hardcoded
#1e1e1e), a+adds / −delsline badge, a Create/Review verb + filename, and a slide-in animation so it's no longer easy to miss.
Known tension / to verify (needs Eli's GUI test)
- Volume. Scaffolding N files now shows N diffs. Mitigated by the existing Accept All / Reject All (applies to the rest of the turn). If it feels heavy, the next step is to batch a multi-file change into ONE review surface (see Phase 2) rather than reverting.
- Yolo. In Yolo mode, existing-file edits already showed diffs (pre-existing
design as a safety net); new files now do too, consistent with that. If Yolo
should mean truly zero prompts, that's a separate decision — wire the
request's
auto_approve_allintorequest_edit_reviewto auto-accept.
Phase 2 (planned, not built — needs GUI iteration)
- Multi-file review surface. Cursor's Composer shows ALL changed files as one reviewable diff set with per-file accept/reject, not N popups. Build a single panel that accumulates the turn's edits and lets the user walk them. (This is also the "center-editor" work that was reverted — retry once the missing workbench service is identified.)
- Inline accept/reject in the editor (green/red gutter + CodeLens "Accept | Reject" above each hunk), the most Cursor-like surface.
- Review the file diff, not the JS. Today execute_code is approved at the JS-args tier; coders want to approve the resulting code, not the script. Consider making the file diff the primary gate and lightening the JS-args prompt.