chore(chat): remove ten dead api routes#1711
Conversation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (26)
💤 Files with no reviewable changes (26)
📝 WalkthroughWalkthroughThis pull request removes a comprehensive set of deprecated API routes, React components, hooks, and utility functions across the application. The deletions span agent management endpoints, funnel analysis features, IPFS upload functionality, Stripe session handlers, social sharing components, and associated helper utilities totaling approximately 500+ lines of code removed. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
No issues found across 4 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Removing API endpoints, especially webhook and payment-related ones like /api/apify and /api/stripe/session/checked, requires human verification of external dependencies.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b2ede6f3a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| * API endpoint for Apify webhooks. | ||
| * Accepts a POST request with a JSON payload, optionally fetches a dataset, and always responds with 200. | ||
| */ | ||
| export async function POST(req: NextRequest) { |
There was a problem hiding this comment.
Keep Apify webhook endpoint available
Removing this handler breaks webhook-based Apify ingestion whenever a scraper run is triggered: both lib/apify/posts/runInstagramProfilesScraper.ts and lib/apify/comments/runInstagramCommentsScraper.ts still append APIFY_WEBHOOKS_VALUE as the webhook target, and that config is still the chat app webhook (/api/apify) in lib/consts.ts. With this route deleted, completed Apify runs will callback to 404, so downstream processing (dataset handling, saves, follow-up runs, notifications) no longer executes.
Useful? React with 👍 / 👎.
- /api/upload/pfp, /api/stripe/session/list, /api/get_running_agent, /api/get_artists_by_socials, /api/ipfs, /api/funnel_analysis - orphan libs/components only reachable from these routes: lib/uploadPfp, lib/uploadPfpToIpfs, lib/stripe/getSession, lib/getRunningAgent, lib/getArtistsByAgent, lib/ipfs/*, hooks/useShareHeatMap, components/SocialSharing/, lib/getFunnelAnalysis, lib/getFunnelChatContext, lib/chat/getFunnelAnalysis Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
Delete ten local
/api/*routes that have zero in-repo callers, plus the orphan libs/components/hooks that only existed to feed them. Routes traced to dead-ends via call-chain analysis (route → lib → hook → component → render site).Routes removed (10):
/api/apify,/api/agentkit/get,/api/stripe/session/checked,/api/workspace/create(deprecated shim) — initial pass/api/upload/pfp,/api/stripe/session/list,/api/get_running_agent,/api/get_artists_by_socials,/api/ipfs,/api/funnel_analysis— orphan-tracedOrphan code removed:
lib/uploadPfp,lib/uploadPfpToIpfs,lib/stripe/getSession,lib/getRunningAgent,lib/getArtistsByAgent,lib/ipfs/*(whole dir),hooks/useShareHeatMap,components/SocialSharing/,lib/getFunnelAnalysis,lib/getFunnelChatContext,lib/chat/getFunnelAnalysis.tsc --noEmitproduces zero errors related to the deletions (pre-existing errors inSpotifyDeepResearchResult.tsxandextractSendEmailResults.test.tsare unchanged).Test plan
Summary by CodeRabbit