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

The design team reviews every pull that changes a page against docs/DESIGN.md #2840

Merged opened this

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

Merged

A pull that changes anything under `src/web/` now has its review sent to a crew reviewer on the Design team. That reviewer's brief holds the change to `docs/DESIGN.md`. A pull that changes only `src/core/` goes to the usual reviewer.

shipped production is serving it deploy 4183511

opened this

A pull that changes anything under src/web/ now has its review sent to a crew reviewer on the Design team. That reviewer's brief holds the change to docs/DESIGN.md. A pull that changes only src/core/ goes to the usual reviewer.

I ran the three review suites (test/review-route.test.ts, test/crew-review.test.ts, test/review-from-green.test.ts), and they pass. bun x tsc --noEmit is clean. I did not run the whole bun test; the forge's check does that on push.

  • Routing: pickReviewer in src/crew/review.ts takes an optional list of design-team user ids. sendToReview reads them from the Design team in core/teams.ts. A security-path change still goes to the security reviewer, because that rule is checked first.
  • Brief: reviewInputs in src/crew/runner.ts now also lists the changed file names. When any starts with src/web/, src/crew/brief.ts adds a design item to the review checklist. It tells the reviewer to read docs/DESIGN.md first and treat a departure from it as a change request.
  • Tests: three new tests in test/review-route.test.ts cover the src/web/pages/x.ts and src/core/ cases from the issue, and the security and no-designer fallbacks.
  • README: I added a short "Design review" note in the README's review section.

I chose not to send a second, extra design review alongside the normal one. The design reviewer takes the pull's single review slot. If the crew has no Design-team reviewer, the pull goes to the usual reviewer, and its brief still includes the DESIGN.md item.

To try it:

  1. Put a crew reviewer on the Design team in the teams settings.
  2. Push a green pull that changes src/web/pages/*.ts.
  3. The queued review run goes to that member.

Closes #2683

commented

A pull that changes anything under src/web/ now has its review sent to a crew reviewer on the Design team. That reviewer's brief holds the change to docs/DESIGN.md. A pull that changes only src/core/ goes to the usual reviewer.

I ran the three review suites (test/review-route.test.ts, test/crew-review.test.ts, test/review-from-green.test.ts), and they pass. bun x tsc --noEmit is clean. I did not run the whole bun test; the forge's check does that on push.

  • Routing: pickReviewer in src/crew/review.ts takes an optional list of design-team user ids. sendToReview reads them from the Design team in core/teams.ts. A security-path change still goes to the security reviewer, because that rule is checked first.
  • Brief: reviewInputs in src/crew/runner.ts now also lists the changed file names. When any starts with src/web/, src/crew/brief.ts adds a design item to the review checklist. It tells the reviewer to read docs/DESIGN.md first and treat a departure from it as a change request.
  • Tests: three new tests in test/review-route.test.ts cover the src/web/pages/x.ts and src/core/ cases from the issue, and the security and no-designer fallbacks.
  • README: I added a short "Design review" note in the README's review section.

I chose not to send a second, extra design review alongside the normal one. The design reviewer takes the pull's single review slot. If the crew has no Design-team reviewer, the pull goes to the usual reviewer, and its brief still includes the DESIGN.md item.

To try it:

  1. Put a crew reviewer on the Design team in the teams settings.
  2. Push a green pull that changes src/web/pages/*.ts.
  3. The queued review run goes to that member.
Changes requested — before the latest push

Routing is sound and the security-first ordering is right. One miss on the Tests rule: the half of the change that makes the reviewer hold the pull to docs/DESIGN.md (design flag from reviewInputs -> brief item) has no test. Fix first: add a brief test that taskBody with design:true includes the docs/DESIGN.md item and design:false/undefined does not; ideally also cover reviewInputs returning design true for a src/web/ diff. Also tidy test/review-route.test.ts (stray , } in the crew literal) and the import order in review.ts/runner.ts.

commented

A pull that changes anything under src/web/ now has its review sent to a crew reviewer on the Design team. That reviewer's brief holds the change to docs/DESIGN.md. A pull that changes only src/core/ is not treated as a design change and goes to the usual reviewer.

This push answers juniper's review:

  • Brief test: the new test/review-design.test.ts checks that taskPrompt includes the docs/DESIGN.md item when design: true, and leaves it out for design: false and when design is unset.
  • Diff detection test: the same file builds a small git repo and calls reviewInputs. A src/web/pages/x.ts change gives design: true; a src/core/x.ts change gives design: false. I exported reviewInputs from src/crew/runner.ts so the test can call it.
  • Empty entries: the file list from git diff --name-only now drops empty entries before the check.
  • Tidy: I removed the stray , } in test/review-route.test.ts. I also put the new imports in review.ts and runner.ts in order.

bun x tsc --noEmit is clean. The new test/review-design.test.ts and test/review-route.test.ts pass. I did not run the whole bun test; the forge's check does that on push.

I chose not to send a second, extra design review. The design reviewer takes the pull's single review slot, and security still outranks design. If the crew has no Design-team reviewer, the pull goes to the usual reviewer, and its brief still includes the docs/DESIGN.md item.

To try it:

  1. Put a crew reviewer on the Design team in the teams settings.
  2. Push a green pull that changes a src/web/ file.
  3. The queued review run goes to that member.
Approved

Routing and brief work as the issue asks. A src/web/ change goes to a Design-team reviewer, security still outranks design, and a crew with no designer keeps its reviewer with the DESIGN.md item in the brief. Each behaviour has a test that fails without it, including a real git diff through reviewInputs. The change touches no page, so there is nothing for the preview or the phone to show; the README note is accurate. The two things I would do next: (1) reviewInputs now runs git diff twice, so derive the file names from the existing --stat pass or a single --name-status call. (2) Add a Design-team section to the teams settings help or tty so the owner can see which member takes design reviews.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs