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

The claim, everyday-account and first-admin passkey notes draw §5's muted text and error-note, and .passkey-note leaves their markup #4376

Merged opened this

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

Merged

The three passkey notes (claim, everyday account, first admin) now draw `muted small` with `data-fail="error-note"`, the same pattern as `/signin`. `.passkey-note` is gone from `src/web/pages`. A server-rendered `errors.passkey` on the claim and first-admin pages shows as `error-note` with `role="alert"` from the first paint.

shipped production is serving it deploy d5b2fe2

opened this

The three passkey notes (claim, everyday account, first admin) now draw muted small with data-fail="error-note", the same pattern as /signin. .passkey-note is gone from src/web/pages. A server-rendered errors.passkey on the claim and first-admin pages shows as error-note with role="alert" from the first paint.

The check on the earlier pull (#4372) failed in web.test.ts, "the home carries no error-note for a setting that is not the default". The signed-in home shows the everyday card, and its note now carries data-fail="error-note". The test's not.toContain("error-note") matched that attribute text even though no note was drawn in the danger style. I changed that one assertion to not.toMatch(/class="[^"]*\berror-note/). It still fails if the home ever draws a note with the class; the "Egress is reported" assertion is unchanged. The test was wrong, not the page. test/board.test.ts has a similar assertion, and it passes unchanged.

  • Tests: web.test.ts, web-workflows.test.ts, board.test.ts, capacity.test.ts and the claim, everyday and first-admin tests all pass (158 tests), and bun x tsc --noEmit is clean. I did not run the whole suite; the forge runs the full check on push.
  • Page tests: claim-link.test.ts, everyday.test.ts and first-admin.test.ts each assert the old class is gone. The claim and first-admin tests also assert the server error renders as error-note. The everyday note has no server-rendered error, so its test checks the quiet state only.
  • Untouched: the stylesheet and docs/DESIGN.md, since #4277 removes the rule.

To try it, open /claim or /first-admin and make a passkey fail. The note turns red, and a cancel or a clear goes back to muted.

Closes #4370

commented

The three passkey notes (claim, everyday account, first admin) now draw muted small with data-fail="error-note", the same pattern as /signin. .passkey-note is gone from src/web/pages. A server-rendered errors.passkey on the claim and first-admin pages shows as error-note with role="alert" from the first paint.

The check on the earlier pull (#4372) failed in web.test.ts, "the home carries no error-note for a setting that is not the default". The signed-in home shows the everyday card, and its note now carries data-fail="error-note". The test's not.toContain("error-note") matched that attribute text even though no note was drawn in the danger style. I changed that one assertion to not.toMatch(/class="[^"]*\berror-note/). It still fails if the home ever draws a note with the class; the "Egress is reported" assertion is unchanged. The test was wrong, not the page. test/board.test.ts has a similar assertion, and it passes unchanged.

  • Tests: web.test.ts, web-workflows.test.ts, board.test.ts, capacity.test.ts and the claim, everyday and first-admin tests all pass (158 tests), and bun x tsc --noEmit is clean. I did not run the whole suite; the forge runs the full check on push.
  • Page tests: claim-link.test.ts, everyday.test.ts and first-admin.test.ts each assert the old class is gone. The claim and first-admin tests also assert the server error renders as error-note. The everyday note has no server-rendered error, so its test checks the quiet state only.
  • Untouched: the stylesheet and docs/DESIGN.md, since #4277 removes the rule.

To try it, open /claim or /first-admin and make a passkey fail. The note turns red, and a cancel or a clear goes back to muted.

Approved

Approved. The three notes now use muted small with data-fail=error-note, the same pattern as /signin. passkey-client.ts toggles the class and role. A server-rendered error comes out as error-note with role=alert from the first paint. Works with JavaScript off, and tests cover each page. The web.test.ts assertion change is justified: the old check matched the data-fail attribute text. Next: (1) when #4277 removes .passkey-note from components.ts, also drop the .passkey-lead > .passkey-note rule at line 160, which is dead too. (2) After a client-side clear, the note goes back to muted but the server-rendered mb margin stays, so check the spacing for a shift.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs