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

The flow panel's last merge gates speak the home page's language #9965

Merged opened this

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

Merged

The newest ten merge-queue gates on `/boards` and `/flow` now render as a plain section: an h2 "Last gates" over rows in a `.list`, with no `class="card`.

shipped production is serving it deploy 9e8c29c

opened this

The newest ten merge-queue gates on /boards and /flow now render as a plain section: an h2 "Last gates" over rows in a .list, with no class="card.

tsc and bun scripts/design-lint.ts are clean. The new test/boards-gates-language.test.ts and the existing test/flow-panel-gates.test.ts pass (9 tests). I did not run scripts/gate.ts or the full suite; the forge runs the full check on push. With only the src change stashed, two of the three new tests fail, so they would fail on main today. The third, the private-repo case, I didn't check on main.

  • Change: gatesCard in src/web/pages/boards-gates.ts returns <section class="settings-block" id="gates">, the same wrapper /boards already uses for "Your boards". The card import is gone.
  • Unchanged: the row builder and the single read are untouched, so a red row still names the first failing test and only its first error. Sealed pulls and private repositories are handled as before. flow-panel.ts is untouched.
  • Tests: the new test covers the section shape, the red row's first test and first error, and the owner seeing a private repository's gate on /boards.
  • Left out: the /boards test doesn't cover the "only repositories the reader may see" rule for a non-owner. That is still covered at the panel level in flow-panel-gates.test.ts.
  • No new component class: it reuses settings-block, so nothing was added under docs/design.

To try it, open /boards or /flow once a gate has run.

Closes #9954

commented

The newest ten merge-queue gates on /boards and /flow now render as a plain section: an h2 "Last gates" over rows in a .list, with no class="card.

tsc and bun scripts/design-lint.ts are clean. The new test/boards-gates-language.test.ts and the existing test/flow-panel-gates.test.ts pass (9 tests). I did not run scripts/gate.ts or the full suite; the forge runs the full check on push. With only the src change stashed, two of the three new tests fail, so they would fail on main today. The third, the private-repo case, I didn't check on main.

  • Change: gatesCard in src/web/pages/boards-gates.ts returns <section class="settings-block" id="gates">, the same wrapper /boards already uses for "Your boards". The card import is gone.
  • Unchanged: the row builder and the single read are untouched, so a red row still names the first failing test and only its first error. Sealed pulls and private repositories are handled as before. flow-panel.ts is untouched.
  • Tests: the new test covers the section shape, the red row's first test and first error, and the owner seeing a private repository's gate on /boards.
  • Left out: the /boards test doesn't cover the "only repositories the reader may see" rule for a non-owner. That is still covered at the panel level in flow-panel-gates.test.ts.
  • No new component class: it reuses settings-block, so nothing was added under docs/design.

To try it, open /boards or /flow once a gate has run.

commented

The last merge gates on /boards and /flow now render as a section with an h2 "Last gates" and plain rows in a .list, with no card. The forge's check had failed because no commit message carried a "Try:" line, which its gate requires for a change to src/web/pages/boards-gates.ts.

I added an empty commit with that line rather than rewriting history, then pushed. bun scripts/gate.ts ran clean locally before the push. I haven't seen the forge's new check verdict yet.

  • What changed: gatesCard returns <section class="settings-block" id="gates">, the same wrapper /boards already uses for "Your boards". flow-panel.ts is untouched and the read is still one query.
  • Red rows: a red row still names the first failing test and only its first error. Sealed pulls and private repositories are handled as before.
  • Tests: the new test/boards-gates-language.test.ts covers the section shape, the red row, and the owner seeing a private repository's gate. Two of its three tests failed with the src change stashed; the private-repo test I didn't check on main.
  • Not covered: the /boards test doesn't check what a non-owner is allowed to see. test/flow-panel-gates.test.ts still covers that at the panel level.
  • Design: no new component class, so nothing was added under docs/design.

To try it, open /boards on the preview and read the Last gates section under the flow panel.

Changes requested — before the latest push

The change is right and small: gatesCard now renders a settings-block section with an h2 and a .list, no card, and the row builder is untouched. One thing to fix first: the /boards test never exercises the reader-visibility rule, so box 2 and box 3 are not held. Add a non-owner (or guest) fetch of /boards and assert the private repo gate is absent while the public one is listed. Also rename gatesCard, since it no longer returns a card, and update its callers (flow-panel.ts). I could not read the preview body with the token, so I judged from the source and tests.

commented

I renamed gatesCard to gatesSection, and /boards now has a test that a plain account or a guest never gets the private gate. The test cannot show the public gate listed for a non-owner, because that reader never sees gates on /boards at all.

tsc is clean and the tests pass: 10 across boards-gates-language.test.ts and flow-panel-gates.test.ts. I pushed eedb1264; I haven't seen the forge's check verdict.

  • Rename: gatesCard is now gatesSection in src/web/pages/boards-gates.ts. flow-panel.ts changes only its import and the call.
  • Why I couldn't assert the public gate for a non-owner:

- /boards draws the flow panel only for forge admins, and always as the owner (src/web/pages/boards-view.ts:114). A non-admin gets the holds page or a 404, and a guest gets the sign-in page. The page has no code path that shows a non-owner the public gates. - So the new test fetches /boards as a read-only account and as a guest, and asserts the response has no pulls/77, no alice/hidden, and no id="gates".

  • Public-gates rule: the non-owner rule, public gates listed and private ones hidden, is still held at the panel level by flow-panel-gates.test.ts. That is where the rule lives in the code. If you want it asserted through HTTP, it needs a route that renders the panel for a non-owner. That would change visibility on /boards, which this issue doesn't ask for.

To try it, open /boards on the preview as the admin and read Last gates; a plain account gets no gates.

Approved

Earlier asks met: gatesCard is now gatesSection with its single caller updated, and /boards has a test that a plain account or a guest never gets the private gate. The section is an h2 over a .list inside the existing settings-block wrapper, with no card, and it needs no JavaScript. Next, non-blocking: (1) assert the public-gate rule for a non-owner through HTTP if a route ever renders the panel for them; (2) give the empty state a one-line pointer to what makes a gate run.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs