Skip to content

SwiftUI: offer Undo after settling a thread #6107

Description

@saphid

Problem

Settling a thread removes it from the active thread list immediately, but the native SwiftUI client gives no inline recovery action. An accidental settle requires finding the thread in the Settled section and manually reopening it.

Proposed behavior

  • After a successful Settle action, show a short-lived bottom toast naming the thread.
  • Include an Undo action that reopens that same thread through the existing settle API.
  • Replace the previous toast when another thread is settled.
  • Do not offer Undo for Reopen, Archive, Delete, Snooze, or Pin actions.
  • Preserve the existing server protocol and settlement model.

Scope

The existing owner is apps/swift-ios/Features/Workspace/WorkspaceView.swift; a small pure state helper can make replacement/expiry behavior deterministic.

Acceptance

  • Settle shows a visible, accessible Undo toast.
  • Undo reopens the intended thread exactly once.
  • Expiry hides the toast without changing thread state.
  • Settling a second thread replaces the first undo target.
  • The toast avoids the floating New Task control and remains usable with large Dynamic Type.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions