Skip to content

Fix Releases page unreleased-commit count on stale or git-free installs - #897

Merged
selfcontained merged 4 commits into
mainfrom
agt_69803635d3d4/build-idea
Aug 8, 2026
Merged

Fix Releases page unreleased-commit count on stale or git-free installs#897
selfcontained merged 4 commits into
mainfrom
agt_69803635d3d4/build-idea

Conversation

@selfcontained

@selfcontainedselfcontained commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Problem

The Releases page could show "No unreleased commits on main" even when a triggered release would ship real commits. The admin enrichment in /api/v1/release/info (computeAdminExtras) ran git rev-parse / rev-list / log against serverDir and never fetched — while the release job itself uses the authoring checkout (DISPATCH_RELEASE_AUTHORING_REPO_DIR) and GitHub Actions releases current main regardless. On a runtime install pinned to a release tag, or a maintainer install with stale origin/main, the page silently reported zero.

Fix

  • New shared resolveAuthoringRepoDir() helper (env var with serverDir fallback), used by both the release job and the admin enrichment so they agree on the checkout.
  • The enrichment now runs a narrow git fetch --tags origin main (30s timeout) in that checkout before comparing.
  • A fetch failure is surfaced as unreleasedFetchError in the API and a warning banner in the UI — never silently rendered as "zero unreleased commits". The Create release buttons stay available in that state (mirroring the existing refMissing behavior).
  • Non-authoring / git-free installs are unchanged: checkIsAdmin() already returns false when DISPATCH_RELEASE_AUTHORING is unset, so no git runs for ordinary users.

Releases page UX improvements (second commit)

  • Non-blocking progress: an in-flight release shows a status banner instead of taking over the page; "View progress" / "Back to releases" jump in and out of the full log view while the release keeps running.
  • Version preview + confirm: create buttons show the resulting tag (Patch → v0.32.3, computed from the latest GitHub release) and require an inline confirm; Promote gets the same confirm treatment.
  • Freshness: refresh button + "checked Ns ago" on Unreleased changes; info requests pass the release-stream client id so slow loads show the server's info-progress steps.
  • Completion handling: when a watched release finishes, a success banner appears and the unreleased list auto-refreshes so just-released commits disappear; stale done jobs from the stream snapshot no longer resurrect UI on revisit.

Validation

  • New unit tests: authoring-checkout targeting + fetch-before-count, fetch-failure surfacing (no silent zero), and resolveAuthoringRepoDir fallbacks.
  • Full checks green: pnpm run check, pnpm run finalize:web, vitest (2424 passed), Playwright E2E (176 passed, 12 skipped) — run after each commit.
  • UI validated in Playwright against the dev stack: fetch-error/commit-list/zero-commit states, confirm flow (open + cancel, no accidental trigger), refresh refetch, in-progress banner with jump in/out, done transition with auto-refresh (real SSE server with production-like event spacing), stale-done-snapshot ignored, plus mobile viewport. Screenshots shared in Dispatch.

Idea: dispatch-ideas/release-page-authoring-checkout-gap

🤖 Generated with Claude Code

selfcontainedand others added 4 commits August 7, 2026 18:51
The admin enrichment on /release/info ran git against serverDir and never
fetched, so a runtime install pinned to a release tag (or with stale
origin/main) reported 'No unreleased commits' while the dispatched
release workflow would happily release current main.
- Resolve the same authoring checkout the release job uses
(DISPATCH_RELEASE_AUTHORING_REPO_DIR, serverDir fallback) via a shared
resolveAuthoringRepoDir helper
- Fetch origin/main + tags in that checkout before comparing
- Surface fetch failures as unreleasedFetchError in the API and a
warning banner in the UI instead of silently reporting zero; Create
release stays available in that state
- Non-authoring installs are unchanged: the isAdmin gate already
short-circuits before any git runs
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- In-flight release no longer takes over the page: a status banner keeps
the page usable, with View progress / Back to releases to jump in and
out of the full log view
- Create buttons preview the resulting tag (Patch → v0.32.3) and require
an inline confirm before triggering the workflow; Promote gets the
same confirm treatment
- Refresh button + 'checked Ns ago' indicator on Unreleased changes;
info requests now pass the release stream client id so slow loads show
the server's info-progress steps instead of a bare spinner
- When a watched release completes, the page auto-refreshes so
just-released commits leave the unreleased list; a stale done job from
the stream snapshot no longer resurrects UI on revisit
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Backend (backend-security-review #601):
- Coalesce authoring-checkout git fetches: new createAuthoringRemoteRefresher
gives /release/info single-flight per checkout plus a 15s freshness TTL,
so concurrent admin refreshes share one fetch instead of contending for
git ref locks or spawning unbounded 30s subprocesses; failures are also
cached for the TTL. Concurrency regression tests included.
- Sanitize unreleasedFetchError: the client now gets a fixed message; the
raw git error (stderr, paths) goes to the server log only.
Frontend (frontend-ux-review #600):
- bumpVersion only predicts a tag from an exact stable semver base; a
prerelease-suffixed tag shows no preview rather than a wrong promise.
- Refresh control is the shared icon Button with an aria-label (32px hit
area) instead of a bare 14px SVG.
- Release rows wrap so the inline Promote confirmation fits at 320px.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The three full-width release-type cards and the inline confirm panel
were heavy, shifted layout when confirming, and left the type buttons
clickable behind the open confirmation. Replace with a standard row of
compact buttons (version tag inline) and a shadcn Dialog confirm — no
layout shift, backdrop blocks interaction while open.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@selfcontained
selfcontained merged commit 1960d2d into mainAug 8, 2026
1 check passed
@selfcontained
selfcontained deleted the agt_69803635d3d4/build-idea branch August 8, 2026 16:43
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@selfcontained