githubnext/chopinPublic

Let's compose rich plans together

[Design] Unify destructive actions and error states

triage/human-response
MA

Base branch: main Branch: maggie/design-error-and-destructive-states Depends on: None

## Goal Design a coherent system for destructive actions and inline, recoverable, and terminal errors across Chopin.

## Context From Planning - The destructive dialog and all error specimens in `/design-audit#surfaces` currently feel visually crude and inconsistent. - Destructive buttons, warnings, validation errors, retryable failures, and terminal failures need related semantics without making every error equally loud. - This is a proper design pass requiring human review, not a CSS-only color adjustment.

## Current Behavior Errors are presented through a mix of plain destructive text, `TerminalAlert`, ad hoc banners, and dialog-local copy. Destructive actions use related colors but do not form a clear severity, placement, or recovery system.

## Desired Behavior Define reusable alert/status and destructive-action patterns with clear severity, readable hierarchy, consistent actions, accessible announcements, and calm visual weight appropriate to the consequence.

## Acceptance Criteria - [ ] The design audit covers inline validation, recoverable error with retry, terminal error, destructive confirmation, destructive failure, and disabled/busy destructive action. - [ ] Each pattern defines icon, title/body hierarchy, action placement, color role, surface, spacing, and announcement semantics. - [ ] Errors remain understandable without color alone and meet contrast requirements. - [ ] Retry, cancel, and destructive confirmation keep their existing behavior and focus management. - [ ] A shared primitive replaces duplicate presentation while retaining consumer-specific copy and recovery behavior. - [ ] Maggie approves the audit specimens before production migration.

## Verification Commands - `bun run types` - `bun run ci` - `bun run design-audit:test` - `bun test`

## Primary Surfaces - `/design-audit#surfaces` - `TerminalAlert` consumers in `apps/web` - Document deletion and other destructive dialogs - Research, navigation, and composer failures

## Expected PR Checks - Repo required checks

## Report Requirements - State matrix and before/after screenshots - Accessibility behavior for alerts and dialogs - Production consumers migrated - Deferred edge cases

## Implementation Notes - Preserve the distinction between validation, recoverable, and terminal failures. - Preserve persistence-before-publication and existing action semantics; presentation must not acknowledge work early. - Build on shared tokens/components rather than bespoke dialog and banner CSS.

## Stop Conditions - Severity semantics or copy require a product decision. - A proposed shared component cannot preserve a consumer's focus or recovery contract.

  1. lavaman131referenced this in [Design] Rebuild the workflow run card with assistant-ui Elements #307last month on GitHub

  2. lavaman131referenced this in [Design] Replace the composer @ mention picker with assistant-ui mentions #308last month on GitHub

  3. lavaman131referenced this in [Design] Conversation controls with assistant-ui Elements: message queue, stopped run, error state #309last month on GitHub

  4. lavaman131referenced this in [Design] Research and references with assistant-ui Elements #310last month on GitHub

  5. lavaman131referenced this in [Design] Decisions display with assistant-ui Elements (option list, question flow) #311last month on GitHub

  6. github-actions[bot]botadded label triage/human-responselast month on GitHub