Skip to content

fix(serve): external artifact links route to the artifact detail (REQ-108, item 1)#336

Merged
avrabe merged 1 commit into
mainfrom
fix/req-108-external-artifact-nav
May 29, 2026
Merged

fix(serve): external artifact links route to the artifact detail (REQ-108, item 1)#336
avrabe merged 1 commit into
mainfrom
fix/req-108-external-artifact-nav

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 29, 2026

Summary

You flagged a suspected regression in external-artifact browsing. It's not a regression — the behaviour has existed since PR #86 (LSP WebView rendering) — but it is a real navigation gap, surfaced now that cross-repo externals (REQ-085) are in active use.

An artifact's outgoing link to a cross-repo prefix:id target rendered as href="/externals/<prefix>" (the external project-list page) instead of /artifacts/<prefix>:<id> (the external artifact's own detail view). render_artifact_detail already resolves prefix:id against the synced external's store, so the detail view worked — you could reach it by typing the URL, but never by clicking a link.

Fix: point the link at /artifacts/<prefix>:<id>, keeping the badge-info prefix chip. One behavioural line.

Playwright coverage (your question: "do we have enough?")

Noexternals.spec.ts only covered the /externals project-list page, not artifact-level cross-repo navigation. Adds a test that walks artifact detail pages and asserts any external reference links to /artifacts/, never /externals/. It's conditional on synced externals being present (skips cleanly otherwise).

Tracked follow-ups (REQ-108, not in this PR)

  • Deterministic synced-external Playwright fixture (so the guard runs unconditionally in CI).
  • Followable recursive prefix:ref links from the external detail view.
  • Inbound internal→external link display.
  • Shortcut-link contrast on the light background.

Test plan

  • cargo build -p rivet-cli + render::artifacts unit tests pass
  • CI (incl. Playwright)

Refs: REQ-108, REQ-085

🤖 Generated with Claude Code

… (REQ-108)

User-flagged as a suspected regression in external-artifact browsing.
It is NOT a regression — the behaviour has been present since PR #86
(LSP WebView rendering) — but it is a real navigation gap, surfaced now
that cross-repo externals (REQ-085) are in active use.

An artifact's outgoing link to a cross-repo (prefix:id) target rendered
as `href="/externals/<prefix>"` — the external *project-list* page —
rather than `/artifacts/<prefix>:<id>`, the external artifact's own
detail view. render_artifact_detail already resolves prefix:id against
the synced external's store (artifacts.rs:425-433), so the detail view
worked; only the link pointed at the wrong place. You could reach an
external artifact by typing the URL but never by clicking a link.

Fix: point the link at `/artifacts/<full prefix:id target>`, keeping
the badge-info prefix chip for visual origin. One behavioural line.

Coverage (answering "do we have enough Playwright tests?"): no — the
existing externals.spec.ts only covered the /externals project-list
page, not artifact-level cross-repo navigation. Adds a Playwright test
that walks artifact detail pages and asserts any external reference
links to /artifacts/, never /externals/. It is conditional on synced
externals being present (skips cleanly otherwise); a deterministic
synced-external Playwright fixture is tracked as a follow-up under
REQ-108, along with the remaining REQ-108 items (followable recursive
prefix:ref links from the external detail, inbound internal links, and
shortcut-link contrast on the light background).

Refs: REQ-108, REQ-085
@github-actions
Copy link
Copy Markdown

📐 Rivet artifact delta

No artifact changes in this PR. Code-only changes (renderer, CLI wiring, tests) don't touch the artifact graph.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@avrabe avrabe merged commit 120431c into main May 29, 2026
22 of 39 checks passed
@avrabe avrabe deleted the fix/req-108-external-artifact-nav branch May 29, 2026 04:58
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