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

The /__forge/ door's "More pulls" line says how many and links to the open pulls (from branch scout/6411-…) #16736

Merged opened this

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

Merged

The door's "More pulls" line now says how many are left, for example "3 more open pulls". It becomes "N+" when the read hits 50. The three named test files pass, tsc is clean, and scripts/gate.ts --fix changed nothing.

Notes

opened this

The door's "More pulls" line now says how many are left, for example "3 more open pulls". It becomes "N+" when the read hits 50. The three named test files pass, tsc is clean, and scripts/gate.ts --fix changed nothing.

  • Reader vs guest: a reader (someone who can read the repo) gets the line linked to <forge>/<repo>/pulls. A guest gets the count as plain text with no link. A single leftover reads "1 more open pull".
  • Reading more, resolving fewer: the door now reads up to 50 pulls (DOOR_PULL_READ) so it can count the others. It looks up environment state only for the five it draws, in doorPulls in src/apps/proxy.ts.
  • CSP unchanged: the door's CSP is untouched, and a new test checks it has no script allowance.
  • Tests:
    • New test/door-more-pulls.test.ts covers the five-or-fewer case, the linked count, the singular, the guest line, "45+" at the read cap, and the CSP.
    • test/door-pulls.test.ts is untouched.
    • In test/apps-door.test.ts I changed the old "More pulls are open on the forge." assertion to expect the linked "3 more open pulls". That assertion was out of date, not wrong.
  • Not taken from the old branch: scout/6411-… (pull #6414) is not on origin, so I couldn't rebase it. I re-implemented the change on this branch instead.
  • Reuse: I built on openPulls and door.ts's existing pullsHtml; no new function was added, so I did not run scripts/similar.ts.
  • Left out: nothing new. I did not run the whole suite; the forge's check does that.

To try it, open /__forge/ on an app with more than five open pulls.

[{"go":"/__forge/ on an app with 6+ open pulls, signed in as a reader","look":"the line under the five listed pulls","expect":"'N more open pulls' linked to the forge's pulls page"},{"go":"/__forge/ on the same app, signed out","look":"the same line","expect":"the count as plain text, no link"}]

Closes #6438

commented

The door's "More pulls" line now says how many are left, for example "3 more open pulls". It becomes "N+" when the read hits 50. The three named test files pass, tsc is clean, and scripts/gate.ts --fix changed nothing.

  • Reader vs guest: a reader (someone who can read the repo) gets the line linked to <forge>/<repo>/pulls. A guest gets the count as plain text with no link. A single leftover reads "1 more open pull".
  • Reading more, resolving fewer: the door now reads up to 50 pulls (DOOR_PULL_READ) so it can count the others. It looks up environment state only for the five it draws, in doorPulls in src/apps/proxy.ts.
  • CSP unchanged: the door's CSP is untouched, and a new test checks it has no script allowance.
  • Tests:
    • New test/door-more-pulls.test.ts covers the five-or-fewer case, the linked count, the singular, the guest line, "45+" at the read cap, and the CSP.
    • test/door-pulls.test.ts is untouched.
    • In test/apps-door.test.ts I changed the old "More pulls are open on the forge." assertion to expect the linked "3 more open pulls". That assertion was out of date, not wrong.
  • Not taken from the old branch: scout/6411-… (pull #6414) is not on origin, so I couldn't rebase it. I re-implemented the change on this branch instead.
  • Reuse: I built on openPulls and door.ts's existing pullsHtml; no new function was added, so I did not run scripts/similar.ts.
  • Left out: nothing new. I did not run the whole suite; the forge's check does that.

To try it, open /__forge/ on an app with more than five open pulls.

[{"go":"/__forge/ on an app with 6+ open pulls, signed in as a reader","look":"the line under the five listed pulls","expect":"'N more open pulls' linked to the forge's pulls page"},{"go":"/__forge/ on the same app, signed out","look":"the same line","expect":"the count as plain text, no link"}]
commented

The two door failures came from test/door-home-links.test.ts, which I had missed and which still expected the old "More pulls are open on the forge." wording. I updated it to the new "1 more open pull" line and pushed. That file and test/apps-door.test.ts now pass locally, and tsc is clean.

The two failures in test/flow-clog-page.test.ts ("pulls touching the same files are listed as a pair…" and the Flow dialog one) have nothing to do with the door. That file passes locally with my change, so I made no change for it. If it fails again on this push, I'd treat it as a flaky test on main and look at it separately.

The check on the new push has not come back yet.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs