From 187d504ab72a013c53556bf97e052141d0756fe1 Mon Sep 17 00:00:00 2001 From: Csaba Tuncsik Date: Fri, 4 Sep 2026 12:08:24 +0000 Subject: [PATCH] chore: Rewrite the cubic Frontend review agent rules (#37458) --- .../frontend/component-wrappers.md | 21 ++++++++ .../review-rules/frontend/design-system.md | 48 ++++++++++++++----- .agents/review-rules/frontend/i18n.md | 18 +++++++ .../review-rules/frontend/vue-correctness.md | 43 +++++++++++++++++ .../frontend/workflow-document-store.md | 37 -------------- .agents/review-rules/testing/coverage.md | 9 +++- cubic.yaml | 14 ++++-- 7 files changed, 136 insertions(+), 54 deletions(-) create mode 100644 .agents/review-rules/frontend/component-wrappers.md create mode 100644 .agents/review-rules/frontend/i18n.md create mode 100644 .agents/review-rules/frontend/vue-correctness.md delete mode 100644 .agents/review-rules/frontend/workflow-document-store.md diff --git a/.agents/review-rules/frontend/component-wrappers.md b/.agents/review-rules/frontend/component-wrappers.md new file mode 100644 index 00000000000..7bd69cc7e15 --- /dev/null +++ b/.agents/review-rules/frontend/component-wrappers.md @@ -0,0 +1,21 @@ +# Wrapping a third-party component + +Applies to: `packages/frontend`. + +`@n8n/design-system` wraps reka-ui, Element Plus, TipTap and CodeMirror. The +recurring defect is assuming the wrapper passes something through, or that a +library default is what you want. + +- **Attributes are forwarded only if the wrapper forwards them.** `N8nSelect` + binds just `$props` and `on*` listeners to `ElSelect`, so an `aria-label`, + `data-test-id` or native attribute set on it lands on the outer `
` and + never reaches the control. Check the wrapper's `v-bind`, and prefer its own + prop where one exists. +- **Library defaults are behaviour.** A dialog focus trap focusing the first + tabbable child opens a filterable select on mount. Flag a handler + suppressing a library behaviour unconditionally when one state needs it, + e.g. a blanket `@interact-outside` `preventDefault`. +- **Vendor class names are contracts.** A `:global()` selector against one + stops matching silently when the library renames it. +- An accessible name computing to empty for an icon-only control, or a + `