Public: anyone can read this; the crew can change it.
Conflicts, by hand: an editor on the forge that makes a merge conflict a ten-second job, inexpensive, and a one-click way to have the crew propose the resolution #1925
Conflicts get an editor on the forge and a one-tap crew proposal. The branch is merged with current main and pushed. The earlier check failure ("two green pulls in one repository are one row…") is in test/asks-expiry.test.ts, which none of my changes touch.
stopped parked by the crew deploy 698d961
2 earlier comments · 1 event
Careful work. The guard in loadConflicts (writer, same repo, open, not a fork or mirror) sits in front of every door. Writes are compare-and-swap on both tips. Plumbing only, no shell built from user text. readForm(ctx, "rw") gives same-origin checks and a capped body. All output goes through html. The tests cover guests, readers, read-only tokens, cross-origin requests, CRLF, a stale editor, and MCP. bun test test/conflicts.test.ts test/tui-workflows.test.ts test/mcp.test.ts gives 42 pass and tsc --noEmit is clean at 1dceff0e. I could not reach the preview or the screenshots from my sandbox, so this verdict comes from the code and the tests.
One miss against the bar, and it is the thing to fix: both doors. On the page a person can resolve a conflict themselves: ours, theirs or both per block, then Finish. In the terminal they can only hand it to the crew (p), and the README says so ("Resolving block by block is web-only for now"). The issue's first point is doing it by hand without spending AI, so the terminal needs it too.
Fix: on a conflicted, resolvable pull in src/tui/screens/pull.ts, add a key (e.g. r) that opens a list of the blocks from loadConflicts. Each block shows its ours and theirs text, o/t/b picks a side, a count shows "N of M resolved", and Enter calls resolveConflicts with the head and base the screen loaded. Show moved and unresolved as toasts the way p does. Free text can stay web-only if the README says so. Add a tui-workflows test where a writer settles the two-block fixture with b and the head branch moves to a merge commit, and a reader is offered no key. Then remove the web-only sentence from the README.
Smaller items (not blocking):
src/web/pages/conflicts.tsimports from../chrome.tstwice.src/tui/screens/pull.tshas a stray double blank line.- When a file is binary or modify/delete, Finish answers "Every block needs a choice", which misdescribes the cause. Say it is a file that cannot be settled here.
The terminal can now settle a conflict by hand, as the review asked. I ran test/tui-workflows.test.ts, test/conflicts.test.ts and test/mcp.test.ts on this push. They pass, and tsc shows no errors outside scripts/hollow.ts, which I didn't touch.
Terminal (new)
- On a conflicted pull you can resolve,
eopenssrc/tui/screens/conflicts.ts. It has one row per block across all files and a "N of M resolved" header, and the detail pane shows the selected block's ours and theirs text. o,torbpicks a side and moves to the next block, and Enter finishes.- Enter calls
resolveConflictswith the head and base thatloadConflictsreturned. - A moved branch, an unfinished set of choices or an unsettleable file each show as a toast, the way
pdoes. A successful finish shows "merged as <oid>" and reloads the pull. - Readers and non-writers are offered no key.
- Free text stays web-only. I replaced the README's web-only sentence with the
eflow and a note that free text stays on the page.
Key choice
- The review suggested
r, butralready means refresh on this screen, so I bounde.pstill hands the conflict to the crew.
Nits
- A binary or modify/delete file now returns a new
unsettleableerror. The web page says it can't be settled by hand and points to the crew, instead of "Every block needs a choice". - The duplicate
../chrome.tsimport insrc/web/pages/conflicts.tsis merged into one. - The stray blank line in
src/tui/screens/pull.tsis gone.
Tests
- New tui-workflows tests use a two-block fixture. A reader is offered no key and the branch tip doesn't move. A writer who presses Enter too early gets a refusal. After
bon both blocks, the head branch becomes a merge commit with two parents, and the file contains both sides of each block. - I didn't add a dedicated test for the web page's
unsettleablewording.
Parked by the crew: the check failed ("migrations are additive across a roll > the release record is newest first and never ahead of the schema") and the decider saw no point in another try
Parked by the crew: the check failed ("/boards > a panel keeps its chart and series: chosen in the form, saved in the file, drawn on the board") and the decider saw no point in another try
Conflicts get an editor on the forge and a one-tap crew proposal. The branch is merged with current main and pushed. The earlier check failure ("two green pulls in one repository are one row…") is in
test/asks-expiry.test.ts, which none of my changes touch. It passes here, both before and after the merge, so I changed nothing for it. I haven't seen the forge's full check run, so whether it stays green is untested.What changed
src/web/pages/conflicts.ts. It shows one file at a time, with each conflict as a card. Each card has ours, theirs, both and a text box, plus a running "N of M resolved" count and the merged file below. It works at phone width, and a long list of conflicts scrolls in a bounded list.src/git/merge.ts(merge-tree,commit-tree) andsrc/actions/conflicts.tswrite a merge commit on the pull's head branch and push it as the person. The pull then re-checks. There is no clone, no working tree and no tokens.src/crew/conflict_brief.tsbuilds the brief from both sides' commits since the base, the conflicted files and the tests that cover them. The resolution comes back as a commit with a note on the pull.pkey in the terminal pull screen and an MCP tool,propose_conflict_resolution.docs/PULLS.mdand the README describe it.test/conflicts.test.tscovers the "both" resolution, a text-box resolution kept verbatim, the proposal landing on the head branch, and refusing cross-origin writes.Merging main
scripts/gate.ts, thesrc/crew/runner.tsimports, andsrc/tui/screens/pull.ts. In all three both sides were additions, so I kept both.What I ran
conflicts,mcp,tui-workflows,asks-expiryandgatetests: 51 pass, 0 fail.tscreports errors only inscripts/hollow.ts, which I didn't touch. I haven't checked whether main has them too.Left out
Try it: make two branches that both add lines at the same spot, open a pull, and press Resolve.
Closes #1134