Skip to content

refactor: migrate account emails to dedicated api#1654

Open
arpitgupta1214 wants to merge 2 commits intotestfrom
codex/account-emails-chat
Open

refactor: migrate account emails to dedicated api#1654
arpitgupta1214 wants to merge 2 commits intotestfrom
codex/account-emails-chat

Conversation

@arpitgupta1214
Copy link
Copy Markdown
Collaborator

@arpitgupta1214 arpitgupta1214 commented Apr 7, 2026

Summary

  • switch account email lookups to the dedicated API endpoint
  • remove the old local /api/account-emails route
  • use the new account-scoped account_id contract from the frontend
  • simplify useAccountEmails so it owns its query key

Testing

  • no dedicated lib test retained for fetchAccountEmails

Summary by cubic

Migrated account email lookups to the dedicated accounts API and removed the local route. Simplifies fetching with a new hook and aligns with the account-scoped account_id contract.

  • Refactors
    • Removed local /api/account-emails route.
    • Added lib/accounts/fetchAccountEmails to call /api/accounts/emails with a bearer token.
    • Added hooks/useAccountEmails (owns its query key, handles auth via usePrivy).
    • Updated FileInfoDialog and TasksList to use useAccountEmails and simplify logic.

Written for commit 130d00f. Summary will update on new commits.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

Warning

Rate limit exceeded

@arpitgupta1214 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 57 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 19 minutes and 57 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7d92a6ba-83d7-417b-92a4-6ff433701ef0

📥 Commits

Reviewing files that changed from the base of the PR and between 04f4dfe and 130d00f.

📒 Files selected for processing (5)
  • app/api/account-emails/route.ts
  • components/Files/FileInfoDialog.tsx
  • components/TasksPage/TasksList.tsx
  • hooks/useAccountEmails.ts
  • lib/accounts/fetchAccountEmails.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/account-emails-chat

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 and usage tips.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 7, 2026

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

Project Deployment Actions Updated (UTC)
recoup-chat Ready Ready Preview Apr 7, 2026 10:07pm

Request Review

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: This PR migrates logic to a new API endpoint and removes an existing route, which is a high-impact architectural change requiring human verification of the new service dependency.

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.

1 participant