Skip to content

feat(website): improve SeqSet citation metadata#6920

Open
theosanderson-agent wants to merge 5 commits into
mainfrom
agent/seqset-citation-authors-and-journals
Open

feat(website): improve SeqSet citation metadata#6920
theosanderson-agent wants to merge 5 commits into
mainfrom
agent/seqset-citation-authors-and-journals

Conversation

@theosanderson-agent

@theosanderson-agent theosanderson-agent commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

SeqSet citation author lists now retain up to ten names and use an ellipsis when additional contributors exist. This keeps citations readable without hiding normal-sized author lists.

The citation model now retains journal metadata from Crossref, persists it in the database, exposes it through the API, and displays it in public and administrative citation views. Manually curated citations can also supply a journal, including DOI metadata lookups.

Why

Citation views previously rendered every contributor, causing unusually long paper author lists to dominate the page. The backend also discarded Crossref journal metadata, leaving users without a key publication detail.
org.loculus.backend.service.crossref.CrossRefServiceTest --console=plain`

Preview evidence

Filled manual citation form

Saved citation showing journal and truncated authors

Sequence details “Cited in” section with truncated authors and journal

🚀 Preview: https://agent-seqset-citation-aut.loculus.org

@theosanderson-agent theosanderson-agent added the preview Triggers a deployment to argocd label Jul 16, 2026
@claude claude Bot added backend related to the loculus backend component website Tasks related to the web application seqset Related to seqsets labels Jul 16, 2026
@claude

claude Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

This PR may be related to: #6918

@theosanderson
theosanderson marked this pull request as ready for review July 16, 2026 13:29
@theosanderson
theosanderson requested a review from tombch July 16, 2026 13:29
@claude

claude Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Claude finished @theosanderson's task in 2m 1s —— View job


Code review

Todo list

  • Gather context (read diff, changed files)
  • Understand the request (code review)
  • Review backend changes (Kotlin, DB migration)
  • Review frontend changes (TS/React)
  • Post inline comments for actionable issues
  • Post final summary review

Summary

This is a clean, well-scoped change: adds a nullable journal column end-to-end (migration → API → DB service → frontend types/UI), and extracts a shared formatCitationContributors helper (with good spec coverage) to cap displayed author lists at 10 with an ellipsis, replacing duplicated inline formatting logic in AdminSeqSetCitationsTable.tsx and CitationTable.tsx.

Things I checked and confirmed are handled correctly:

  • All three write paths in SeqSetCitationsDatabaseService.kt (CrossRef upsert, curated add, and both read/select mappings) consistently include the new journal column — no path silently drops it.
  • The migration (V1.34__add_journal_to_seqset_citation_source.sql) is additive/nullable, matches schema.sql, and needs no backfill.
  • CrossRefService.kt's journal_title extraction follows the same selectFirst/blank-check pattern already used for doi, year, title, etc., and is exercised by the updated CrossRefServiceTest.
  • The journal display guard (!== undefined && !== null) is consistent with existing idioms elsewhere in the codebase (e.g. SeqSetItem.tsx), so no change needed there.

One minor point left as an inline comment on formatCitationContributors.ts: the ellipsis is shown even when only a single contributor would be hidden (11 → 10 shown + ...), which is likely intentional but worth a quick sanity check against the desired UX.

No security, performance, or test-coverage concerns found.

@theosanderson-agent
theosanderson-agent force-pushed the agent/seqset-citation-authors-and-journals branch from 2f64a79 to d1be6b1 Compare July 16, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend related to the loculus backend component preview Triggers a deployment to argocd seqset Related to seqsets update_db_schema website Tasks related to the web application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants