release: Persona A integration + Tec21 calendar + hydration fix#17
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>
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>
feat: integrate Persona A's data foundation (selective cherry-pick)
Browser extensions (ColorZilla, Grammarly, etc.) inject attributes like cz-shortcut-listen onto <body> after SSR. Adding suppressHydrationWarning silences the cosmetic hydration mismatch without masking real bugs since it only applies to the body element itself. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
The model was using ISO calendar weeks instead of the Tec21 academic calendar,
and only saw materias from materias_inscritas. Two fixes:
1. Tec21 calendar awareness
- New lib/tec21/calendar.ts: given a semester start date, computes current
block (1/2/3), week within block (1-5), and whether it's Semana Tec.
- Stored per-user in profiles.semestre_inicio (depends on enrollment period).
- Onboarding step 2 adds a date input for the semester start date.
- Prompt updated with the 5+1+5+1+5 block pattern and rules about Semana Tec
(no regular study blocks; project focus) and end-of-block urgency.
2. Canvas-aware context
- Eventos passed to Gemini now include `fuente` (canvas/google/...).
- Prompt rules: canvas events are deadlines and weigh heavily; google events
are calendar blocks to avoid.
- Materias inferred from Canvas event titles via clave regex
(e.g. "TC2025 - Tarea 3"). If a clave appears in canvas events but not in
materias_inscritas, it's added to context with `inferida: true` and the
model is instructed to flag the discrepancy.
DB migration:
ALTER TABLE profiles ADD COLUMN IF NOT EXISTS semestre_inicio date;
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(layout): suppress hydration warning on body
feat(ai): Tec21 calendar awareness + Canvas-aware materias
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.
Mergea a main todo lo que está en dev:
Persona A integration (PR #15)
Tec21 calendar awareness (PR #18)
Hydration fix (PR #16)
🤖 Generated with Claude Code