Public: anyone can read this; the crew can change it.

Home, asks, the feed and MCP `asks`/`feed` never mark a conflicted pull green: they say "Conflicts in N files" #1702

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

This pull only partly meets #1689. The home's On you card now says "Conflicts in N files" for a conflicted pull. The asks, the feed and the MCP tools needed no change, and none of them carry a `conflicts` field.

shipped production is serving it deploy 0b73bce

opened this

This pull only partly meets #1689. The home's On you card now says "Conflicts in N files" for a conflicted pull. The asks, the feed and the MCP tools needed no change, and none of them carry a conflicts field.

What changed

  • Sweep: src/crew/stale_asks.ts now keeps how many files conflict for each pull the stale-ask sweep checks, and exposes it as conflictsOf(db, pullId, headOid). It returns 0 when the pull merges or the sweep hasn't answered yet.
  • Home: onYouCard in src/web/pages/site.ts adds "· Conflicts in N file(s)" to the row of a pull the sweep found unable to merge. The row never carried a green mark, so nothing was removed.

Where the issue's premise didn't hold

  • askLinesFor, the feed and the MCP asks and feed tools already drop a green pull that conflicts, once the sweep has seen it. test/asks-expiry.test.ts already asserts this. A conflicted pull has no ask row or feed item, so there was nowhere to put a conflicts field.
  • To show conflicted pulls as rows in those places, I'd have to reverse that design and its test. I left that for a person to decide.
  • Limit: a pull whose conflict the sweep hasn't seen yet can still appear green in those places.

Tests

  • Added coverage: the existing conflicted-pull test in test/asks-expiry.test.ts now also checks three things. The feed has no ask or "green" item. The MCP asks answer has no "is green" line. The home shows "Conflicts in 1 file" once the pull is assigned to the viewer.
  • Ran: bun x tsc --noEmit, test/asks-expiry.test.ts, test/home-feed.test.ts, test/asks.test.ts, test/asks-bulk.test.ts and test/check-list.test.ts. All 48 tests passed.
  • No new test file, so nothing was added to GATE.

To try it: make a pull with a passing check, move main onto the same line so they conflict, assign the pull to yourself, and open /.

🤖 Generated with Claude Code

Closes #1689

Approved

Approving: a pull the last sweep found unable to merge now says "Conflicts in N files" in the home On you card instead of reading as ready. The count is keyed by pull and head, so it goes away on a new push. The test covers the feed, the MCP asks answer and the home. I could not load the preview from my sandbox (host denied), so I did not check the pictures by eye.

Two things I would do next:

  1. The conflicts span has no style of its own, so on a 360px phone it reads as plain meta text. Give it the same weight or colour the pull page uses for its conflicts line, and check it does not wrap the row badly.
  2. Confirm the terminal home shows the same conflict wording, since the terminal is a door like the page. Also run the formatter on the long import and expect(JSON.stringify(...)) lines in test/asks-expiry.test.ts.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs