A2: disk-conflict banner, overwrite question and Local History dialog
- Banner inside the editor pane for a dirty tab whose file changed (Reload (discard mine) / Keep mine / Compare) or was deleted (Keep as unsaved / Close); state in stores/diskConflicts.ts, the old notice is gone. - Save and save all ask Overwrite / Cancel when the engine refuses with disk_changed. - Diff tabs against the disk text (file.readDisk) and a Local History entry (history.read); "Revert to This" in the caption. - Show Local History dialog (history.show: tree context menu, palette, File menu) with Show Diff and an undoable Revert to This. - History failures warn once until a snapshot works again. - Docs: docs/local-history.md, G2 in gaps.md, ui-parity, architecture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
dfe2f19ca5
commit
d2344bf216
29 changed files with 1999 additions and 52 deletions
|
|
@ -475,7 +475,7 @@ describe("project tree context menu", () => {
|
|||
await tree.find("[data-path='a.php']").trigger("contextmenu", { clientX: 40, clientY: 50 });
|
||||
const menu = document.querySelector("[data-test=tree-menu]");
|
||||
expect(menu).not.toBeNull();
|
||||
expect([...document.querySelectorAll("[data-test=tree-menu-item]")].map((item) => item.textContent.trim())).toEqual(["Open", "Show Diff", "Show History", "Upload to Server", "Compare with Server", "Download from Server"]);
|
||||
expect([...document.querySelectorAll("[data-test=tree-menu-item]")].map((item) => item.textContent.trim())).toEqual(["Open", "Show Diff", "Show History", "Show Local History", "Upload to Server", "Compare with Server", "Download from Server"]);
|
||||
(document.querySelector("[data-item=showDiff]") as HTMLElement).click();
|
||||
await flushPromises();
|
||||
await flushPromises();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue