View Issue Details

IDProjectCategoryView StatusLast Update
0012029Talerexchange 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 
Summary0012029: AML decision wizard: 'Create custom measure' does not focus the Name field
DescriptionWhat happens:
In step 4 ('Immediate measures'), 'Add custom measure', or 'Customize a copy' on an exchange measure, replaces the step content with the 'Create custom measure' form (or the guided verification editor for e-mail/phone/postal templates). The button that was clicked is removed, so focus falls back to BODY and the officer has to find the Name field. With 'Customize a copy' the name is prefilled with the original, which collides and has to be changed.

Expected:
The Name input, the first field of both editors, is focused when a new measure is being created.

Where:
  - packages/taler-exchange-aml-webui/src/components/NewMeasure.tsx:280
  - packages/taler-exchange-aml-webui/src/components/NewMeasure.tsx:476

Measured in headless Chromium (document.activeElement):
  before: BODY (nothing focused)
  after: INPUT[name=name]

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={addingNew}` to the FormUI of NormalMeasureForm and VerificationMeasureForm. Editing an existing custom measure does not take focus. There the name is locked, and the framework would skip to 'Program', a combobox whose option list pops open on focus. A short comment explains this.

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; screenshot (ImmediateMeasures story, after clicking 'Add custom measure'); typing into the Program combobox afterwards keeps focus there
TagsNo tags attached.
Attached Files
aml--new-measure.diff (1,703 bytes)   
diff --git a/packages/taler-exchange-aml-webui/src/components/NewMeasure.tsx b/packages/taler-exchange-aml-webui/src/components/NewMeasure.tsx
index ef87d75bd..df96bc2d6 100644
--- a/packages/taler-exchange-aml-webui/src/components/NewMeasure.tsx
+++ b/packages/taler-exchange-aml-webui/src/components/NewMeasure.tsx
@@ -272,7 +272,14 @@ function NormalMeasureForm({
           </i18n.Translate>
         </p>
       </div>
-      <FormUI design={design} model={form.model} onSubmit={submitMeasure} />
+      {/* Only a new measure needs a name typed first; when editing, the
+          name is locked and the next field is a list that pops open. */}
+      <FormUI
+        design={design}
+        model={form.model}
+        focus={addingNew}
+        onSubmit={submitMeasure}
+      />
       <div class="flex flex-wrap gap-3 border-t border-gray-200 pt-5 dark:border-gray-700">
         <button type="button" onClick={onCancel} class={secondaryButtonClass}>
           <i18n.Translate>Cancel</i18n.Translate>
@@ -461,7 +468,14 @@ function VerificationMeasureForm({
 
   return (
     <div class="space-y-6">
-      <FormUI design={design} model={form.model} onSubmit={submitMeasure} />
+      {/* Only a new measure needs a name typed first; when editing, the
+          name is locked and the next field is a list that pops open. */}
+      <FormUI
+        design={design}
+        model={form.model}
+        focus={addingNew}
+        onSubmit={submitMeasure}
+      />
       <div class="flex flex-wrap gap-3 border-t border-gray-200 pt-5 dark:border-gray-700">
         <button type="button" onClick={onCancel} class={secondaryButtonClass}>
           <i18n.Translate>Cancel</i18n.Translate>
aml--new-measure.diff (1,703 bytes)   
aml--new-measure--before.png (115,504 bytes)   
aml--new-measure--before.png (115,504 bytes)   
aml--new-measure--after.png (116,169 bytes)   
aml--new-measure--after.png (116,169 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--new-measure.diff
2026-11-10 23:42bot-cgFile Added: aml--new-measure--before.png
2026-11-10 23:42bot-cgFile Added: aml--new-measure--after.png