A 3-way merge editor: Ours, Base and Theirs panes plus a Result; accept ours, theirs, both or base per conflict, take the agent's suggestion or edit by hand, step through conflicts, then mark the file resolved and complete the merge.
Rendered from Rust at build time · goes live when visible
When to use
An agent rebases a worktree onto main, merges a teammate's branch, or opens a PR that "can't merge cleanly".
The user wants to understand each clash, decide it fast (or let the agent decide and check its work), make sure nothing is left half-resolved, and either finish or back out safely.
When not to use
Review an agent's change set: use Diff viewer instead.
A run as a line of checkpoints, like git for agents: use Checkpoint lanes instead.
An agent's code review in one card: use Review card instead.
Installation
Merge conflict is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
Terminal
oxyn add merge-conflict
Usage
Dioxus · rust
The code is part of Oxyn Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Move to the next unresolved conflict after a pick.
suggestions
bool
true
Show the agent's suggestions where the files carry them.
fold_after
usize
6
Clean runs longer than this fold to "⋯ n unchanged lines" (0 never folds).
default_picks
Vec<(usize, usize, Pick)>
Default::default()
Picks already made: (file, conflict, pick).
on_resolve
EventHandler<(String, usize, Option<Pick>)>
—
A conflict was settled or reopened (`None`): (path, conflict, pick).
on_mark
EventHandler<String>
—
A file was marked resolved.
on_complete
EventHandler<()>
—
Complete merge was pressed with every file marked.
on_abort
EventHandler<()>
—
Abort was confirmed.
Read from the Rust signature and doc comments.
Keyboard interactions
Key
Action
Alt↓or]
Next unresolved conflict (wraps)
Alt↑or[
Previous unresolved conflict
Alt1
Accept ours (current)
Alt2
Accept theirs (incoming)
Alt3
Accept both, ours first
Alt4
Keep the base
Alt5
Accept the agent's suggestion
AltR
Reopen the focused conflict
E
Edit the focused conflict by hand
⌘EnterorCtrlEnter
Apply a manual edit
Esc
Cancel a manual edit
⌘ZorCtrlZ
Undo the last pick, reopen or mark
⌘ShiftEnterorCtrlShiftEnter
Mark the file resolved
Accessibility
The editor is a labelled region (“Merge conflicts: feature/token-refresh into main”); each pane and each conflict is a labelled group, and each conflict's actions are a toolbar.
Every conflict says its state in text (“unresolved”, “ours”, “⚑ markers left”) and by a coloured edge; colour is never the only cue.
A polite live region reads “Conflict 2 of 3 in src/auth/session.rs, resolved, took theirs. 1 left.” after each move or pick.
Buttons carry aria-keyshortcuts; Mark resolved and Complete merge stay focusable when disabled and show why next to them (“1 conflict left”).
Abort asks inline (role=alertdialog) and has no shortcut.
From the spec
Landmarks. The editor is a region "Merge conflicts: feature/auth-refresh into main"; each pane is a labelled group ("Current, main", "Base", "Incoming, feature/auth-refresh", "Result, editable").
Conflict accessible name. "Conflict 2 of 5 in auth.rs, lines 41 to 42, unresolved. Current: 2 lines. Incoming: 1 line. Agent suggestion available, medium confidence." Changes per state ("resolved, took incoming", "agent suggestion, not reviewed").
Text alternatives for colour. Every region carries a text tag (current / incoming / both / agent / edited / unresolved) and a gutter glyph; colour is never the only cue; contrast of tags and outlines ≥ 3:1 against the pane, text ≥ 4.5:1; amber and violet pass in both themes and the daltonized preset.
Announcements (polite): "Conflict 3 of 5" on navigation; "Resolved, 2 conflicts left" on accept; "Agent suggested a resolution for conflict 2" when it finishes; "Agent resolved 5 conflicts, 5 to review" once for Resolve all (never per step); "All conflicts resolved". Assertive: commit failure, abort failure, file changed on disk.
Keyboard (proposed; all remappable via MergeKeymap). Alt+↓ / Alt+↑ next / previous unresolved conflict; Alt+Shift+↓ next any; Alt+1 accept current; Alt+2 accept incoming; Alt+3 accept both; Alt+4 accept agent suggestion; Alt+Backspace reject suggestion; Alt+R reopen; F8 / Shift+F8 next / previous marker; ⌘/Ctrl+Alt+R resolve all with agent; ⌘/Ctrl+Alt+M mark file resolved; ⌘/Ctrl+Shift+Enter complete merge; Abort has no shortcut. Esc leaves the result editor to the navigator. Shortcuts avoid ⌘/Ctrl+Shift+A (status-strip approval jump).
Focus order. Header actions → file strip → navigator → focused conflict action bar → result editor → footer. Focus stays on the action bar after Accept and moves with auto-advance; the move is announced.
Screen-reader reading of panes. Each conflict offers "Read current / base / incoming" buttons that read the region's lines without leaving the result.
Reduced motion. §6 last row.
Motion & interaction
Conflict focus. Navigator move scrolls all four panes together so the conflict's first line sits at 30 % of viewport height (proposed); the amber outline draws in (opacity 0 → 1, 160 ms); the previous conflict's outline fades. Panes scroll-sync by aligned regions, not by line number, so a 2-line current vs 12-line incoming region stays aligned (spacer rows as in diff-viewer.md).
Navigator count. "conflict 2 of 5" rolls digits with dur.digit.roll (280 ms); the total rolls down as conflicts resolve; the "unresolved" counter in the file strip and in the status-strip PR pill roll together (one PrStatus.conflicts value, composer-status-strip.md §3).
Hover preview. Hovering Accept current / incoming / both shows the ghost result after 120 ms (hover-intent), tints the source region in its pane (color.merge.current / .incoming at 18 % alpha); no layout shift: the ghost replaces the region's height with a 160 ms spring.snap tween.
Accept. The chosen lines travel from the source pane into the result (a translucent copy, dur.travel 240 ms ease.in-out, capped at 12 lines; larger regions crossfade instead); the outline morphs amber → resolved (300 ms colour ease in OKLab) and the tag fades in. Navigator auto-advances to the next unresolved after 400 ms (proposed; off with auto_advance = false).
Accept both ▾. Default order current-then-incoming; the menu offers "Incoming first" and "Combine line by line" (only when the regions don't overlap at line level — the adapter says so).
Agent suggestion. Ghost text streams line by line using text-reveal.md line reveal; the ✦ glyph shimmers while streaming; the rationale appears after the text, one line, with a 160 ms fade. Confidence chip colour is neutral (never green) — it is the agent's claim, not a verification.
Resolve all. A determinate bar fills per finished conflict (no fake progress); finished conflicts flip to Suggested with a 120 ms stagger cap 6 if several land in one frame; the minimap marks turn amber → violet-neutral (color.merge.suggested). The header text rolls "Resolving 3 of 5".
Review. Each Suggested conflict shows an "unreviewed" dot; opening it for ≥ 600 ms (proposed) or pressing Accept clears the dot. "Accept all" enables only when no dots remain (default policy).
Reject suggestion. Ghost dims to 30 % and collapses to a one-line "Suggestion rejected · Show" stub (200 ms); the conflict returns to amber.
Markers counter. Typing that removes the last marker of a region flips the region to EditedManually → Resolved{Manual} after a 600 ms idle debounce; the counter rolls; adding a marker back reopens it. Markers in the result are highlighted with color.merge.marker background and a gutter ⚑.
Mark file resolved. ✓ stroke draws (dur.check.draw), the file's chip in the strip morphs ● → ✓ and slides to the end of the strip (200 ms spring.snap, after a 300 ms delay so it never moves under the pointer).
Complete merge. Button label swaps to "Completing…" in one fixed-width cell; on success the header morphs to ✓ "Merged into main" (dur.row.morph + dur.check.draw); the pane goes read-only with a 200 ms desaturate. No confetti in free variants.
Abort. The confirm expands inline under the button (dur.expand); on confirm, conflict outlines fade out and panes crossfade to the restored file (240 ms). Error → 2 × 3 px nudge of the banner.
Stale. Banner slides from the pane top (200 ms ease.out); regions whose text no longer matches pulse amber once (600 ms) and reopen.
Minimap. One mark per conflict on the right rail (amber unresolved, violet suggested, success resolved, danger markers-left); click scrolls; current conflict mark is 2 px wider.
Timing
Transition
Duration
Delay
Easing / spring
Stagger
Frame rate
Focus scroll (4 panes synced)
260 ms
0
ease.in-out
—
60 Hz
Focus outline in / out
160 ms / 120 ms
0
ease.out / ease.in
—
60 Hz
Navigator / counter digit roll
280 ms
0
ease.out
30 ms right → left
30 Hz during roll
Hover preview ghost
160 ms height tween
120 ms hover-intent
spring.snap
—
60 Hz
Accept travel (≤ 12 lines)
240 ms
0
ease.in-out
—
60 Hz
Accept crossfade (> 12 lines)
160 ms
0
ease.out
—
60 Hz
Outline amber → resolved
300 ms
0
linear in OKLab
—
30 Hz
Auto-advance to next conflict
as focus scroll
400 ms (proposed)
ease.in-out
—
60 Hz
Suggestion stream
line reveal 120 ms per line
first line after first token
ease.out
40 ms per line
30 Hz
✦ shimmer while suggesting
1400 ms sweep / 800 ms rest
600 ms
ease.coast
—
30 Hz
Rationale fade-in
160 ms
after text completes
ease.out
—
60 Hz
Resolve-all bar step
300 ms per change
0
ease.out
120 ms cap 6
30 Hz
Unreviewed dot clear
120 ms
600 ms dwell (proposed)
ease.out
—
60 Hz
Reject collapse
200 ms
0
spring.snap
—
60 Hz
Manual-resolve debounce
—
600 ms idle (proposed)
—
—
—
Mark-resolved ✓ + chip move
160 + 240 ms; move 200 ms
move after 300 ms
spring.snap / ease.out
—
60 Hz
Complete → ✓ header
160 ms morph + 240 ms stroke
≤ 200 ms beat
spring.snap / ease.out
—
60 Hz
Read-only desaturate
200 ms
after ✓
ease.out
—
30 Hz
Abort confirm expand / panes restore
220 ms / 240 ms
0
spring.snap / ease.in-out
—
60 Hz
Stale banner / region pulse
200 ms / 600 ms ×1
0
ease.out / ease.in-out
60 ms cap 6
60 Hz
Error nudge
300 ms (2 × 3 px)
after morph
linear
—
60 Hz
card auto-close after Completed
240 ms collapse
4 s hold
ease.in
—
60 Hz
Reduced motion
no travel, no ghost height tween (ghost appears in place), scrolls jump (scroll-behavior: auto), outlines and tints swap instantly with an 80 ms opacity crossfade, counters swap without rolling, no shimmer (static ✦ + "Suggesting…"), suggestion text appears in one block when complete (a "streaming" label shows meanwhile), no pulses or nudges (a static icon + text carry the meaning), chip does not slide (re-sorts on next open)
—
linear
none
event-driven only
Motion tokens are the family-F set (tools.md §5.2) plus dur.travel from composer.md. Proposed colour tokens (to live in checkpoints-git.md if the family overview defines them): color.merge.current (blue-ish), color.merge.incoming (teal-ish), color.merge.base (neutral), color.merge.conflict (= color.loader.waiting, amber), color.merge.suggested (low-chroma violet), color.merge.resolved (low-chroma success), color.merge.marker (danger at 16 % alpha). Current / incoming hues avoid the add / remove greens and reds so a diff and a merge never read the same.
Responsive behaviour
Container query: under 600 px the three-pane inputs become tabs (Ours · Base · Theirs) above one column with the Result below; result-center turns into Ours · Result · Theirs tabs under 760 px, opening on Result.
Under 480 px line numbers narrow, the action buttons share the width two per row and Mark resolved spans the footer.
Long lines wrap inside each pane; the panes never scroll sideways.
Edge cases (spec)
Agent-resolved but unreviewed. Default policy (proposed): Resolved{Agent, reviewed: false} counts as unresolved for Complete merge; the app can relax it with ReviewPolicy::TrustAgent (e.g. autonomy set to full in composer-permission-selector.md), and then the Complete button reads "Complete merge · 5 unreviewed".
Agent writes outside the conflict. A suggestion may only replace its own region; any change elsewhere is shown as a separate EditedManually region tagged "agent" so it is reviewable.
Conflict counts disagree. The adapter's count wins in headers; the marker scan is a second, local signal ("⚑ markers left") and never silently overrides the adapter.
Markers in content on purpose (docs about git, test fixtures): "Mark anyway" exists for every file; the counter then shows "⚑ 2 (kept)".
Huge files (≥ 20k lines, proposed threshold): panes virtualise (diff-viewer); minimap becomes the heat strip; travel animation is disabled; syntax highlighting falls back to plain text above the host's highlighter limit with a "Highlighting off for large file" note.
Huge merges (100+ files): file strip becomes a filterable list (unresolved first, then by conflict count); Resolve all processes in batches of 10 (proposed) with Stop between batches.
Very fast agent. A suggestion that completes inside delay.row_guard (150 ms) renders as Suggested without the streaming phase.
Very slow agent. Per-conflict suggestion inherits the tool stall thresholds (soft 5 s, hard 45 s, composer-status-strip.md); stalled suggestions show "Still thinking · Stop" and never block manual resolution.
Rebase ours/theirs swap. Covered in §2; with no branch name available the labels fall back to "Current (being rebased onto)" / "Incoming (your commit)".
Add/add and no base. Base pane shows "No common ancestor" and the editor runs two-way.
Whitespace-only and EOL conflicts. Header chip "whitespace only" with one-click "Accept incoming whitespace"; CRLF vs LF shown as a visible ␍ glyph toggle.
Long branch names. Pane headers use git-chips.md truncation (keep prefix and last segment); full name in tooltip.
RTL. Chrome mirrors (navigator, actions); code panes stay LTR; pane order does not mirror (Current stays at inline-start in LTR and inline-end in RTL by logical order, so "current" is always the reading-start pane).
Tiny sizes (16–20 px). The merge appears only as a chip: "⚠ 5" amber, tooltip "5 merge conflicts"; the status-strip PR pill carries the same number.
Dense IDE. 20 px line height, action bar becomes icon buttons (C, I, B, ✦) with tooltips, rationale collapses to a ✦ icon with hover card.
Touch. Actions become a bottom sheet per conflict; swipe left / right on a conflict block = Accept current / incoming (with undo toast 5 s); targets ≥ 44 px.
Slow network / remote sandbox. File load shows skeleton panes; first conflict becomes interactive as soon as its file arrives (others stay skeleton); writes are optimistic with a per-region "saving" dot and rollback on failure.
Offline. Read and manual resolution work on the local copy; Agent, Complete and Abort are disabled-with-reason; on reconnect, if the file changed remotely → Stale.
Concurrent agent run. If the agent is still running a turn that touches a conflicted file, the file shows "Agent is editing" and actions are disabled until the edit settles (file-edit chip Writing state).
Undo after Complete. Only via checkpoint restore (checkpoint-timeline.md); the component never runs a reset itself.
Notes for AI
Import MergeConflict from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
A GPUI version exists: MergeConflictEl in oxyn_gpui.
Props to set first: files.
Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.
Review an agent's change set: unified, split or stacked, Accept / Reject (or Keep / Undo) per hunk, per file and for all with undo, a file list with Viewed marks, hidden context on demand, line comments sent to the agent together, and a minimap.
A run as a line of checkpoints, like git for agents: rewind to any of them and the new attempt branches out in its own lane, while the one it left fades back but stays.
An agent's code review in one card: the verdict, open findings by severity, and each finding with its file and line, a suggested fix as a diff, and Apply fix / Dismiss / Reopen.
A label with light passing over it while the agent works: a sweep, a calm band, a pulse or an ASCII scan; it stops when the run ends and dims when it stalls.