Skip to content

fix(macapp): restore conversation delete and undo preview confirmations #996

Description

@dennisonbertram

Parent: #991
Depends on: #995

Summary

Conversation deletion executes immediately from a context menu, and Undo executes immediately from several surfaces. This regresses the completed #933 and #935 contracts, which require delete confirmation and an undo preview/picker describing what will be removed.

Evidence

  • macapp/Sources/GoCodeUI/SessionsView.swift:50-60,108-110 — Delete calls the API with no confirmation.
  • macapp/Sources/GoCodeUI/ConversationChrome.swift:33-36 — Undo last turn executes immediately.
  • macapp/Sources/GoCodeUI/ChatView.swift:350-357 — message action Undo executes immediately.
  • macapp/Sources/GoCodeUI/SettingsView.swift:195-199 — project action Undo executes immediately.
  • macapp/Sources/GoCodeUI/ProjectSession.swift:374-381 — undo accepts a count and sends it with no preview model.
  • feat(macapp): conversation and session picker #933 acceptance: “Delete with confirmation.”
  • feat(macapp): fork and undo #935 acceptance: undo picker shows what will be removed; 409 undo_crosses_compaction is explained plainly.

Scope

  • Add one confirmation flow for conversation deletion showing title and irreversible data loss.
  • Add an undo preview/picker showing the prompt(s)/steps that will be removed before POST.
  • Route every Undo entry point through the same presentation/state.
  • Explain undo_crosses_compaction with a user action/next step.
  • Keep the active-run guard from the prerequisite slice.

Tests first

  • Regression: neither DELETE nor undo POST fires before explicit confirmation.
  • Cancel/Escape leaves conversation and transcript unchanged.
  • Confirm sends the exact selected conversation/count/step once.
  • Structured undo_crosses_compaction maps to plain-language UI.
  • Production-reachability tests cover every existing Delete/Undo entry point.

Acceptance criteria

  • Delete always requires confirmation naming the conversation.
  • Undo always previews what will be removed and requires confirmation.
  • All entry points share one behavior; no bypass remains.
  • Cancel is the safe default and receives initial keyboard focus.
  • feat(macapp): conversation and session picker #933/feat(macapp): fork and undo #935 contracts have durable regression coverage.
  • swift test, Swift build, formatting, strict format lint, and manual keyboard smoke pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcorrectnessCorrectness bugs and logic errorsmacappNative macOS app (macapp/)mediumMedium effort: 1-3 daysuxUser experience improvementswell-specifiedIssue is clear, scoped, and ready to implement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions