Fix #281: mirror UX gaps #298

Merged
crueber merged 2 commits from fix/issue-281 into main 2026-09-10 18:28:19 +00:00
Owner

Fixes #281 — three mirror UX gaps between what the mirror system does and what the UI communicates.

  1. Listing badge: detailed owner listing rows carry mirror + mirror_upstream (bounded-parallel sidecar probes, no per-row summary fetch); RepoRow renders a pill badge with accessible upstream label on /explore + /:owner.
  2. Waiting state: EmptyRepoGuide branches on summary.mirror — mirrors awaiting first sync show upstream + next-sync + clone only, never push guidance. No Sync-now button (admin-only endpoint).
  3. Import creates mirrors: import-once / mirror-continuously toggle, shared presets/validation, submits to POST /api/v1/repos/mirrors, lands on the repo page.

Tests: go test ./internal/api/ -race green (incl. new TestOwnerReposDetailedMirrorFlag), coverage 95.3%, node --test 571/571, vite+esbuild green. No new deps. Browser proof open (shared-daemon loopback guard). Docs updated (07_api, 12_web_ui, 11_mirror decisions).

Fixes #281 — three mirror UX gaps between what the mirror system does and what the UI communicates. 1. Listing badge: detailed owner listing rows carry mirror + mirror_upstream (bounded-parallel sidecar probes, no per-row summary fetch); RepoRow renders a pill badge with accessible upstream label on /explore + /:owner. 2. Waiting state: EmptyRepoGuide branches on summary.mirror — mirrors awaiting first sync show upstream + next-sync + clone only, never push guidance. No Sync-now button (admin-only endpoint). 3. Import creates mirrors: import-once / mirror-continuously toggle, shared presets/validation, submits to POST /api/v1/repos/mirrors, lands on the repo page. Tests: go test ./internal/api/ -race green (incl. new TestOwnerReposDetailedMirrorFlag), coverage 95.3%, node --test 571/571, vite+esbuild green. No new deps. Browser proof open (shared-daemon loopback guard). Docs updated (07_api, 12_web_ui, 11_mirror decisions).
Backend (07_api.md): detailed owner listing rows gain mirror +
mirror_upstream from bounded-parallel sidecar probes (no per-row
summary fetch, no mirror import from core).
UI (12_web_ui.md, 11_mirror.md): RepoRow badge via mirrorRowBadge,
MirrorEmptyGuide instead of push guidance, /import mirror mode via
the #240 create endpoint.
- 11_mirror.md: 'no fetches' -> 'no client fetches' (server adds
  bounded-parallel sidecar probes per 07_api.md decision).
- MirrorEmptyGuide: never-synced copy no longer echoes
  formatNextSync ('First sync in progress - never synced - first sync
  pending'); direct pending phrasing instead.
- RepoRow mirror badge: role=img so the aria-label naming the
  upstream is actually exposed.
Sign in to join this conversation.
No description provided.