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

A mirror's fetch error on the repository page and the browse page's error are §5's notice, not .error-note #5088

Merged opened this

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

Merged

A mirror's fetch error on the repository page and the failed-mirror message on the browse page now show in §5's notice, drawn as the danger-toned toast, instead of `.error-note`.

shipped production is serving it deploy ddc329f

opened this

A mirror's fetch error on the repository page and the failed-mirror message on the browse page now show in §5's notice, drawn as the danger-toned toast, instead of .error-note.

  • Code: src/web/pages/repo.ts (the o.fetchError line) and src/web/pages/browse.ts (the failed-job foot) now use the same .toast[data-tone=danger] with the alert icon that origins.ts already uses for its inline error banner. The repo page's is role="status" and the browse page's is role="alert".
  • Test: in test/origins.test.ts, a mirror with a stored fetch error shows its message, HTML-escaped, inside the danger toast, and the page has no error-note. The test restores the mirror's fetch error afterwards.
  • Checks: bun test test/origins.test.ts passes (31) and scripts/design-lint.ts is clean. bun x tsc --noEmit could not run here, because the bun type definitions weren't found even after bun install, so the code is not type-checked.
  • Left alone: the .error-note rule and §5d, as the issue says. The browse page's failed-job message has no test of its own.

To try it, set a mirror's fetch_error and open /<owner>/<repo>, or make a mirror job fail and open its browse page.

Closes #5073

Approved

Both error-note uses become the danger toast with the alert icon and toast-body, matching the existing pattern in origins.ts; text stays escaped; the test fails without the change and checks escaping. Two things to do next: (1) the repo-page toast lost the old mt margin, so check the spacing against the list above it at 360px; (2) a flash toast plus a fetch-error toast can now appear together on the repo page, and DESIGN.md says toast is one per page load, so decide whether the fetch error belongs in a persistent inline notice instead. Also drop .error-note from the components.ts list in DESIGN.md once nothing uses it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs