View Issue Details

IDProjectCategoryView StatusLast Update
0012030Talerexchange AML officer webuipublic2026-11-10 23:42
Reporterbot-cg [agent] Assigned ToResolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicatorCM_7  
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeveritytweakReproducibilityhave not tried
Status newResolutionopen 
Summary0012030: AML decision wizard: 'Add proposed rule' editor opens without focus
DescriptionWhat happens:
In step 5 ('Transaction rules'), 'Add rule' opens the inline rule editor and at the same time disables itself (disabled={editor !== undefined}), so keyboard focus is dropped to BODY. 'Edit' on a rule row opens the same editor above the rules table, while focus stays on that row's Edit button further down. Closing the editor already returns focus to 'Add rule' (closeEditor), so only the opening half was missing.

Expected:
The editor's first field, the 'Operation type' choice group, is focused when the editor opens.

Where:
  - packages/taler-exchange-aml-webui/src/pages/decision/Rules.tsx:196
  - packages/taler-exchange-aml-webui/src/pages/decision/Rules.tsx:385

Measured in headless Chromium (document.activeElement):
  before: BODY (nothing focused)
  after: BUTTON 'Deposit' (first Operation type choice)

Depends on: "web-util: Forms: `<FormUI focus>` and the per-field `focus` prop never focus anything" (sibling issue in this tree); without it this fix has no effect.

Proposed fix:
Pass `focus` to RuleEditor's FormUI. The working-tree web-util InputChoiceHorizontal then focuses the first enabled choice button.

Patch against taler-typescript-core master attached; the same change is committed on branch dev/bots/autofocus (durian). Screenshots attached (focused element outlined in red): 'before' is master, 'after' is with the patch.

Verified: tsc ok; AML unit tests 69/69 (Rules.test included); screenshot (TransactionRules story, after clicking 'Add rule'). Caveat for web-util: when editing an existing rule, focus goes to the first choice and not the selected one (see notes).
TagsNo tags attached.
Attached Files
aml--rule-editor.diff (669 bytes)   
diff --git a/packages/taler-exchange-aml-webui/src/pages/decision/Rules.tsx b/packages/taler-exchange-aml-webui/src/pages/decision/Rules.tsx
index f8e6388f9..8d6822842 100644
--- a/packages/taler-exchange-aml-webui/src/pages/decision/Rules.tsx
+++ b/packages/taler-exchange-aml-webui/src/pages/decision/Rules.tsx
@@ -193,7 +193,7 @@ function RuleEditor({
           <i18n.Translate>Add proposed rule</i18n.Translate>
         )}
       </h3>
-      <FormUI design={ruleFormDesign} model={ruleForm.model} />
+      <FormUI design={ruleFormDesign} model={ruleForm.model} focus />
       <div class="mt-4 flex justify-end gap-3">
         <button
           type="button"
aml--rule-editor.diff (669 bytes)   
aml--rule-editor--before.png (119,385 bytes)   
aml--rule-editor--before.png (119,385 bytes)   
aml--rule-editor--after.png (119,439 bytes)   
aml--rule-editor--after.png (119,439 bytes)   

Required notifications

Address or linkRemarkAdded byNotifiedActions

Relationships

related to 0012057 new web-util: Forms: `<FormUI focus>` and the per-field `focus` prop never focus anything 
child of 0012024 new Web UIs (bank, wallet, exchange AML/KYC, challenger, auditor, web-util forms): dialogs and single-purpose forms open without keyboard focus on the obvious field 

Activities

Issue History

Date ModifiedUsernameFieldChange
2026-11-10 23:42bot-cgNew Issue
2026-11-10 23:42bot-cgRelationship addedchild of 0012024
2026-11-10 23:42bot-cgRelationship addedrelated to 0012057
2026-11-10 23:42bot-cgFile Added: aml--rule-editor.diff
2026-11-10 23:42bot-cgFile Added: aml--rule-editor--before.png
2026-11-10 23:42bot-cgFile Added: aml--rule-editor--after.png