Skip to content

feat(dashboards): collections detail view#1099

Draft
fhennig wants to merge 8 commits intomainfrom
generalized-collections-ui-detail-view
Draft

feat(dashboards): collections detail view#1099
fhennig wants to merge 8 commits intomainfrom
generalized-collections-ui-detail-view

Conversation

@fhennig
Copy link
Copy Markdown
Contributor

@fhennig fhennig commented Mar 23, 2026

Summary

  • Adds the details page
  • 'Edit' button in the top right, if you're currently logged in as the owner of the collection
  • Description and owner displayed
  • Variants in a table:
    • Counts are fetched from lapis
    • link out to 'Analyze single variant'

Screenshot

image

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by an appropriate test.

@fhennig fhennig self-assigned this Mar 23, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboards Ready Ready Preview, Comment Mar 26, 2026 10:52am

Request Review

@fhennig fhennig force-pushed the generalized-collections-ui-pt1 branch from 8bf2b3d to 6c84134 Compare March 23, 2026 14:37
@fhennig fhennig force-pushed the generalized-collections-ui-detail-view branch from cd5ab56 to c5d8a57 Compare March 23, 2026 14:37
@fhennig fhennig force-pushed the generalized-collections-ui-pt1 branch from 6c84134 to aaa7e7d Compare March 24, 2026 08:34
@fhennig fhennig force-pushed the generalized-collections-ui-detail-view branch from c5d8a57 to 62f60ad Compare March 24, 2026 09:36
@fhennig fhennig force-pushed the generalized-collections-ui-detail-view branch from 62f60ad to c560f43 Compare March 24, 2026 09:42
Base automatically changed from generalized-collections-ui-pt1 to main March 24, 2026 09:42
- Add viewCollection route to pages.ts
- Add clickable rows to CollectionsOverview linking to detail page
- Add CollectionDetail component (read-only, shows variants)
- Add [organism]/[id]/index.astro page with breadcrumbs and session-based userId

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Use plain h2 for variants section in CollectionDetail

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fhennig and others added 2 commits March 24, 2026 11:18
- Show organism label (e.g. 'SARS-CoV-2') instead of raw key in detail page
- Render lineage fields (catchall string entries) in filter object variants
- Remove variant type badge since the type is implied by the shown properties
- Use 'Collection #<id>' for page title and breadcrumb
- Add browser spec for CollectionDetail covering success and error states
- Add mockGetCollection to AstroApiRouteMocker

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move data fetching from client-side React (useQuery) to Astro frontmatter,
enabling the real collection name in the title/breadcrumb at render time and
eliminating the loading spinner. 404s redirect; other errors show an inline
message. CollectionDetail becomes a pure renderer accepting a collection prop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…owser spec

The collection detail is now server-rendered so the browser spec and the
astro route mock for fetching a single collection are no longer needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drop the separate fetchError boolean; check collection !== undefined directly
in the template, which TypeScript narrows correctly without a non-null assertion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add FILTER_OBJECT_ARRAY_FIELD_LABELS map and getLineageFields() to Collection.ts
as the single source of truth for known filter object keys. Simplify
FilterObjectVariantDetails to iterate over known fields explicitly, removing
the duplicated key/label arrays and the non-null assertion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@fhennig fhennig marked this pull request as ready for review March 24, 2026 16:29
@fhennig fhennig removed the request for review from fengelniederhammer March 26, 2026 09:21
@fhennig fhennig marked this pull request as draft March 26, 2026 09:21
@fhennig
Copy link
Copy Markdown
Contributor Author

fhennig commented Mar 26, 2026

To be changed:

  • variant overview should be a table
  • variant name should link out to 'analyze single variant' dashboard
  • new columns for the table: query, total count, last 30 days count, last 90 days count, description
  • make it possible to filter by location, so the counts are by location -> I've created an issue for that: collections detail view: allow filtering for specific location #1117

fhennig and others added 2 commits March 26, 2026 11:31
Variants in the collection detail view are now displayed in a table with
Name, Description, Query, Total, Last 30d, and Last 90d columns. Counts
are fetched client-side from LAPIS using React Query.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds Page.singleVariantView(organism, variant) to the Page helpers and
uses it to make variant names in the collection detail table link to the
single-variant analysis page with the variant filter pre-populated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@fhennig
Copy link
Copy Markdown
Contributor Author

fhennig commented Mar 26, 2026

Needs a bit of testing:

  • What happens for really long descriptions etc, does it still look good?
  • Do the link outs and queries work for other organisms except covid? Haven't tested it yet.

Would be nice to have automated testing for that, probably.

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