Repository navigation
feat: prefer authors over uploader in DatasetCard byline - #23
Merged
neuromechanist merged 2 commits intoMay 18, 2026
Merged
neuromechanist merged 2 commits into
neuromechanist merged 2 commits into
Conversation
Discover cards previously showed 'by yahya' (the uploader) for every dataset. When the catalog row is enriched with author names, prefer those: 'by FirstAuthor' for one, 'by FirstAuthor et al.' for two or more. Fall back to the uploader, then to 'NEMAR' when neither is known. Adds formatAuthorByline() helper + 4 unit tests covering nullish, single, multi, and degenerate-comma input. Refs #22
- format.ts: replace verbose docstring with one-line invariant comment;
the previous docstring duplicated the code (WHAT) and only the API
contract assumption is non-obvious (WHY).
- DatasetCard.astro: drop inline comment over fallback chain; the
three-term short-circuit is self-evident TypeScript.
- format.test.ts: add whitespace-only first-slot test (" , Richard N
Henson" -> "Richard N Henson") covering a previously-untested branch
where the filter must drop blank entries before counting.
Contributor
Author
pr-review-toolkit review (sonnet)Three reviewers, three findings, all addressed in a9cc34a.
Both deletion items from comment-analyzer happen to align with code-reviewer's "explain WHY" ask — the trimmed format keeps only the load-bearing line. 80/80 tests passing, typecheck 0 errors, biome clean. |
neuromechanist
merged commit May 18, 2026
fbb3a73
into
feature/issue-1-epic-nemar-redesign
1 check failed
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #22
Summary
Discover cards now show the dataset's authors instead of the uploader when the catalog row is enriched. Falls back gracefully when authors are missing.
Behavior
Why "FirstAuthor et al." instead of full list
Card footer real estate is small. Compact byline preserves the visual rhythm of the card grid. Full author list still appears in the detail page's right rail.
Tests
4 new tests for formatAuthorByline (nullish, single, multi, degenerate commas). 79/79 passing, typecheck 0 errors.
Live behavior pending backend
The list endpoint currently returns empty authors for source=openneuro rows (separate #512 list-endpoint projection regression). Once your enrichment work backfills, on* cards will flip from "by yahya" to "by Wakeman et al." with no further frontend change.
ds* rows on Discover page 2+ already display the new byline today.