Skip to content

Web UI: Docker group pages label a proxy member's times Cached, not Pushed - #871

Merged
schmitch merged 1 commit into
mainfrom
claude/562-group-cached-labels
Nov 3, 2026
Merged

schmitch merged 1 commit into
mainfrom
claude/562-group-cached-labels

Conversation

@schmitch

@schmitch schmitch commented Nov 3, 2026

Copy link
Copy Markdown
Member

Fixes #562

What

#248 labelled a Docker proxy's times "Cached" / "Last cached", but only on the proxy's own pages (repoKind === 'proxy'). On a group, manifests and images served by a proxy member still showed when Forge cached them under "Pushed" / "Last pushed".

  • Image page, Manifests table (ManifestTable in web/src/components/ImageTables.tsx, used by both the image page and the Helm chart page): on a group, each row's time is labelled by the kind of the member it comes from (source).
    • All rows from proxy members: the column is Cached (same hint as on a proxy).
    • All rows from hosted members: the column is Pushed.
    • Rows from both kinds, or from a member whose kind is not known: the column is Pushed / cached (with a hint), and each row of a known member gets a small "Cached" / "Pushed" label under its time.
  • Repository page, image list (web/src/routes/RepoBrowse.tsx): on a group the column is Last pushed / cached (with a hint). Proxy and hosted pages are unchanged.
  • The image page header's "Pushed …" meta was already shown only for hosted repositories, so nothing changes there.

Where the member's kind comes from

The API doesn't give the kind of a row's member:

  • GET /browse/images/{repo}/{image} gives each manifest's source, the member's name, but not its kind.
  • GET /browse/images?repo=… gives an image row no member at all. A group's row merges what all its members hold.

What I did:

  • Manifests: the kind is looked up by name in GET /browse/repos, which the UI already loads (browseReposQueryOptions, shared cache). The table only fetches it on a group. That list includes every repository the reader can read, and a group only shows what its readable members hold, so a row's member is normally in it. If the list hasn't loaded, fails, or doesn't name the member, the row's kind counts as unknown. The column then uses the neutral heading and that row gets no label, rather than a guess.
  • Image list: a row has no member to look up, so the group's column uses the neutral heading.

I kept the fix in the web UI. The alternative would be adding the member's kind to the server's ManifestItem (source_kind). That's more direct, but it touches crates/server/src/browse_images.rs, which the Docker proxy PR (#869) is also changing. It could be a follow-up if wanted.

Tests

  • web/src/routes/ImageDetail.test.tsx: a group with a proxy and a hosted member (mixed heading, per-row "Cached" / "Pushed"); only proxy members ("Cached"); only hosted members ("Pushed"); member kinds unknown (neutral heading, no row labels).
  • web/src/routes/Browse.test.tsx: a proxy's image list says "Last cached", a group's says "Last pushed / cached".
  • pnpm run tsc, pnpm run test (621 passed), pnpm run build, cargo xtask changelog --check: all pass. The web project has no separate lint script; CI runs tsc, test and build.

Changelog

docs/changes/2.2.0/562.fixed.md

Not fixed here

  • web/src/components/VersionTable.tsx has the same repoKind === 'proxy' rule for packages: a package group's version times read "Published" even when a proxy member cached them. This issue is about Docker and the package formats have their own PRs in flight, so I left it for a separate issue.

Generated by Claude Code

On a group's image page, each manifest's time is what its member's is:
"Cached" for one from a proxy member, "Pushed" for one from a hosted
member. The members' kinds come from /browse/repos, which lists every
member a group serves the reader. When the rows mix kinds, or a member's
kind is not known, the column is "Pushed / cached" and each row of a
known member says which its time is. A group's image list merges its
members' images and names none of them, so its column says "Last pushed
/ cached".

Fixes #562

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012e6DJYfDiGC4npKLCFPnZL
@schmitch
schmitch added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit a836d68 Nov 3, 2026
19 checks passed
@schmitch
schmitch deleted the claude/562-group-cached-labels branch November 3, 2026 22:00
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.

Docker group pages label a proxy member's cache times "Pushed" (follow-up to #248)

2 participants