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
Fourth slice of #133. #267 gave the conflict modal Overwrite and Cancel. Cancel is safe but it's a dead end: you're told the two versions diverged and left to work out what to do about it somewhere else. This slice gives you the two ways out — see the difference, or take theirs.
Depends on #269 (and transitively #268, #267): Reload is #269's reload path, asked for deliberately.
Acceptance criteria
The conflict modal's buttons become [ Compare ] [ Overwrite ] [ Reload ] [< Cancel >], with Cancel still focused and Esc still cancelling.
Compare closes the modal and opens the Compare to saved diff tab (CommandIds.CompareToSaved, cts) for that file, showing your buffer against what's on disk now. Nothing is written.
After Compare, the diff tab is the active tab and has focus.
Reload discards the buffer's edits and loads what's on disk — the same reload A clean tab shows what is actually on disk #269 does for a clean tab, so cursor line/column is kept and clamped, the gutter baseline resets, and undo history is cleared. ● and ⚠ both clear. Nothing is written.
Reload does not ask a second time. You already chose it in a dialog; a confirm-the-confirm is noise.
After a Reload, pressing Ctrl+S immediately is silent — the recorded state is the file that's now there.
The modal still fits an 80-column terminal with four buttons.
Implementation notes
Close the modal, then open the diff tab — in that order. Removing a focused modal makes TG hand focus back into the editor group, and a Tabs switches Value to whichever tab takes focus, which isn't always the active one. Opening the tab first and closing after leaves the wrong tab selected. See AGENTS.md's note and OpenRevisionPicker (Compare to revision: run from a diff tab, the new diff opens behind the file tab #191).
The modal pops its KeybindingService off the IInputScopeStack on close, whichever button was pressed.
Tests
Compare writes nothing and leaves a diff tab active and focused; Reload writes nothing, replaces the buffer with the disk content, clears ● and ⚠, clears undo history, and makes the following save silent; Overwrite and Cancel are unchanged; the scope stack is balanced after each of the four buttons (nothing left pushed).
Out of scope
Merging the two versions, or any three-way merge. Compare, overwrite or reload — the user resolves it.
A "save as" / "keep both" escape, or writing the buffer to a backup file.
Context
Fourth slice of #133. #267 gave the conflict modal
OverwriteandCancel. Cancel is safe but it's a dead end: you're told the two versions diverged and left to work out what to do about it somewhere else. This slice gives you the two ways out — see the difference, or take theirs.Depends on #269 (and transitively #268, #267):
Reloadis #269's reload path, asked for deliberately.Acceptance criteria
[ Compare ] [ Overwrite ] [ Reload ] [< Cancel >], with Cancel still focused and Esc still cancelling.CommandIds.CompareToSaved,cts) for that file, showing your buffer against what's on disk now. Nothing is written.●and⚠both clear. Nothing is written.Ctrl+Simmediately is silent — the recorded state is the file that's now there.Implementation notes
TabsswitchesValueto whichever tab takes focus, which isn't always the active one. Opening the tab first and closing after leaves the wrong tab selected. See AGENTS.md's note andOpenRevisionPicker(Compare to revision: run from a diff tab, the new diff opens behind the file tab #191).Reloadshould call A clean tab shows what is actually on disk #269's reload routine, not a second copy of it.KeybindingServiceoff theIInputScopeStackon close, whichever button was pressed.Tests
Compare writes nothing and leaves a diff tab active and focused; Reload writes nothing, replaces the buffer with the disk content, clears
●and⚠, clears undo history, and makes the following save silent; Overwrite and Cancel are unchanged; the scope stack is balanced after each of the four buttons (nothing left pushed).Out of scope
cts.