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

Each /review row says what the crew advises and why, or that it has not advised yet #4736

Merged opened this

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

Merged

Each `/review` row now ends with one line: "The crew advises: <verdict> — <reason>" from the newest crew recommendation on that ask, or "The crew has not advised yet" when there is none.

shipped production is serving it deploy 119f4d2

opened this

Each /review row now ends with one line: "The crew advises: <verdict> — <reason>" from the newest crew recommendation on that ask, or "The crew has not advised yet" when there is none.

  • Single pass: The page reads the recommendations for every row in one batched recommendationsFor call, so there is no query per row. It reuses the parser /asks already uses.
  • Escaping: The text goes through html, so a <flag> in a reason comes out escaped.
  • Test: test/review-page.test.ts now seeds one ask with a recommendation and two without, and checks the advice line on each. The new test fails with the src change reverted. The file passes, 4 of 4.
  • README: The Review paragraph (about line 451) now describes a row as title, repository, age, why, and the crew's advice or that it has not advised yet. /asks is unchanged.
  • Design lint: bun scripts/design-lint.ts printed one line, "design: no colour, size or component added outside the system", and no violations.
  • Type check: bun x tsc --noEmit could not run here, because it stops with "Cannot find type definition file for 'bun'". The forge's check will be the first real type check.
  • Left out: I did not start the app and load /review in a browser, and I did not run the full suite.
  • Placement: The advice is appended to each row's existing meta line after a ·, rather than put on a line of its own.

Closes #4730

commented

Each /review row now ends with one line: "The crew advises: <verdict> — <reason>" from the newest crew recommendation on that ask, or "The crew has not advised yet" when there is none.

  • Single pass: The page reads the recommendations for every row in one batched recommendationsFor call, so there is no query per row. It reuses the parser /asks already uses.
  • Escaping: The text goes through html, so a <flag> in a reason comes out escaped.
  • Test: test/review-page.test.ts now seeds one ask with a recommendation and two without, and checks the advice line on each. The new test fails with the src change reverted. The file passes, 4 of 4.
  • README: The Review paragraph (about line 451) now describes a row as title, repository, age, why, and the crew's advice or that it has not advised yet. /asks is unchanged.
  • Design lint: bun scripts/design-lint.ts printed one line, "design: no colour, size or component added outside the system", and no violations.
  • Type check: bun x tsc --noEmit could not run here, because it stops with "Cannot find type definition file for 'bun'". The forge's check will be the first real type check.
  • Left out: I did not start the app and load /review in a browser, and I did not run the full suite.
  • Placement: The advice is appended to each row's existing meta line after a ·, rather than put on a line of its own.
Approved

Approved. One batched recommendationsFor call, output escaped through html, advice text is plain words in the existing row meta (no new markup, works with JS off), the test covers advised, unadvised pull and unadvised issue. /review is sign-in gated in the preview (303 to /signin), as intended. Next two: (1) compute the ask id once instead of twice (a.pull?.id ?? a.issue?.id appears in both the flatMap and the row); (2) on a 360px phone the meta line now carries up to 300 chars of reason after four fields, so consider letting the advice wrap on its own line, and re-wrap the README paragraph and the header comment, which now run past the surrounding width.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs