Migrate scholarship-finder to TinyFish SDK#131
Migrate scholarship-finder to TinyFish SDK#131KrishnaAgarwal7531 wants to merge 5 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
The working endpoint (/api/search) is actually really nice — typed EventType / RunStatus, parallel agents, fallback URLs, sensible error surfacing. That's the template. But there's a bunch of dead weight around it that's breaking the build.
🔴 Build fails — type error in dead api/scrape/route.ts
./src/app/api/scrape/route.ts:59:29
Type error: 'raw.replace' is of type 'unknown'.
event.result from the SDK is structured (not a markdown-wrapped string), so raw.replace(/```json|```/g, "") is both a type error and incorrect at runtime.
The easier fix here: delete this route entirely. Nothing in the UI calls /api/scrape — src/hooks/useScholarshipSearch.ts only fetches /api/search.
🔴 Dead routes
/api/discover is also unreferenced. /api/search already does its own Groq discovery inline at STEP 1 with its own FALLBACK_URLS. Please delete both /api/discover and /api/scrape.
🔴 Missing @radix-ui/* deps for dead UI components
src/components/ui/ has 48 shadcn files but only 5 of the ~23 needed @radix-ui/* packages are in package.json. Once the scrape type error is fixed, typecheck will fail next on accordion.tsx, alert-dialog.tsx, etc.
The live app only imports Select (from SearchForm) and the toast types (from use-toast). Delete the unused ui/*.tsx files — same fix as #129. Quick way to find keepers:
grep -rho "from \"@/components/ui/[^\"]*\"" src/{app,components,hooks} | sort -u🔴 No README.md
Required by CONTRIBUTING.md. Please add one with title, live link, description, demo, code snippet, run steps, architecture diagram.
🟡 .env.example needs comments
Currently just:
TINYFISH_API_KEY=
GROQ_API_KEY=
Playbook requires a one-line comment per var with "get your key at" URL. See tutor-finder/.env.example (PR #129) for the format.
🟡 Nits (not blocking)
- PR body is empty — please add a description of what was migrated + testing notes.
- Title
migration scholarship-finder→ suggestMigrate scholarship-finder to TinyFish SDK.
✅ What's working well
/api/search/route.tsis a solid SDK reference — typed events, parallel agents,RunStatuscheck, proper fallback, clear error paths.- Supabase, Mino, Vite artifacts all fully removed.
.env/.env.localin.gitignore.
Once those land, push and we'll re-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. |
simantak-dabhade
left a comment
There was a problem hiding this comment.
Good progress — 5 of 6 original asks are fixed. Dead routes deleted (only api/search/ remains), README added and well-written, .env.example has sign-up URL comments, PR body filled in.
Two remaining issues:
1. Build fails — 12 dead UI files (one breaks the build)
You trimmed ui/ from 48 to 13 files, but 12 of the remaining 13 are still unused. Only select.tsx is imported by app code (SearchForm.tsx). The rest have zero references:
button.tsx, dialog.tsx, input.tsx, label.tsx, separator.tsx,
sheet.tsx, skeleton.tsx, toast.tsx, toaster.tsx, toggle.tsx,
tooltip.tsx, use-toast.ts
label.tsx breaks the build because it imports @radix-ui/react-label which isn't in package.json:
./src/components/ui/label.tsx:2:33
Type error: Cannot find module '@radix-ui/react-label'
Fix: delete all 12 files. Keep only select.tsx. Then also trim the excess radix deps from package.json — the only needed one is @radix-ui/react-select.
2. Switch from Groq to OpenAI or Gemini
Same issue as wing-command (#134) — Groq is not opening up access for new accounts, which makes this recipe impossible to clone-and-run. search/route.ts uses groq-sdk for URL discovery.
Please switch to OpenAI (openai package, OPENAI_API_KEY) or Google Gemini (@google/generative-ai, GEMINI_API_KEY). Update the SDK import, client init, .env.example, and README.
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.