Skip to content

(errors): remaining failure dialogs say what to do, on the surface where they happen #709

Open

Description

@devsuitup

Split from #566 (decided by Jean-Baptiste in person, 2026-10-18: the remaining error dialogs are a separate issue).

#566 moved row actions, Run now and restore failures to the persistent notice brick (B8, public/app-notices.js). These failures still open a one-button modal (appAlert, title "Switchboard"), and most of them only say "X failed: " without saying what to do:

Surface Site (main a80a49b) Text today
File panel, save public/file-panel.js:472, :475 Save failed: <error>
Activity trace panel, read public/activity-trace-panel.js:70 Could not read <file>: <error>
Activity trace panel, delete public/activity-trace-panel.js:133 Delete failed: <error>
Viewer panel (Memory / Work Files), delete public/viewer-panel.js:290, :293 Delete failed: <error>
Sidebar, remap missing project public/sidebar.js:1412 Failed to remap: <error>
Sidebar, delete worktree public/sidebar.js:1469 Failed to delete worktree: <error>

Left as is on purpose: the "Scheduled task already running" information in guardResume (public/app.js:1931, public/resume-guard.js:20) belongs to #567.

Expected, per the #566 rule: each failure says what happened and what to do, on the surface where it happened. Where a panel exists, an inline error next to the thing that failed (brick B9 in docs/product/BUILDING-BLOCKS.md); otherwise a B8 error notice that stays until dismissed. Decide per site whether a modal is still warranted (a failed save with unsaved edits may be).

Activity

  1. devsuitup commented on Oct 28, 2026

    @devsuitup
    OwnerAuthor

    Same rule as #835 (#566: a refusal says what to do), on another surface.

  2. devsuitup commented on Oct 29, 2026

    @devsuitup
    OwnerAuthor

    Re-checked against main 2fb1779 (audit of 2026-10-29, recommendation 5). The sites in the table have moved; one is done:

    Surface Site today Status
    File panel, save public/file-panel.js:541, :544 still appAlert
    Activity trace panel, read public/activity-trace-panel.js:70 still appAlert
    Activity trace panel, delete public/activity-trace-panel.js:133 still appAlert
    Viewer panel, delete public/viewer-panel.js:290, :293 still appAlert
    Sidebar, remap missing project public/sidebar.js:1754 still appAlert
    Sidebar, delete worktree public/sidebar.js:1806-1836, :2756 done: showSessionActionFailure (B8)

    That is 7 appAlert calls left, all "X failed: ", none saying what to do.

    The audit proposes one reportFailure(op, err). showSessionActionFailure(operation, session, error, recovery, onRetry, …) in public/app-notices.js:17 already is that helper for row actions; for panels the rule here is B9 inline first, so a second generic helper is not obviously needed. Suggest reusing showSessionActionFailure / showAppNotice where no panel exists rather than adding a new function.

    Two silent failures the audit found, outside this issue's table — proposed as a separate issue rather than widening this one:

    • search-worker-client.js:78-82: a search worker reply with msg.error resolves [], and drainPending() (:51-53, called on worker error/exit at :90, :101, :163) does the same. The user sees "no results" instead of "search failed".
    • 19 loadProjects() calls in public/*.js end in .catch(console.warn): a failed reload leaves a stale sidebar with no notice.

    Acceptance for the remaining 7 sites (unchanged from the issue): each failure says what happened and what to do, inline (B9) where a panel exists, otherwise a B8 notice; a DOM test per site asserts no appAlert call and the presence of the notice/inline text.

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