HYBRID CALENDAR 5.6.0 — RELEASE SCOPE (builds on 5.5.0)

Rows — one behaviour everywhere
- Scheduled Tasks, Daily, Weekly, Weekend, Monthly and Yearly are all paged rails with ‹ Today › controls and a live page label.
- Each row opens centred on today (Daily: today · Weekly: this week · Weekend: this weekend, or last weekend's carryover on Mondays ·
  Monthly: this month · Yearly: this quarter). All pages share one centred width so the rows line up.
- "⌖ Today" in the toolbar re-centres every row at once.
- Desktop: click-and-drag on empty space to pan; release snaps to the nearest page. Arrow keys work when a row is focused.
- Mobile: each column is a swipe stop — one day part / day / week / month at a time, centred.
- Rails keep their page when the window resizes.
- Ranges: Daily −14…+30 days · Weekly/Weekend −8…+16 weeks · Monthly −6…+12 months · Yearly previous, current and next year.
  Anything scheduled outside the range appears on an "Outside this view" page at the end of its row.

Moving categories and tasks
- A category (with its tasks) can be dragged by its header into any row slot, into another board column, or before another category.
- The ⇄ button on categories and tasks opens "Move to…" (row, date, AM/PM/Evening or weekend slot) — works on touch and for any date.
- Tasks inside a category take the category's row, slot and date. Tasks previously moved out on their own stay where they are.
- Moving a category back to the board keeps its tasks' own dates.
- While dragging, hover the ‹ › arrows to flip pages, or hold near a row's edge to auto-scroll.
- A task dropped into a category inherits that category's placement. A task added to a placed category lands with it.

Date status
- Every card and placed category shows a live date chip and colour: +3 navy · +2 hot blue · +1 light blue · today green ·
  −1 yellow · −2 orange · −3 red · DONE muted. Recomputed immediately after any move or status change.
- Monthly placements are due at the end of their week and Yearly placements at the end of their month.
- Status pills follow the Status Colors legend: NEW slate · IN PROGRESS light blue · PENDING yellow · WAITING orange (new) · DONE navy.

Scoring
- Ledger now records Hybrid task moves, category moves (with every task that moved with them) and automatic carryover.
- Rule: slipping past the committed window −1/day; pulling earlier +1/day; narrowing Year → Month → Week → Day = 0.
- Category rows are informational; each task inside is scored individually.
- Score card: week and month score, category moves, past due now, due in the current window; per-task table with original vs current date;
  category movement table; ledger with type and source (Moved / With category / Carryover).
- Hero scores update live after every move.

Automation fixes
- Friday carryover runs from 17:00 (it used to pull Friday's own tasks at the first cron run of the day) and skips DONE tasks.
- Monday To-Schedule only sweeps past weekends, not future planned weekends.
- Carryover moves whole categories with their tasks and records them in the ledger.
- Daily sync puts untimed Daily AM/PM tasks in their AM/PM list (they used to fall to Evening) and no longer pulls Monthly/Yearly placements into a day list.
- A duplicated task no longer shares the original's CRM task link.

Schema (additive only — no DROP/TRUNCATE)
- categories: zone, slot, scheduled_date, updated_at · cards: original_date · movements: item_type, card_id, category_id, source, batch.
- The installer runs automatically on the first admin load after upload (the version option changes to 5.6.0).

5.6.0 update (Sep 29)
- Scheduled Tasks (first row) on desktop and tablet: always 4 columns per line, wrapping onto a second, third… line as columns are added.
  Mobile keeps the one-column-per-swipe rail.
- Every row, column, category and task can be closed and opened. ⌃ = open (click to close), ⌄ = closed (click to open).
  A closed task keeps its title and status and hides the note field, icons and notes.
- Open/closed state is remembered in this browser.

5.6.1 (Sep 29)
- Fix: rows now actually close (the row layout was overriding "hidden"). Asset URLs carry the file time, so browsers load new JS/CSS after every update.
- Scoring: a task's score = its moves (later −1/day, earlier +1/day; Mon→Tue→Wed→Tue = −1) + completion
  (completed before its due day +1/day, after −1/day, within its day/week/month 0).
  The score is OPEN until the task is DONE; completion makes it final. Un-completing reopens it. Deleting a task removes its score.
  Week/Month = final scores of tasks completed in that period. OPEN = running score of tasks not done yet.
- Each card shows its score badge (dashed = open, solid ✓ = final). The date chip now reads "Today" / "in 2d" / "3d late" so it can't be mistaken for the score.
- Assign: every task has an assignee picker above the notes (active Perfex staff). The assignee is shown in the Perfex daily list lines.
- Category ⌃/⌄ sits right after the category's date chip, matching the task ⌃ after the status.
- Completed tasks fade out and are hidden; "Show completed (n)" at the top brings them back (remembered per browser).
  The 5-per-category limit counts open tasks only.
- Sync daily lists: dates are sent in Perfex's own date format (the old format made Perfex refuse the task). The result shows under
  the toolbar with links to each Perfex task list, or the reason it failed.
- Scoring page: real "Score Card" and "Movement Tracking" tabs; the sidebar items open the matching tab.
- Schema (additive): cards.assigned_to, cards.completed_at.

5.6.2 (Sep 29)
- Scoring in days, not points: moving later −1 day per day, earlier +1. One badge per task (hidden while 0; ✓ when final); the date chip is gone on done tasks.
- Procrastination rate = days postponed ÷ tasks moved, per month. Scoring page opens on the current month with ‹ › month navigation,
  a 12-month history, and month-scoped task / category / ledger tables. The top bar shows this month's net days and rate.
- Team tab (admins): every user's procrastination rate for the month, highest first. Sidebar: "Team Procrastination".
- Admin · Reset tab (admins only): pick a user or ALL USERS, type RESET. The calendar is exported first (ZIP of CSVs + JSON, kept in
  uploads/hybrid_calendar_exports/, not publicly readable) and downloads immediately; only then is it deleted. If the export can't be written, nothing is reset.
  Past exports stay listed for download. Perfex tasks already synced are not touched. The reset is written to the Perfex activity log.
- Client per task: 🏢 button beside the assignee. Search existing Perfex clients or type a new name to create it (needs Perfex "Customers → Create").
  The client is shown in the Perfex daily list lines.
- ⤢ on every column head expands that column (e.g. Monday) to the full page with its tasks laid out across it; ‹ › then steps Monday → Tuesday…
  ⤡ returns to the week. Remembered per row.
- Auto-fit: when a row's columns would be narrower than ~230px (e.g. 5 weekdays on a laptop/tablet), the row scrolls column by column instead of squeezing.
- Card icon rows wrap instead of overflowing the card.
- Schema (additive): cards.client_id.

5.7.0 (Sep 30)
- Every row shows 4 columns by default, with a view picker on each row: Auto (4 desktop · 2 iPad · 1 phone), 1, 2, 4, All.
  The choice is remembered per row. ‹ › moves a full view at a time; drag or swipe moves one column. ⤢ still expands one column to the whole page.
  Scheduled Tasks (board): the picker sets columns per line (All = as many as fit).
- Daily has a 4th column, Standby (after Evening). Moving into, out of, or completing from Standby never counts; Standby has no due date,
  is not sent to Perfex by Daily Sync, and is left alone by the weekend carryover.
- Monthly is a rolling view of 52 weeks, 4 at a time. Each week is titled with its lead month (the month it starts in), so
  Sep 28 – Oct 4 reads "September" and October starts the week after.
- Date automation & status colours: a full palette editor (admins; applies to everyone): colour picker and label for every date-status
  and status colour, live preview, presets (Default, High contrast, Soft, Traffic light), Save and Reset to default. Text colour adjusts for contrast.
- Scoring & reports, users first: a task counts for its assignee; unassigned tasks count for the owner of the calendar.
  Tabs: Users (score card per user) · Task tracking (every task with responsible user, client, category and category date, placement,
  due date, date status, status, moves, days this month and total) · Movement (full ledger) · Categories (dates, due, tasks, moves) ·
  Monthly trend · Admin reset. Admins pick any user or all users; everyone else sees the tasks they are responsible for.
  All tables sort by clicking a heading and have a text filter; Task tracking and Movement also filter by user and by status / kind.


5.7.1 (Sep 30) — hotfix for HTTP 500 on the calendar page
- Page helper functions renamed (hcal_… / hcalr_…) so they cannot clash with functions from other modules (e.g. Hybrid Core).
- If the calendar ever fails to load, admins now see the actual PHP error on the page instead of a blank HTTP 500
  (it is also written to the Perfex log); other users see a short notice.
- The module checks that its files match: if the controller and model come from different uploads (partial upload or a stale
  PHP cache), the page says so and tells you to re-upload the whole folder / clear OPcache.

5.7.2 (Sep 30) — diagnostics
- Every page and action of the module is wrapped: if anything fails, admins see the error message, file, line, PHP version and module
  version on a normal error page (and it is written to the Perfex log) instead of a blank HTTP 500.

5.7.3 (Sep 30) — fix: MySQL rejected a column alias named "delayed" (a reserved word), which caused the HTTP 500. Renamed, and the other aliases hardened.

5.8.0 (Sep 30)
- Per-user calendars: everyone's calendar shows the tasks other people assigned to them, on the same dates (tagged "from …").
  The assignee can change their status; only the owner moves or edits them. Admins get "Calendar of [user]" to open anyone's calendar, view-only.
- Push to CRM (↗ on each task): Reminder (default) goes into Perfex's own reminder process for the assignee (optional email);
  on the client if the task has one, otherwise on a linked Perfex task. Or push as a Perfex task (reused if already linked). "CRM #…" link on the card.
- Fix: Perfex task assignee is now set correctly when the module creates Perfex tasks (daily lists included).
- Colours palette moved to its own page (sidebar: Colours; tab on Calendar / Score Card).
- Less text: short row titles, no repeated page line in column heads, hints removed, shorter labels.
