feat(web): add span-level citation UI — popovers, source highlight, inline markers (#450)#818
Merged
Conversation
d12b99d to
fd12a2a
Compare
…nline markers (Phase 4) (#450) Three-layer citation experience connecting article claims to source spans: - Layer 1: Citation markers on claims with hover popovers showing verbatim quotes - Layer 2: Source panel with highlighted span text and auto-scroll - Layer 3: Inline citation markers in article markdown next to confidence badges Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The CONFIDENCE_TAG_REGEX only matched [sourced] but articles use (sourced). Updated regex to accept both bracket and parenthesis delimiters so Layer 3 inline [src] markers render correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ocator, add error handling (#450) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fd12a2a to
56c7cab
Compare
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.
Summary
[N]on each Key Claim in ClaimsPanel — click to show popover with verbatim source quote, locator info, and "View in source" link[src]markers in article markdown body next to confidence badges — connects reading experience directly to source verificationNew components
CitationContext.tsx— React context for active citation stateCitationPopover.tsx— hover/click popover with source quoteInlineCitationMarker.tsx— inline superscript citation buttonSourceHighlightPanel.tsx— right sidebar source preview with highlightTest plan
[N]markers appear on each claim[src]markers appear next to(sourced)badges in article body🤖 Generated with Claude Code