Migration summer-school-finder#135
Migration summer-school-finder#135KrishnaAgarwal7531 wants to merge 4 commits intotinyfish-io:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
simantak-dabhade
left a comment
There was a problem hiding this comment.
Review: changes requested
/api/scrape/route.ts is a clean SDK reference (typed EventType.STARTED/STREAMING_URL/PROGRESS/COMPLETE, RunStatus.COMPLETED check, per-request client). Supabase fully gone, no Mino refs, no env leak. The core is there — but a few things block merge.
🔴 Build fails — NavLink.tsx imports missing dep
./src/components/NavLink.tsx:1:56
Type error: Cannot find module 'react-router-dom' or its corresponding type declarations.
react-router-dom isn't in package.json, and NavLink.tsx is dead — nothing in the app imports it. It's a Vite-era leftover from the router-based app; App Router doesn't need it. Delete src/components/NavLink.tsx.
🔴 Partial SDK migration — /api/discover still uses raw HTTP
src/app/api/discover/route.ts:9-16 calls the TinyFish Search endpoint via raw fetch:
const response = await fetch(
`https://api.search.tinyfish.ai?query=${encodeURIComponent(query)}`,
{ headers: { "X-API-Key": process.env.TINYFISH_API_KEY! } }
);Per migration goal 1 (SDK over raw HTTPS), this must use the SDK. @tiny-fish/sdk exports a SearchResource with a query method — replace with:
const client = new TinyFish({ apiKey: process.env.TINYFISH_API_KEY });
const data = await client.search.query({ query });
// data.results is already shaped(Check the SDK types for the exact SearchQueryParams / SearchQueryResponse shape — @tiny-fish/sdk/dist/search/types.d.ts.)
Also cleans up the process.env.TINYFISH_API_KEY! non-null assertion, which is a latent bug — if the env is missing, you currently get a runtime 401 from the API instead of an explicit "no key configured" error.
🔴 Dead UI dump — all 49 src/components/ui/*.tsx unreferenced
Grep across src/{app,components,hooks} for @/components/ui returns zero matches. Every one of the 49 shadcn files is unimported by the live app. Meanwhile they collectively import 27 distinct @radix-ui/* packages, only 9 declared in package.json. Once the NavLink fix lands, typecheck will fail next on accordion.tsx → @radix-ui/react-accordion.
Fix: delete the entire src/components/ui/ directory (and src/hooks/use-toast.ts if it references toast types that go away).
🔴 No README.md
Required by CONTRIBUTING.md — title, live link, description, demo, code snippet, run steps, architecture diagram.
🟡 Nits (not blocking)
- PR body is empty.
- Next 15.3.6 — outdated vs pack, will be handled by the repo-wide Next/Node sweep.
✅ What's working well
/api/scrape/route.ts— clean SDK streaming reference.- No Mino, no Supabase, no env leak.
.env.examplehas the get-your-key URL comment..env.localcorrectly not tracked.
Once NavLink is deleted, /api/discover moves to client.search.query, dead ui/ dir is removed, and the README is added — re-request review.
Migrated scholarship-finder to @tiny-fish/sdk. Deleted the two dead routes (/api/discover and /api/scrape) — /api/search already handles Groq-powered URL discovery and parallel TinyFish agent scraping in one SSE stream. Removed 35 unused shadcn components that were causing missing @radix-ui dep errors, fixed package.json to remove scroll-area and add the missing toggle and tooltip packages, added commented .env.example for both keys, and added a README.md. Also removed the mid-search live results section from page.tsx — cards were rendering at different heights and without working select/compare controls, so results now only appear once all agents complete. Tested end to end — search, live agent streaming, and results with comparison all working.