feat(ai-partner): continue-in-tab handoff from peek (#1464)#1500
Merged
CraigBuckmaster merged 1 commit intoApr 17, 2026
Conversation
Promotes an ephemeral peek conversation into a persistent Amicus
thread when the user taps "Continue in Amicus tab →".
- `promotePeekToThread` service: generates a word-boundary-truncated
title from the first user message, creates the thread row, replays
each peek message into `amicus_messages` (with citations +
follow_ups serialized), and navigates via
`getParent().navigate('AmicusTab', { screen: 'Thread' })`.
- `AmicusPeekSheet` wires the CTA to the service, tracks
`handoffInProgress` to prevent double-taps, and surfaces a
"Couldn't save conversation — try again" banner on DB failure
(peek stays open so the user can retry; messages preserved).
- `PeekMiniConversation` now accepts a `handoffError` string so
handoff failures render a clear message without reusing the
streaming-error code set.
Acceptance criteria covered:
- CTA appears at turn 3, writes thread + all messages, navigates to
AmicusTab/Thread
- Peek closes after navigation; underlying screen state preserved
- Double-tap rejected; CTA shows "Saving…" during save
- DB failure → error banner; peek stays open
https://claude.ai/code/session_01Pht3kzgdvkn81DDfL9SnFe
Test Results✅ All tests passed
Coverage
⏱️ Duration: 80.9s |
This was referenced Apr 17, 2026
CraigBuckmaster
added a commit
that referenced
this pull request
Apr 17, 2026
…rash-I3NJC revert: back out #1500 to unblock TestFlight launch (P0)
This was referenced Apr 17, 2026
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
Resolves phase 3, card #1464 of epic #1446. Completes the FAB-peek → Amicus tab story arc.
promotePeekToThreadservice generates a word-boundary-truncated title from the first user message, creates the thread row inamicus_threads, replays each peek message intoamicus_messages(citations + follow_ups serialized), and navigates viaparent.navigate('AmicusTab', { screen: 'Thread' }).AmicusPeekSheetwires the CTA to the service, trackshandoffInProgressto prevent double-taps, and surfaces"Couldn't save conversation — try again"on DB failure. On failure the peek stays open so the user can retry — nothing is lost.PeekMiniConversationaccepts an optionalhandoffErrorstring so handoff failures render cleanly without overloading the streaming-error code set.Title generation cases:
< 10chars →"New Amicus conversation"fallback≤ 50chars → raw text> 50chars → truncated at a word boundary with trailing…(hard-cut if no usable boundary)Acceptance criteria
AmicusTab/Threadwith the new threadId"Saving…"during saveanytypes; lint cleanTest plan
npx jest src/services/amicus/__tests__/promotePeekToThread.test.ts— 9 passingnpx jest src/components/amicus/__tests__/AmicusPeekSheet.test.tsx— 8 passing (3 new peek-integration tests)npx tsc --noEmitclean for all Amicus filesnpx eslintclean (0 errors, 0 warnings) on changed fileshttps://claude.ai/code/session_01Pht3kzgdvkn81DDfL9SnFe