site: Done page links the community page; Review handles 409 slug-taken (phase-2 plan Task 8) #35

Closed
opened 2026-08-28 21:00:27 +00:00 by ben · 6 comments
Owner

Plan

docs/superpowers/plans/2026-08-28-coa-phase-2.md Task 8.

Deliverable

site/src/api/types.ts: SubmitResult gains 200 {accepted, slug, pageUrl} and 409 {error:'slug-taken', slug}. Review.tsx: on 200 navigate to /done?slug=<slug>&page=<encodeURIComponent(pageUrl)>; on 409 set errors['brand.slug'] = 'That short name is already taken — choose another' and jump to brand. Done.tsx: renders the link (<a href={page}>) and "We've emailed your contact address — the page shows "build pending" until the installers are ready." Tests: site/src/pages/Done.test.tsx; two new cases in Review.test.tsx using its existing harness.

Acceptance

  • Done shows a link whose href is the page URL and the "build pending" copy.
  • 409 → role="alert" containing "already taken"; 200 → route /done with page= in the search string.
  • pnpm --filter @coa/site test && typecheck green; the mirrored types stay identical in shape to the server's.

depends_on

  • site: Backend step, Review, submit, Done (#17)
  • server: /api/submit phase-2 pipeline (Task 6)

out_of_scope

Any other copy changes to the form.

Phase gate

No build dispatch, no coa-shared provisioning, no status transitions beyond page-ready (phase 3). Never delete or rewrite anything under communities/ (ADR 0002/0003).

## Plan `docs/superpowers/plans/2026-08-28-coa-phase-2.md` **Task 8**. ## Deliverable `site/src/api/types.ts`: `SubmitResult` gains `200 {accepted, slug, pageUrl}` and `409 {error:'slug-taken', slug}`. `Review.tsx`: on 200 navigate to `/done?slug=<slug>&page=<encodeURIComponent(pageUrl)>`; on 409 set `errors['brand.slug'] = 'That short name is already taken — choose another'` and jump to `brand`. `Done.tsx`: renders the link (`<a href={page}>`) and "We've emailed your contact address — the page shows "build pending" until the installers are ready." Tests: `site/src/pages/Done.test.tsx`; two new cases in `Review.test.tsx` using its existing harness. ## Acceptance - Done shows a link whose `href` is the page URL and the "build pending" copy. - 409 → `role="alert"` containing "already taken"; 200 → route `/done` with `page=` in the search string. - `pnpm --filter @coa/site test && typecheck` green; the mirrored types stay identical in shape to the server's. ## depends_on - site: Backend step, Review, submit, Done (#17) - server: /api/submit phase-2 pipeline (Task 6) ## out_of_scope Any other copy changes to the form. ## Phase gate No build dispatch, no `coa-shared` provisioning, no status transitions beyond `page-ready` (phase 3). Never delete or rewrite anything under `communities/` (ADR 0002/0003).
Author
Owner

On hold (needs-info): Ben has an uncommitted site redesign in his local checkout touching exactly this ticket's files (Review.tsx, Review.test.tsx, Wizard.tsx, plus schema tweaks). Working this now — by the session or a swarm worker — would conflict with that work. Re-add ready-for-agent once the redesign is pushed. Server side (#28–#34) is all on main, so this is the only thing between here and the e2e ticket.

On hold (needs-info): Ben has an uncommitted site redesign in his local checkout touching exactly this ticket's files (`Review.tsx`, `Review.test.tsx`, `Wizard.tsx`, plus schema tweaks). Working this now — by the session or a swarm worker — would conflict with that work. Re-add `ready-for-agent` once the redesign is pushed. Server side (#28–#34) is all on main, so this is the only thing between here and the e2e ticket.
Author
Owner

Unblocked: Ben pushed the site redesign (merged with the phase-2 server side in 42e14d6) and the workstation's claude-limit marker has cleared. Back to ready-for-agent. Note for the worker: Review.tsx/Wizard.tsx changed in the redesign — read the current code before applying plan Task 8's sketch.

Unblocked: Ben pushed the site redesign (merged with the phase-2 server side in 42e14d6) and the workstation's claude-limit marker has cleared. Back to `ready-for-agent`. Note for the worker: `Review.tsx`/`Wizard.tsx` changed in the redesign — read the current code before applying plan Task 8's sketch.

swarm-claim host=matou-dev-server-01 run=942
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=942 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #35 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • no open agent PR (agent/issue-35) for this issue — pr-mode commits land on a PR before they can close it (#13)
envelope
{
  "issue": 35,
  "status": "success",
  "commits": [
    "6cdf44bdb5aa013c405ac64e2233d018a5f4227f"
  ],
  "changed_files": [
    "site/src/api/types.ts",
    "site/src/form/Review.tsx",
    "site/src/form/Review.test.tsx",
    "site/src/pages/Done.tsx",
    "site/src/pages/Done.test.tsx",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "pnpm -r typecheck",
      "exit_code": 0
    },
    {
      "command": "pnpm -r test",
      "exit_code": 0
    },
    {
      "command": "pnpm --filter @coa/site build",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Done shows a link whose href is the page URL and the 'build pending' copy": "site/src/pages/Done.tsx renders <a href={page}>{page}</a> plus \"the page shows \\\"build pending\\\" until the installers are ready\"; verified by site/src/pages/Done.test.tsx",
    "409 -> role=alert containing 'already taken'; 200 -> route /done with page= in the search string": "site/src/form/Review.tsx 409 branch sets brand.slug error 'That short name is already taken — choose another', jumps to brand, and surfaces it in the role=alert list; 200 branch navigates to /done?slug=…&page=<encodeURIComponent(pageUrl)>; both covered by the two new Review.test.tsx cases",
    "pnpm --filter @coa/site test && typecheck green; mirrored types identical in shape to the server's": "pnpm -r typecheck and pnpm -r test exit 0; site/src/api/types.ts SubmitResult mirrors server/src/routes/submit.ts — 200 {accepted,slug,pageUrl}, 409 {error:'slug-taken',slug}"
  },
  "summary": "Wired the phase-2 site side: /done links the live community page and Review handles the 200 page-ready and 409 slug-taken responses.",
  "reason": "Phase-2 plan Task 8 delivered — SubmitResult mirrors the server, Review routes to /done or flags the taken slug, and /done carries the build-pending copy, all test-covered and green.",
  "blockers": []
}
**close-report** for #35 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - no open agent PR (agent/issue-35) for this issue — pr-mode commits land on a PR before they can close it (#13) <details><summary>envelope</summary> ```json { "issue": 35, "status": "success", "commits": [ "6cdf44bdb5aa013c405ac64e2233d018a5f4227f" ], "changed_files": [ "site/src/api/types.ts", "site/src/form/Review.tsx", "site/src/form/Review.test.tsx", "site/src/pages/Done.tsx", "site/src/pages/Done.test.tsx", "STATUS.md" ], "tests": [ { "command": "pnpm -r typecheck", "exit_code": 0 }, { "command": "pnpm -r test", "exit_code": 0 }, { "command": "pnpm --filter @coa/site build", "exit_code": 0 } ], "criteria": { "Done shows a link whose href is the page URL and the 'build pending' copy": "site/src/pages/Done.tsx renders <a href={page}>{page}</a> plus \"the page shows \\\"build pending\\\" until the installers are ready\"; verified by site/src/pages/Done.test.tsx", "409 -> role=alert containing 'already taken'; 200 -> route /done with page= in the search string": "site/src/form/Review.tsx 409 branch sets brand.slug error 'That short name is already taken — choose another', jumps to brand, and surfaces it in the role=alert list; 200 branch navigates to /done?slug=…&page=<encodeURIComponent(pageUrl)>; both covered by the two new Review.test.tsx cases", "pnpm --filter @coa/site test && typecheck green; mirrored types identical in shape to the server's": "pnpm -r typecheck and pnpm -r test exit 0; site/src/api/types.ts SubmitResult mirrors server/src/routes/submit.ts — 200 {accepted,slug,pageUrl}, 409 {error:'slug-taken',slug}" }, "summary": "Wired the phase-2 site side: /done links the live community page and Review handles the 200 page-ready and 409 slug-taken responses.", "reason": "Phase-2 plan Task 8 delivered — SubmitResult mirrors the server, Review routes to /done or flags the taken slug, and /done carries the build-pending copy, all test-covered and green.", "blockers": [] } ``` </details>

close-report for #35 — status success

⚠️ close-report gates passed and the checks are green, but the merge POST failed (merge-failed 63 405) — PR #63 (#63) still open; a later reconcile pass or a human retries the merge.

envelope
{
  "issue": 35,
  "status": "success",
  "commits": [
    "6cdf44bdb5aa013c405ac64e2233d018a5f4227f"
  ],
  "changed_files": [
    "site/src/api/types.ts",
    "site/src/form/Review.tsx",
    "site/src/form/Review.test.tsx",
    "site/src/pages/Done.tsx",
    "site/src/pages/Done.test.tsx",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "pnpm -r typecheck",
      "exit_code": 0
    },
    {
      "command": "pnpm -r test",
      "exit_code": 0
    },
    {
      "command": "pnpm --filter @coa/site build",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Done shows a link whose href is the page URL and the 'build pending' copy": "site/src/pages/Done.tsx renders <a href={page}>{page}</a> plus \"the page shows \\\"build pending\\\" until the installers are ready\"; verified by site/src/pages/Done.test.tsx",
    "409 -> role=alert containing 'already taken'; 200 -> route /done with page= in the search string": "site/src/form/Review.tsx 409 branch sets brand.slug error 'That short name is already taken — choose another', jumps to brand, and surfaces it in the role=alert list; 200 branch navigates to /done?slug=…&page=<encodeURIComponent(pageUrl)>; both covered by the two new Review.test.tsx cases",
    "pnpm --filter @coa/site test && typecheck green; mirrored types identical in shape to the server's": "pnpm -r typecheck and pnpm -r test exit 0; site/src/api/types.ts SubmitResult mirrors server/src/routes/submit.ts — 200 {accepted,slug,pageUrl}, 409 {error:'slug-taken',slug}"
  },
  "summary": "Wired the phase-2 site side: /done links the live community page and Review handles the 200 page-ready and 409 slug-taken responses.",
  "reason": "Phase-2 plan Task 8 delivered — SubmitResult mirrors the server, Review routes to /done or flags the taken slug, and /done carries the build-pending copy, all test-covered and green.",
  "blockers": []
}
**close-report** for #35 — status `success` :warning: **close-report gates passed and the checks are green, but the merge POST failed** (merge-failed 63 405) — PR #63 (https://git.matou.nz/Matou/coa/pulls/63) still open; a later reconcile pass or a human retries the merge. <details><summary>envelope</summary> ```json { "issue": 35, "status": "success", "commits": [ "6cdf44bdb5aa013c405ac64e2233d018a5f4227f" ], "changed_files": [ "site/src/api/types.ts", "site/src/form/Review.tsx", "site/src/form/Review.test.tsx", "site/src/pages/Done.tsx", "site/src/pages/Done.test.tsx", "STATUS.md" ], "tests": [ { "command": "pnpm -r typecheck", "exit_code": 0 }, { "command": "pnpm -r test", "exit_code": 0 }, { "command": "pnpm --filter @coa/site build", "exit_code": 0 } ], "criteria": { "Done shows a link whose href is the page URL and the 'build pending' copy": "site/src/pages/Done.tsx renders <a href={page}>{page}</a> plus \"the page shows \\\"build pending\\\" until the installers are ready\"; verified by site/src/pages/Done.test.tsx", "409 -> role=alert containing 'already taken'; 200 -> route /done with page= in the search string": "site/src/form/Review.tsx 409 branch sets brand.slug error 'That short name is already taken — choose another', jumps to brand, and surfaces it in the role=alert list; 200 branch navigates to /done?slug=…&page=<encodeURIComponent(pageUrl)>; both covered by the two new Review.test.tsx cases", "pnpm --filter @coa/site test && typecheck green; mirrored types identical in shape to the server's": "pnpm -r typecheck and pnpm -r test exit 0; site/src/api/types.ts SubmitResult mirrors server/src/routes/submit.ts — 200 {accepted,slug,pageUrl}, 409 {error:'slug-taken',slug}" }, "summary": "Wired the phase-2 site side: /done links the live community page and Review handles the 200 page-ready and 409 slug-taken responses.", "reason": "Phase-2 plan Task 8 delivered — SubmitResult mirrors the server, Review routes to /done or flags the taken slug, and /done carries the build-pending copy, all test-covered and green.", "blockers": [] } ``` </details>

close-report for #35 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 35,
  "status": "success",
  "commits": [
    "6cdf44bdb5aa013c405ac64e2233d018a5f4227f"
  ],
  "changed_files": [
    "site/src/api/types.ts",
    "site/src/form/Review.tsx",
    "site/src/form/Review.test.tsx",
    "site/src/pages/Done.tsx",
    "site/src/pages/Done.test.tsx",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "pnpm -r typecheck",
      "exit_code": 0
    },
    {
      "command": "pnpm -r test",
      "exit_code": 0
    },
    {
      "command": "pnpm --filter @coa/site build",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Done shows a link whose href is the page URL and the 'build pending' copy": "site/src/pages/Done.tsx renders <a href={page}>{page}</a> plus \"the page shows \\\"build pending\\\" until the installers are ready\"; verified by site/src/pages/Done.test.tsx",
    "409 -> role=alert containing 'already taken'; 200 -> route /done with page= in the search string": "site/src/form/Review.tsx 409 branch sets brand.slug error 'That short name is already taken — choose another', jumps to brand, and surfaces it in the role=alert list; 200 branch navigates to /done?slug=…&page=<encodeURIComponent(pageUrl)>; both covered by the two new Review.test.tsx cases",
    "pnpm --filter @coa/site test && typecheck green; mirrored types identical in shape to the server's": "pnpm -r typecheck and pnpm -r test exit 0; site/src/api/types.ts SubmitResult mirrors server/src/routes/submit.ts — 200 {accepted,slug,pageUrl}, 409 {error:'slug-taken',slug}"
  },
  "summary": "Wired the phase-2 site side: /done links the live community page and Review handles the 200 page-ready and 409 slug-taken responses.",
  "reason": "Phase-2 plan Task 8 delivered — SubmitResult mirrors the server, Review routes to /done or flags the taken slug, and /done carries the build-pending copy, all test-covered and green.",
  "blockers": []
}
**close-report** for #35 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 35, "status": "success", "commits": [ "6cdf44bdb5aa013c405ac64e2233d018a5f4227f" ], "changed_files": [ "site/src/api/types.ts", "site/src/form/Review.tsx", "site/src/form/Review.test.tsx", "site/src/pages/Done.tsx", "site/src/pages/Done.test.tsx", "STATUS.md" ], "tests": [ { "command": "pnpm -r typecheck", "exit_code": 0 }, { "command": "pnpm -r test", "exit_code": 0 }, { "command": "pnpm --filter @coa/site build", "exit_code": 0 } ], "criteria": { "Done shows a link whose href is the page URL and the 'build pending' copy": "site/src/pages/Done.tsx renders <a href={page}>{page}</a> plus \"the page shows \\\"build pending\\\" until the installers are ready\"; verified by site/src/pages/Done.test.tsx", "409 -> role=alert containing 'already taken'; 200 -> route /done with page= in the search string": "site/src/form/Review.tsx 409 branch sets brand.slug error 'That short name is already taken — choose another', jumps to brand, and surfaces it in the role=alert list; 200 branch navigates to /done?slug=…&page=<encodeURIComponent(pageUrl)>; both covered by the two new Review.test.tsx cases", "pnpm --filter @coa/site test && typecheck green; mirrored types identical in shape to the server's": "pnpm -r typecheck and pnpm -r test exit 0; site/src/api/types.ts SubmitResult mirrors server/src/routes/submit.ts — 200 {accepted,slug,pageUrl}, 409 {error:'slug-taken',slug}" }, "summary": "Wired the phase-2 site side: /done links the live community page and Review handles the 200 page-ready and 409 slug-taken responses.", "reason": "Phase-2 plan Task 8 delivered — SubmitResult mirrors the server, Review routes to /done or flags the taken slug, and /done carries the build-pending copy, all test-covered and green.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/coa#35
No description provided.