View Issue Details

IDProjectCategoryView StatusLast Update
0012045Talerchallengerpublic2026-11-10 23:43
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 
Summary0012045: Challenger: developer 'Create a verification session' form does not focus the client password (or redirect URL)
DescriptionWhat happens:
Setup supports `focus` (ref={focus ? doAutoFocus : undefined} on the password field), but Routing never passed it, so #/setup/<client> focused nothing. Had it been passed, the password would be focused even when `secret` came in the URL and the field was read-only. Measured: #/setup/client1 = BODY; #/setup/client1?secret=... = BODY.

Expected:
Focus is on the first field the developer still has to fill in: the password, or the redirect URL when the secret is given in the URL. Nothing is focused when both are given.

Where:
  - packages/challenger-webui/src/pages/Setup.tsx:90
  - packages/challenger-webui/src/Routing.tsx:139

Measured in headless Chromium (document.activeElement):
  before: BODY (setup, setup-with-secret)
  after: INPUT#password (setup); INPUT#redirect_url (setup-with-secret, see challenger--setup-with-secret--after.png)

Proposed fix:
Routing passes `focus` to Setup. Setup computes which field is the first still editable and attaches the existing doAutoFocus ref to that field only.

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 --noEmit ok; eslint + prettier clean; rendered in Chromium, before and after
TagsNo tags attached.
Attached Files
challenger--setup-focus.diff (1,945 bytes)   
diff --git a/packages/challenger-webui/src/Routing.tsx b/packages/challenger-webui/src/Routing.tsx
index 5723d901d..8ad764e54 100644
--- a/packages/challenger-webui/src/Routing.tsx
+++ b/packages/challenger-webui/src/Routing.tsx
@@ -137,6 +137,7 @@ function PublicRouting(): VNode {
 
       return (
         <Setup
+          focus
           clientId={safeDecodeURIComponent(location.values.client)}
           secret={secret}
           redirectURL={redirectURL}
diff --git a/packages/challenger-webui/src/pages/Setup.tsx b/packages/challenger-webui/src/pages/Setup.tsx
index c76ac982e..dc084e818 100644
--- a/packages/challenger-webui/src/pages/Setup.tsx
+++ b/packages/challenger-webui/src/pages/Setup.tsx
@@ -85,6 +85,15 @@ export function Setup({ clientId, secret, redirectURL, focus }: Props): VNode {
         ? invalidUrlMessage
         : undefined,
   });
+  // Values passed in the URL are read-only; start on the first field the
+  // developer still has to fill in.
+  const focusField = !focus
+    ? undefined
+    : secret === undefined
+      ? "password"
+      : redirectURL === undefined
+        ? "redirect_url"
+        : undefined;
   const startArgs =
     errors || !password || !url
       ? undefined
@@ -138,7 +147,7 @@ export function Setup({ clientId, secret, redirectURL, focus }: Props): VNode {
             {clientPasswordLabel}
           </label>
           <input
-            ref={focus ? doAutoFocus : undefined}
+            ref={focusField === "password" ? doAutoFocus : undefined}
             id="password"
             name="password"
             type="password"
@@ -162,6 +171,7 @@ export function Setup({ clientId, secret, redirectURL, focus }: Props): VNode {
             {redirectUrlLabel}
           </label>
           <input
+            ref={focusField === "redirect_url" ? doAutoFocus : undefined}
             id="redirect_url"
             name="redirect_url"
             type="url"
challenger--setup-focus.diff (1,945 bytes)   
challenger--setup--before.png (32,772 bytes)   
challenger--setup--before.png (32,772 bytes)   
challenger--setup--after.png (33,509 bytes)   
challenger--setup--after.png (33,509 bytes)   

Required notifications

Address or linkRemarkAdded byNotifiedActions

Relationships

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:43bot-cgFile Added: challenger--setup-focus.diff
2026-11-10 23:43bot-cgFile Added: challenger--setup--before.png
2026-11-10 23:43bot-cgFile Added: challenger--setup--after.png