Skip to content

Return to the parent when an active child is auto-archived, and use a project draft as the fallback #361

Description

@Tryanks

Problem and current behavior

Completed Orchestrate children are already auto-archived by default after result delivery. If the user is viewing that child, the requested behavior is to return to its parent instead of landing on an empty page.

The runtime owns archive/result lifecycle. In the UI store's index-snapshot handling, a selected non-draft session that is no longer unarchived triggers leave_session(). The design contract still explicitly specifies “Pick a thread to continue” with no composer as its empty state. Returning to a parent and replacing that default destination are therefore additional navigation behavior.

Requested navigation policy

  • When the currently viewed child is auto-archived on completion, navigate to its available parent. Preserve the parent's existing conversation state.
  • Replace the generic empty workspace page with the new-conversation page for the last project the user interacted with. Reuse that project's existing draft and attachments rather than recreating them.
  • Define “last interacted project” from user navigation or input, not background model activity or archive timestamps.
  • If no usable parent exists, use the same project-draft fallback. Define a deliberate add/select-project state when there is no usable project at all.
  • Archiving a background child must not steal the user's current navigation. Handle parent/child batch archival, deleted projects and late archive events without redirect loops or reviving archived threads.

Acceptance criteria

Verify completion while viewing a child, completion while viewing another thread, a missing/archived parent, batch archive, startup without a selected conversation and a workspace with no projects. Draft text, attachments and parent scroll state survive navigation. Update the empty-state design contract and exercise the end-to-end archive event/navigation path.

Keep destination selection in the UI/navigation owner; do not make provider shutdown or archive persistence directly choose a client's page.

Code context

Reviewed against main at b4c549787da6 (2026-09-08).

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions