Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(calendar): hide Copy guest emails while the guest list is hidden (#8664)
gbirman5ac305ba26bb
diff --git a/apps/web/src/features/calendar-view/components/EventGuests.test.tsx b/apps/web/src/features/calendar-view/components/EventGuests.test.tsxindex 6435939680..78a311e373 100644--- a/apps/web/src/features/calendar-view/components/EventGuests.test.tsx+++ b/apps/web/src/features/calendar-view/components/EventGuests.test.tsx@@ -392,6 +392,25 @@ describe('adding guests from event details', () => {).toBeNull();});+ it('offers no guest addresses to copy while the organizer hides the guest list', () => {+ renderGuests(+ event({+ guestPolicy: {+ canModify: false,+ canInviteOthers: true,+ canSeeOtherGuests: false,+ },+ viewerCan: { ...MAY_INVITE, inviteGuests: false },+ })+ );++ expect(+ screen.queryByRole('button', { name: 'Copy guest emails' })+ ).toBeNull();+ // The organizer the copy lists can still be written to.+ expect(screen.getByRole('button', { name: 'Email guests' })).toBeTruthy();+ });+it('switches to the hidden-list explanation when the server finds the list hidden', async () => {mocks.invite.mockRejectedValue({ code: 'guest_list_hidden' });const user = userEvent.setup();diff --git a/apps/web/src/features/calendar-view/components/EventGuests.tsx b/apps/web/src/features/calendar-view/components/EventGuests.tsxindex 3f76d9a74f..339c74f242 100644--- a/apps/web/src/features/calendar-view/components/EventGuests.tsx+++ b/apps/web/src/features/calendar-view/components/EventGuests.tsx@@ -227,9 +227,11 @@ function EventInviteGuestsAction(props: {/*** The guest-row actions Google Calendar users know: copy every guest's* address and start an email to the other guests (both hidden when the- * viewer is the only one, as on a snapshot), or add guests when the organizer- * allows it. Emailing closes the details first: closing hands focus back to- * the calendar chip, and the composer's To field has to win that exchange.+ * viewer is the only one, as on a snapshot, and copying while the organizer+ * hides the guest list, which the copy does not hold), or add guests when the+ * organizer allows it. Emailing closes the details first: closing hands focus+ * back to the calendar chip, and the composer's To field has to win that+ * exchange.*/function EventGuestActions(props: {event: CalendarEvent;@@ -241,16 +243,18 @@ function EventGuestActions(props: {return (<Show when={!props.event.teamProjection}><Show when={eventEmailRecipients(props.event).length > 0}>- <Button- label="Copy guest emails"- variant="ghost"- size="icon-sm"- depth={3}- class="text-ink-muted [&_svg]:size-4"- onClick={() => copyGuestEmails(guestEmails(props.event.attendees))}- >- <CopyIcon />- </Button>+ <Show when={!guestListHidden(props.event)}>+ <Button+ label="Copy guest emails"+ variant="ghost"+ size="icon-sm"+ depth={3}+ class="text-ink-muted [&_svg]:size-4"+ onClick={() => copyGuestEmails(guestEmails(props.event.attendees))}+ >+ <CopyIcon />+ </Button>+ </Show><Buttonlabel="Email guests"variant="ghost"diff --git a/docs/agent-guide/calendar.md b/docs/agent-guide/calendar.mdindex aaf9145fc3..c0a8fc5e16 100644--- a/docs/agent-guide/calendar.md+++ b/docs/agent-guide/calendar.md@@ -458,7 +458,8 @@ start to another weekday keeps a custom rule on the day the editor shows.As in Google Calendar, the guests row of the details popover (a bottom sheet on phones)carries `Copy guest emails` and `Email guests` icon buttons, both hidden when you are theonly guest (always so on a snapshot). Copying puts every guest's address on the clipboard,-comma-separated. Emailing opens a new email addressed to every guest but you, with the event+comma-separated; it is hidden too while the organizer hides the guest list, which your copy+does not hold. Emailing opens a new email addressed to every guest but you, with the eventtitle as its subject (as `Forward by email` fills it in) — in a splitbeside the calendar on desktop, as the full-screen composer on touch devices, in its owncomposer even when another one is open. Deleting an event asks first, and says guests will be