refactor: route conflict resolution through the diff workspace
Use the active DiffState, native FilePicker and existing diff input, layout, focus, source navigation and scrolling paths for Resolution. Delete separate resolver filtering, file-list rendering and scroll APIs. Keep projections, source choices, History and guarded jj saves distinct. Verify native parity for picker remaps, current-file selection, excerpt initialization, folded search, wheel focus, layouts, buffer transitions and per-file viewports. All 932 tests pass; actual terminal smoke covers Space-e explorer, Down/Enter file selection and guarded confirmed save. Clippy completes with existing warnings only. Size exception: 1197 implementation added/deleted lines excluding tests and docs; input routing, native buffer lifecycle and rendering are kept as one coherent cutover, without a parallel legacy resolver path.
This commit is contained in:
+2
-2
@@ -473,9 +473,9 @@ Run **`:resolve`** in Normal mode for the current jj working copy. It opens a de
|
||||
| `resolve.history` / `resolve.view.toggle` | Show read-only input/base/input History / switch views |
|
||||
| `resolve.close` | Close the resolver without discarding dirty drafts |
|
||||
|
||||
**History** is separate from editing: it compares the original inputs and their base, with all sides and bases selectable for multi-sided conflicts. Draft text, undo, caret and viewport survive view switches. The file explorer is hidden by default and available on demand. Narrow Resolution panes retain side-by-side comparison where usable; narrow History shows the focused input. Native editing, copying, search and remapped pane navigation work normally; read-only Alternatives and History reject edits and saves.
|
||||
**History** is separate from editing: it compares the original inputs and their base, with all sides and bases selectable for multi-sided conflicts. Draft text, undo, caret and viewport survive view switches. Resolution uses the ordinary diff workspace, including its configured explorer, split/unified/orientation controls, source-line navigation, excerpts, focus and scrolling. Narrow History shows the focused input. Read-only Alternatives and History reject edits and saves.
|
||||
|
||||
Input indexes are one-based and include bases. Commands appear in the palette and through corresponding `config.core.resolve` actions; no new global default bindings are installed. Normal-mode Tab/Shift+Tab cycles visible panes and an open file list. In the list, `/` filters and Enter opens a file. The complete seeded Draft can be saved even when intentional differences remain against the Alternative: those differences are not unresolved conflict markers. There is no automatic “accept both”.
|
||||
Input indexes are one-based and include bases. Conflict-specific actions appear in the palette and through corresponding `config.core.resolve` methods. File navigation uses the existing picker/explorer actions: Space o opens floating search, Space e focuses the dock, Ctrl+t switches Tree/List, Ctrl+w closes it, and configured tree/selection bindings apply unchanged. Enter selects a relevant conflict file and focuses the editable Draft. Normal-mode Tab/Shift+Tab, native motions/search, context expansion and layout actions follow normal diff behavior. The complete seeded Draft can be saved even when intentional differences remain against the Alternative: those differences are not unresolved conflict markers. There is no automatic “accept both”.
|
||||
|
||||
**`:w` saves and checks jj**, asynchronously. Before writing, the resolver locks the working copy and validates the frozen checkout and exact on-disk file state. Checkout changes, external writes and unsafe filesystem ancestors refuse the write, including force-save. Successful writes trigger jj's normal snapshot operation, which may capture other on-disk changes. The list distinguishes unresolved, unsaved, checking, resolved and unconfirmed states. jj—not marker scanning or a manual checkbox—confirms resolution. A failed confirmation keeps saved contents and reports unconfirmed status. Resolved files remain in the session for review. Dirty drafts prevent destructive resolver/pane/tab closes.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user