Files
TX/artifacts/tx-os/public/opengraph.jpg
T
riyadhafraa 6abc60deaa Task #198: Edit→Save toggle + bulk-clear attendees + multi-select delete meetings
Three executive-meetings polish features on the Schedule view:

1. Edit-mode toggle now flips its label (Edit↔Save) and icon
   (Pencil↔Check) so a second click reads as "I'm done editing."
2. New-/edit-meeting dialog gained a "Remove all attendees" button
   next to "+ Add attendee" with a confirm prompt; only renders
   when ≥1 attendee is present.
3. Per-row select checkboxes (only in edit mode) drive a tri-state
   "select all" checkbox in the schedule header AND a floating
   bulk toolbar that appears only when ≥1 row is selected. The
   toolbar shows "Selected N of M" with "Delete selected" +
   "Clear selection". Single confirm wipes all checked meetings.

Implementation notes:
- Bulk-select checkbox is rendered as an absolute overlay on the
  first visible non-merged cell of every row (and on the merged
  <td> for merged rows) instead of being inlined inside the # cell.
  This (a) preserves the # cell's grip handle so dnd-kit drag still
  works, (b) keeps the checkbox reachable when users hide # via the
  column customizer, and (c) keeps it reachable on rows whose merge
  swallows the leading cells.
- Tri-state "select all" is rendered as an absolute overlay on the
  first visible <th> in <thead> (typically # but falls back to the
  next visible header when # is hidden).
- Floating bulk toolbar is gated on `selectedMeetingIds.size > 0`
  per spec — it disappears entirely with zero selection.
- Selection clears on date change, edit-mode-off, post-bulk-delete,
  AND on every successful day refresh (detected via meetings array
  reference change from useQuery), so a refresh that returns the
  same ids cannot leave a stale selection.
- Locale text added to ar.json/en.json for saveToggle.*, bulk*,
  removeAll, schedule.bulkSelectRow.

Tests:
- New spec executive-meetings-bulk-actions.spec.mjs (5 tests):
  edit toggle flip, dialog remove-all-attendees, multi-select
  delete with DB verify + tri-state header indeterminate/unchecked
  state assertions, hidden-# overlay survival, merged-row overlay
  survival. All pass.
- Verified no regressions in executive-meetings-edit-toggle (4/4),
  -row-actions-menu (2/2), -schedule-features (4/4, including
  drag-row reorder), -manage-create (1/1).

Code review (architect, 3 rounds):
- Round 1 flagged checkbox-in-#-cell breaks when # is hidden →
  fixed by lifting to absolute overlay.
- Round 2 flagged merged rows skipped overlay → fixed by sharing
  the overlay JSX between renderCell (first unmerged cell) and the
  merged <td>, plus added the merged-row e2e regression test.
- Round 3 (validation) flagged: (a) toolbar visible without
  selection, (b) tri-state should be in <thead>, (c) selection
  should reset on day refresh. All three addressed; tests updated.

Pre-existing failures unrelated to this task: 2 PDF tests in
api-server (Tasks #172/#179) — untouched.
2026-04-30 08:30:39 +00:00

25 KiB
1280x720px