90 lines
4.2 KiB
Markdown
90 lines
4.2 KiB
Markdown
# Task EP.1.6.2-R1 - Upstream Big Calendar Source Adoption
|
|
|
|
Date: 2026-07-13
|
|
Status: Implemented
|
|
Upstream: `https://github.com/lramos33/big-calendar`
|
|
Pinned commit: `fbb8485e3d54b267261056c784632229ba6f7bc3`
|
|
|
|
## Outcome
|
|
|
|
R1 replaces the locally reimplemented EP.1.6.2 calendar renderer with copied upstream Big Calendar source under:
|
|
|
|
```text
|
|
src/features/crm/calendar/upstream-big-calendar/**
|
|
```
|
|
|
|
The active `/dashboard/crm/calendar` workspace now renders:
|
|
|
|
```text
|
|
CalendarProvider -> ClientContainer -> CalendarHeader -> Day / Week / Month / Year / Agenda
|
|
```
|
|
|
|
ALLA OS still owns Calendar Projection, Activity lifecycle, Business Events, Projection Runtime, CRM authorization, and React Query invalidation.
|
|
|
|
## Removal / Replacement Matrix
|
|
|
|
| Previous EP.1.6.2 file | R1 action | Replacement |
|
|
| --- | --- | --- |
|
|
| `big-calendar/provider.tsx` | removed | upstream `contexts/calendar-context.tsx` |
|
|
| `big-calendar/header.tsx` | removed | upstream `components/header/**` |
|
|
| `big-calendar/views.tsx` | removed | upstream `month-view`, `week-and-day-view`, `agenda-view`, `year-view` |
|
|
| `big-calendar/calendar-slot.tsx` | removed | upstream day/week/month cells and DnD droppables |
|
|
| `big-calendar/event-card.tsx` | removed | upstream event block, month badge, agenda card |
|
|
| `big-calendar/helpers.ts` | removed | upstream `helpers.ts` |
|
|
| `big-calendar/types.ts` | removed | upstream `interfaces.ts` and `types.ts` |
|
|
|
|
The previous custom folder was removed from the active source tree.
|
|
|
|
## Local Adapter Boundary
|
|
|
|
- `mapCalendarProjectionToUpstreamEvent()` maps `CalendarProjectionItem` into upstream `IEvent`.
|
|
- `mapUpstreamEventToActivityCommand()` maps upstream moved events into Activity reschedule commands.
|
|
- Upstream `IEvent` carries an `alla` metadata object for source references, editability, milestone/read-only flags, and visibility metadata.
|
|
- Read-only milestones are marked non-editable and prevented from dragging through upstream DnD wrappers.
|
|
|
|
## Upstream Patches
|
|
|
|
- Import paths were rewritten from `@/calendar/*` to the isolated local upstream directory.
|
|
- `lucide-react` imports were mapped to the project icon registry via `upstream-big-calendar/icons.tsx`.
|
|
- Upstream demo add/edit dialogs were replaced with ALLA-safe integration shells; React Hook Form was not introduced.
|
|
- Upstream mock data, request helpers, and demo schemas were removed.
|
|
- `CalendarProvider` was extended with `initialDate`, `initialView`, and `onEventChange`.
|
|
- `ClientContainer` now reads selected view from upstream context so the toolbar can switch views inside the ALLA route.
|
|
- Header view buttons preserve upstream toolbar composition but no longer navigate to upstream demo routes.
|
|
- Upstream `react-dnd` / `react-dnd-html5-backend` behavior is used for drag/drop.
|
|
|
|
## Dependency Review
|
|
|
|
Added:
|
|
|
|
- `react-dnd@16.0.1`
|
|
- `react-dnd-html5-backend@16.0.1`
|
|
|
|
Not added:
|
|
|
|
- `react-hook-form`
|
|
- `@hookform/resolvers`
|
|
- `react-aria-components`
|
|
- `lucide-react`
|
|
|
|
Reason: those were only required by upstream demo forms/config controls or were replaced by existing ALLA UI/icon primitives.
|
|
|
|
`npm install` reported existing audit findings after dependency update: 9 moderate and 3 high. No automatic `audit fix --force` was run because it may introduce unrelated breaking changes.
|
|
|
|
## Parity Notes
|
|
|
|
- Adopted upstream Day, Week, Month, Agenda, Year, Header, DnD provider, drag layer, droppable cells, event positioning helpers, multi-day rows, and month event badges.
|
|
- Agenda empty state comes from upstream agenda view.
|
|
- Day/Week/Month still render actual upstream grids when empty.
|
|
- Year view is adopted.
|
|
- Drag/drop uses upstream `react-dnd` mechanics and forwards changed editable Activity events to the ALLA Activity reschedule API.
|
|
- Resize edge-handle parity remains limited by the reviewed upstream commit; no separate local resize approximation was retained.
|
|
- Full browser visual parity, dark-mode parity, and interaction parity still require manual browser verification.
|
|
|
|
## Verification
|
|
|
|
- Passed: `npm run typecheck`
|
|
- Passed: `npx oxlint src/features/crm/calendar`
|
|
- Not run: `npm run db:generate`; no schema changes.
|
|
- Not automated: browser drag/drop regression, responsive screenshots, screen-reader pass, dark-mode visual parity.
|