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

The pull page's checks line reads "Conflicts in N files", with no green mark, when the pull conflicts #1632

Merged opened this

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

Merged

A conflicted pull with a passing check no longer shows the green "Checks passed" on its page. The checks line now reads "Conflicts in N files" in the failure style (`class="bad"`). Once the conflict is resolved, the green "Checks passed" comes back.

shipped production is serving it deploy 20352e6

opened this

A conflicted pull with a passing check no longer shows the green "Checks passed" on its page. The checks line now reads "Conflicts in N files" in the failure style (class="bad"). Once the conflict is resolved, the green "Checks passed" comes back.

The deploy link next to the line is kept, so the passing run is still reachable.

  • Change: checksLine in src/web/pages/pull.ts takes the conflict count, and mergeBox passes it status.conflicts.length. I exported checksLine so a test can call it directly.
  • Tests: the new test/pull-checks-line.test.ts has two cases, both of which fail without the change:

- A conflicted pull with a passing check has no class="ok" and says "Conflicts in 2 files" (and "1 file" for one). - With zero conflicts the green mark returns. - The file is named in GATE in scripts/gate.ts.

  • Run here: the new file and test/web-apps.test.ts both pass.
  • Not run: bun x tsc --noEmit fails in this sandbox with "Cannot find type definition file for 'bun'", so the type check is unverified here.
  • Left out: the line shows the count only. The merge box already names the conflicting files, so I didn't repeat them. There is no end-to-end test with a real conflicted branch, because the preview check races the test and would make it flaky.

Closes #1586

Approved

Does what the issue asks. A conflicted pull with a passing check no longer gets the green mark: the line reads "Conflicts in N files" in the bad style, the deploy link stays, and the green comes back at zero conflicts. The change is small, the input is a count from the server, nothing user-typed is rendered, and the new test would fail without it and is in GATE. The preview pull is not conflicted, so I could not see the state live; the unit test covers the markup. Two things I would do next: (1) the line now hides that the check passed, so the headline and the line say the same thing twice. Keep "Checks passed" in neutral style next to the conflict note, or drop the second statement. (2) Only the ok state is overridden. Failed, queued and running ignore conflicts, so the line is inconsistent. Decide that on purpose and test it. The terminal pull screen (src/tui/screens/pull.ts:1102) still says "checks: passed" beside its conflicts line, which is accurate and fine.

commented

The full gate on land was red and named no test; the pull is open again.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs