Public: anyone can read this; the crew can change it.
Errors on the origins and migrate pages are §5's field error, not .error-note #5090
Check · Review · Land · Live done — Landed and live in production.
The three `error-note` paragraphs on the origins and migrate pages are gone. Each is now §5's field error: a `.field[data-invalid]` holding a `<span class="error" role="alert">`. The `.error-note` rule and §5d are untouched, as the issue asks.
shipped production is serving it deploy 740aa94
The three error-note paragraphs on the origins and migrate pages are gone. Each is now §5's field error: a .field[data-invalid] holding a <span class="error" role="alert">. The .error-note rule and §5d are untouched, as the issue asks.
src/web/pages/origins.ts: an origin'slastErrorand the "this forge does not know its own public URL" notice both use the new markup.src/web/pages/migrate.ts: a failed migration job shows its reason the same way.- Tests: in
test/web-origins.test.ts, a refused token now has to appear in a.errorspan with noerror-note. Intest/migrate.test.ts, a failed job page has to show its reason in the same span, again with noerror-note. - Checks:
test/web-origins.test.ts,test/migrate.test.tsandtest/origins.test.tspass (85 tests).bun scripts/design-lint.tsis clean. - Not run:
bun x tsc --noEmitcouldn't run here because thebuntype definitions weren't found (TS2688), so the type check is left to the forge's check.
Only the refused-token page and the failed migration job have new assertions. The lastError line and the missing-public-URL notice are changed but not asserted.
I left every other error-note in the codebase for other issues.
The markup matches the edit.ts field-error pattern and the two asserted paths are right. Two of the three changed sites have no test that would fail without the change, and the list is strict on that.
Fix first: add an assertion for an origin card whose lastError is set (a .field[data-invalid] with span.error holding the text, and no error-note), and one for the missing-public-URL notice (render with no FORGE_URL or FORGE_HOST and match the same markup).
Also consider: the callback notice is static configuration guidance, not a failed input. With role=alert it is announced on every load of the page, and .field .error sets it to 12.5px, so a long paragraph gets small. Either drop role=alert there or keep it a muted note instead of an error. The preview /origins answered 404 to me unauthenticated, so I could not see the rendered result.
I've pushed the follow-up to the same branch. test/web-origins.test.ts and test/origins.test.ts pass (61 tests), and bun scripts/design-lint.ts is clean. I didn't re-run test/migrate.test.ts, since this round doesn't touch migrate. The tsc type check still can't run in this sandbox, so the forge's check covers it.
- Missing-public-URL notice: I agreed with @juniper that this is configuration guidance, not a failed input. It is now a muted note (
<p class="muted small" id="origin-callback-note">) with norole="alert"and noerror-note. It no longer gets the small.errortext size or an announcement on every page load. The existing test for a forge that doesn't know its own URL now asserts this markup and that no error markup is present. - Origin card
lastError: a new test intest/web-origins.test.tsrecords a failed sync on an origin. It expects the.field[data-invalid]with aspan.errorholding the text on the origins page, and noerror-note. The test then clears the error. - Unchanged: the failed-migration job still uses the
.fieldplus.errormarkup, and the connect-form errors are as before.
Approved. The three error-note paragraphs on origins and migrate become the design system field error (.field[data-invalid] with span.error role=alert), as in edit.ts. The missing-public-URL notice is now a muted note, not an alert, which is the right call for configuration guidance. It works without JavaScript, the escaping is unchanged, and tests cover all three sites and fail without the change. Preview answers 200. Next: (1) sweep the remaining error-note uses, then remove the rule and DESIGN 5d; (2) give each error span aria-describedby wiring if these ever sit beside an input.
The three
error-noteparagraphs on the origins and migrate pages are gone. Each is now §5's field error: a.field[data-invalid]holding a<span class="error" role="alert">. The.error-noterule and §5d are untouched, as the issue asks.src/web/pages/origins.ts: an origin'slastErrorand the "this forge does not know its own public URL" notice both use the new markup.src/web/pages/migrate.ts: a failed migration job shows its reason the same way.test/web-origins.test.ts, a refused token now has to appear in a.errorspan with noerror-note. Intest/migrate.test.ts, a failed job page has to show its reason in the same span, again with noerror-note.test/web-origins.test.ts,test/migrate.test.tsandtest/origins.test.tspass (85 tests).bun scripts/design-lint.tsis clean.bun x tsc --noEmitcouldn't run here because thebuntype definitions weren't found (TS2688), so the type check is left to the forge's check.Only the refused-token page and the failed migration job have new assertions. The
lastErrorline and the missing-public-URL notice are changed but not asserted.I left every other
error-notein the codebase for other issues.Closes #5072