As an identity holder, I want to have my notifications sent to an email address I control, so that I hear about replies and mentions when the app is closed.
Situation
I have an identity selected on this phone and I am in the Activity tab. I do not open the app every day, and I have an email address I do read.
What I do
Tap the settings button in the top bar of Activity.
Type my address and tap "Enable".
Open the message in my mail and follow the verification link.
Return to the app and see the address verified.
Later, type another address and tap "Change", or tap "Turn off email notifications".
What I should see
The Email notifications screen opens with a back button.
With nothing set up the status reads "No email configured", the field shows the hint "you@example.com", and the button reads "Enable", dimmed until I type.
Under the field: "We'll send a link to verify your address before emailing you notifications."
After "Enable" the status reads "Pending verification: reader@example.com". The address is saved trimmed and in lower case.
While pending I see "Check your inbox and open the verification link. This screen updates automatically." and "Resend verification email".
Once I have followed the link, the status becomes "Verified: reader@example.com" within a few seconds, with nothing to tap, and the resend row disappears.
With an address saved, the button reads "Change" and "Turn off email notifications" is offered.
Changing the address starts verification again for the new one.
If the link ran out, the status reads "Pending verification: reader@example.com (link expired)" with "Your verification link expired. Request a new email to finish setup." Tapping "Resend verification email" makes it pending again.
"Turn off email notifications" returns the status to "No email configured" and empties the field.
The setting belongs to the selected identity: after switching identity the screen shows that identity's own address, or none.
When something goes wrong
If I type something that is not an address, a red line reads "Enter a valid email address." and nothing is saved. I correct it and tap the button again.
If the settings cannot be loaded, I see the reason, for example "Notification service is temporarily unavailable.", with "Retry".
With no identity the screen says "Choose an identity to set up email notifications." with "Open Me".
Not included
Turning email off happens at once, with no confirmation and no warning colour (Email status panel).
I cannot choose which kinds of notification are emailed, or how often.
Verification happens in my mail and browser, not in the app.
Trace
Story US-ACT-04, status Shipped. These links are kept in step with the traceability matrix and with the "User stories" section of every page listed here.
Design
Page | Part it plays |
|---|---|
The email settings screen | |
The settings button that leads here | |
Why this screen exists although the original design did not mention it | |
The status sentence, field, button and footer, and the sections each state adds | |
The email field | |
The inset-grouped sections with header and footer | |
Enable, Change, Resend and Turn off as row buttons | |
One field, validation on submit, the error section | |
The email form among the app forms | |
Plain button rows that act at once | |
Turning off has no confirmation | |
Loading, load failure with Retry, no identity | |
The email settings rows of the state table | |
The status sentence and the automatic update | |
Pushed, not a sheet | |
The settings bar action on the inbox | |
"Open Me" from the no-identity state | |
Each state shows only the section it needs | |
The exact status and help wording |
Implementation
Page | Part it plays |
|---|---|
ActivityEmailScreen, the draft ownership and the 3 second verification task | |
activityApply set-config, resend-config-verification and remove-config | |
emailInput validation; emailState and emailStatus | |
The signed writes and service discovery | |
The signed notify envelope | |
The signer for the selected identity | |
The email config actions, verification and expiry | |
activityEmail and its owner, activityDraft, activityVerification | |
The activity-email route | |
Polling while pending or expired | |
The notify network grants | |
The email tests | |
The fixture: verify endpoint and the "expired" scenario | |
The combined local server | |
Email verification unit tests |
Code
File | What |
|---|---|
ActivityEmailScreen | |
the activity tab and the activity-email route | |
activityEmail, activityEmailOwner, activityEmailServer | |
activityDraft, errors and the activityVerification task | |
activitySettings, activityEditEmail, activitySetEmail, activityResend, activityRemoveEmail | |
activityAfterChange | |
activityApply | |
emailState, emailStatus and emailInput | |
notificationRequest | |
the notify fixture used by the tests |
Tests
File | What it checks |
|---|---|
activity: email validation, pending, poll verified, change and turn off | |
activity: expired verification can be resent | |
activity: switching identities scopes the inbox and email draft | |
email verification: normalizes input only at the input boundary; off โ pending โ verified โ off and changing address resets verification; expired links can be resent, pending links are unchanged |
Delivery
Delivered by #1470.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime