01a0b3d5 - Keep /account/mail from mounting an empty email field - #1511
Conversation
EditOverlay applies defaultValues only on first mount. After a full navigation to /account/mail, check2fa can resolve before GET /user, so the email field stayed empty. Keep the existing spinner while isUserLoading as well as checking2fa.
|
dfx pr guard EN: Thanks for your contribution! This repository follows A38. A38 pass: author local-CI report accepted for this head. DE: Danke für deinen Beitrag! In diesem Repository gilt A38. A38 pass: Autor-Local-CI-Report für diesen Head akzeptiert. Details
|
|
EN: DE: Details
Durations rounded up to whole seconds / Laufzeiten auf ganze Sekunden aufgerundet. Original report / Originalbericht{
"head": "eb7815ab2507588391662a450d57db23c0268dd4",
"private": false,
"recorded_at": "2026-09-18T10:23:13Z",
"repo": "DFXswiss/app",
"required": [
"lint"
],
"runs": [
{
"command": "agent a38 job commands --config '{\"env\":{\"CI\":\"true\"},\"npm\":{\"canaries\":[\"react-app-rewired/package.json\",\"react-scripts/package.json\",\"typescript/lib/typescript.js\",\"prettier/package.json\"],\"node_major\":20},\"steps\":[[\"npm\",\"run\",\"lint\"],[\"npm\",\"run\",\"format:md:check\"]]}'",
"duration_s": 73.07992487493902,
"exit_code": 0,
"id": "lint",
"name": "Lint and Markdown format",
"result": "pass",
"timeout_s": 600.0
}
],
"schema": "dfx-local-ci/v1"
} |
|
EN: DE: Details{
"base": "0c34dea9f15d8b891352723e86587ab590e84a87",
"head": "94ef74ccdac0cf9ee15d0e4a0b17ee51d8125968",
"phase": "applied",
"pr": 1511,
"reasons": [
"CI not green: .github/workflows/codeql.yml (in_progress)",
"CI not green: .github/workflows/pr-review-bot.yml (in_progress)",
"CI not green: .github/workflows/pr.yml (in_progress)",
"CI not green: dynamic/github-code-quality/codeql (in_progress)",
"Required CI check not green: .github/workflows/pr.yml / Lint and Markdown format",
"Required CI check not green: .github/workflows/pr.yml / Build and test",
"Required CI check not green: .github/workflows/pr.yml / Full-stack E2E",
"CI check not green: Build and test (in_progress)",
"CI check not green: Lint and Markdown format (in_progress)",
"CI check not green: Analyze (javascript-typescript) (in_progress)",
"CI check not green: Analyze (actions) (in_progress)",
"CI check not green: review (in_progress)"
],
"repo": "DFXswiss/app",
"state": "ready"
} |
The overlay empty-prefill case must use a user object with no mail, not an undefined user, so it matches the add-mail path.
|
EN: DE: Details
Durations rounded up to whole seconds / Laufzeiten auf ganze Sekunden aufgerundet. Original report / Originalbericht{
"head": "529792bb7b82f55696f37c3d87d017911ec1f90b",
"private": false,
"recorded_at": "2026-09-18T10:50:31Z",
"repo": "DFXswiss/app",
"required": [
"lint"
],
"runs": [
{
"command": "agent a38 job commands --config '{\"env\":{\"CI\":\"true\"},\"npm\":{\"canaries\":[\"react-app-rewired/package.json\",\"react-scripts/package.json\",\"typescript/lib/typescript.js\",\"prettier/package.json\"],\"node_major\":20},\"steps\":[[\"npm\",\"run\",\"lint\"],[\"npm\",\"run\",\"format:md:check\"]]}'",
"duration_s": 10.991222749929875,
"exit_code": 0,
"id": "lint",
"name": "Lint and Markdown format",
"result": "pass",
"timeout_s": 600.0
}
],
"schema": "dfx-local-ci/v1"
} |
onSubmit swallowed a missing API message because error is falsy. Match onVerify and surface Unknown error.
|
EN: DE: Details
Durations rounded up to whole seconds / Laufzeiten auf ganze Sekunden aufgerundet. Original report / Originalbericht{
"head": "94ef74ccdac0cf9ee15d0e4a0b17ee51d8125968",
"private": false,
"recorded_at": "2026-09-18T11:05:06Z",
"repo": "DFXswiss/app",
"required": [
"lint"
],
"runs": [
{
"command": "agent a38 job commands --config '{\"env\":{\"CI\":\"true\"},\"npm\":{\"canaries\":[\"react-app-rewired/package.json\",\"react-scripts/package.json\",\"typescript/lib/typescript.js\",\"prettier/package.json\"],\"node_major\":20},\"steps\":[[\"npm\",\"run\",\"lint\"],[\"npm\",\"run\",\"format:md:check\"]]}'",
"duration_s": 13.32793691684492,
"exit_code": 0,
"id": "lint",
"name": "Lint and Markdown format",
"result": "pass",
"timeout_s": 600.0
}
],
"schema": "dfx-local-ci/v1"
} |
|
EN: DE: DetailsReview passes:
A38: lint + Markdown format pass on this head (author report posted). GitHub PR CI on the previous head was green; this head is a one-line product fallback plus the matching test. This repository is an A38 adopter: the author leaves the PR as draft; Ready is the guard. |
EN:
Keep /account/mail from mounting the email editor until the user context has finished loading, so the current address is prefilled instead of an empty field.
The full-stack e2e that asserts that prefilled value was failing when check2fa resolved before GET /user.
src/screens/edit-mail.screen.tsx coverage: statements 100%, branches 100%, functions 100%, lines 100%.
DE:
/account/mail öffnet den E-Mail-Editor erst, wenn der User-Kontext geladen ist, damit die aktuelle Adresse vorausgefüllt ist statt eines leeren Felds.
Der Full-Stack-e2e, der den vorausgefüllten Wert prüft, schlug fehl, wenn check2fa vor GET /user fertig war.
src/screens/edit-mail.screen.tsx Coverage: Statements 100 %, Branches 100 %, Functions 100 %, Lines 100 %.
Details
EditOverlayapplies react-hook-formdefaultValuesonly on first mount. After a full navigation to/account/mail,check2fa(hot after the just-completed 2FA) can finish beforeGET /userfillsuser.mail. The overlay then mounted withprefill=undefinedand the field stayed empty.This keeps the existing spinner while
checking2fa || isUserLoading, so the overlay mounts only once the user payload is present. A loaded user without mail still sees the empty editor (add-mail).EditOverlayitself is unchanged. The matching full-stack test ine2e-stack/specs/account.spec.tsis unchanged; itstoHaveValueassertion becomes stable.Touched files must reach 100% statement/branch/function/line coverage (review gate). Measured on Node 20 with
CI=true npm test -- --watchAll=false --coverage --collectCoverageFrom='src/screens/edit-mail.screen.tsx' --testPathPattern=edit-mail-return: 23 tests passed;src/screens/edit-mail.screen.tsxis 100/100/100/100.Observed on the companion API develop-to-main Full-stack E2E: expected
e2e+acct-mail-chg-3@dfx.swiss, received"". Frontend product code was the same as the previous green run.