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

A frozen mirror says so in one line on its repository page, not in a boxed card #10033

Merged opened this

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

Merged

A frozen mirror now says so in one plain line (`<div class="small mb" id="frozen">`) on its repository page and its branches page. The boxed card is gone, and I'd already pushed before running `test/origins-reconnect.test.ts`; it passes (12 tests). The new `test/frozen-line.test.ts` passes, `bun x tsc --noEmit`, `bun scripts/gate.ts` and `bun scripts/design-lint.ts` came back clean, and I did not…

shipped production is serving it deploy abf00b0

opened this

A frozen mirror now says so in one plain line (<div class="small mb" id="frozen">) on its repository page and its branches page. The boxed card is gone, and I'd already pushed before running test/origins-reconnect.test.ts; it passes (12 tests). The new test/frozen-line.test.ts passes, bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts came back clean, and I did not run the full bun test.

  • What changed: frozenBlock in src/web/pages/frozen.ts now returns that line: the frozenSentence text, then the action beside it. frozenSentence wording and reattachMessage are untouched.
  • Who sees what:

- A reader sees the sentence plus "An admin of this repository can reconnect it." - An admin with no origin on the mirror's host is pointed to Settings → Origins. - An admin with an origin there gets the inline reconnect form, still a POST to /:owner/:name/settings/origin/reconnect.

  • New test:

- test/frozen-line.test.ts checks /alice/frozen and /alice/frozen/branches for no card, the reader/admin split and the form action. - It also checks that a cross-origin POST to the reconnect route is refused. - The two reader-view tests fail with the src change stashed (the old card is still there) and pass with it.

  • Left out: no new component class and no CSS, since the line reuses small, mb and field-row.

Closes #9953

commented

A frozen mirror now says so in one plain line (<div class="small mb" id="frozen">) on its repository page and its branches page. The boxed card is gone, and I'd already pushed before running test/origins-reconnect.test.ts; it passes (12 tests). The new test/frozen-line.test.ts passes, bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts came back clean, and I did not run the full bun test.

  • What changed: frozenBlock in src/web/pages/frozen.ts now returns that line: the frozenSentence text, then the action beside it. frozenSentence wording and reattachMessage are untouched.
  • Who sees what:

- A reader sees the sentence plus "An admin of this repository can reconnect it." - An admin with no origin on the mirror's host is pointed to Settings → Origins. - An admin with an origin there gets the inline reconnect form, still a POST to /:owner/:name/settings/origin/reconnect.

  • New test:

- test/frozen-line.test.ts checks /alice/frozen and /alice/frozen/branches for no card, the reader/admin split and the form action. - It also checks that a cross-origin POST to the reconnect route is refused. - The two reader-view tests fail with the src change stashed (the old card is still there) and pass with it.

  • Left out: no new component class and no CSS, since the line reuses small, mb and field-row.
commented

A frozen mirror now says so in one plain line on its repository page and on its branches page. The boxed card is gone. I haven't seen the new check run yet; I pushed a commit to fix the one failure it reported.

That failure was the gate rule asking for a "Try:" line in a commit message. I added an empty commit with that line rather than rewriting history. It tells people to open a disconnected mirror's page and its /branches on the preview and read the line under the header. I made no code changes this round.

  • What changed: frozenBlock in src/web/pages/frozen.ts now returns one <div class="small mb" id="frozen"> holding the frozenSentence text and the action beside it. The sentence wording and reattachMessage are untouched.
  • Who sees what:

- A reader sees the sentence plus "An admin of this repository can reconnect it." - An admin with no origin on the mirror's host is pointed to Settings → Origins. - An admin with an origin there gets an inline reconnect form, still a POST to /:owner/:name/settings/origin/reconnect.

  • Tests: The new test/frozen-line.test.ts covers both pages, the reader/admin split, the form action, and a cross-origin POST being refused. Its two reader-view tests fail with the src change stashed and pass with it. test/origins-reconnect.test.ts passes. tsc, scripts/gate.ts and scripts/design-lint.ts came back clean. I did not run the full bun test.
  • Left out: no new component class and no CSS; the line reuses small, mb and field-row.

Try: open a disconnected mirror at /<owner>/<name> and /<owner>/<name>/branches on the preview. As a reader you get the sentence only. As an admin you get the reconnect form, or the Settings → Origins pointer if you have no origin on that host.

🤖 Generated with Claude Code

Approved

Clean. The boxed card is now one plain line (sentence plus action) on the repo page and on branches. The reconnect stays a same-origin POST. Only an admin gets the action, and a reader sees the sentence only. The route is unchanged, so authorization is unchanged. Output is escaped through html``. No new class or dependency. The test covers both pages, both roles and a cross-origin refusal. The reader tests fail on main because the card wraps id=frozen. I did not run the tests or look at the preview.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs