Repository navigation
#419 Fork from Session Chat overflow and from a message - #658
Conversation
Add "Fork session" to the Session Chat overflow menu and "Fork from here"
to the outgoing-message actions sheet on iOS and Android. All entry points
share the existing fork dialog, now with an optional message ID passed to
forkSession and a "Fork of {title}" prefill ("Forked session" when blank).
Fork and rename are now separate steps: a failed rename after a successful
fork closes the dialog, still offers Open / Stay here, and shows a
non-blocking error, so one confirm never creates two forks. A fork from a
message saves that message's text as the fork's composer draft, matching
the opencode TUI.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
OPE-81 Session fork from Session Chat
What to buildFrom Session Chat, fork the open session via overflow (Fork session, whole session) or an outgoing message action (Fork from here). Show a shared name dialog with suggested title Synced Feature Slice: iOS + Android. Relationship to OPE-58OPE-58 implements this whole-session fork dialog flow first as the Commands-sheet Behavior
Out of scope
Acceptance criteria
Blocked byPrefer after OPE-58 if that ticket lands the shared fork flow first; otherwise can start independently and OPE-58 should reuse this path. Related
|
ivanfenenko
left a comment
There was a problem hiding this comment.
Looks good. Single-flight on confirm and the rename-failure handling are solid on both platforms. One small iOS thing below.
The overflow entry and "Fork from here" close their menu before opening the dialog, so the silent offline guard made Fork a no-op. Open the dialog whenever the session exists; its Fork button already follows canMutate and confirmFork still refuses to fork until the connection is live. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
messageID, v2before).[fork], the overflow entry and the message action all use the existing dialog and Open / Stay here prompt. A message ID is optional all the way through toforkSession.Fork of {title}from every entry point, orForked sessionwhen the title is blank. Android shares this with Home throughSessionForkTitle.confirmForkdoes nothing once the dialog has closed.dialog-fork.tsxprefills the fork's prompt with that message), a message fork saves the message text as the fork's composer draft throughComposerDraftStore. It appears when you tap Open, or later from the session list.chat_overflow_forkandmessage_actions_forkon both platforms.Evidence (iOS, real app against a local opencode 1.18.35 server)
Checked on the server afterwards: exactly one fork, containing the 2 messages before the tapped one. Cancel from the overflow dialog created no session.
Checks
./gradlew --offline :app:assembleDebugpasses.:app:testDebugUnitTest --tests '*SessionChat*' --tests '*MainScreenViewModelTest*': 384 tests, 0 failures. ktlint shows no new violations; the touched files already had some.xcodebuild buildpasses.xcodebuild test -only-testing:"OpenCode MobileTests/SessionChatViewModelTests": 164/164 pass.Issue
Risks / Follow-ups
forkSessionmapping was already in the repositories and is unchanged.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmithwith what you need.