[Bug] Registration / Verify account: SMS code field stays disabled after email verified (mdc-text-field--disabled) #10

Closed
opened 2026-04-26 18:37:21 +00:00 by spikerj · 2 comments
Owner

Environment

  • URL: learn.spikersoft.comVerify Your Account flow (registration stepper: Basic → SMS → Password → Verify).
  • Observed: Email shows Verified (green checkmarks, “Verified” on email action). SMS Verification Code* text field remains greyed out / not focusable.
  • DevTools: The Material field has class mdc-text-field--disabled on the host (disabled form control, not just styling).

Expected

After email is verified, the user can enter the SMS verification code in the SMS field (or the UI clearly explains a single required action, e.g. only “Send Code” first, without blocking data entry permanently).

Actual

  • Email verification appears complete in the UI.
  • SMS Verification Code* stays disabled, so the code cannot be typed.
  • Status copy can still imply SMS is waiting on email verification (inconsistent with email already verified).
  • Red banner: “Invalid data provided. Please check your information.”
  • Optional header chips: Client verified / Server verified (per screenshot).

Likely code area (for devs)

spikersoft-angular/projects/spikersoft/src/app/_components/registration-stepper/registration-stepper.component.ts

  • An effect() keeps the smsCode form control disabled when phoneVerified() || smsCodeExpired() || **!smsSent()** (see comments around the SMS / email verification effects).
  • If emailVerified() is true but smsSent() never becomes true (HTTP vs SignalR timing, conflict recovery, or failed resend), the input stays disabled — matches mat-form-field showing mdc-text-field--disabled.
  • Related comment in the same file: SignalR vs resendSmsCode() HTTP 400 can surface as “Invalid data provided” with SMS stuck; worth reproducing with network tab + SignalR connection state.

Suggested QA follow-up

  1. Reproduce on learn.spikersoft.com after clearing site data or using a fresh pending registration.
  2. Confirm whether Send Code was pressed and whether API returns success for SMS send.
  3. Capture Network + Console + whether SignalR connected for the pre-registration hub.

Labels: bug, frontend, registration (add in Gitea if available)

## Environment - **URL:** `learn.spikersoft.com` — **Verify Your Account** flow (registration stepper: Basic → SMS → Password → Verify). - **Observed:** Email shows **Verified** (green checkmarks, “Verified” on email action). **SMS Verification Code\*** text field remains **greyed out / not focusable**. - **DevTools:** The Material field has class **`mdc-text-field--disabled`** on the host (disabled form control, not just styling). ## Expected After email is verified, the user can **enter the SMS verification code** in the SMS field (or the UI clearly explains a single required action, e.g. only “Send Code” first, without blocking data entry permanently). ## Actual - Email verification appears complete in the UI. - **SMS Verification Code\*** stays **disabled**, so the code cannot be typed. - Status copy can still imply SMS is waiting on email verification (inconsistent with email already verified). - Red banner: **“Invalid data provided. Please check your information.”** - Optional header chips: **Client verified** / **Server verified** (per screenshot). ## Likely code area (for devs) `spikersoft-angular/projects/spikersoft/src/app/_components/registration-stepper/registration-stepper.component.ts` - An `effect()` keeps the **`smsCode` form control disabled** when `phoneVerified() || smsCodeExpired() || **!smsSent()**` (see comments around the SMS / email verification effects). - If **`emailVerified()` is true** but **`smsSent()` never becomes `true`** (HTTP vs SignalR timing, conflict recovery, or failed resend), the input stays disabled — matches `mat-form-field` showing `mdc-text-field--disabled`. - Related comment in the same file: SignalR vs `resendSmsCode()` **HTTP 400** can surface as **“Invalid data provided”** with SMS stuck; worth reproducing with network tab + SignalR connection state. ## Suggested QA follow-up 1. Reproduce on `learn.spikersoft.com` after clearing site data or using a fresh pending registration. 2. Confirm whether **Send Code** was pressed and whether API returns success for SMS send. 3. Capture **Network** + **Console** + whether **SignalR** connected for the pre-registration hub. --- **Labels:** `bug`, `frontend`, `registration` *(add in Gitea if available)*
Author
Owner

Triage: Mostly fixed -- The registration flow's verify-email REST path has been reviewed. The core SMS/email verification logic appears functional. There may be a residual edge case in the REST verify-email path that needs live reproduction testing to confirm.

**Triage: Mostly fixed** -- The registration flow's `verify-email` REST path has been reviewed. The core SMS/email verification logic appears functional. There may be a residual edge case in the REST verify-email path that needs live reproduction testing to confirm.
Author
Owner

Found and fixed the remaining REST-path stuck-disabled case in spikersoft-angular PR #58.

The SMS field's disable effect keys off !smsSent(). The SignalR email-verified path optimistically sets smsSent=true (the backend auto-dispatches the SMS when it marks email verified), but the REST verifyEmail handler only set it when response.smsSent was truthy — and the REST response doesn't always echo that flag, so the field stayed mdc-text-field--disabled with no way to type the code. PR #58 makes the REST path mirror the SignalR path (optimistic smsSent=true + start timer + latch signalREmailVerifiedHandled) when email is verified and phone isn't yet. The Resend button stays available as a fallback. Added a regression test. nx test spikersoft --filter=RegistrationStepperComponent → 58 pass. Will close once PR #58 merges.

Found and fixed the remaining REST-path stuck-disabled case in `spikersoft-angular` PR #58. The SMS field's disable effect keys off `!smsSent()`. The SignalR email-verified path optimistically sets `smsSent=true` (the backend auto-dispatches the SMS when it marks email verified), but the REST `verifyEmail` handler only set it when `response.smsSent` was truthy — and the REST response doesn't always echo that flag, so the field stayed `mdc-text-field--disabled` with no way to type the code. PR #58 makes the REST path mirror the SignalR path (optimistic `smsSent=true` + start timer + latch `signalREmailVerifiedHandled`) when email is verified and phone isn't yet. The Resend button stays available as a fallback. Added a regression test. `nx test spikersoft --filter=RegistrationStepperComponent` → 58 pass. Will close once PR #58 merges.
Sign in to join this conversation.