Files
MyAiConfiguration/shared/rules/ui-ux/references/destructive-and-error-prevention.md
T
Julian LechnerandClaude Opus 5.5 6159c6373c
CI / CI configuration security checks (pull_request) Successful in 2s
CI / Capabilities and shell quality (pull_request) Successful in 15s
CI / Python tests and compilation (pull_request) Successful in 36s
CI / QMD unit tests (pull_request) Successful in 7s
CI / Build and inspect generated packages (pull_request) Successful in 16s
CI / Bash integration and installation guards (pull_request) Failing after 51s
CI / PowerShell tests on Ubuntu (pull_request) Failing after 1m45s
CI / Installed client configuration smoke tests (pull_request) Canceled after 1m24s
docs(rules): fix contradictions, update technical rules, enforce rule structure
- Resolve contradictions: authorization is never a skipped "boundary check";
  one browser token policy (BFF/HttpOnly cookies first, RFC 10017); one
  sanitizer-bypass rule; Angular responses are unknown until validated.
- Add security rules for AI/LLM integration and Java XXE, concrete crypto
  and password-hashing parameters, and RFC 8725 JWT validation.
- Update version-dependent guidance after checking official sources:
  Angular 22, TypeScript 6/7, Node 24+, .NET 10/C# 14, JDK 21-25, Spring
  Boot 4; add a Spring Boot and Spring Security topic.
- Give every rule a unique level-1 title and scope line, keep language
  security files to language specifics, and fix routing for inbound vs
  outbound HTTP, XML parsing, and WPF/Angular parent rules.
- Validate rule structure and routing in validate-config.py, with tests.
- Fix CI issues found by a local run: shellcheck directive order, pinned
  ruff rule set, Invoke-Python test mock, CRLF-tolerant package checks,
  Windows-only credential test, and refreshed prompt-budget baselines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 10:51:08 +01:00

73 lines
2.8 KiB
Markdown

# UI Destructive Actions and Error Prevention
Apply these rules when designing destructive or irreversible actions, defaults, undo, and safeguards against user error.
## Destructive Actions
* Clearly label destructive actions.
* Use confirmations for irreversible or high-impact operations.
* Explain the consequence before confirmation.
* Prefer reversible actions when possible.
* Offer undo where practical.
* Do not use generic confirmation text for destructive operations.
* Make the safe action visually distinct.
* Do not preselect destructive choices.
## Error Prevention
* Prevent invalid actions before they occur where practical.
* Use constraints and suitable controls instead of relying only on validation errors.
* Provide sensible defaults.
* Confirm only high-impact decisions.
* Warn users before losing unsaved changes.
* Do not clear entered data unexpectedly.
* Avoid ambiguous state transitions.
* Make dependencies between fields or actions visible.
## Consistency
* Similar problems should have similar UI solutions.
* Similar actions should use the same wording and placement.
* Do not introduce custom patterns when an existing pattern already solves the problem.
* Reuse components and design tokens.
* Keep interaction behavior consistent across the application.
* Preserve platform conventions unless there is a strong reason not to.
## User Control
* Keep users in control of important actions.
* Do not perform surprising destructive actions automatically.
* Do not change user data without a clear action or established behavior.
* Make automatic behavior visible when it materially affects the user.
* Allow users to cancel long-running operations where practical.
* Allow recovery from mistakes where possible.
* Avoid dark patterns.
* Never manipulate users into actions they did not intend.
## Progressive Disclosure
* Show the most important options first.
* Hide advanced complexity until it is needed.
* Do not overwhelm users with every possible setting at once.
* Keep advanced options discoverable.
* Avoid forcing expert workflows on normal users.
* Avoid hiding frequently used functionality behind excessive menus.
## Performance Perception
* Optimize perceived performance as well as actual performance.
* Show useful content as early as possible.
* Avoid blocking initial rendering on non-critical data.
* Use skeletons only when they improve comprehension.
* Avoid fake progress.
* Do not use loading animations to mask avoidable slowness.
* Keep interactions responsive even while background work continues.
## Defaults
* Choose safe and sensible defaults.
* Defaults should match the most common expected user intent.
* Avoid defaults with destructive consequences.
* Preserve user preferences when appropriate.
* Do not force repeated configuration for common workflows.