You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable contextual handoffs into the Amicus tab that pre-seed a new thread with a starter query. Used by the home card (#1466), external deep-links (future), and potentially FAB escape routes.
Files to modify
app/src/navigation/types.ts — ensure AmicusStackParamList.NewThread accepts seedQuery and seedChapterRef
app/src/screens/AmicusThreadListScreen.tsx — handle NewThread navigation by creating a thread with seed and navigating onward
app/src/navigation/RootNavigator.tsx — register deep-link config mapping URLs to Amicus routes
Files to create
app/src/services/amicus/deepLink.ts — helper that constructs + dispatches seeded navigation actions
Replace nav stack so back button goes to previous screen (not NewThread → ThreadList which would feel broken)
Implementation note: NewThread doesn't need to be a rendered screen — it can be a "transition" route that redirects to Thread after setup. Use useEffect to perform the transition in the screen component, with a loading indicator shown for the ~100ms it takes.
External deep-link config
For future use (e.g., push notifications in Phase 5, widget taps in v2):
Parent epic: #1446 (Amicus — AI Study Partner v1)
Phase: 4 · Size: XS · Depends on: #1454 (Amicus tab), #1466 (home card)
Enable contextual handoffs into the Amicus tab that pre-seed a new thread with a starter query. Used by the home card (#1466), external deep-links (future), and potentially FAB escape routes.
Files to modify
app/src/navigation/types.ts— ensureAmicusStackParamList.NewThreadacceptsseedQueryandseedChapterRefapp/src/screens/AmicusThreadListScreen.tsx— handleNewThreadnavigation by creating a thread with seed and navigating onwardapp/src/navigation/RootNavigator.tsx— register deep-link config mapping URLs to Amicus routesFiles to create
app/src/services/amicus/deepLink.ts— helper that constructs + dispatches seeded navigation actionsapp/src/services/amicus/__tests__/deepLink.test.tsAPI surface
The function:
navigation.navigate('AmicusTab', { screen: 'NewThread', params: { seedQuery: seed.query, seedChapterRef: formatChapterRef(seed.chapterRef) } })NewThread route behavior
When navigated to with a seed:
createAmicusThreadfrom ai-partner: conversation persistence (user.db) #1457) with title generated from seed querystreamChatfrom ai-partner: streaming chat UI with citation pills #1455)Implementation note:
NewThreaddoesn't need to be a rendered screen — it can be a "transition" route that redirects toThreadafter setup. UseuseEffectto perform the transition in the screen component, with a loading indicator shown for the ~100ms it takes.External deep-link config
For future use (e.g., push notifications in Phase 5, widget taps in v2):
Register in
RootNavigator.tsxdeep-link config. Not actively used in v1 but wired so tapping a notification or widget can open Amicus with seed.Home card integration
AmicusHomeCard(#1466) callsnavigateToAmicusWithSeed(navigation, { query: prompt.seed_query })on tap.Acceptance criteria
navigateToAmicusWithSeednavigates to Amicus tab and creates thread with seedcompanionstudy://amicus/new?q=testroutes correctly (spot-check; not required to fully test)anytypes; lint cleanOut of scope