Skip to content

feat(views): switch Content-tab displays to unresolved query with client-side version resolution - #574

Merged
tkuhn merged 1 commit into
masterfrom
view-displays-unresolved-query
Jul 30, 2026
Merged

feat(views): switch Content-tab displays to unresolved query with client-side version resolution#574
tkuhn merged 1 commit into
masterfrom
view-displays-unresolved-query

Conversation

@tkuhn

@tkuhn tkuhn commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Wires in the new get-view-displays-unresolved query head (RAXdRFNLE1jB_NTaWrwIC9965SmZdZKB96VFnj1HvjdbY) for the space Content tab. The new head drops the server-side repo-wide view-version resolution sub-select — the query's dominant and fragility-prone cost, linear in the total view count — and returns referenced view versions unresolved, leaving latest-version resolution to the caller.

  • QueryApiAccess: new GET_VIEW_DISPLAYS_UNRESOLVED constant documenting the caller-side resolution contract.
  • AbstractResourceWithProfile.viewDisplaysRefQueryRef now uses the new head; buildViewDisplays branches on the query id and stops passing the ?view column through for the unresolved head, so View.get(viewIri, true) resolves each view — its existing memoized path (60s stale-while-revalidate) already implements the contract exactly: space-governed pins resolve space-based, everything else follows the supersedes chain.
  • ViewDisplay.forPresetView gains a resolveLatest parameter for preset-supplied rows.
  • The older resolved heads (IRI-keyed query for non-space resources, DownloadRdfPage) keep the pass-through behavior unchanged.

Client-side resolution runs against the meta repo, so view-version freshness no longer depends on the gen:ResourceView type repo, which can lag.

Deploy note: new Nanodash + old query is fine (just redundant resolution); old Nanodash + a future resolved-head retirement would pin stale versions — retire the old heads only after all instances carry this change.

Test plan

  • Verified on a local jetty against the live query API: openaire space Content tab renders fully — headers, correct section ordering from the latest view versions, and duplicate version rows (two project-outputs-view pins) collapse correctly through the per-kind latest-wins aggregation.
  • Direct API call to the new query head answers fast and returns the expected unresolved rows.

🤖 Generated with Claude Code

…ent-side version resolution

The new get-view-displays-unresolved query head (RAXdRFNL...) drops the
server-side repo-wide view-version resolution sub-select (the query's
dominant cost, linear in the total view count) and returns the referenced
view versions unresolved. Supersedes-head resolution now happens
caller-side per view through the existing memoized View.get path, which
also covers space-governed pins. The older resolved heads (IRI-keyed
query, DownloadRdfPage) keep the pass-through behavior unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tkuhn
tkuhn merged commit cf6c827 into master Jul 30, 2026
8 checks passed
@tkuhn
tkuhn deleted the view-displays-unresolved-query branch July 30, 2026 05:46
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 5.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant