Skip to content

feat(ai-partner): citation → source navigation (#1456)#1486

Merged
CraigBuckmaster merged 1 commit into
masterfrom
claude/issue-1456-citation-nav
Apr 17, 2026
Merged

feat(ai-partner): citation → source navigation (#1456)#1486
CraigBuckmaster merged 1 commit into
masterfrom
claude/issue-1456-citation-nav

Conversation

@CraigBuckmaster
Copy link
Copy Markdown
Owner

Closes #1456. Phase 2 of epic #1446. Depends on #1455 (merged).

Summary

Citation pills in Amicus messages now navigate to the source. Cross-stack jumps use navigation.getParent() to bubble up to the root tab navigator.

Routing table

source_type Destination
section_panel ReadTab → Chapter w/ openPanel: { sectionNum, panelType }
chapter_panel ReadTab → Chapter w/ openPanel: { panelType }
word_study ExploreTab → WordStudyDetail
lexicon_entry ExploreTab → DictionaryDetail
debate_topic ExploreTab → DebateDetail
cross_ref_thread_note ExploreTab → ThreadDetail
journey_stop ExploreTab → JourneyDetail
meta_faq MetaFaqModal (no dedicated screen — reference content only)

New files

  • services/amicus/citationNav.tsnavigateToCitation + deterministic parseSectionPanelId / parseChapterPanelId / parseJourneyStopId / parseCrossRefThreadNoteId.
  • components/amicus/MetaFaqModal.tsx — bottom-sheet modal showing title + scrollable body.

Test plan

  • npx tsc --noEmit clean
  • 13 new tests in citationNav.test.ts cover parsers + every source_type + malformed paths + missing meta_faq
  • Full suite 3,308 / 3,308 passing
  • Coverage thresholds green
  • Reviewer: verify deep-link state on back button returns to the thread.

Out of scope

https://claude.ai/code/session_01Pht3kzgdvkn81DDfL9SnFe

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 17, 2026

Test Results

✅ All tests passed

Passed Failed Total
Tests ✅ 3308 ❌ 0 3308
Suites ✅ 445 ❌ 0 445

Coverage

Statements Branches Functions Lines

⏱️ Duration: 73.5s

New services/amicus/citationNav.ts resolves chunk_id → cross-tab
navigation action. Section/chapter panels open Read → Chapter with
openPanel; lexicon/word_study/debate/thread/journey open Explore with
their canonical detail screen; meta_faq opens a modal since that
content has no dedicated screen.

New components/amicus/MetaFaqModal renders the FAQ body with a close
button and safe-area aware layout.

Wired into AmicusThreadScreen: citation taps now navigate (or open the
modal), with `navigation.getParent()` pattern for cross-stack jumps.
Malformed source_ids log a warning and surface an 'unresolved' outcome
so the screen can toast — never crash.

13 new tests cover:
- section_panel / chapter_panel / journey_stop / cross_ref_thread_note
  parsers with happy + malformed cases
- Navigation dispatch for each source_type
- Meta-FAQ modal outcome w/ hydrated article
- Unresolved outcomes for missing meta_faq + malformed ids + unknown
  source_types

https://claude.ai/code/session_01Pht3kzgdvkn81DDfL9SnFe
@CraigBuckmaster CraigBuckmaster force-pushed the claude/issue-1456-citation-nav branch from 2f02b73 to 779301b Compare April 17, 2026 14:11
@CraigBuckmaster CraigBuckmaster merged commit 65352a2 into master Apr 17, 2026
6 checks passed
@CraigBuckmaster CraigBuckmaster deleted the claude/issue-1456-citation-nav branch April 17, 2026 14:42
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.

ai-partner: citation → source navigation

2 participants