05 · Nested groups

When does the "+ Add group" affordance appear?

System-thinking artefact
Decision artefact

The brief flags nesting as advanced. So how do we let it exist without cluttering the 95% case where it isn't needed?

Three options compared. Recommendation, reasoning, and the trade-offs the system has to live with.

Option A · Alternative

Always visible

"+ Add group" sits next to "+ Add condition" from the start, regardless of rule complexity.

AND
+ Add condition + Add group
When it appears: always. From the moment the user opens the rule builder.

Pros

  • Most discoverable
  • No mode shifts
  • One mental model

Cons

  • Clutters the simple case
  • Beginners ask "what's a group?"
  • Implies nesting is normal
Option B · Recommended

Deferred until needed

"+ Add group" appears only once the rule has three or more conditions. Surfaces complexity when complexity has already arrived.

AND
AND
+ Add condition + Add group
When it appears: after the third condition is added. Stays visible from then on.

Pros

  • Beginner has clean canvas
  • Advanced earns the affordance
  • No mode toggle

Cons

  • Discoverable only by use
  • Needs help text or onboarding
Option C · Rejected

Behind an Advanced toggle

"+ Add group" hidden until the user flips an Advanced mode switch. Mode toggles the whole editor experience.

Simple ↔ Advanced
AND
+ Add condition + Add group (hidden)
When it appears: only after the user flips Advanced mode on, regardless of how many conditions exist.

Pros

  • Clear separation of intent
  • Beginner never sees groups

Cons

  • Users self-declare as "advanced" without context
  • Mode shifts confuse
  • Discoverability is poor
  • Two UIs to maintain

Why deferred wins

Progressive disclosure beats mode toggles because it tracks the user's actual complexity, not a self-reported skill level. By the third condition, the user has already proven that the rule isn't trivial. Showing them a way to organise it at exactly that moment is helpful. Showing it on first load is noisy.

The trade-off is discoverability. A user who never reaches three conditions may not learn that groups exist. We accept this because users with simple rules don't need groups, and users with complex rules will hit the threshold organically. The cost is a help link or one-time tooltip the first time the button appears, which is far cheaper than maintaining a two-mode editor.

Edge cases flagged for later: deeply nested rules (groups inside groups) are out of scope. If they become necessary, the visual nesting will break down at the second level. At that point the right answer is probably a saved-rule reference inside another rule, not deeper visual nesting.