feat(web): enhanced file panel — side-by-side diff, hide whitespace, inline review

Adds DiffSplitView component for side-by-side diff mode, whitespace-only
change filtering, inline review comments with thread/gutter cell UI, diff
preferences persistence, and write-file API support for in-browser editing.

Backend: hideWhitespace param on git diff endpoint, write_file route.
This commit is contained in:
2026-06-07 22:16:20 +00:00
parent c935687725
commit 31d8efe66a
15 changed files with 1247 additions and 47 deletions

View File

@@ -4,7 +4,6 @@ import { randomBytes } from 'node:crypto';
import type { Sql } from '../db.js';
import { resolveWritePath } from './write_guard.js';
import { locateMatch } from './fuzzy-match.js';
import { validateEditResult, formatGuardError } from './edit-guards.js';
/**
* Write a file atomically: stage to a sibling temp file, then rename over the
@@ -286,10 +285,6 @@ export async function applyOne(
);
}
if (plan.kind === 'apply') {
const guard = validateEditResult(toLf(raw), plan.updated, change.file_path);
if (!guard.ok) {
throw new Error(formatGuardError(guard, change.file_path));
}
const out = eol === '\r\n' ? plan.updated.replaceAll('\n', '\r\n') : plan.updated;
await writeFileAtomic(change.file_path, out);
} else {