Files
TX/artifacts/api-server
Riyadh 459c5304a0 Task #152: cell-merge + current-meeting tint on EM schedule
Adds two related features to the executive-meetings schedule:

1. Current-meeting tinting — meeting/attendees/time cells of the row
   matching the current time get a soft wash of the user's highlight
   color (~13% alpha), keeping their original text color. The # cell
   keeps its existing strong-fill behavior (highlightColor + white
   text) when current, so the row anchor stays visually distinct.

2. Cell-merge overlay — editors can merge "meeting+attendees",
   "meeting+attendees+time", or the whole row into a single free-text
   cell. Stored in the DB so all viewers see the same overlay; the
   originals (titleAr/En, attendees, start/endTime) stay untouched
   and are restored on Unmerge.

Implementation notes
- DB: 3 nullable columns added to executive_meetings
  (merge_start_column, merge_end_column, merge_text). Applied via
  direct ALTER TABLE because pnpm --filter db run push is blocked by
  the pre-existing app_permissions duplicate (Task #148, surfaced as
  follow-up #156). Schema file kept in sync.
- API: meetingPatchSchema accepts an optional `merge` field
  (`null | {start,end,text}`) with start<=end ordering and server-side
  sanitizeRichText on the text. Reuses the existing PATCH route.
- Frontend: new MergeMenu component + canonical-order range
  resolution so merges still render when boundary columns are hidden,
  and gracefully degrade to unmerged rendering (without losing DB
  state) when column reordering makes the visible span non-contiguous.
  Unmerge stays available whenever a stored merge exists, even in
  degraded state, and existing mergeText is preserved on re-merge.
  Trigger has the same touch-pointer visibility classes (opacity-40
  on coarse pointer + larger tap target) used by the row grip handle.
- i18n: en + ar keys under executiveMeetings.merge.*
- Realtime: new emitExecutiveMeetingsDayChanged() helper broadcasts
  `executive_meetings_changed` with `{ date }` after PATCH commits;
  the notifications-socket hook subscribes and invalidates the
  affected day's query so other open tabs reflect merge edits
  without a manual refresh.

Out of scope (deferred to follow-ups)
- API + e2e test coverage for the merge endpoint and UI flows (#154)
- Realtime emission for the remaining EM mutations — POST/DELETE/
  PUT/duplicate/reorder (#155)

Validation
- TypeScript compiles cleanly across the changed surfaces (existing
  pre-existing errors in api-zod / generated client are unrelated).
- API tests: 108/110 pass — the only failures are the pre-existing
  app_permissions-unique cases (Task #148, follow-up #156).
- Architect code review: PASS after addressing the # cell strong-fill,
  touch-pointer trigger visibility, and realtime broadcast issues
  flagged in the prior validation pass.
2026-04-29 14:13:07 +00:00
..
2026-04-18 02:00:09 +00:00
2026-04-18 02:00:09 +00:00