Migration wing-command to Tinyfish SDK - #210
KrishnaAgarwal7531 wants to merge 1 commit into
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 core SDK migration in /api/scout/route.ts is correct — client.agent.stream() with proper EventType/RunStatus, Gemini for URL discovery, no raw fetch, no Mino, no secrets. The architecture is sound.
However, the build fails with 129 TypeScript errors and there's significant dead code that needs cleanup.
Blockers
1. Build fails — 129 TypeScript errors
The WingSpot type in lib/types.ts was slimmed down during migration, but many components and lib/utils.ts still reference old properties that no longer exist:
price_per_wing,delivery_time_mins,deal_text,platform_ids,is_in_stock,is_open_now,flavor_tags,menu_json,opens_during_game,wait_time_mins, etc.
Affected files: ScoutingReportCard, CompareModal, WingGrid, DealsView, MenuModal, FlavorSelector, lib/utils.ts
Also:
AvailabilityStatsmissingpercentage: number(used inCommandJumbotron.tsx:218)FlavorPersonaInfomissingid,subtitle,keywords(used inutils.ts)
Fix: either restore the removed properties in types.ts or update all components to use the new property names. Given the scale, I'd recommend restoring the type properties and then deleting the components that are truly unused (see #2).
2. Delete 11 unused component files
These are never imported by any page:
AnimatedFieldBackground,BannerBreak,ComicHero,FlavorSelector,FrostedGlassPanel,HeroVisuals,JumbotronSearch,SunnyFieldEntrance,TacticalCanvas,WingGrid,ZipSearch
Additionally DealsView and MenuModal reference deleted API routes (/api/deals, /api/menu) and deleted types — they will crash if ever imported.
3. Delete unused /api/discover/route.ts
This route is never called. Discovery is inlined in /api/scout.
4. Remove 4 unused npm dependencies
@tanstack/react-query(never imported)date-fns(never imported)canvas-confetti(never imported)zod(never imported)
5. Remove next-env.d.ts
Auto-generated, should not be committed. Add to .gitignore.
Non-blocking
- README architecture shows
/api/discoveras separate step but it's inlined in/api/scout. lib/utils.tsheader says "Wing Scout v3" — should be v4.
This PR needs a significant cleanup pass. The SDK migration itself is done right, but the surrounding code wasn't updated to match the new types. Please fix the type errors, remove dead code, and verify npm run build passes before re-requesting review.
Migrates Wing Command from raw TinyFish HTTP calls to the official SDK, and tears out the Supabase + Redis infrastructure that was never needed for this use case. The app now runs entirely in-memory — no database to provision, no cache to configure, just two API keys and you're running.
The app itself finds the best chicken wing spots near you by zip code. Pick a flavor persona, and it fires parallel browser agents at DoorDash, Uber Eats, Grubhub, and Google simultaneously, streaming results back as each source finishes rather than waiting for all of them.