Problem Statement
The artifact-details dialog (opened from the Artifacts tab on a repo detail page) shows static fields like Name, Path, Size, Content Type, and Created. For a Remote (proxy) repository it does NOT show when the cached copy of the artifact will expire, which is exactly the field operators need before deciding whether to wait for the natural refresh or hit the "Invalidate cache" button shipped via #446 / #447.
Proposed Solution
Once the backend exposes the per-artifact cache metadata (companion issue: artifact-keeper#... — backend issue link will be added in the PR description once filed), surface those fields in the existing artifact-details dialog details tab in repo-detail-content.tsx:
- New
DetailRow for "Cached" (relative time + absolute timestamp tooltip), populated from cache_cached_at. Hidden when the value is absent.
- New
DetailRow for "Cache expires" with relative-time formatting (e.g. "in 4 hours" or "expired 12 minutes ago, will re-fetch on next download"). Hidden when the value is absent.
- Both rows only render when
repository.repo_type === "remote" AND the backend response actually included the fields. Local / Virtual / Staging repos do not have a proxy cache, so the rows never appear there.
- Sits next to the new "Invalidate cache" button so the operator can read the expiry state and act on it in the same panel.
The existing Artifact local type (src/types/index.ts or wherever it lives) gets two new optional fields mirroring the backend's optional response fields. The adaptArtifact helper in src/lib/api/artifacts.ts plumbs them through.
Alternatives Considered
- Inline badge on the artifact row in the table. Cluttered for long lists; the dialog is the right place for this level of detail.
- Polling the cache state every N seconds while the dialog is open. Premature optimisation — operators reading this panel are deciding whether to invalidate, so a stale-by-a-minute display is fine. Can be revisited if real usage shows otherwise.
- Show only
expires_at and not cached_at. Tempting, but having both makes "this entry is fresh" vs. "this entry is about to flip stale" much clearer, especially for short-TTL repos.
Use Case
As a repo admin, when I open the details for a cached artifact in a remote (proxy) repository, I want to immediately see "Cache expires in 4 hours" so I can choose between waiting for the natural refresh and clicking "Invalidate cache" right now. Today the dialog gives me no signal at all about cache freshness.
Component
Repository Browser
Additional Context
Pre-submission Checklist
Problem Statement
The artifact-details dialog (opened from the Artifacts tab on a repo detail page) shows static fields like Name, Path, Size, Content Type, and Created. For a Remote (proxy) repository it does NOT show when the cached copy of the artifact will expire, which is exactly the field operators need before deciding whether to wait for the natural refresh or hit the "Invalidate cache" button shipped via #446 / #447.
Proposed Solution
Once the backend exposes the per-artifact cache metadata (companion issue: artifact-keeper#... — backend issue link will be added in the PR description once filed), surface those fields in the existing artifact-details dialog
detailstab inrepo-detail-content.tsx:DetailRowfor "Cached" (relative time + absolute timestamp tooltip), populated fromcache_cached_at. Hidden when the value is absent.DetailRowfor "Cache expires" with relative-time formatting (e.g. "in 4 hours" or "expired 12 minutes ago, will re-fetch on next download"). Hidden when the value is absent.repository.repo_type === "remote"AND the backend response actually included the fields. Local / Virtual / Staging repos do not have a proxy cache, so the rows never appear there.The existing
Artifactlocal type (src/types/index.tsor wherever it lives) gets two new optional fields mirroring the backend's optional response fields. TheadaptArtifacthelper insrc/lib/api/artifacts.tsplumbs them through.Alternatives Considered
expires_atand notcached_at. Tempting, but having both makes "this entry is fresh" vs. "this entry is about to flip stale" much clearer, especially for short-TTL repos.Use Case
As a repo admin, when I open the details for a cached artifact in a remote (proxy) repository, I want to immediately see "Cache expires in 4 hours" so I can choose between waiting for the natural refresh and clicking "Invalidate cache" right now. Today the dialog gives me no signal at all about cache freshness.
Component
Repository Browser
Additional Context
Artifacttype.Pre-submission Checklist