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

Design: a repository's audience mark uses §5's badge, and repo-audience leaves §5d #4423

Parked opened this
Closed without merging

The audience mark in a repository's header is now §5's badge(). It used to be its own / , and .repo-audience is now gone from src/web/style/content.ts and from its bullet in docs/DESIGN.md §5d. The words are unchanged.

Notes

stopped parked by the crew deploy a61eaec

opened this

The audience mark in a repository's header is now §5's badge(). It used to be its own <a>/<span class="repo-audience">, and .repo-audience is now gone from src/web/style/content.ts and from its bullet in docs/DESIGN.md §5d. The words are unchanged. As before, someone who can open the settings gets a link to /owner/name/settings, everyone else gets plain text, and both keep the full sentence in title.

Why the last check was red: it was not this change. All 44 failures were in one shard and were the check machine running out of disk: No space left on device from git, SQLITE_FULL from the database, then afterAll errors in the files whose setup never finished. test/unfurl.test.ts ("the pages > (unnamed)"), test/policy.test.ts, test/usage-report.test.ts and the rest of that shard pass here. This push only merges current main (no conflicts) so the check runs again on a fresh head.

What moved where

  • src/web/ui.ts: badge() takes optional href and title. With href the badge is the link itself (<a class="badge">). Existing callers produce exactly the same HTML as before.
  • src/web/chrome.ts (audienceLine): draws an outline badge with a .truncate body. Nothing else in the header changed.
  • src/web/style/components.ts: the states the old rule gave the sentence now belong to the badge:
    • a linked badge changes colour on hover;
    • on a wide screen the sentence stays on one line;
    • under 640px it wraps whole, and as a link it is at least 44px tall.
  • src/web/style/content.ts: the .repo-audience rules are deleted.
  • docs/DESIGN.md: §5's badge row describes the link and long-sentence states, and .repo-audience leaves §5d.
  • Tests: test/repo-audience.test.ts and test/audience-surfaces.test.ts now match the badge markup. A new test checks that a private repository's header has no repo-audience and shows the "Private" badge.

Checks run after the merge: bun scripts/design-lint.ts is clean and bun x tsc --noEmit passes. 121 tests pass across 11 files: the audience, design-lint, policy, unfurl, usage-report, browse, code, about-card and lineage suites. The full suite was not run here.

Not done:

  • The before/after screenshots the issue asks for: this sandbox cannot run a browser. They can be taken from the preview at https://lab--3856--forge-trevato-apps.open-platform.sh, on a public and a private repository, light and dark, at desktop width and at 390 px.
  • Two non-blocking review notes from juniper are left for separate issues:
    • the badge sits inside the h1, so the heading's accessible name includes the sentence;
    • the link is only 44px tall on a phone, not on wide screens.

To try it, open any repository on the preview and look at the audience badge beside Private/Public, at desktop width and at phone width.

🤖 Generated with Claude Code

Closes #3852

3 earlier comments · 1 event
commented

The audience mark in a repository's header is now §5's badge(). It used to be its own <a>/<span class="repo-audience">, and .repo-audience is now gone from src/web/style/content.ts and from its bullet in docs/DESIGN.md §5d. The words are unchanged. As before, someone who can open the settings gets a link to /owner/name/settings, everyone else gets plain text, and both keep the full sentence in title.

Why the last check was red: it was not this change. All 44 failures were in one shard and were the check machine running out of disk: No space left on device from git, SQLITE_FULL from the database, then afterAll errors in the files whose setup never finished. test/unfurl.test.ts ("the pages > (unnamed)"), test/policy.test.ts, test/usage-report.test.ts and the rest of that shard pass here. This push only merges current main (no conflicts) so the check runs again on a fresh head.

What moved where

  • src/web/ui.ts: badge() takes optional href and title. With href the badge is the link itself (<a class="badge">). Existing callers produce exactly the same HTML as before.
  • src/web/chrome.ts (audienceLine): draws an outline badge with a .truncate body. Nothing else in the header changed.
  • src/web/style/components.ts: the states the old rule gave the sentence now belong to the badge:
    • a linked badge changes colour on hover;
    • on a wide screen the sentence stays on one line;
    • under 640px it wraps whole, and as a link it is at least 44px tall.
  • src/web/style/content.ts: the .repo-audience rules are deleted.
  • docs/DESIGN.md: §5's badge row describes the link and long-sentence states, and .repo-audience leaves §5d.
  • Tests: test/repo-audience.test.ts and test/audience-surfaces.test.ts now match the badge markup. A new test checks that a private repository's header has no repo-audience and shows the "Private" badge.

Checks run after the merge: bun scripts/design-lint.ts is clean and bun x tsc --noEmit passes. 121 tests pass across 11 files: the audience, design-lint, policy, unfurl, usage-report, browse, code, about-card and lineage suites. The full suite was not run here.

Not done:

  • The before/after screenshots the issue asks for: this sandbox cannot run a browser. They can be taken from the preview at https://lab--3856--forge-trevato-apps.open-platform.sh, on a public and a private repository, light and dark, at desktop width and at 390 px.
  • Two non-blocking review notes from juniper are left for separate issues:
    • the badge sits inside the h1, so the heading's accessible name includes the sentence;
    • the link is only 44px tall on a phone, not on wide screens.

To try it, open any repository on the preview and look at the audience badge beside Private/Public, at desktop width and at phone width.

🤖 Generated with Claude Code

commented

The audience mark in a repository's header now uses §5's badge(), and .repo-audience is gone from src/web/style/content.ts and from docs/DESIGN.md §5d. The words are unchanged. Someone who can open the settings gets the badge as a link to /owner/name/settings, everyone else gets plain text, and both keep the full sentence in title.

This push merges current main to fix the "does not merge into main" failure. The only conflict was again the §5d "page furniture" list in docs/DESIGN.md, where main and this branch had each removed classes. The resolved line is main's list without .repo-audience. Against main, docs/DESIGN.md now differs only in that line and the §5 badge row.

What moved where

  • src/web/ui.ts: badge() takes optional href and title. With href the badge is the link itself (<a class="badge">). Existing callers produce exactly the same HTML as before.
  • src/web/chrome.ts (audienceLine): draws an outline badge whose body is a .truncate span. Nothing else in the header changed.
  • src/web/style/components.ts: the badge now has the states the old rule gave the sentence:
    • a linked badge changes colour on hover;
    • on a wide screen the sentence stays on one line;
    • under 640px it wraps whole, and as a link it is at least 44px tall.
  • src/web/style/content.ts: the .repo-audience rules are deleted.
  • docs/DESIGN.md: the §5 badge row describes the link and long-sentence states, and .repo-audience leaves §5d.
  • Tests: test/repo-audience.test.ts and test/audience-surfaces.test.ts now expect the badge markup. A new test checks that a private repository's header has no repo-audience and shows the "Private" badge.

Checks run after the merge: bun scripts/design-lint.ts is clean and bun x tsc --noEmit passes. 70 tests pass across the audience, design-lint, design-map, design-audit and browse suites. The full suite was not run here.

The red check before the previous push was not this change: all 44 failures were the check machine running out of disk (No space left on device from git, SQLITE_FULL from the database).

Not done:

  • The before/after screenshots the issue asks for: this sandbox cannot run a browser. They can be taken from this pull's preview, on a public and a private repository, light and dark, at desktop width and at 390 px.
  • Two non-blocking review notes from juniper are left for separate issues:
    • the badge sits inside the h1, so the heading's accessible name includes the sentence;
    • the link is only 44px tall on a phone, not on wide screens.

To try it, open any repository on the preview and look at the audience badge beside Private/Public, at desktop width and at phone width.

🤖 Generated with Claude Code

Approved — before the latest push

Approved. The audience mark is now §5 badge(); .repo-audience is gone from content.ts and from the §5d list; the DESIGN.md badge row documents the link and long-sentence states; the old hover, one-line and phone-wrap behaviour carry over; the link is a real <a> that works with JS off; the sentence stays escaped and in title. Tests cover link, plain text, signed-out and the private head. I read the diff and CSS only; I did not fetch a repository page on the preview, so the rendered result is unchecked.

Two things I would do next:

  1. Move the audience badge out of the h1 (a sibling in repo-head) so the heading's accessible name is the repo name, not the whole sentence.
  2. Give the linked badge a 44px target on wide screens too, or at least a visible focus ring check, so keyboard and pointer users get the same hit area.
commented

The audience mark in a repository's header now uses §5's badge(), and .repo-audience is gone from src/web/style/content.ts and from docs/DESIGN.md §5d. The words are unchanged. Someone who can open the settings gets the badge as a link to /owner/name/settings, everyone else gets plain text, and both keep the full sentence in title.

This push merges current main again. The only conflict was the §5d "page furniture" list in docs/DESIGN.md, the same line as before: main had changed it and this branch had removed .repo-audience from it. The resolved line is main's list without .repo-audience, so both changes stand. Against main, docs/DESIGN.md differs only in that line and the §5 badge row.

What moved where

  • src/web/ui.ts: badge() takes optional href and title. With href the badge is the link itself (<a class="badge">). Existing callers produce exactly the same HTML as before.
  • src/web/chrome.ts (audienceLine): draws an outline badge whose body is a .truncate span. Nothing else in the header changed.
  • src/web/style/components.ts: the badge now has the states the old rule gave the sentence:
    • a linked badge changes colour on hover;
    • on a wide screen the sentence stays on one line;
    • under 640px it wraps whole, and as a link it is at least 44px tall.
  • src/web/style/content.ts: the .repo-audience rules are deleted.
  • docs/DESIGN.md: the §5 badge row describes the link and long-sentence states, and .repo-audience leaves §5d.
  • Tests: test/repo-audience.test.ts and test/audience-surfaces.test.ts now expect the badge markup. A new test checks that a private repository's header has no repo-audience and shows the "Private" badge.

Checks run after the merge: bun scripts/design-lint.ts is clean and bun x tsc --noEmit passes. 70 tests pass across the audience, design-lint, design-map, design-audit and browse suites. The full suite was not run here.

Not done:

  • The before/after screenshots the issue asks for: this sandbox cannot run a browser. They can be taken from this pull's preview, on a public and a private repository, light and dark, at desktop width and at 390 px.
  • Two non-blocking review notes from juniper are left for separate issues:
    • the badge sits inside the h1, so the heading's accessible name includes the sentence;
    • the link is only 44px tall on a phone, not on wide screens.

To try it, open any repository on the preview and look at the audience badge beside Private/Public, at desktop width and at phone width.

🤖 Generated with Claude Code

commented

Parked by the crew: the check failed ("authorization across origins, mirrors, pins and disconnect > (unnamed)") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs