feat: resolve conflicts through focused two-way drafts
Replace the marker-filled three-pane resolver with a marker-free native Draft versus frozen Alternative projected from current working text. Preserve preexisting outside edits, native undo, dirty-save guards, all sides/bases, and draft caret/viewports across separate History views. Reuse DiffState alignment/highlighting/excerpts for Resolution and merge its base-aligned rows for readonly three-way History. Hide explorer and source-selector chrome by default. Verified 926 tests plus actual terminal projection, History highlighting, hunk choice, optional explorer, and guarded jj-confirmed save workflows. Clippy completes with pre-existing warnings only. Smoke fixtures stay unresolved in this ancestry; remove that ancestry before publication. Size exception: approximately 1650 implementation added/deleted lines, excluding tests/docs, kept coherent because native draft lifecycle and aligned rendering must change together without parallel legacy modes.
This commit is contained in:
@@ -78,7 +78,7 @@ Comparison views reserve no separate metadata header or native-buffer help foote
|
||||
|
||||
Each comparison owns its split/unified mode and split axis; startup defaults apply only when opening a comparison. Source alignment and file-side availability stay independent of presentation. Unified display rows carry a side projection: equal context maps both sources, changed runs emit Before rows followed by After rows, and folds retain aligned coordinates. Native navigation/editing continues to bind source buffers rather than a synthetic unified document. The TUI reuses side-specific syntax/wrap/overlay pipelines in one unified region or the existing axis-based split geometry, exposing only the active logical side for unified hit-testing and directional focus.
|
||||
|
||||
The resolver owns a dedicated native tab with immutable input buffers and shared editable Result buffers, independent of historical comparison state. `resolve` reads all alternating jj merge-tree terms from immutable Git-backed `jj:trees` metadata; marker parsing only provides region navigation and draft replacement. Session background jobs load inputs and perform guarded saves. The write path holds jj's working-copy lock while validating checkout identity and on-disk data and installing the chosen result, then delegates snapshot/status authority to jj. Save aliases and shared Result tabs route through the same guards. TUI resolver geometry reuses native document rendering, with two inputs above Result or a single selected input at narrow widths.
|
||||
The resolver owns a dedicated native tab with an editable Draft and frozen read-only Alternatives projected from the current raw working buffer. Projection replaces only conflict regions; automatically merged text and pre-existing outside edits remain identical across initial alternatives. Native undo includes initial seeding. Resolution reuses DiffState alignment, excerpts, highlighting and viewport mapping, including equal-text editing. A separate read-only History uses the original jj inputs/bases; native buffer identity and frontend offsets retain draft/view state. `resolve` reads all alternating Git-backed `jj:trees` terms. Background guarded saves retain checkout/disk validation and jj snapshot/status authority; no presentation change bypasses these write guards.
|
||||
|
||||
`Editor::scroll_distance()` supplies the session-wide optional edge margin. The TUI applies it to document/diff visual rows and unwrapped text columns, and retains independent picker offsets across navigation frames. Picker windows exclude their fixed chrome and align whole multi-row entries. File projections carry a monotonic viewport revision, so catalog/filter/expansion changes invalidate picker identity without hashing the entire catalog on every redraw. Metadata-only status changes do not move the viewport. Explicit LSP/wrap-toggle anchors and detached wheel views retain precedence.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user