Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
@@ -6,7 +6,7 @@
|
||||
| **Owner** | Akeshan |
|
||||
| **Phase** | P16 — Kalender, Booking, Forms & Signatur |
|
||||
| **Cycle/Fenster** | W4 — USP, Härtung & Launch · fällig 2026-07-05 · Gate W4 |
|
||||
| **Status** | geplant |
|
||||
| **Status** | in Arbeit (~92 % gewichtet; 5/7 DoD vollständig, 2/7 teilfertig; selbst machbarer Server-Rest erledigt, Rest David D-P16/AK-P16c + Staging-DB-Ausführung) |
|
||||
|
||||
## Abhängigkeiten & Parallelität
|
||||
- **Blocked by:** `AK-P16a` (Kalender-Sync — Slot-Verfügbarkeit braucht Busy-Slots aus Google)
|
||||
@@ -27,13 +27,13 @@
|
||||
| Verfügbarkeit [`/availability`] | Wöchentliche Standard-Regeln (mehrere Zeitfenster/Tag), Datums-Ausnahmen (frei/Custom-Window), Timezone |
|
||||
|
||||
## Definition of Done
|
||||
- [ ] Öffentliche **Booking-Seiten** berechnen Slots **timezone-aware** (Regeln, Ausnahmen, Kalender-Sync, Puffer, Vorlauf)
|
||||
- [ ] Nach Buchung: **Lead oder Activity** (Email-Match), **FormSubmission**, **Bestätigungs-Email** (.ics) — **Race-Schutz** beim Submit
|
||||
- [ ] **iFrame-Embed** + Public-URL mit Copy
|
||||
- [ ] Nur **eine** Zuteilungs-Strategie „Erster der frei ist" (Round-Robin/Provider-Wahl → v2)
|
||||
- [ ] **Storno/Verschiebung/Re-Assign/No-Show** (M129 VOLL) inkl. Auto-Mail bei Cancel
|
||||
- [ ] Permission-Bundle `bookings.*` (read_own/read_all/write/admin) serverseitig Owner-gefiltert
|
||||
- [ ] Konnektor `tenantHasModule('booking')`; RLS auf allen Tenant-Tabellen
|
||||
- [x] Öffentliche **Booking-Seiten** berechnen Slots **timezone-aware** (Regeln, Ausnahmen, Kalender-Sync, Puffer, Vorlauf)
|
||||
- [~] Nach Buchung: **Lead oder Activity** (Email-Match), **FormSubmission**, **Bestätigungs-Email** (.ics) — **Race-Schutz** beim Submit · *Kontakt-Email-Match → Activity, sonst echtes `InboxLead` + `Appointment.leadId`; bei gesetzter `intakeFormId` echtes `FormSubmission` + `Appointment.formSubmissionId`, sonst `intakeAnswers` Json-Fallback*
|
||||
- [x] **iFrame-Embed** + Public-URL mit Copy
|
||||
- [x] Nur **eine** Zuteilungs-Strategie „Erster der frei ist" (Round-Robin/Provider-Wahl → v2)
|
||||
- [~] **Storno/Verschiebung/Re-Assign/No-Show** (M129 VOLL) inkl. Auto-Mail bei Cancel · *Service + Route-Action-Contract vollständig; Reschedule/Re-Assign-Picker-UI → David D-P16*
|
||||
- [x] Permission-Bundle `bookings.*` (read_own/read_all/write/admin) serverseitig Owner-gefiltert
|
||||
- [x] Konnektor `tenantHasModule('booking')`; RLS auf allen Tenant-Tabellen *(RLS-SQL als deferred Cutover wie Kalender)*
|
||||
|
||||
## Technische Bausteine
|
||||
- **Entities** (eigene `prisma/schema/booking.prisma`): `BookingPage` (slug, duration_minutes, assignment_strategy, is_published, intake_form_id), `BookingPageProvider` (M:N User), `AvailabilityRule`/`AvailabilityException`, `Appointment` (provider_user_id, start/end, status scheduled/held/cancelled/no_show/rescheduled, kontakt_id|lead_id, form_submission_id). `calendar.prisma`/`crm.prisma`/`forms.prisma` nur über Relationen (AD-21).
|
||||
@@ -53,3 +53,105 @@
|
||||
- [ ] Spec/ENTITY-MODEL an Davids UI-Entscheidungen angepasst
|
||||
- [ ] REQUIREMENTS/PHASE-SOURCES nachgezogen
|
||||
- [ ] Plane-Ticket `AK-P16b` aktualisiert
|
||||
|
||||
## Umsetzungs-Notiz (2026-06-30, Akeshan) — ~85 % DoD
|
||||
|
||||
Branch `feat/AK-P16b` (von `feat/AK-P16a` abgezweigt, AD-21), **8 Commits** (`fecf6f19f`
|
||||
→ `b262dabe8`), nicht gepusht, Plane-Status unverändert. Alle Verifikations-Gates grün:
|
||||
`pnpm prisma validate`, `@hivegrid/{web,db,view-models,entitlements,queue}` +
|
||||
`@hivegrid/activity` typecheck **0 Fehler**, `verify:i18n` (i18n-check) exit 0,
|
||||
**26 Booking-Unit-Tests grün** (slotEngine 11, ics 5, transitions 5, VM 3,
|
||||
auth-boundary 2). lefthook pre-commit je Commit grün.
|
||||
|
||||
**4 Forks (User-Freigabe 2026-06-30):** (1) Lead-Gap → Kontakt-Match/Create +
|
||||
`logActivity`, `leadId` reserviert R-P7. (2) Intake-Gap → `intakeAnswers` Json am
|
||||
Appointment, `formSubmissionId` reserviert AK-P16c. (3) Modul-Gate → eigener
|
||||
`booking` Feature-Key (`tenantHasModule('booking')`). (4) Scope → Backend +
|
||||
funktionale Routen inkl. minimal-funktionaler öffentlicher Strecke.
|
||||
|
||||
**DoD-Stand:**
|
||||
- [x] **Slot-Engine timezone-aware (DoD 1)** — `slotEngine.ts` pure (Regeln/Ausnahmen,
|
||||
Buffer, min-notice/max-advance, Increment, `first_available`-Union); Google-Busy
|
||||
via AK-P16a `availability.ts` (leak-safe). 11 Tests inkl. DST. `/b/{tenant}/{slug}`.
|
||||
- [~] **Post-Booking + Race (DoD 2)** — Serializable-Tx Slot-Re-Check + Postgres
|
||||
`EXCLUDE USING gist`-Backstop (`booking-constraints.sql`); Kontakt-Match/Create +
|
||||
`appointment_scheduled`-Activity; `intakeAnswers` Json; lokales CalendarEvent;
|
||||
Bestätigungsmail + **.ics-Attachment** (`buildIcs` pure). **Offen:** echte
|
||||
`FormSubmission` (AK-P16c), echtes CRM-`Lead` (R-P7) — bewusst reserviert.
|
||||
- [x] **iFrame-Embed + Public-URL (DoD 3)** — `/b/.../embed` (frame-ancestors) +
|
||||
Embed-Code-Generator + Public-URL-Copy im Page-Editor.
|
||||
- [x] **Eine Strategie (DoD 4)** — `first_available` implementiert; Enum trägt alle 3
|
||||
(round_robin/specific_provider_choice → v2, additiv).
|
||||
- [~] **Lifecycle M129 (DoD 5)** — `BookingLifecycleService`: held/no_show/cancel/
|
||||
reschedule/reassign mit lokalem CalendarEvent-Nachzug + Auto-Mail + Activity +
|
||||
`notify()`; Detail-Route mit held/no_show/cancel-Actions (CSRF+Owner). **Offen:**
|
||||
Reschedule-/Re-Assign-**Picker-UI** (Slot-/Provider-Auswahl) → David D-P16.
|
||||
- [x] **bookings.* owner-gefiltert (DoD 6)** — 4 Registries, `bookingAccess.server.ts`
|
||||
(Modul-Gate + Permission + Appointment-Owner-Check, 404 statt 403), Liste
|
||||
server-seitig owner-gefiltert. Auth-Boundary-Test.
|
||||
- [x] **Konnektor + RLS (DoD 7)** — `booking` Feature-Key + Gate; `booking-isolation.sql`
|
||||
(deferred Cutover wie Kalender), `booking-constraints.sql` (gist + btree_gist).
|
||||
|
||||
**Selbst machbar offen (~15 %):** `/availability`-Editor-UI (M06 F — Modelle +
|
||||
Slot-Engine konsumieren Verfügbarkeit bereits; nur die Pflege-Oberfläche fehlt) ·
|
||||
Reschedule/Re-Assign-Picker-Verdrahtung. **Staging-DB-blockiert:** `prisma db push` +
|
||||
`psql -f booking-constraints.sql` + RLS-Live-Check + **Race-Integrationstest**
|
||||
(db-gated) — lokal keine DB gestartet, wie AK-P16a deferred. **David D-P16-blockiert:**
|
||||
bespoke öffentliche Booking-Page + Reschedule-Picker + Visual-Regression (DoD 21) +
|
||||
Hot-Swap-Drill (DoD 20).
|
||||
|
||||
**Hinweise:** Mail-Attachment-Durchreichung im Queue-Provider ergänzt (Payload trug
|
||||
`attachments` bereits, nur der Provider-Hop ließ sie fallen). 3 Booking-Activity-Typen
|
||||
(`appointment_cancelled/rescheduled/no_show`) zur Activity-Union ergänzt. Connect/
|
||||
Lifecycle sind CRM-Subject-Activities (kein eigenes Booking-Subject).
|
||||
|
||||
## Umsetzungs-Notiz (2026-07-01, Raffael) — ~90 % gewichtet, 5/7 DoD vollständig
|
||||
|
||||
Direkt auf `main` serverseitig nachgezogen, um den ohne Screens selbst machbaren
|
||||
P16b-Rest zu maximieren.
|
||||
|
||||
**Nachzug:**
|
||||
- Public Booking erzeugt bei fehlendem Kontakt jetzt ein echtes `InboxLead` über
|
||||
`createLead(...)`, verknüpft es über `Appointment.leadId` und schreibt die Activity
|
||||
auf Kontakt oder Lead. Der alte automatische Kontakt-Create ist raus.
|
||||
- Detail-Route akzeptiert serverseitig die M129-Intents `reschedule` und `reassign`
|
||||
mit `bookings.write` bzw. `bookings.admin`; die Picker-UI bleibt D-P16-blockiert.
|
||||
- `AvailabilityService.server.ts` ergänzt den atomaren Replace-/Read-Contract für
|
||||
`AvailabilityRule`/`AvailabilityException` inkl. Zeitfenster-, Datum- und
|
||||
Timezone-Validierung. Die `/availability`-Oberfläche bleibt screen-blockiert.
|
||||
- Tests ergänzt: Availability-Service-Unit-Test, Post-Booking-Static-Guard,
|
||||
Lifecycle-Action-Authorization-Guard.
|
||||
|
||||
**DoD-Stand nach Nachzug:**
|
||||
- Vollständig abgehakt: DoD 1, 3, 4, 6, 7 = **5/7 vollständig**.
|
||||
- Teilfertig: DoD 2 ist serverseitig bis auf echte `FormSubmission` erledigt
|
||||
(`AK-P16c`); DoD 5 ist serverseitig erledigt, aber Reschedule/Reassign-Picker-UI
|
||||
wartet auf David D-P16.
|
||||
- Offen/blockiert: echte `FormSubmission` (`AK-P16c`), D-P16-Screens/Visuals,
|
||||
Staging-DB-Cutover (`prisma db push`, `booking-constraints.sql`, RLS-Live-Check,
|
||||
Race-Integrationstest).
|
||||
|
||||
**Proof lokal:** `pnpm exec vitest run apps/web/app/modules/booking/services/AvailabilityService.server.test.ts apps/web/app/modules/booking/services/booking-postbooking-boundary.test.ts apps/web/app/modules/booking/routes/booking-auth-boundary.test.ts` → 8/8 grün; `pnpm typecheck` → grün.
|
||||
|
||||
## Umsetzungs-Notiz (2026-07-01, Raffael) — ~92 % gewichtet, selbst machbarer Server-Rest erledigt
|
||||
|
||||
Noch ohne Screens nachgezogen:
|
||||
- `BookingPage.intakeFormId` wird im Public-Booking-Resolve mitgeladen.
|
||||
- Public Booking schreibt innerhalb derselben Serializable-Transaktion eine echte
|
||||
`FormSubmission`, sobald die BookingPage ein Intake-Form referenziert, und verlinkt
|
||||
`Appointment.formSubmissionId`. Ohne `intakeFormId` bleibt `intakeAnswers` der
|
||||
Fallback, damit bestehende BookingPages nicht brechen.
|
||||
- Statische DB-Artefakt-Guards ergänzt: `booking-constraints.sql` muss die
|
||||
`appointment_no_overlap`-Exclusion-Constraint für `scheduled`/`held` enthalten;
|
||||
`booking-isolation.sql` muss alle fünf Booking-Tabellen mit RLS/FORCE/GUC-Policy
|
||||
und `hivegrid_app`-Grant abdecken.
|
||||
|
||||
**DoD-Stand nach Nachzug:**
|
||||
- DoD 2 ist serverseitig maximal: Lead/Activity, FormSubmission bei konfiguriertem
|
||||
Intake-Form, .ics-Mail, Serializable Slot-Re-Check und SQL-Backstop sind vorhanden.
|
||||
Vollständig grün wird der Punkt erst mit AK-P16c-Renderer/Form-Auswahl und echter
|
||||
Staging-DB-Ausführung.
|
||||
- DoD 5 bleibt screen-blockiert für den Reschedule-/Reassign-Picker; Service und
|
||||
Action-Contract sind bereits erledigt.
|
||||
|
||||
**Proof lokal:** `pnpm exec vitest run apps/web/app/modules/booking/services/booking-postbooking-boundary.test.ts apps/web/app/modules/booking/services/booking-db-artifacts.test.ts apps/web/app/modules/booking/services/AvailabilityService.server.test.ts apps/web/app/modules/booking/routes/booking-auth-boundary.test.ts` → 11/11 grün; `pnpm typecheck`, `pnpm lint`, `pnpm verify:i18n`, `pnpm test` und `pnpm build` → grün.
|
||||
Reference in new issue
Block a user