Skip to content

Gallery versions (sc-9563): visualci release keeps what the gallery showed at each release - #258

Open
ndbroadbent wants to merge 3 commits into
mainfrom
gallery-versions
Open

ndbroadbent wants to merge 3 commits into
mainfrom
gallery-versions

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

sc-9563. Gallery versions: keep what a project's gallery showed at each release, for good, at stable URLs of its own.

What it does

  • visualci release [version] (CLI 0.2.30) records what the gallery published at a commit: the approved screenshots of the newest default-branch builds at or before it. Approvals made after that commit don't count. Without a version it takes the CI provider's tag, else the commit's own tag. POST/GET /api/v1/versions: 201 new, 200 the same again, 400 a bad label, 409 the label taken at another commit, 422 nothing published at that commit.
  • Each version is served at /g/<org>/<project>@<key>.json and /g/<org>/<project>@<key>/<path>. Its images never change, so they're cached for a year. Its thumbnails are filled in by the background sync, which is queued directly when the version is recorded.
  • The main manifest and every version's manifest list versions, newest first. The project page lists them too.
  • Retention and project deletion keep a version's blobs, its thumbnails included. The thumbnail rows a version copies are share-locked while it's recorded, so a sync deleting one waits.
  • A project keeps at most 500 versions. The next one is a 422 that names the limit and says to contact support. This guards against a setup that tags every commit; it isn't a price. Keeping versions costs no credits, like baselines (agreed with the coordinator: our galleries are 5 to 22 MB a version, so about $0.11/month after a year of nightly tags).
  • Docs: a "Gallery versions" guide with tested GitHub Actions, CircleCI and GitLab examples (pinned, checksummed install), plus the CLI and API references, the gallery page and the changelog. Plugin 0.1.68.

Tests

  • a_reported_version_keeps_what_the_gallery_published_at_its_commit covers: record, repeat, conflict, bad labels, a commit with nothing published, serving after the gallery moves on, thumbnails, ordering, the 500-version limit, retention, and a version recorded after main moved on (C waiting for review, D approved later: the version at C keeps B's screenshot). That last assertion fails on the code before the fix.
  • All 418 app tests, the CLI and core tests and the 77 frontend tests pass. Clippy is clean, and the migration safety check passes (one new migration, two new tables).

@visualci-com

visualci-com Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

VisualCI

docspring/visualci · build #1430 · 9 changed, 1 added, 569 unchanged · waiting for review

This PR vs base: 36 changed, 37 added since #1059, across 8 builds · 9 not approved yet

Snapshot What changed Close-up: before → after
screenshots/changelog/1440-dark (changed)
before · after

Content below here moved
screenshots/changelog/1440-light (changed)
before · after

Content below here moved
screenshots/changelog/390-dark (changed)
before · after

Content below here moved
screenshots/changelog/390-light (changed)
before · after

Content below here moved
and 6 more in the build

docspring/visualci · journeys · build #1425 · 3 removed, 53 unchanged · waiting for review

This PR vs base: 53 added, 50 removed since #1055, across 11 builds · 3 not approved yet

Removed: journeys/organization-settings/02-admin, journeys/organization-settings/03-admin-invited, journeys/organization-settings/04-admin-dark

Updated as builds change. Agents can review with VisualCI's MCP tools.

@ndbroadbent
ndbroadbent force-pushed the gallery-versions branch 2 times, most recently from 5420133 to 008b876 Compare December 5, 2026 06:02
@ndbroadbent
ndbroadbent force-pushed the gallery-versions branch 2 times, most recently from 37c9ef9 to b1519f2 Compare December 5, 2026 09:10
ndbroadbent added a commit that referenced this pull request Dec 5, 2026
@ndbroadbent
ndbroadbent force-pushed the gallery-versions branch 2 times, most recently from 8fc8a50 to 66252c2 Compare December 5, 2026 11:55
… published at a commit, kept for good at /g/<org>/<project>@<key>.json and its own image URLs; every manifest lists the versions newest first; versions on the project page; retention and project deletion keep their blobs; a version's thumbnails filled in by the sync; POST/GET /api/v1/versions; a guide with GitHub Actions, CircleCI and GitLab examples; CLI 0.2.30; plugin 0.1.68
…e time-budgeted queue; the changelog line is an entry file; no plugin version

This branch has not been deployed

No deployments
Sign up for free to 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