Repository navigation
Conversation
Each conflict in the review's conflicts list is a card of what the fork, the target now and this branch hold, who set the target's side (through the merge that brought it), and a decision: Keep main's writes the target's row onto the branch, Keep this branch's writes the branch's onto the target once confirmed, Edit… opens the row with the target's values beside each field, and a @card conflict lists each side's relationships with Remove on its side. New actions ShowConflicts, KeepTarget and KeepSource, bound on every platform.
There was a problem hiding this comment.
Devin Review found 5 potential issues.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
| let SidesState::Read(read) = &self.resolve.state else { | ||
| return; | ||
| }; | ||
| if self.target_write_refusal(cx).is_some() { | ||
| return; | ||
| } | ||
| let bound = read.target_head.clone(); | ||
| let list = self.resolve.of; |
There was a problem hiding this comment.
🔴 Stale confirmation deletes newer target data
If the target changes while confirmation is open, send_target_write can bind the old request to newly read target_head. A confirmed deletion then removes the updated row without comparing it with the original conflict.
Learn more
A target-side decision builds its mutation in decide before opening a confirmation. When the target head moves, preview_moved can replace the conflicts and sides_owed can read a new target head while that confirmation stays open. send_target_write then takes the new head without checking that the request came from the same conflict list. The server accepts a delete bound to that new head, even if the row changed since the original read.
Example: The target holds node d1 at commit m2. A reviewer opens “Keep feature's” to delete it, then another writer edits d1 at m3. Once the review rereads m3, confirming the old dialog deletes that newly edited node instead of refusing the stale decision.
Recommended fix: Capture the conflict-list identity and target_head with the request before opening confirmation. In send_target_write, refuse if the list or head changed; only advance a captured head after a write from that same list commits.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Fixed in 77530e6. The write is now bound to the target head its values were read at, for the list they were read in. A confirmation answered after either has moved sends nothing and says "Not written: main moved while you confirmed. Decide again." (test a_confirmation_answered_after_main_moved_sends_nothing).
| let mut edges: Vec<CardEdge> = Vec::new(); | ||
| for (head, on_target) in [(&target_head, true), (&source_head, false)] { | ||
| let read = session | ||
| .update(cx, |session, cx| { | ||
| session.read(&query, Some(head.clone()), cx) | ||
| }) | ||
| .await; | ||
| let Ok(answer) = read else { continue }; | ||
| for (id, (_, ends)) in images_of(&answer.rows, true, &[]) { | ||
| let to = ends.map(|(_, to)| to).unwrap_or_default(); | ||
| match edges.iter_mut().find(|edge| edge.id == id) { | ||
| Some(edge) if on_target => edge.on_target = true, | ||
| Some(edge) => edge.on_source = true, | ||
| None => edges.push(CardEdge { |
There was a problem hiding this comment.
🔴 Shared relationships appear as removable additions
When either edges_of read fails or exceeds 50 rows, CardEdge treats missing rows as absent on that side. A shared relationship can appear exclusive, inviting a deletion that removes existing target data.
Learn more
A cardinality conflict compares edge IDs returned at two branch heads to show which side alone holds each relationship. An unsuccessful read is skipped, and edges_of returns only 50 sorted rows per side. The comparison does not distinguish absent relationships from relationships omitted by a failure or the cap. render_card_edges then offers Remove for edges misclassified as exclusive.
Example: Both branches hold shared edge e60, plus enough other edges that e60 is outside one side's first 50. The card labels e60 as belonging only to the other side and offers a deletion there, despite its presence on both branches.
Recommended fix: Keep explicit read-success and truncation status per side. Only classify edges as exclusive and offer Remove when both complete memberships are known; otherwise show a partial-results notice and require a narrower or complete read before resolving.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Fixed in 77530e6. A @card card now records whether both sides' relationships were read whole: no read failed and neither side reached 50. If not, it says so and offers no Remove, and side_write refuses one as well.
| let Some(list) = self.resolve.of else { return }; | ||
| let what = self.conflict_title(ix); | ||
| if !on_target { | ||
| let key = conflict_key(list, ix); | ||
| self.resolve.pending.insert(key.clone(), ix); |
There was a problem hiding this comment.
🔴 Resolved cards permit stale overwrites
After KeepTarget commits, its synthetic fix key leaves the matching review card idle. Editing a list from that stale card can overwrite the resolution because bound_head now points to the fix's commit.
Learn more
The existing review fix queue uses a change's key to find its card after the write. Here a conflict fix always uses a synthetic key. finish_fix cannot find the corresponding card, so it leaves that card's FixState idle after a successful decision. save_edit allows another edit from the old card, and a list value has no value comparison in its mutation.
Example: The branch has tags ["old"] and the target has ["new"]. “Keep target's” writes ["new"] and advances the bound head. The reviewer switches to changes, edits the stale ["old"] card to ["old", "extra"], and Save replaces ["new"] with that list.
Recommended fix: Associate each conflict fix with its folded change when one exists. Set that card's fix state to running and then completed just as ordinary review fixes do, while preserving synthetic keys for conflicts without cards.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Fixed in 77530e6. Keep main's is now sent under the key of the review's change of the entity when the review holds one. The card's fix turns done, so it offers no other fix until Refresh (asserted in a_conflict_shows_three_sides_and_keeps_mains).
| match page.next_page_token { | ||
| Some(next) => token = Some(next), | ||
| None => return (who, reached || page.caught_up != Some(false)), | ||
| } |
There was a problem hiding this comment.
🟡 Target attribution stops before recent commits
When read_who receives caught_up: false without a page token, it stops instead of continuing after the last block. The displayed target author can be outdated even when the four-page limit has not been reached.
Learn more
The change-feed endpoint can return no next_page_token while caught_up is false: it processed its allowed number of commits but more remain. The existing review feed reader resumes such a page with after:<last_commit_id>; read_who instead returns immediately. It can therefore retain an earlier actor for an entity updated again in a later page.
Example: Main has 130 commits after the fork and changes Deal d1 in commits 10 and 130. If the first page stops at commit 128 with no token, the conflict card credits the author of commit 10 rather than commit 130.
Recommended fix: When caught_up is false without a token, resume from the last block's commit with a new start=after:<id>, counting that request against WHO_PAGES. Mark attribution incomplete only when the page bound is exhausted or continuation cannot advance.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Fixed in 77530e6. When a page has no token and caught_up: false, read_who now reads on from after:<last commit>, as the review's own feed does. The test server now answers such a page first, and the test checks that the author comes from the later commit.
| fn use_other(&mut self, at: usize, window: &mut Window, cx: &mut Context<Self>) { | ||
| let Some(field) = self.fields.get(at) else { | ||
| return; | ||
| }; | ||
| let text = edit_text(field.other.as_ref().unwrap_or(&Value::Null)); | ||
| field | ||
| .editor | ||
| .update(cx, |editor, cx| editor.set_text(text, window, cx)); |
There was a problem hiding this comment.
🟡 Using an empty value writes null
When the target's nullable text value is empty, use_other inserts empty text. typed interprets that text as null, so Save writes null instead of the target's empty string.
Learn more
The conflict edit form offers Use to copy the target's value into a field. edit_text renders both an empty string and null as empty text. When the branch currently holds a nonempty value, typed parses that newly inserted empty text; parse_input makes it null for nullable properties and rejects it for required properties.
Example: Main holds title: "" while the branch holds title: "CEO". Clicking Use and Save writes title: null on a nullable title, leaving the sides different instead of resolving the conflict.
Recommended fix: Carry the target's typed Value through the Use action and Save rather than relying only on the editor text to recover it. Preserve the separate state for an empty string and null, including when the person edits the field afterward.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Fixed in 77530e6. Use now keeps main's typed value, and Save sends that value while the field's text still reads it, so an empty string stays an empty string.
… its card; review of #151
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 11fda65. Configure here.
| // The card a fix already holds offers nothing more until Refresh. | ||
| if card.is_some_and(|card| self.cards.get(card).is_none_or(|card| card.fix.done())) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Fixed cards still offer Keep main's
Medium Severity
Keep main's now bails out when the entity's card is already done, but the conflict buttons still render enabled. After a revert or edit of that entity, Keep main's and Edit look available and click or keypress does nothing, with no reason shown.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 11fda65. Configure here.
There was a problem hiding this comment.
Fixed in b843138. When a fix already holds the entity's card, Keep main's and Edit… are now disabled with "Its card was fixed already: Refresh to decide again." (card_held), and the keys do nothing (test a_conflict_on_a_fixed_card_says_why_it_offers_nothing).
ragnorc
left a comment
There was a problem hiding this comment.
Review of #151 at b843138a
Recommendation: revise before merge. Two blocking findings. In both, a decision says it resolves the conflict, but the write does not make the two sides alike in the way the merge compares them. I reproduced both on a local graph with the v0.15.0 CLI.
What the change does
Before this change, a merge conflict showed one side and the hint "Fix each on the branch, then merge". Now the conflicts list shows a card for each conflict with three columns: the fork, the target now, and the branch. Each card names who set the target's value. It has three decisions:
- Keep main's writes the target's row onto the branch through the fix queue.
- Keep 's… writes the branch's row onto the target, after you confirm it.
- Edit… opens the edit form with the target's values beside the fields.
A @card conflict lists each side's relationships and lets you remove one on its side. The sides are read over contract 0.14 (merge-base, a query by id at each head, the type-filtered change feed). This keeps the design within today's API, and E53/E61 can replace those reads later. The code is mostly new: view/resolve.rs (2,459 lines), fixes::take_side, builder::edges_of and GraphSession::typed_changes.
The design is sound. A decision is an ordinary write, it is never retried, and it is bound to a commit. The branch's writes go through the existing fix queue, so the queue keeps one bound_head. The fixes for the earlier Devin and Bugbot findings (77530e6, 11fda65, b843138) are correct as far as I read them.
Blocking
1. A Vector or Blob property makes "Keep main's" and "Keep 's" report success while the conflict stays.
read_sides reads only projectable() properties (resolve.rs:1633-1645), so a side image never holds a Vector or Blob value. take_side compares only the properties both images hold (fixes.rs, the (Some(want), Some(have)) arm). But the engine compares the whole row, Vector and Blob columns included (Omnigraph v0.15.0 changes/row_compare.rs rows_equal_by_column, which exec/merge.rs cursor_rows_equal uses).
What happens:
- If the sides differ in a text property and in a vector, Keep main's sets the text, shows "Wrote main's version… Checking the merge again", and the dry run returns the same conflict.
- After that, the card shows no differing property, and Keep main's says "Both sides already hold the same values." The person has no way forward from the card.
- On a
delete_vs_update, Keep 's inserts the node on the target without its vector or Blob (restorablenever sees them). This changes the target and still does not resolve the conflict.
The doc comment on take_side says that a differing Blob or vector "makes it unavailable, with why". That code path cannot run, because those values are never in the images.
Reproduction (local graph, omnigraph 0.15.0, schema node Doc { slug: String @key title: String? embedding: Vector(3)? }):
- Load
d1(titlefork, embedding[1,0,0]). Create branchfeat. - On main, set the title to
mainand the embedding to[0,1,0]. Onfeat, set the title tofeat. branch merge feat into main dry run→divergent_updateford1.- On
feat, run the statementtake_sidebuilds for Keep main's:update Doc set { title: $new0_0 } where @id = $id0 and title = $old0_0. Result: 1 node affected. Both branches now readtitle: main. - Dry run again → the same
divergent_update. - Control: also set the embedding on
featto[0,1,0]→ the dry run answersmerged.
A temporary unit test in graph_store::fixes (a Doc type with embedding: Vector(3)?, images as the review reads them) shows that take_side returns an update that leaves the vector out. It fails at b843138a (output below). I did not push this test.
The invariant: a side image holds every column the merge compares, or the decision says it cannot make the rows alike. The owner is take_side, which already has the schema. A minimal fix by design: when the type has a property that is not projectable, refuse the update and insert arms with the reason (for example "embedding is a vector, which the review cannot read or compare"). Keep the delete arm, because a delete makes both sides absent. The card should also say that the row may differ in properties it cannot show, so that an empty comparison does not look like agreement. E53 (images from the server) removes this gap. Until then, refusing is the honest behavior. If you want the decisions for these types later, read a vector by id, and compare a Blob by its descriptor. Both add reads and state, so I would add them only on demand.
2. Keep 's on a node the target deleted restores the node but not its relationships, and the confirmation does not say so.
When main deleted a node, the delete cascaded to its edges on main. take_side (only want holds it) inserts the node again with the branch's values. The rows are then alike, the dry run answers merged, and the merge applies main's edge deletions. The branch still holds those edges, but the result has none of them. The confirmation says "so the two agree and the merge takes them", so the person expects the branch's version.
Reproduction (local graph, node Doc { slug @key, title }, edge Links: Doc -> Doc, data d1 → d2):
- Create branch
feat. On main, deleted1(1 node and 1 edge affected). Onfeat, set the title ofd1tofeat. - The dry run gives
delete_vs_update. - On main, run
insert Doc { slug: "d1", title: "feat" }(Keep feat's) → the dry run answersmerged. - Merge. Main holds
d1 (feat)andd2, and noLinksedge.featstill holdsd1 → d2.
The invariant: "Keep 's version" keeps what the branch holds of the entity, or says what it does not keep. The smallest coherent fix: when the insert arm runs, the confirmation names the relationships the branch holds that the merge will not keep (the review can read them with edges_of(From)). Another option is to offer this decision only for a node that has no relationships on the branch. Inserting the edges again under new ids would restore them, but it adds more writes to the target and the E26 limit. I would not do that before E61, which makes this decision the merge itself.
Optional
- The target head can move backwards across lists. In
send_target_write,read.target_head = commitruns before thethis.resolve.of == listcheck (resolve.rs:758-763). If a Refresh reads the sides again while a write to the target is out, the old write's commit overwrites the head of the new list. The result is safe: the next write is bound to an older head and gets a 412. But it is wrong state. Put the update inside the same list check. - Keep buttons enabled where
take_sidealways refuses. For a relationship conflict where both sides hold the edge, and for a type whose differing property cannot be set, the buttons are enabled. A click only then shows "Not offered…".render_decisionscould callside_writeonce and disable the buttons with its reason, as constitution VI asks for other refusals. - Liability and shape.
resolve.rsputs the reads, the decision state machine and the drawing in one 2.4k-line module. The part that E53 replaces (read_sides,read_who) is already separate fromSides/Decision, and that is good. The implicit concept that finding 1 shows is "which columns the merge compares":projectable()in one place, "not compared" intake_side, and nothing incompared_rows. Put one predicate ingraph_store(the properties a side read can prove alike) and use it in all three places. After five more decisions of this kind, each one asks that predicate and does not repeat the filter. - Overlap. #142, #145, #146, #148, #150 and #153 also edit
crates/review/src/view.rsorgraph_store/src/session.rs. Expect rebase conflicts inview.rsaround theon_actionregistrations andfix_finished.builder::edges_ofemits GQ 2.x text. GQ 3 (omnigraph#1316, a draft) would port it with the rest of the builder, so this change adds no special cost.
Validation
| What | Where | Result |
|---|---|---|
cargo test --workspace |
local, b843138a, Linux |
review 62, graph_store 335, gq_language 95: all pass. Five failures in crates this PR does not touch (agent_panel 2, studio_update 1, studio_workspace 2). They test file permissions, links and process stats, which this sandbox (root, gVisor) does not enforce. CI's Check jobs pass at this head |
| Finding 1: dry run, Keep main's statement, dry run, then control | local graph, omnigraph 0.15.0 CLI |
conflict → write affects 1 node → same conflict; control → merged |
| Finding 2: delete vs. update, insert on main, merge | same | merged; main loses d1 → d2 |
Temporary test taking_a_side_of_a_type_with_a_vector_is_not_offered_as_alike |
local, b843138a, graph_store |
fails for the predicted reason: take_side returns update Doc set { title: … }, with no vector. I restored the source afterwards |
| Engine comparison | Omnigraph v0.15.0 changes/row_compare.rs, exec/merge.rs |
inspected: every non-system column is compared, Blob by descriptor or bytes |
CI at b843138a |
Actions run 44494661248 | Check on Ubuntu and macOS, structure and changes pass; Windows was pending when I looked. deny fails on RUSTSEC-2026-0566/0567 (wasmtime). It fails the same way on main at 98c7cead (run 44418895712), so this change did not cause it |
Limitations: I did not run the GUI or the offscreen snapshots, and I did not run a v0.15.0 server. The reproductions use the CLI on a local graph with the same engine version, and run the statements take_side builds by hand. The fix commits in this PR change code that is new in the PR, so main has no "before" behavior for them. I did not re-prove their tests before and after.
|
CI on b843138: Check passes on macOS, Ubuntu and Windows (fmt, clippy
|
|
Closing for now. The PRs from the cookbook study were built in parallel from the same main and conflict with each other, so we are designing the branch workflow as one piece first. The branch stays; nothing is deleted. |


Implements the cookbook study's proposal "Conflicts with three sides and a resolution" (PR #143,
docs/ux/2026-11-18-cookbook-study.md; it is section### 3.there, ranked 3rd, and was assigned here as proposal 4). Plan: spec 039.What changed
Each conflict in the review's conflicts list (Show conflicts, or ⌥⌘C / Ctrl-Alt-C) is now a card with three sides and a decision:
cardinality_violation). The card lists each side's relationships from the node the server names, with the name of the other end and where each one is. "Remove on main" or "Remove here" sits on the side that alone holds it.update, bound to the values the branch holds. A row only one side holds is inserted or deleted. It goes through the review's fix queue, bound to the head that fixes bind to. The study verified this resolution by hand in beads B5.How the sides are read on today's API (contract 0.14):
GET /branches/merge-basegives both heads.nodes_fields_by_id, or the newbuilder::edges_of.GraphSession::typed_changes). A merged change's head is read by id to name its branch and author.New actions:
studio_review::ShowConflicts,KeepTargetandKeepSource, bound on all three platforms and listed in the palette while conflicts exist. The conflicts list is now a cached view of its own (ConflictRows), with a draw-count guard indocs/drawing.md.What waits on the engine
docs/deferred-engine-changes.md): ModernRelay/omnigraph#1471, a merge that takes a side for named entities. Until it lands, "Keep this branch's" writes to main before the merge, rather than being part of the merge.Verified against a real v0.15.0 server
I ran the release
omnigraph-serverv0.15.0 (sha256 checked) with the eight cookbook graphs in one cluster and recreated the study's conflicts:divergent_updatecardinality_violationdivergent_update,delete_vs_updateanddivergent_insertdivergent_updateStudio was drawn with its offscreen snapshot tool (
crates/studio/examples/snapshot.rs, debug build, 1440×900). This box has no X server, so the binary itself was not run under Xvfb as in the study. On vcos I opened Edit… and the confirmation, then pressed ⌥⌘[. The write committed onpipeline/2026-11-17, the review checked the merge again, and the server's own dry run now answersmerged.The real data showed one bug, now fixed: a query row leaves out null columns, so a null read as "not read" and Keep main's would have skipped it. A side's image is now filled with nulls for every property read.
Before (the study, origin/main)
After
vcos V4, three sides:

company C4, each side's successor with Remove on its side:

beads B5, all three kinds:

program P2:

Edit… with main's values beside each field:

Keep this branch's asks before it writes to main:

Keep main's landed, and nothing stops the merge now:

The screenshots are on the branch
feat/ux-p4-three-sided-conflicts-screenshots, which can be deleted after review.Checks
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings, the layer, brand and design-token scripts,script/test_release_files.py, the tests of review, gq_language, graph_store and studio_actions, and the keymaps test.a_conflict_shows_three_sides_and_keeps_mains,keeping_this_branchs_writes_to_the_target_bound_to_its_head,a_card_conflict_lists_each_sides_relationships,typing_in_the_search_leaves_the_conflicts_as_they_were, plus the unit tests inview::resolvetaking_a_side_makes_the_other_rows_alikeedges_are_read_by_id_or_from_their_sourcecrates/review/src/view.rs. This change keeps its own code inview/resolve.rsand touchesview.rsonly where the list, the keys and the fix outcome hook in.Note
Medium Risk
Introduces branch and target mutations during merge conflict resolution with head binding and confirmations; mistakes could write wrong graph state, though it reuses existing fix/write patterns and access checks.
Overview
Implements spec 039: the review conflicts list becomes the place to resolve merges, with per-conflict cards showing fork, target, and branch values (plus who set the target), instead of only kind/type/id/message.
Resolution actions add Keep main's (write target onto reviewed branch via the fix queue), Keep this branch's… (confirmed write to target, bound to the head sides were read at), Edit… with target values and Use, and Remove for cardinality violations. New keyboard actions and keymap bindings cover Show conflicts, Keep target/source, and conflict navigation while the list is visible.
Backend/query support adds
gq_language::edges_of,graph_store::take_sidefor row-alignment mutations, andGraphSession::typed_changesfor type-filtered feeds. The conflicts UI lives inview/resolve.rswith a cachedConflictRowsview (drawing guard indocs/drawing.md). Docs/specs record the feature and deferrals E53/E61.Reviewed by Cursor Bugbot for commit b843138. Bugbot is set up for automated code reviews on this repo. Configure here.