Skip to content

OPE-81: Session fork from Session Chat #419

Closed

Description

@ivanfenenko

What to build

Add two more ways to fork from Session Chat, both going through the fork flow that already exists:

  • Overflow → Fork session forks the whole open session.
  • Outgoing message action → Fork from here forks at that message.

Also fix two gaps in the existing flow: the title prefill, and what happens when the rename fails.

Synced Feature Slice: iOS + Android.

Current state

Already shipped on both platforms by OPE-58 (#74), reached through the Commands sheet [fork] action:

  • Fork name dialog (OpenCodeDialog + OpenCodeTextInput), trimmed and validated, with Fork disabled while the request is in flight
  • Open / Stay here result prompt; Open replaces Session Chat with the fork
  • Lives in SessionChatCommands.openForkDialog / confirmFork / chooseForkOpen / chooseForkStay (Android ui/sessionchat/region/SessionChatCommands.kt, iOS UI/SessionChat/Region/SessionChatCommands.swift)
  • Repository forkSession(id, atMessageId/atMessageID, …) already supports a message ID on v1 (messageID) and v2 (before). Session Chat always passes null today.

Not there yet:

  • The Session Chat overflow menu has no fork entry (it has Rename, Review changes, Session context, Copy session ID, Archive, Delete)
  • The message actions sheet (SessionChatMessageActionsSheet) has only Revert message and Copy message
  • The dialog prefills the current title as-is, not Fork of {title}
  • confirmFork runs fork + title update as one step that succeeds or fails together. If the fork succeeds but the rename fails, the dialog stays open with an error, and tapping Fork again creates a second fork.

Behavior

  • Overflow → Fork session opens the existing fork dialog with no message ID (fork at the tip)
  • Fork from here appears in the message actions sheet for outgoing (user) messages only and opens the same dialog with that message's ID
  • Thread the optional message ID through openForkDialog → confirmFork → forkSession. Do not build a second fork implementation.
  • Prefill Fork of {currentTitle}, or Forked session when the title is empty. The prefill applies to every entry point, including the Commands sheet.
  • If the fork succeeds and the title update fails: close the name dialog, still show the Open / Stay here prompt for the created fork, and show a non-blocking error. Never fork twice for one confirm.
  • If the fork itself fails: keep the name dialog open with the error (current behavior)
  • Allowed while busy or with a permission pending; disabled only while a submit is in flight
  • Child sessions behave the same as parents

Open question

The server copies history before the given message (v1 messageID, v2 before), so the fork leaves out the message the user tapped. Check this against the server and the TUI's message fork. Decide whether the fork should prefill its composer with that message's text, or whether the label needs to change.

Out of scope

  • Fork from Home or the session list
  • Fork from assistant, tool, or unknown rows
  • Navigating to the fork automatically, without the Open / Stay here prompt
  • Changes to share, archive, or delete

Acceptance criteria

  • Overflow Fork session creates a fork at the tip with the chosen title
  • Fork from here on an outgoing message creates a fork at that message on v1 and v2
  • Prefill is Fork of {title} (Forked session fallback) from every entry point
  • Rename failure after a successful fork still shows the Open / Stay here prompt, plus a non-blocking error, with no duplicate fork
  • Cancel or an empty title makes no API call
  • All entry points share one dialog and navigation path
  • Screen Model tests cover message-scoped fork and the rename-failure path on both platforms
  • Parity on iOS and Android

Related

  • OPE-58 (closed): Commands sheet [fork] and the shared fork flow
  • OPE-120 (closed): Home session context actions, which include Home fork

Imported from Linear OPE-81. Created 2026-07-23. Refreshed 2026-10-11 against current main.

Activity

  1. added
    backlog
    ready-for-agent
    on Oct 11, 2026
  2. added a commit that references this issue on Oct 14, 2026
  3. added 2 commits that reference this issue on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions