feat: side-by-side diff view + auto-save skips backup
CI / lint (push) Failing after 7s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / security (push) Successful in 10s

- Side-by-side diff: toggle button (columns-2/align-justify icon) in toolbar
  switches between unified and side-by-side view
- Backend: diff endpoint returns left_content + right_content for side-by-side
- Frontend: SequenceMatcher-based LCS diff for two-column rendering
- CSS: .backup-diff-sidebyside with left/right borders, empty cell styling
- Auto-save: PUT /save?backup=false skips backup creation (auto-save=no backup)
- Footer text updated to reflect backup-on-manual-save behavior
This commit is contained in:
2026-06-04 18:37:14 -04:00
parent 1e9ecf656f
commit 8c5a5fd6b2
4 changed files with 177 additions and 5 deletions
+2 -1
View File
@@ -437,7 +437,8 @@ async function saveFile(silent = false) {
safeCreateIcons();
}
const response = await fetch(`/api/file/${encodeURIComponent(state.editorVault)}/save?path=${encodeURIComponent(state.editorPath)}`, {
const backupParam = silent ? '&backup=false' : '';
const response = await fetch(`/api/file/${encodeURIComponent(state.editorVault)}/save?path=${encodeURIComponent(state.editorPath)}${backupParam}`, {
method: "PUT",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ content }),