Skip to content

[Existing app][OTP Module] Trim render work and loading latency #988

Description

@kryputh

Summary

Improve the existing OTP Module surface. This issue is intentionally scoped to existing app code and should not introduce a new standalone tool or unrelated feature.

Current area

OTP detection, OTP card rendering, copy behavior, expiry messaging, and OTP visual states

Relevant paths

  • src/features/otp/detectOtp.ts
  • src/features/otp/components/OTPCard.tsx
  • src/features/otp/styles.css

Goal

tighten the current OTP detection and display experience around security-sensitive mail.

Work focus

Reduce unnecessary render work and perceived latency in the current implementation. Prefer memoization, derived data cleanup, smaller loops, and loading skeleton improvements over broad rewrites.

Acceptance criteria

  • Identify the current render or data-flow hotspot before changing code.
  • Avoid broad refactors; keep the optimization scoped to the listed paths.
  • No visible regression in empty, loading, populated, and error states.
  • Add a short PR note describing the measured or reasoned performance win.

Scope guardrails

  • Keep the work inside the relevant existing app/module paths above unless a small shared helper is clearly justified.
  • Do not add a new V1/V2 tool folder for this issue.
  • Do not use real user data, secrets, private keys, or live customer mail.
  • Keep copy and UI aligned with the Stealth Mail safety, speed, and sender-control positioning.

Suggested validation

  • Run the most relevant unit or e2e tests for the touched area.
  • Run �un x tsc --noEmit and �un run lint when the local environment supports the project dependency install.

Metadata

Metadata

Assignees

Labels

GrantFox OSSGrantFox open-source contribution issueMaybe RewardedPotentially rewardable contributor issueOfficial CampaignOfficial campaign issuePerformancePerformance-focused workSecuritySecurity-focused workUIUser interface workenhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions