fix(edge-fn): use user.id instead of claims.sub; fixes 500s and false cert_required fix(migrations): drop broad reservations SELECT policy; add reservation_slots view with security_invoker=false fix(tests): correct weekSlot() keys from start/end to start_time/end_time fix(tests): spread overlap test slots across separate ISO weeks fix(tests): update e2e assertion to match actual authenticated home text fix(app): hide IonMenu before user is authenticated feat(dx): add test:all script running unit, integration, and e2e in sequence docs(claude-md): document SELinux fix, Edge Function auth pattern, security_invoker behaviour
5.2 KiB
5.2 KiB
Session Handoff: Home Page Content + E2E Fixes
Date: 2026-04-20 Session Duration: ~1.5 hours Session Focus: Build authenticated home page; fix E2E test issues from prior session Context Usage at Handoff: Low
What Was Accomplished
- Playwright E2E: fixed selector issues —
IonButton router-linkrenders as role=linknotbutton;IonInputlabel not associated viafor/id, usegetByPlaceholderinstead - Playwright E2E: fixed magic link redirect —
supabase/config.tomlhad wrongsite_url(127.0.0.1→localhost) and missing/auth/callbackinadditional_redirect_urls; also added server-side redirect follow viafetch(magicLink, { redirect: 'manual' })to avoid browser connecting to Supabase local port - E2E tests passing: 2/2 — splash→login→magic link→home flow + protected route redirect
- Home page built →
app/pages/index.vue— Welcome heading, upcoming reservations card, Create Reservation button, inline PrimeVue DatePicker calendar - WeatherWidget component created →
app/components/WeatherWidget.vue— Open-Meteo (free, no key), shows temp/conditions/wind in knots; 10-minutelocalStoragecache to avoid API overload - Marina coordinates set:
43.4412629, -79.6696725(Oakville/Bronte Harbour) IonSplitPaneadded toapp/app.vue— sidebar open by default on desktop (≥992px); user revertedauto-hide="false"onIonMenuButtoninindex.vue— desktop sidebar toggle behavior is OPEN
Exact State of Work in Progress
- Desktop sidebar toggle:
IonSplitPaneis inapp.vuebutauto-hide="false"was reverted fromindex.vue; sidebar opens on desktop but hamburger icon hides — revisit next session if needed /reservations/createroute: wired up asrouter-linkon Create Reservation button but page does not exist yet
Decisions Made This Session
- Open-Meteo for weather BECAUSE free, no API key, client-side CORS allowed, updates every 15 min — STATUS: confirmed
- 10-minute
localStoragecache for weather BECAUSE Open-Meteo updates every 15 min; survives page refresh — STATUS: confirmed - Server-side redirect follow for E2E magic link BECAUSE Playwright Chromium headless shell cannot reach
127.0.0.1:54321(Supabase local auth); Node.jsfetchcan — STATUS: confirmed
Key Numbers Generated or Discovered This Session
- Weather cache TTL: 10 minutes (
600_000ms) - Open-Meteo wind unit: knots (
wind_speed_unit=kn) - Marina coordinates:
43.4412629, -79.6696725 IonSplitPanedesktop breakpoint:lg= 992px (Ionic default)- E2E tests: 2/2 passing
Files Created or Modified
| File Path | Action | Description |
|---|---|---|
app/pages/index.vue |
Modified | Full home content: welcome, reservations card, create button, calendar |
app/components/WeatherWidget.vue |
Created | Open-Meteo weather card with localStorage cache |
app/app.vue |
Modified | Added IonSplitPane wrapping menu + router outlet |
supabase/config.toml |
Modified | site_url → http://localhost:3000; added /auth/callback to additional_redirect_urls |
tests/e2e/auth.spec.ts |
Modified | Fixed selectors; added server-side redirect follow for magic link |
docs/summaries/handoff-2026-04-19-playwright-e2e-setup.md |
Created | Prior session handoff (Playwright setup) |
What the NEXT Session Should Do
- Build
app/pages/reservations/create.vue— reservation creation form- Fields needed: boat selection, date/time (start + end), reason, passengers (member_ids)
- Schema ref:
app/types/supabase.ts→reservationstable Insert type - On submit:
supabase.from('reservations').insert(...)withuser_id = user.value.id, defaultstatus = 'pending' - On success: navigate to
/or a reservation detail page
- Read
app/types/supabase.tsfor boats + reservations schema before writing the form - Read
app/stores/auth.tsforuserref andmemberdata (member_ids on the reservation)
Open Questions Requiring User Input
- Desktop hamburger behaviour —
IonSplitPaneis active but user revertedauto-hide="false"; should the hamburger be visible on desktop to allow closing the sidebar, or hidden when sidebar is open? ImpactsIonMenuButtonprops on every page - Reservation form: boat selection — should the user pick from all
booking_available = trueboats, or filtered by their certifications (member.certificationsvsboat.required_certs)? Impacts query in create form - Reservation form: time selection — free-form time pickers, or constrained to
interval_templates? Impacts form UI significantly - After reservation created — navigate to reservation detail, home page, or show confirmation inline?
Assumptions That Need Validation
- ASSUMED:
supabase stop && supabase startwas run afterconfig.tomlchange — E2E tests pass so this is confirmed - ASSUMED: PrimeVue
DatePickerinline renders correctly in Ionic card on mobile — not manually tested in browser since session end
Files to Load Next Session
app/types/supabase.ts— boats + reservations schema for form fieldsapp/stores/auth.ts— user/member refs for form submissionapp/pages/index.vue— reference for page structure pattern