feat: integrate Persona A's data foundation (selective cherry-pick)#15
Merged
Conversation
- Install @google/genai SDK (gemini-2.5-flash) - lib/gemini/client.ts: singleton Gemini client - lib/gemini/prompts.ts: coach prompt with few-shot examples + structured output schema - lib/scheduling/conflicts.ts: conflict detector with ±30m/1h/2h shift resolver - api/gemini/test: smoke-test endpoint - api/insights/generate: full pipeline — profile + materias + eventos → Gemini → conflict resolve → cache - api/insights/current: read cached weekly insight - api/profile/setup: save profile + materias_inscritas to Supabase - README: sync schema to actual Supabase tables (fecha_inicio/fecha_fin, insights table) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Selectively brings in non-conflicting work from feat/a-data-foundation, adapting imports to use our existing supabase helpers instead of the duplicate refactor. Brought over as-is: - 53 study plan JSONs in apps/frontend/data/planes/ (generaciones 19 y 26) - apps/frontend/scripts/seed-planes.ts (uses service-role client, no app code) - apps/frontend/src/lib/ical/parser.ts (Canvas iCal parser via node-ical) Brought over with import adaptation (createClient -> getSupabaseServer): - apps/frontend/src/lib/google/calendar.ts (read+write Google Calendar) - apps/frontend/src/app/api/canvas/sync/route.ts - apps/frontend/src/app/api/calendar/sync/route.ts - apps/frontend/src/app/api/calendar/create/route.ts (powers ApplyBlocks button) New (Persona A's branch did not include these): - apps/frontend/src/app/api/planes/route.ts (list carreras from DB) - apps/frontend/src/app/api/planes/[clave]/route.ts (single plan from DB) Other: - Add node-ical dependency - Recover the dashboard column-name fix that was lost in PR #11's partial merge Deliberately NOT brought in (would break our flow): - Persona A's lib/supabase/{server,browser}.ts refactor (renames our helpers) - Persona A's auth/callback (skips onboarding, redirects to non-existent /login) - Persona A's profile/setup/route.ts (replaced by ours, which already matches schema) - @google/generative-ai (deprecated package, we use @google/genai) Also recovers commit f304883 (Gemini insights engine) which was missing from PR #11's merge to dev for unknown reasons. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Next's webpack bundle serializer mangles node-ical's BigInt usage during "Collecting page data", causing `TypeError: g.BigInt is not a function` on /api/canvas/sync. Treating it as an external Node module fixes the build. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Trae selectivamente del trabajo de Persona A (PR #13) lo que NOS FALTA, sin pisar nuestras convenciones existentes.
Por qué no mergeamos PR #13 directo: su rama se basó en commit muy viejo (PR #2), refactorizó `lib/supabase/server.ts` cambiando `getSupabaseServer` → `createClient`, y reemplazó nuestro `auth/callback` con uno que se salta onboarding y redirige a `/login` (que no existe). Mergearlo rompería el flow completo de auth y dashboard.
Lo que SÍ integramos
Sin cambios:
Con adaptación (`createClient` → `getSupabaseServer`):
Nuevos (Persona A no los incluyó):
Recovery extra: este commit también recupera `f304883` (Gemini insights engine) que se perdió en el merge parcial de PR #11 a dev por alguna razón.
Qué NO trajimos
Test plan
🤖 Generated with Claude Code