Skip to content

Confirmations get the condition builder their copy promised - #40

Merged
AllTerrainDeveloper merged 1 commit into
mainfrom
feature/confirmation-conditions
Aug 22, 2026
Merged

AllTerrainDeveloper merged 1 commit into
mainfrom
feature/confirmation-conditions

Conversation

@AllTerrainDeveloper

Copy link
Copy Markdown
Owner

What

Two reports from design QA on a dark desktop theme, plus the feature gap behind one of them:

  1. The Confirmations tab said "The first one whose conditions match is the one they see" — with no condition builder anywhere. The schema carries logic on every confirmation, and atf_resolve_confirmation() / atf_notification_* evaluate it on every submit; the builder just never drew an editor. Both the confirmations and notifications panes now get a Conditions section — "Only use/send this … sometimes", all/any matching, and the same choice-aware rule cards fields use, extracted into a shared logicRulesEditor().

  2. The success-screen style tiles were illegible on dark desktop themes. They're <button>s, which inherit neither ink nor type — the UA paints them black — so every monochrome glyph (¶, ✓, ⌨) vanished into its tile. color: inherit; font: inherit.

The bug underneath

Building the editor exposed a real data-loss bug: rebindCanvas() skipped all non-Build tabs on the claim that other panes "write through this.schema". The confirmations/notifications panes don't — every control closes over the object it was rendered from, so after any autosave, a Name typed or a rule added wrote to an orphaned copy and vanished at the next save, with no error anywhere. Both tabs rebind now; the existing focus guard keeps rebuilds from landing mid-keystroke.

Verified on the 8889 QA site under the dark brand theme: tiles legible, conditions editable, rules survive the autosave round-trip (the exact sequence that silently lost data before), demo form restored afterwards. tsc --noEmit clean, 369 vitest tests pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_0119U4sRRWGcTQdwYreTwpAp

"The first one whose conditions match is the one they see" has stood
above the confirmations list since it existed — and there was no way
to give a confirmation a condition. The schema carried the logic
block, `atf_resolve_confirmation()` evaluated it on every submit, and
the builder never drew an editor for it. Notifications had the same
silent gap.

The rule cards, joiners and Add-rule button move out of the field
editor into a shared `logicRulesEditor()`, and a new Conditions
section — "Only use this confirmation sometimes", all/any, the same
choice-aware rule cards — joins both panes, writing the same Logic
block fields write.

Two bugs fell out of building it:

- `rebindCanvas()` skipped every non-Build tab on the claim that the
  other panes write through `this.schema`. The confirmations and
  notifications panes do not — every control closes over the object it
  was rendered from, so after any autosave a Name typed or a rule
  added went to an orphaned copy and vanished at the next save with no
  error anywhere. Both tabs rebind now; the focus guard already keeps
  a rebuild from landing mid-keystroke.

- The success-screen style tiles are <button>s, which inherit neither
  ink nor type from the pane — the UA gives them black — so on a dark
  desktop theme every monochrome glyph (¶, ✓, ⌨) vanished into its
  tile. They say `color: inherit; font: inherit` now.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119U4sRRWGcTQdwYreTwpAp
@AllTerrainDeveloper
AllTerrainDeveloper merged commit d4de48d into main Aug 22, 2026
3 checks passed
@AllTerrainDeveloper
AllTerrainDeveloper deleted the feature/confirmation-conditions branch August 22, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant