Skip to content

P3: feat(auth): suggest checking spam for OTP emails - #221

Closed
aspiers wants to merge 1 commit into
mainfrom
split-pr165/spam-folder-hint
Closed

P3: feat(auth): suggest checking spam for OTP emails#221
aspiers wants to merge 1 commit into
mainfrom
split-pr165/spam-folder-hint

Conversation

@aspiers

@aspiers aspiers commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a concise spam-folder hint below the OTP form so users have an immediate next step when the verification email is slow to appear.

Changes

  • Show a muted spam-folder hint on the OTP step
  • Document the end-user change with a changeset

Testing

  • pnpm format:check
  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm test:coverage

Screenshots

Before: the OTP form gave no hint about checking filtered mail.

Before: no spam-folder hint

After: a concise, readable spam-folder hint appears beneath Verify; it retains the theme variable and meets normal-text contrast guidance.

After: spam-folder hint

Notes

Summary by CodeRabbit

  • New Features

    • Added a note to the one-time passcode sign-in screen reminding users to check their spam folder if the email hasn’t arrived.
  • Style

    • Improved contrast for muted text throughout the sign-in page.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The OTP sign-in page now shows a centered hint that tells users to check their spam folder when the email does not arrive. Muted text uses a darker color. A changeset documents the update.

Changes

OTP login guidance

Layer / File(s) Summary
Add OTP spam-folder guidance
packages/auth-service/src/routes/login-page.ts, .changeset/spam-hint-on-otp-form.md
The OTP step renders and styles a spam-folder hint below the subtitle. Muted text uses #6b6b6b. The changeset documents the updated sign-in guidance.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Suggested reviewers: holkexyz

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding spam-folder guidance for OTP emails.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch split-pr165/spam-folder-hint

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
epds-demo Ready Ready Preview Jul 31, 2026 12:07pm

Request Review

@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8a163d1

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@railway-app

railway-app Bot commented Jul 30, 2026

Copy link
Copy Markdown

🚅 Deployed to the ePDS-pr-221 environment in ePDS

Service Status Web Updated (UTC)
@certified-app/auth-service ✅ Success (View Logs) Web Jul 31, 2026 at 12:08 pm
@certified-app/demo untrusted ✅ Success (View Logs) Web Jul 30, 2026 at 1:41 pm
@certified-app/demo ✅ Success (View Logs) Web Jul 30, 2026 at 1:41 pm
@certified-app/pds-core ✅ Success (View Logs) Web Jul 30, 2026 at 1:40 pm

@railway-app
railway-app Bot temporarily deployed to ePDS / ePDS-pr-221 July 30, 2026 13:38 Destroyed
@coveralls-official

coveralls-official Bot commented Jul 30, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 30629432974

Coverage remained the same at 57.281%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 3069
Covered Lines: 1753
Line Coverage: 57.12%
Relevant Branches: 1910
Covered Branches: 1099
Branch Coverage: 57.54%
Branches in Coverage %: Yes
Coverage Strength: 6.06 hits per line

💛 - Coveralls

@aspiers aspiers changed the title feat(auth): suggest checking spam for OTP emails P3: feat(auth): suggest checking spam for OTP emails Jul 30, 2026
@aspiers
aspiers marked this pull request as ready for review July 30, 2026 21:27
Copilot AI review requested due to automatic review settings July 30, 2026 21:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@aspiers
aspiers requested a review from holkexyz July 30, 2026 21:27

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.changeset/spam-hint-on-otp-form.md:
- Line 9: Update the end-user description in the changeset to replace “digit
boxes” with “code boxes,” keeping the rest of the wording and meaning unchanged.

In `@packages/auth-service/src/routes/login-page.ts`:
- Line 617: Update the .otp-spam-hint CSS rule to use the darker existing muted
color `#6b6b6b` instead of the faint `#999` value, while preserving its other
styling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 63b9b071-3af2-4774-acfd-48e872999e81

📥 Commits

Reviewing files that changed from the base of the PR and between 7bce175 and 9da3263.

📒 Files selected for processing (2)
  • .changeset/spam-hint-on-otp-form.md
  • packages/auth-service/src/routes/login-page.ts

Comment thread .changeset/spam-hint-on-otp-form.md Outdated
Comment thread packages/auth-service/src/routes/login-page.ts
If the user typo'd their email or the OTP landed in spam, they
sat staring at the OTP form with no indication of what to do.
The natural next move is "Use different email" or check the
spam folder, but the page surfaced neither — so the user just
waited and got frustrated.

Add a small muted note below the digit boxes:
  "If you don't see the email, check your spam folder."

Single line, doesn't compete with the "We sent a 8-digit code
to xx@example.com" subtitle, lives above the Resend / Use
different email actions so the visual reading order is:
  1. We sent it to xx@example.com
  2. (digit boxes + Verify)
  3. If you don't see it, check spam
  4. Otherwise, Resend / Use different email / Recover.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 31, 2026 12:06
@aspiers
aspiers force-pushed the split-pr165/spam-folder-hint branch from 9da3263 to 8a163d1 Compare July 31, 2026 12:06
@railway-app
railway-app Bot temporarily deployed to ePDS / ePDS-pr-221 July 31, 2026 12:06 Destroyed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sonarqubecloud

Copy link
Copy Markdown

aspiers added a commit that referenced this pull request Aug 3, 2026
Resending an OTP invalidates every earlier one, but the UI never said
so. A user holding two code emails had no way to tell which one the
form would accept, and the natural guess — the one that arrived first
and is higher up the inbox — is the wrong one.

The spam-folder hint has the same shape: it only helps someone whose
mail has not arrived, which is a minority of sign-ins. Both facts are
noise for the user who signs in on the first code, so neither belongs
in permanently-visible page copy. Clicking "Resend code" is the signal
that the user is struggling, so the resend confirmation carries both:

  Use the new code; earlier ones no longer work. It may be in your
  spam folder.

This replaces "Code resent!", which restated what the click already
confirmed. The message renders in the existing flash region, which is
a persistent role="status" live region rather than a toast, so the
longer copy is announced to assistive tech and stays on screen until
the next action clears it.

Supersedes #221, which added the spam hint as a permanent line under
the code boxes. The --muted-foreground contrast bump that #221 carried
to make that 13px line pass WCAG AA is no longer needed here and will
land separately on its own accessibility merit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@aspiers

aspiers commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #220 and #232 — not closing yet, since #220 has to land first.

The hint. This PR renders the spam advice as a permanently visible line under the code boxes. That is clutter for the majority of users, who sign in on the first code and never need it; the advice only helps someone whose email has not arrived.

The same reasoning applies to a second fact worth surfacing: resending an OTP invalidates every earlier one, so a user holding two code emails cannot tell which the form will accept — and the natural guess, the one that arrived first, is wrong.

Clicking Resend code is precisely the signal that a user is struggling, so both facts now live in the resend confirmation instead, landed on #220 as fe45b27:

Use the new code; earlier ones no longer work. It may be in your spam folder.

That replaces 'Code resent!', which only restated what the click already confirmed. It renders in the existing flash region — a persistent role="status" aria-live="polite" div rather than an auto-dismissing toast — so the longer copy is announced to assistive technology and stays on screen until the next action clears it. No new DOM, no new CSS.

The contrast change. This PR also carried --muted-foreground: #999#6b6b6b, undocumented in both the changeset and the description. It is now #232, with a correction: #6b6b6b clears WCAG AA only against the card background. .powered-by sits in .page-wrap outside .container, so it renders against the page background where #6b6b6b reaches 4.35:1 and still fails at 13px. #232 uses #666 (5.41:1 and 4.69:1), which passes on both.

(analysis and follow-up PRs by Claude Opus 5 via Claude Code)

aspiers added a commit that referenced this pull request Aug 4, 2026
Resending an OTP invalidates every earlier one, but the UI never said
so. A user holding two code emails had no way to tell which one the
form would accept, and the natural guess — the one that arrived first
and is higher up the inbox — is the wrong one.

The spam-folder hint has the same shape: it only helps someone whose
mail has not arrived, which is a minority of sign-ins. Both facts are
noise for the user who signs in on the first code, so neither belongs
in permanently-visible page copy. Clicking "Resend code" is the signal
that the user is struggling, so the resend confirmation carries both:

  Use the new code; earlier ones no longer work. It may be in your
  spam folder.

This replaces "Code resent!", which restated what the click already
confirmed. The message renders in the existing flash region, which is
a persistent role="status" live region rather than a toast, so the
longer copy is announced to assistive tech and stays on screen until
the next action clears it.

Supersedes #221, which added the spam hint as a permanent line under
the code boxes. The --muted-foreground contrast bump that #221 carried
to make that 13px line pass WCAG AA is no longer needed here and will
land separately on its own accessibility merit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@aspiers

aspiers commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #220

@aspiers aspiers closed this Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants