Skip to content

(janitor/dedupe): consolidate isValidEmail in dev seed topics - #6037

Merged
kilo-code-bot[bot] merged 1 commit into
mainfrom
janitor/dedupe-seed-is-valid-email
Sep 11, 2026
Merged

(janitor/dedupe): consolidate isValidEmail in dev seed topics#6037
kilo-code-bot[bot] merged 1 commit into
mainfrom
janitor/dedupe-seed-is-valid-email

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Seven dev/seed/app/* topic files re-declared the same permissive email regex locally:

/^[^\s@]+@[^\s@]+\.[^\s@]+$/

An authoritative implementation already exists in dev/seed/lib/users.ts and is already imported by three other topic files (usage-evidence, github-account, byok-e2e-fixture). This consolidates the remaining copies to use it.

Change

  • Remove the local isValidEmail in 7 topic files and import isValidEmail from ../lib/users.
  • Net: 7 insertions, 33 deletions. No behavior change — identical regex.

Verification

  • oxfmt: clean
  • oxlint: 0 errors / 0 warnings
  • tsx import smoke test: all 7 modules load

Notes

The apps/web/src/components/organizations/spending-alerts-form.ts copy is intentionally left alone: it has different semantics (trims before matching) and lives in a different runtime/package.

Seven seed topic files re-declared the same permissive email regex locally. Reuse the existing authoritative isValidEmail in dev/seed/lib/users.ts.
@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Sep 10, 2026
@kilo-code-bot
kilo-code-bot Bot enabled auto-merge (squash) September 10, 2026 07:10
@kilo-code-bot

kilo-code-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (7 files)
  • dev/seed/app/api-token.ts
  • dev/seed/app/create-user.ts
  • dev/seed/app/kilo-pass-stripe.ts
  • dev/seed/app/mobile-sheet-fixtures.ts
  • dev/seed/app/paged-history.ts
  • dev/seed/app/session-pr-link.ts
  • dev/seed/app/user-id.ts

Reviewed by grok-4.6 · Input: 32K · Output: 4.3K · Cached: 119K

Review guidance: REVIEW.md from base branch main

@kilo-code-bot
kilo-code-bot Bot merged commit c5c0f97 into main Sep 11, 2026
17 checks passed
@kilo-code-bot
kilo-code-bot Bot deleted the janitor/dedupe-seed-is-valid-email branch September 11, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

janitor Automated dead-code/duplication cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant