feat(ai-partner): citation → source navigation (#1456)#1486
Merged
Conversation
Test Results✅ All tests passed
Coverage
⏱️ 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
2f02b73 to
779301b
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.
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
section_panelopenPanel: { sectionNum, panelType }chapter_panelopenPanel: { panelType }word_studylexicon_entrydebate_topiccross_ref_thread_notejourney_stopmeta_faqMetaFaqModal(no dedicated screen — reference content only)New files
services/amicus/citationNav.ts—navigateToCitation+ deterministicparseSectionPanelId / parseChapterPanelId / parseJourneyStopId / parseCrossRefThreadNoteId.components/amicus/MetaFaqModal.tsx— bottom-sheet modal showing title + scrollable body.Test plan
npx tsc --noEmitcleancitationNav.test.tscover parsers + every source_type + malformed paths + missing meta_faqOut of scope
https://claude.ai/code/session_01Pht3kzgdvkn81DDfL9SnFe