Skip to content

Await settings persistence before closing and preserve the draft on save failure #50

Closed

Description

@CompleteDotTech

Problem

Save calls onSave(s) and immediately onClose(). Persistence/refresh are asynchronous in App. If saving fails, the modal is already closed and its draft is lost; there is no pending state or in-dialog retry.

Triage

  • Original finding: 11 of 11.
  • Priority: P2. Schedule as a normal correctness/feedback fix.
  • Classification: Confirmed behavior/source defect.
  • Inspected current main: 3c2bb240059b3e1bec9264f1e57fa885096c6bf9 (2026-10-01).

Evidence

Source-confirmed: onSave is typed as returning void; the click handler does not await it. App.saveSettings wraps an async settings:update followed by refresh.

Source: apps/desktop/src/renderer/components/SettingsDialog.tsx:229, apps/desktop/src/renderer/App.tsx:273.

Acceptance criteria

  • Give the dialog an awaitable save outcome; close only after successful persistence, handling refresh failure separately when data already saved.
  • Keep the draft and display an actionable error on failure; provide retry and prevent duplicate submissions while pending.
  • Use delayed/rejected fake IPC to test pending, success, failure, retry, and dismissal behavior without changing real settings.

Coordination and validation

Related issues: #42 (finding 3), #43 (finding 4), #48 (finding 9). These are coordination links, not hard blockers.

Recommended sequence: fix transport enforcement/setup invalidation and policy constraints first; coordinate draft testing/status and persistence semantics; then reorganize the UI and add advanced controls. Independent fixes may proceed without artificial dependencies.

Use offline fixtures/fake transports for automated checks. Coding turns remain CLI-only; do not launch live agents or weaken approval/sandbox behavior. Implementation PRs must use their own worktree, update docs/status.md as applicable, and run required build/unit/UI checks. This issue publishes scope and acceptance criteria; no production fix or live-provider verification is claimed.

Activity

  1. added a commit that references this issue on Oct 3, 2026
    d9414b5
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