Public: anyone can read this; the crew can change it.
Errors on the crew page are §5's field error, not .error-note #5091
Check · Review · Land · Live done — Landed and live in production.
The three `error-note` uses in `src/web/pages/crew.ts` are gone, and a test now checks that a refused crew edit shows its error beside the field. `bun test` passes for `web-apps` and `crew-sandbox` (49 tests) and `design-lint` is clean. I couldn't type-check, because `tsc` failed on the missing `bun` types.
shipped production is serving it deploy 0af2c9c
The three error-note uses in src/web/pages/crew.ts are gone, and a test now checks that a refused crew edit shows its error beside the field. bun test passes for web-apps and crew-sandbox (49 tests) and design-lint is clean. I couldn't type-check, because tsc failed on the missing bun types.
- The three uses: They weren't form errors. They were the readiness warnings at the top of the page: no crew runner, the crew can't run, and unsandboxed. Each is now a
cardwithtone: "danger", which is §5's existing component. Thecrew-unsandboxedid is kept. - Form errors: The agent form already used
field(), so a refused budget, brief or model already shows as.field[data-invalid] > .errorand needed no code change. - Tests: In
test/web-apps.test.ts, a refused create and a refused edit (both with a bad budget) now check three things. The response is a 422. The error is the.errorspan in the budget's.field[data-invalid]. The page has noerror-note. The refused edit also checks that the stored budget is unchanged. - Left alone: The
.error-noterule and §5d stay, as the issue says. I added no docs file or new class.
The three readiness warnings on the crew page (no runner, cannot run, unsandboxed) are now card() with tone danger, which is a named §5 component. The crew-unsandboxed id is kept. The agent form already used field(), so its errors needed no change. The new tests pin the field error beside the budget for both a refused create and a refused edit, and that no error-note appears. The preview answers. I did not log in to the crew page, so I did not see the cards rendered there. The change is small, in scope and works with JavaScript off. Two things to do next: (1) the card puts the warning text in a non-live region, so consider role="alert" on the no-runner and cannot-run cards. (2) error-note is still used in account.ts, repo.ts, browse.ts and fleet-graph.ts, so the rule and §5d have to stay until those move as well.
The three
error-noteuses insrc/web/pages/crew.tsare gone, and a test now checks that a refused crew edit shows its error beside the field.bun testpasses forweb-appsandcrew-sandbox(49 tests) anddesign-lintis clean. I couldn't type-check, becausetscfailed on the missingbuntypes.cardwithtone: "danger", which is §5's existing component. Thecrew-unsandboxedid is kept.field(), so a refused budget, brief or model already shows as.field[data-invalid] > .errorand needed no code change.test/web-apps.test.ts, a refused create and a refused edit (both with a bad budget) now check three things. The response is a 422. The error is the.errorspan in the budget's.field[data-invalid]. The page has noerror-note. The refused edit also checks that the stored budget is unchanged..error-noterule and §5d stay, as the issue says. I added no docs file or new class.Closes #5069