You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2026/08/30 20:30:22 UTC
(causeway) 03/03: docs(openspec): archive destructive action confirmation
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch htmx
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit 079d56ec519efce961fd8c0a23fb4e45edf09053
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sun Aug 30 22:24:03 2026 +0200
docs(openspec): archive destructive action confirmation
---
.../.openspec.yaml | 0
.../design.md | 0
.../proposal.md | 0
.../specs/domain-web-components/spec.md | 0
.../generic-htmx-web-component-viewer/spec.md | 0
.../specs/rich-graphql-member-metadata/spec.md | 0
.../tasks.md | 0
openspec/specs/domain-web-components/spec.md | 45 ++++++++++++++++++++++
.../generic-htmx-web-component-viewer/spec.md | 36 +++++++++++++++++
.../specs/rich-graphql-member-metadata/spec.md | 21 ++++++++++
10 files changed, 102 insertions(+)
diff --git a/openspec/changes/confirm-destructive-actions/.openspec.yaml b/openspec/changes/archive/2026-08-30-confirm-destructive-actions/.openspec.yaml
similarity index 100%
rename from openspec/changes/confirm-destructive-actions/.openspec.yaml
rename to openspec/changes/archive/2026-08-30-confirm-destructive-actions/.openspec.yaml
diff --git a/openspec/changes/confirm-destructive-actions/design.md b/openspec/changes/archive/2026-08-30-confirm-destructive-actions/design.md
similarity index 100%
rename from openspec/changes/confirm-destructive-actions/design.md
rename to openspec/changes/archive/2026-08-30-confirm-destructive-actions/design.md
diff --git a/openspec/changes/confirm-destructive-actions/proposal.md b/openspec/changes/archive/2026-08-30-confirm-destructive-actions/proposal.md
similarity index 100%
rename from openspec/changes/confirm-destructive-actions/proposal.md
rename to openspec/changes/archive/2026-08-30-confirm-destructive-actions/proposal.md
diff --git a/openspec/changes/confirm-destructive-actions/specs/domain-web-components/spec.md b/openspec/changes/archive/2026-08-30-confirm-destructive-actions/specs/domain-web-components/spec.md
similarity index 100%
rename from openspec/changes/confirm-destructive-actions/specs/domain-web-components/spec.md
rename to openspec/changes/archive/2026-08-30-confirm-destructive-actions/specs/domain-web-components/spec.md
diff --git a/openspec/changes/confirm-destructive-actions/specs/generic-htmx-web-component-viewer/spec.md b/openspec/changes/archive/2026-08-30-confirm-destructive-actions/specs/generic-htmx-web-component-viewer/spec.md
similarity index 100%
rename from openspec/changes/confirm-destructive-actions/specs/generic-htmx-web-component-viewer/spec.md
rename to openspec/changes/archive/2026-08-30-confirm-destructive-actions/specs/generic-htmx-web-component-viewer/spec.md
diff --git a/openspec/changes/confirm-destructive-actions/specs/rich-graphql-member-metadata/spec.md b/openspec/changes/archive/2026-08-30-confirm-destructive-actions/specs/rich-graphql-member-metadata/spec.md
similarity index 100%
rename from openspec/changes/confirm-destructive-actions/specs/rich-graphql-member-metadata/spec.md
rename to openspec/changes/archive/2026-08-30-confirm-destructive-actions/specs/rich-graphql-member-metadata/spec.md
diff --git a/openspec/changes/confirm-destructive-actions/tasks.md b/openspec/changes/archive/2026-08-30-confirm-destructive-actions/tasks.md
similarity index 100%
rename from openspec/changes/confirm-destructive-actions/tasks.md
rename to openspec/changes/archive/2026-08-30-confirm-destructive-actions/tasks.md
diff --git a/openspec/specs/domain-web-components/spec.md b/openspec/specs/domain-web-components/spec.md
index bba62d5e500..a7356806e9c 100644
--- a/openspec/specs/domain-web-components/spec.md
+++ b/openspec/specs/domain-web-components/spec.md
@@ -2018,3 +2018,48 @@ Locale presentation MUST NOT change the ISO lexical value retained by the tempor
- **WHEN** the platform exposes localized month names, weekday names, and first-day-of-week information
- **THEN** the date chooser uses those locale settings
- **AND** date selection still produces the same ISO local semantic value
+
+### Requirement: Canonical are-you-sure action confirmation
+The standard interaction controller SHALL require explicit accessible confirmation before invoking an action whose canonical rich GraphQL metadata reports `areYouSure` as true.
+HTML-authored component presentation MUST NOT suppress, fabricate, or override that canonical requirement.
+
+#### Scenario: Parameterless action requires confirmation
+- **WHEN** an enabled parameterless action with `areYouSure` metadata is activated
+- **THEN** the controller presents confirmation before invoking the action
+- **AND** the action is invoked only after the user explicitly confirms
+
+#### Scenario: Parameterized action requires confirmation
+- **WHEN** an action with `areYouSure` metadata has parameters
+- **AND** the user submits values that pass authoritative parameter preparation and whole-action validation
+- **THEN** the controller presents confirmation with the validated pending values retained
+- **AND** invokes only after the user explicitly confirms
+
+#### Scenario: Parameterized confirmation is declined
+- **WHEN** a user cancels or presses Escape from confirmation for a parameterized action
+- **THEN** the controller returns to the parameter prompt with pending values intact
+- **AND** does not invoke the action
+
+#### Scenario: Parameterless confirmation is declined
+- **WHEN** a user cancels or presses Escape from confirmation for a parameterless action
+- **THEN** the controller closes the prompt without invocation
+- **AND** restores focus to the originating action affordance
+
+#### Scenario: Ordinary action is activated
+- **WHEN** an enabled action's canonical metadata reports `areYouSure` as false or the compatible schema does not expose the field
+- **THEN** the controller retains the established parameterless or parameterized interaction flow
+- **AND** does not infer confirmation from presentation or operation placement
+
+#### Scenario: Confirmation is presented accessibly
+- **WHEN** an action enters confirmation state
+- **THEN** one controller-owned modal dialog identifies the effective action name and destructive decision
+- **AND** exposes keyboard-operable Confirm and Cancel controls with deterministic focus and stable automation hooks
+
+#### Scenario: Confirmation is activated repeatedly
+- **WHEN** the user confirms an action and invocation begins
+- **THEN** confirmation controls are gated against repeated activation
+- **AND** the controller invokes the action at most once for that prompt generation
+
+#### Scenario: Action is disabled
+- **WHEN** authoritative action state supplies a disabled reason
+- **THEN** activation remains unavailable and the reason remains accessible
+- **AND** no confirmation prompt opens
diff --git a/openspec/specs/generic-htmx-web-component-viewer/spec.md b/openspec/specs/generic-htmx-web-component-viewer/spec.md
index 8e93f7dc41c..0742b32e94b 100644
--- a/openspec/specs/generic-htmx-web-component-viewer/spec.md
+++ b/openspec/specs/generic-htmx-web-component-viewer/spec.md
@@ -808,3 +808,39 @@ Petclinic custom HTML pages SHALL demonstrate optional `<cw-parameter>` presenta
- **WHEN** the same or another Petclinic prompt contains an authoritative parameter without a matching declaration
- **THEN** that parameter retains its established canonical name, description, and qualified editor
- **AND** no HTML declaration is required for it to participate in validation or invocation
+
+### Requirement: Faithful Petclinic owner deletion policy
+The Petclinic sample SHALL retain the pinned original application's observable owner-deletion policy while demonstrating standard are-you-sure confirmation through the HTMX Web Components viewer.
+
+#### Scenario: Owner has related visits
+- **WHEN** a Petclinic owner has one or more related visits
+- **THEN** Delete is disabled with the reason `This owner has N visits` using the authoritative count
+- **AND** the viewer does not offer confirmation or attempt deletion
+
+#### Scenario: Owner has no related visits
+- **WHEN** a Petclinic owner has no related visits
+- **THEN** Delete remains enabled with canonical are-you-sure metadata
+- **AND** its description does not claim that related visits will be deleted
+
+#### Scenario: Eligible deletion is cancelled
+- **WHEN** a user activates Delete for an eligible disposable owner and declines confirmation
+- **THEN** the owner remains available on its canonical route
+- **AND** no delete mutation is issued
+
+#### Scenario: Eligible deletion is confirmed
+- **WHEN** a user activates Delete for an eligible disposable owner and explicitly confirms
+- **THEN** the action completes through the established GraphQL mutation and void-result policy
+- **AND** the deleted object route returns to the configured home route after post-action refresh establishes that the owner no longer exists
+
+### Requirement: Petclinic destructive-action regression coverage
+Petclinic integration and opt-in browser acceptance SHALL verify canonical confirmation metadata, visit-based disable behavior, cancellation, successful confirmed deletion, focus, routing, and error monitoring.
+
+#### Scenario: Rich GraphQL delete state is queried
+- **WHEN** integration coverage reads Delete for a fixture owner with visits and an eligible owner without visits
+- **THEN** both expose `areYouSure` as true
+- **AND** only the fixture owner exposes the visit-count disabled reason
+
+#### Scenario: Browser exercises destructive deletion
+- **WHEN** browser automation cancels one eligible deletion and confirms another
+- **THEN** focus and route outcomes follow the standard interaction and void-action recovery contracts
+- **AND** no unexpected console, page, resource, GraphQL, or referential-integrity failure occurs
diff --git a/openspec/specs/rich-graphql-member-metadata/spec.md b/openspec/specs/rich-graphql-member-metadata/spec.md
index 0789d3b0681..c73ed02043d 100644
--- a/openspec/specs/rich-graphql-member-metadata/spec.md
+++ b/openspec/specs/rich-graphql-member-metadata/spec.md
@@ -136,3 +136,24 @@ It MUST NOT execute imperative icon logic or expose arbitrary action layout inte
- **WHEN** icon behavior would require invoking domain code
- **THEN** static icon metadata returns null
- **AND** metadata resolution remains side-effect-free
+
+### Requirement: Static action confirmation metadata
+The shared rich member metadata object SHALL expose nullable `areYouSure` metadata derived from canonical action semantics without invoking domain behavior or exposing the complete action-semantics model.
+
+#### Scenario: Action requires confirmation
+- **WHEN** an action's canonical semantics have are-you-sure behavior
+- **THEN** `areYouSure` returns true
+
+#### Scenario: Action does not require confirmation
+- **WHEN** an action's canonical semantics do not have are-you-sure behavior
+- **THEN** `areYouSure` returns false
+- **AND** no confirmation requirement is inferred from the action's name, icon, description, or mutation placement
+
+#### Scenario: Metadata belongs to another wrapper
+- **WHEN** property, collection, or action-parameter metadata is requested
+- **THEN** `areYouSure` returns null
+- **AND** metadata resolution does not invoke domain-object methods
+
+#### Scenario: Existing client omits confirmation metadata
+- **WHEN** an existing GraphQL document does not select `areYouSure`
+- **THEN** its operation and response shape remain unchanged