P2-04: ORCID author badges - #24
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
8 tasks
This was referenced Aug 11, 2026
dkritarth
force-pushed
the
p2-03-citations
branch
from
September 12, 2026 15:13
27ef0a0 to
0ce61cb
Compare
Show a clickable ORCID badge next to authors in the Details panel when an
ORCID is available, linking to the author's ORCID profile. Authors without
an ORCID render as plain text (graceful absence).
ORCID source is the Crossref metadata already fetched during DOI ingest —
no new external API call, no key. `core/ingest/fetch.ts` parses each
Crossref author's `ORCID` field, normalizes it to a bare id
(strips http/https + orcid.org host + trailing slash, validates the
`\d{4}-\d{4}-\d{4}-\d{3}[\dX]` shape, malformed → null), and builds an
`authorOrcids` array positionally aligned to `authors`. The arXiv path has
no ORCID data.
Alignment safety: the persisted `authorOrcids` are kept only when the final
author list is content-equal to the Crossref author list they were aligned
to. If agent-extracted authors win and diverge from Crossref's, ORCIDs are
dropped (column NULL) rather than risk attaching a badge to the wrong author.
Storage is additive: migration 5 adds a nullable `author_orcids` TEXT column
(JSON, positionally aligned to authors, null per-author when unknown, whole
column NULL for papers with no ORCID data). `authors` stays `string[]` —
no change to existing read sites. Old rows read back with authorOrcids
undefined.
Renderer-only UI: DetailsPanel renders authors individually; OrcidBadge is
an anchor to https://orcid.org/<id> (target=_blank rel=noopener) with an
accessible label. Data rides the existing vellum:get-paper channel on the
shared PaperRecord — no new IPC.
Acceptance ([P2-04]):
- badge renders when ORCID present ✓
- opens profile ✓
- graceful absence ✓
- tests ✓ (migration+column, repo round-trip incl null/undefined/legacy row,
ORCID normalization + alignment + divergence-drop, DetailsPanel + OrcidBadge)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dkritarth
force-pushed
the
p2-04-orcid
branch
from
September 12, 2026 15:14
c626fec to
b0eb051
Compare
8 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.
User outcome
Users can inspect verified author ORCID identifiers on paper details cards and the right panel "Details" tab. Clicking an ORCID badge navigates to the official verified ORCID registry profile.
Acceptance criteria
Automated verification
core/ingest/fetch.test.ts(7/7 tests passing)core/ingest/index.test.ts(6/6 tests passing)src/app/OrcidBadge.test.tsx(1/1 test passing)src/app/DetailsPanel.test.tsx(4/4 tests passing)npm run buildsucceeds without errors.Live Electron verification
Visual and console evidence
Limitations and follow-ups
Independent review
ORCID data schema migration adds non-breaking nullable author identifier structures to SQLite library store.
Closes #32