Skip to content

Migration summer-school-finder#135

Closed
KrishnaAgarwal7531 wants to merge 4 commits intotinyfish-io:mainfrom
KrishnaAgarwal7531:mig-summerschoolfinder
Closed

Migration summer-school-finder#135
KrishnaAgarwal7531 wants to merge 4 commits intotinyfish-io:mainfrom
KrishnaAgarwal7531:mig-summerschoolfinder

Conversation

@KrishnaAgarwal7531
Copy link
Copy Markdown
Contributor

@KrishnaAgarwal7531 KrishnaAgarwal7531 commented Apr 7, 2026

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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7f6c2a69-7e9e-4710-b03f-d5752a0b8632

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copy link
Copy Markdown
Contributor

@simantak-dabhade simantak-dabhade left a comment

Choose a reason for hiding this comment

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

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.example has the get-your-key URL comment.
  • .env.local correctly 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.

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.

3 participants