feat(edit-meeting): show and remove a meeting's linked schedule - #557
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
b0b785b to
87b151a
Compare
Adds an admin-only linkedSchedules array alongside the existing zid-keyed sharedWith, keyed on linkedToMid so a Zoom-free In-Person family member is reported too, and releases a surviving member's linkedToMid when the family anchor is deleted.
Renders each linked schedule as a read-only ScheduleSummaryCard in the Edit form and the View popup -- mode, days, time, location, and whether it is still waiting to sync -- with a confirm-first Remove in Edit and a deep link to the schedule's own form for anything else.
…removal Covers ScheduleSummaryCard's fields, waiting-to-sync state and Remove action, Edit's confirm-then-delete flow (including what each Zoom outcome promises), and View's admin-only section.
…lete Retrieve: the card's full shape, resolution from either member, a Zoom-free member no zid lookup could find, and the admin-only gate (BUG-022). Delete: the survivor's released pointer, the shared Zoom meeting outliving the first deletion, and the survivor's name falling back to its single-schedule form.
41396e6 to
609597f
Compare
@coderabbitai summary
Description
Fifth PR of the linked meeting modes work, stacked on #555. PRs 3 and 4 taught the update and create routes to write a linked schedule; this one is the first that lets an admin see one. After it, the three legacy production meetings that were backfilled into families in PR 1 are visible and manageable in the app — read-only, plus a Remove action. There is still no create UI (PR 6).
linkedSchedules— this meeting's other schedules (Meeting.linkedToMid), each carrying only what the card renders: mode, room, Zoom room, host, recurrence pattern, start/end, and the two sync statuses. Deliberately a separate field from the existingsharedWith: that one is keyed onzidand answers "does another row use this Zoom link", which an In-Person family member — nozidat all — can never appear in, whereas this one answers "which schedules make up this one meeting". Admin-only for the BUG-022 reason (it names rooms, hosts and schedules a public viewer never sees), and omitted entirely rather than sent as[]for the overwhelmingly common single-schedule meeting, matchingsharedZoom's shape.ILinkedSchedule, so PR 6 can hand it a schedule that only exists in form state with no mid or sync status yet.startDateTime/endDateTimeaccept a string as well as aDatebecause a saved schedule arrives over JSON and is a string at runtime whatever the declared type says —Intl.formatthrows on an unwrapped one.'error'counts as waiting, not broken: a schedule created while the Zoom host pool was exhausted lands there with no calendar events at all, and the fix is the same retry sync as'pending'. Anullstatus is a legacy/backfilled row that never reported one, and claims nothing.formatScheduleLineis exported so the removal confirmation names the schedule exactly the way the card does.DELETE /api/delete/meetingwithdeleteOption: 'all'— it is a whole-series delete of a real Meeting row, so it gets the same modal weight as any other delete rather than an inline "×". The modal states the Zoom consequence up front, which is not the same in all three cases: nothing at all for an In-Person schedule (it was never on the Zoom meeting), kept when the surviving schedule still runs on it, deleted when this was the last row pointing at thatzid. None of the form's in-progress edits are submitted or discarded; the existingonUpdateSuccessrefresh re-reads the meeting without closing the panel.linkedToMidon its surviving members, inside the same transaction as the soft delete, so a lone row never dangles a pointer at a soft-deleted mid — its family drops to one and its Zoom topic and calendar titles fall back to the single-schedule name on the next write. Nothing to do when the deleted row was the linked member instead: the anchor's ownlinkedToMidwas never set. The shared Zoom meeting is untouched either way —syncDeleteAll's existing sibling/zid guard keeps it alive for whichever schedule is left, and only tears it down with the last one.EditMeetingcases (the read-only card and its link, silence for a single-schedule meeting, cancel deletes nothing, confirm hits the delete route, and both Zoom-consequence wordings), a new 9-caseScheduleSummaryCard.test.tsx, 2 newViewMeetingcases (admin sees it with no Remove; a non-admin never does), 5 newdelete-meeting-routecases (anchor-vs-member deletion, the shared Zoom meeting surviving the first delete and going with the last, and the survivor's external name falling back), and 6 newretrieve-meeting-detail-routecases (including a Zoom-free member reported despite sharing nozid, a soft-deleted member dropping out of the family, and a USER-role session plus a public caller both getting nothing).Testing
cd frontend && yarn test:all— green (lint, lint:css, typecheck, unit, component, integration, e2e), run against a clear port 3000.yarn test:component --testPathPattern "ScheduleSummaryCard|EditMeeting|ViewMeeting"andyarn test:integration --testPathPattern "retrieve-meeting-detail-route|delete-meeting-route"— the new cases above.pr_convention.md): the behavior-altering edits are the delete route's singleupdate→$transactionand the retrieve route's admin body gaining a field, so the existingdelete-meeting-route.test.tsandretrieve-meeting-detail-route.test.tssuites passing unchanged is the assertion that a single-schedule meeting deletes and reads back exactly as before; delegated to a subagent rather than run from the implementing context.linkedToMidis cleared when the anchor is the one removed.Area(s) Touched
Product areas
Integrations
Engineering
Pre-merge Checklist
yarn lint).