Feat/temp email checker tool - #88
Conversation
📝 WalkthroughWalkthroughAdds a temporary email checker tool with client-side preview validation, structured result display, route content, navigation, SEO metadata, structured data, and Open Graph/Twitter images. ChangesTemporary email checker
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Visitor
participant CheckerPanel
participant previewCheck
participant ResultCard
Visitor->>CheckerPanel: Enter email or domain
CheckerPanel->>previewCheck: Submit normalized input
previewCheck-->>CheckerPanel: Return CheckResult
CheckerPanel->>ResultCard: Render verdict and signals
ResultCard-->>Visitor: Display checker result
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
| return; | ||
| } | ||
| // TODO: swap for the route handler once the check is built. | ||
| setResult(previewCheck(raw)); |
There was a problem hiding this comment.
Preview checker returns false negatives
When a visitor checks a disposable provider outside the ten hard-coded preview domains, previewCheck returns “No disposable signals” and “Safe to accept,” causing the public tool to present a false-negative verdict instead of performing the advertised catalogue lookup.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@apps/frontend/web/src/app/tools/temp-email-checker/checker-panel.tsx`:
- Around line 153-160: Production claims are exposed while the checker still
uses preview-only detection. In checker-panel.tsx:153-160, update run to call
the route handler instead of previewCheck before release. In content.ts:22-104,
remove unsupported capability claims; in page.tsx:113-186, stop rendering
production detection claims while preview behavior remains; in
opengraph-image.tsx:476-517, align social-image messaging with the implemented
checker.
- Around line 193-194: Update the input onChange handler in the checker panel to
clear the existing result whenever the value changes, while preserving the
current value update behavior so stale verdict cards cannot remain visible for a
different email.
In `@apps/frontend/web/src/app/tools/temp-email-checker/preview-check.ts`:
- Around line 75-76: Update DOMAIN_SHAPE in the email preview classification
logic to allow only valid DNS label characters, excluding URL delimiters such as
':' and '/'. Add coverage for URL-like and path-containing inputs, ensuring
previewCheck does not classify them as deliverable domains.
🪄 Autofix
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: 154c81bc-3a4b-407f-ad31-f149bbcac137
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (7)
apps/frontend/web/src/app/tools/temp-email-checker/checker-panel.tsxapps/frontend/web/src/app/tools/temp-email-checker/content.tsapps/frontend/web/src/app/tools/temp-email-checker/opengraph-image.tsxapps/frontend/web/src/app/tools/temp-email-checker/page.tsxapps/frontend/web/src/app/tools/temp-email-checker/preview-check.tsapps/frontend/web/src/app/tools/temp-email-checker/twitter-image.tsxapps/frontend/web/src/components/header.tsx
| const run = (raw: string) => { | ||
| if (!raw.trim()) { | ||
| setResult(null); | ||
| return; | ||
| } | ||
| // TODO: swap for the route handler once the check is built. | ||
| setResult(previewCheck(raw)); | ||
| }; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Implement the checker before publishing production verdicts.
The public route calls previewCheck, which is explicitly preview-only and uses exact matches against a small hard-coded set. It does not implement the refreshed catalogue, wildcard matching, or exception list that the page and social image promise. Unknown disposable domains can receive a “Looks fine” verdict.
apps/frontend/web/src/app/tools/temp-email-checker/checker-panel.tsx#L153-L160: replacepreviewCheckwith the route-handler request before release.apps/frontend/web/src/app/tools/temp-email-checker/content.ts#L22-L104: remove unsupported capability claims until the handler implements them.apps/frontend/web/src/app/tools/temp-email-checker/page.tsx#L113-L186: do not render production detection claims while the checker remains a preview.apps/frontend/web/src/app/tools/temp-email-checker/opengraph-image.tsx#L476-L517: align social-image claims with the implemented checker.
📍 Affects 4 files
apps/frontend/web/src/app/tools/temp-email-checker/checker-panel.tsx#L153-L160(this comment)apps/frontend/web/src/app/tools/temp-email-checker/content.ts#L22-L104apps/frontend/web/src/app/tools/temp-email-checker/page.tsx#L113-L186apps/frontend/web/src/app/tools/temp-email-checker/opengraph-image.tsx#L476-L517
🤖 Prompt for 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.
In `@apps/frontend/web/src/app/tools/temp-email-checker/checker-panel.tsx` around
lines 153 - 160, Production claims are exposed while the checker still uses
preview-only detection. In checker-panel.tsx:153-160, update run to call the
route handler instead of previewCheck before release. In content.ts:22-104,
remove unsupported capability claims; in page.tsx:113-186, stop rendering
production detection claims while preview behavior remains; in
opengraph-image.tsx:476-517, align social-image messaging with the implemented
checker.
| value={value} | ||
| onChange={(e) => setValue(e.target.value)} |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Clear the result when the input changes.
After a check, editing the input leaves the prior result card visible. The form then shows one value while the verdict identifies another value.
Clear result in onChange, or re-run the check for the new value.
Proposed fix
- onChange={(e) => setValue(e.target.value)}
+ onChange={(e) => {
+ setValue(e.target.value);
+ setResult(null);
+ }}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| value={value} | |
| onChange={(e) => setValue(e.target.value)} | |
| value={value} | |
| onChange={(e) => { | |
| setValue(e.target.value); | |
| setResult(null); | |
| }} |
🤖 Prompt for 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.
In `@apps/frontend/web/src/app/tools/temp-email-checker/checker-panel.tsx` around
lines 193 - 194, Update the input onChange handler in the checker panel to clear
the existing result whenever the value changes, while preserving the current
value update behavior so stale verdict cards cannot remain visible for a
different email.
| const EMAIL_SHAPE = /^[^\s@]+@[^\s@.]+(?:\.[^\s@.]+)+$/; | ||
| const DOMAIN_SHAPE = /^[^\s@.]+(?:\.[^\s@.]+)+$/; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Reject URL-like input before classification.
DOMAIN_SHAPE permits : and /. For example, https://mailinator.com matches as a bare domain. It is not in the exact domain set, so previewCheck returns a deliverable verdict.
Restrict domain labels to valid DNS characters before classification. Add tests for URLs and path-containing input.
Proposed fix
-const DOMAIN_SHAPE = /^[^\s@.]+(?:\.[^\s@.]+)+$/;
+const DOMAIN_SHAPE =
+ /^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const EMAIL_SHAPE = /^[^\s@]+@[^\s@.]+(?:\.[^\s@.]+)+$/; | |
| const DOMAIN_SHAPE = /^[^\s@.]+(?:\.[^\s@.]+)+$/; | |
| const EMAIL_SHAPE = /^[^\s@]+@[^\s@.]+(?:\.[^\s@.]+)+$/; | |
| const DOMAIN_SHAPE = | |
| /^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/; |
🤖 Prompt for 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.
In `@apps/frontend/web/src/app/tools/temp-email-checker/preview-check.ts` around
lines 75 - 76, Update DOMAIN_SHAPE in the email preview classification logic to
allow only valid DNS label characters, excluding URL delimiters such as ':' and
'/'. Add coverage for URL-like and path-containing inputs, ensuring previewCheck
does not classify them as deliverable domains.
Adds a public tool page at
/tools/temp-email-checkerthat checks whether anemail address or domain belongs to a disposable/temporary mailbox provider.
Page layout: hero → checker panel → what the check looks at → why throwaway
signups cost you → how it works → FAQ → CTA.
Summary by CodeRabbit
Greptile Summary
Adds a public temporary-email checker marketing page, client-side result panel, social images, structured metadata, and navigation entry. The submitted check currently runs against a preview-only hard-coded domain sample rather than the advertised disposable-provider catalogue.
/tools/temp-email-checkerpage and supporting marketing content.Confidence Score: 4/5
The public tool should not be merged until its primary action uses the real checker or is clearly presented as a non-authoritative demo.
The page exposes a preview-only ten-domain sample as a functional checker, causing realistic disposable addresses outside that sample to receive authoritative-looking “Safe to accept” results.
Files Needing Attention: apps/frontend/web/src/app/tools/temp-email-checker/checker-panel.tsx, apps/frontend/web/src/app/tools/temp-email-checker/preview-check.ts
Important Files Changed
Reviews (1): Last reviewed commit: "feat(web): link temp email checker in th..." | Re-trigger Greptile