Skip to content

New session: draft first, pick project and worktree, create on send #1004

Closed

Description

@ivanfenenko

New session opens Session Chat at once as a draft, lets you pick the project and worktree in the middle of the empty screen, and creates the session only when you send the first message.

Today New session creates the server session right away (after a project sheet in the All scope), so backing out leaves an empty "New session" on the server and in the list.

Chosen in prototype review: "Run session in" card, version 1 (two-line rows with icon tiles), with the project and worktree each opening their own sheet. Prototypes: "New session, option A refined" and "New session, two pickers" on the team artifact server.

Behaviour (iOS and Android, v1 and v2)

New session

  • Tapping New session opens Session Chat right away as a draft. Nothing is created on the server yet. The hold gesture and the New session / Run in sheet on Home go away; /new in Session Chat opens the same draft.
  • Header: title "New session" (muted), subtitle "Draft · created when you send". No branch pill or repo strip while drafting.
  • Starting place: the Home filter's project (or worktree, when filtered to one); in All projects, the place of the most recent session. Same rule as today's tap.

Run session in card (centred in the empty timeline area, above the composer)

  • Caption "Run session in", then one card with two-line rows: an icon tile, a small label above a bold value, and a chevron.
    • Project: the project's letter avatar tile, label "Project", the project name.
    • Worktree: label "Worktree", value "Local" (main checkout), the worktree's branch, or "New worktree". The tile is highlighted when it is not Local.
    • Starts from (only for New worktree, v2 only): the base branch, default the project's main branch.
  • Path of the checkout under the card in small monospace.
  • Not a Git repository: the Worktree row stays but is disabled and greyed: "None · not a Git repo".
  • Worktrees setting off (Worktrees setting and a collapsible project picker #785): no Worktree row; sessions start on the main checkout.
  • Keyboard up: rows get tighter and the caption hides; the card stays between the header and the composer. Wide screens (foldable, tablet): the card keeps its phone width, centred.
  • After the first send the card goes away and Session Chat looks as it does today (header with project, branch pill).

Project sheet (Project row)

  • Uses the existing bottom sheet and the Filter by project rows, in the user's Home order, with a search field pinned at the top and an "Add project…" row at the end that opens the existing Add project flow.
  • Picking another project resets the worktree to Local.

Worktree sheet (Worktree row)

  • Lists only the current project's places: Local (main checkout), New worktree (when NewWorktreeAvailability allows it), then the existing worktrees by branch, with the running count where one exists.
  • New worktree: the server names it; the app only picks the base branch (Starts from row, v2). v1 creates from the current checkout, so it has no Starts from row.

Create on send

  • The first send creates, in order: the worktree (if New worktree), then the session in that directory, then sends the prompt with the chosen model, agent and variant. Errors keep the draft (text, attachments, place) and show the error with Retry.
  • Home shows no row for a draft. The new session's row appears when it is created, as today.

Draft

  • One draft per Connection Profile, kept in memory: text, attachments, model/agent/variant, project and worktree choice.
  • Back or leaving the app keeps it; New session restores it. An app restart drops it.
  • Back with no text and no attachments discards the draft (a place choice alone is not kept).
  • Discard draft is in the ⋯ menu.

Acceptance

  • New session never creates a server session or worktree until the first send, on v1 and v2. Backing out leaves nothing on the server or in Home.
  • The Run session in card shows Project and Worktree rows (Starts from for a new worktree on v2), each opening its own sheet; non-Git and Worktrees-off cases behave as above.
  • The project sheet has search and Add project…; the worktree sheet lists Local, New worktree and the project's worktrees.
  • The first send creates worktree → session → prompt; a failure keeps the draft with Retry.
  • The draft survives Back and backgrounding, is dropped on app restart and on Discard draft.
  • Unit tests on both platforms for the draft state model and the create-on-send order; real-app evidence on both platforms against v1 and v2.

Remaining:

  • iOS: draft Session Chat, Run session in card, project and worktree sheets, create on send, in-memory draft
  • Android: the same
  • Remove the New session hold sheet / Run in sheet from Home on both platforms; route /new to the draft
  • Evidence on both platforms (v1 and v2) via the scenario harness

Related: #785 (Worktrees setting, Run in), #752 (create worktrees), #469 (composer drafts), #981 (no session counts on Home).

Activity

  1. added
    enhancement
    ios
    android
    shared
    priority: medium
    in-progress
    on Nov 9, 2026
  2. removed
    in-progress
    on Nov 9, 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

    androidenhancementiospriority: mediumshared

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions