MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-368

6.6.5 Automation settings UI — rule list + when/if/then editor (registry-driven rows, enable/disable, caps, validation states)

Done
Description

Estimate: 35m · Depends on: 6.6.1, 6.6.4, 6.1.4, 6.5.2

The authoring surface, per the 6.6.4 design, on the 6.6.1 routes — the Automation page mounted in the reserved slot of the 6.5.2 settings-nav registry (admin-gated end to end via its access predicates: the nav entry, the page, and every route 403 for non-admins).

Build: the rule list (name, toggle, owner, last-run glyph, overflow actions, empty + cap + auto-disabled-banner states); the editor with when/if/then rows driven BY THE REGISTRIES (trigger picker → its config editor kind; action rows → per-action editors; a registry addition appears with zero UI changes — the 6.1.4 pattern, asserted with a test-only entry); the If group reusing the 6.1.4 condition-row components scoped to the rule editor (match all/any + rows + cap — one predicate UI in the product); add/remove/reorder actions; save/validation surfacing the typed 422s (caps, unknown/stale referents) per the designed states; enable/disable with the counter-reset behaviour; delete with confirm. The Automation nav entry fills the 6.5.2 reserved slot (a registry entry, not a new chrome). Strings via next-intl.

A11y: the when/if/then columns are labelled groups; every picker keyboard-complete; the toggle + last-run status announced; action reorder keyboard-operable; extends the settings strict sweep.

Acceptance criteria

  • Matches the design panel-for-panel: list states, every trigger/action config editor kind, condition rows, caps, stale-referent + 422 surfacing, the nav entry in the reserved slot.
  • Rows render from the registries (test-only-entry assertion); the condition group is the reused 6.1.4 component (no forked predicate UI); editor round-trips every rule shape 6.6.1 accepts.
  • Admin-gating: viewers/members see no Automation nav entry and get the 6.4-shaped denial on direct navigation; axe-clean; token tiers only; next-intl.
  • Integration tests over the editor wiring + validation states; coverage ≥90%.

Context refs

  • design/projects/automation.mock.html + notes (6.6.4) — THE authority
  • 6.6.1 (routes + registries — the UI contract); 6.1.4 (the condition-row components to reuse)
  • 6.5.2 (the settings-nav registry + access predicates — the mount point); the i18n threading pattern
Status
Done
Type
Sub-task