Repository navigation
Web UI: Docker group pages label a proxy member's times Cached, not Pushed - #871
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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".ManifestTableinweb/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).web/src/routes/RepoBrowse.tsx): on a group the column is Last pushed / cached (with a hint). Proxy and hosted pages are unchanged.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'ssource, 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:
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.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 touchescrates/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.mdNot fixed here
web/src/components/VersionTable.tsxhas the samerepoKind === '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