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): show each guest's address in event details (#9462)
gbirman9680fe183d20
diff --git a/apps/web/src/features/calendar/components/EventDetails.test.tsx b/apps/web/src/features/calendar/components/EventDetails.test.tsxnew file mode 100644index 0000000000..d3d016a4eb--- /dev/null+++ b/apps/web/src/features/calendar/components/EventDetails.test.tsx@@ -0,0 +1,144 @@+/**+ * @vitest-environment jsdom+ */++import type { CalendarEvent } from '@app/features/calendar/types';+import type { CalendarAttendee } from '@service-storage/generated/schemas/calendarAttendee';+import { cleanup, render, screen } from '@solidjs/testing-library';+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';+import { EventAttendeesSection, EventDetails } from './EventDetails';++vi.mock('@core/component/UserIcon', () => ({+ UserIcon: () => document.createElement('span'),+}));+vi.mock('@core/mobile/isMobile', () => ({ isMobile: () => false }));+// Macro profile and contact names; any other address has no name and falls+// back to itself, as the real lookup does.+vi.mock('@core/user', async (importOriginal) => {+ const names: Record<string, string> = {+ 'macro|[email protected]': 'Bea Booker',+ 'macro|[email protected]': 'Mo Viewer',+ 'macro|[email protected]': 'Hana Host',+ };+ return {+ ...(await importOriginal<typeof import('@core/user')>()),+ getDisplayName: (id?: string) =>+ id ? (names[id] ?? id.replace(/^macro\|/, '')) : '',+ };+});++class ResizeObserverStub {+ observe() {}+ unobserve() {}+ disconnect() {}+}++beforeEach(() => {+ vi.stubGlobal('ResizeObserver', ResizeObserverStub);+});++afterEach(() => {+ cleanup();+ vi.unstubAllGlobals();+});++function attendee(overrides: Partial<CalendarAttendee>): CalendarAttendee {+ return {+ email: '[email protected]',+ isOptional: false,+ isOrganizer: false,+ isSelf: false,+ responseStatus: 'accepted',+ ...overrides,+ };+}++function event(overrides: Partial<CalendarEvent> = {}): CalendarEvent {+ return {+ id: '["event-1","2026-10-22T14:00:00Z"]',+ eventId: 'event-1',+ occurrenceKey: '2026-10-22T14:00:00Z',+ isCancelled: false,+ isReadOnly: false,+ guestPolicy: {+ canModify: false,+ canInviteOthers: true,+ canSeeOtherGuests: true,+ },+ viewerCan: {+ editDetails: false,+ inviteGuests: false,+ removeGuests: false,+ setGuestPolicy: false,+ rsvp: true,+ organize: false,+ },+ attendees: [],+ recurrenceLines: [],+ sourceCalendarIds: ['calendar-1'],+ calendarId: 'calendar-1',+ title: 'Planning',+ start: '2026-10-22T14:00:00Z',+ end: '2026-10-22T15:00:00Z',+ allDay: false,+ calendar: { id: 'calendar-1', name: 'Calendar', color: 'orange' },+ visibleCalendars: [],+ ...overrides,+ };+}++describe('the guest list in event details', () => {+ it('shows each named guest’s address under their name', () => {+ render(() => (+ <EventAttendeesSection+ attendees={[+ attendee({ email: '[email protected]' }),+ attendee({ email: '[email protected]', isSelf: true }),+ ]}+ />+ ));++ expect(screen.getByText('Bea Booker')).toBeTruthy();+ expect(screen.getByText('[email protected]')).toBeTruthy();+ expect(screen.getByText('Mo Viewer (you)')).toBeTruthy();+ expect(screen.getByText('[email protected]')).toBeTruthy();+ });++ it('shows a guest without a name by their address, once', () => {+ render(() => (+ <EventAttendeesSection+ attendees={[attendee({ email: '[email protected]' })]}+ />+ ));++ expect(screen.getAllByText('[email protected]')).toHaveLength(1);+ });+});++describe('the organizer in event details', () => {+ it('shows the organizer’s address under their name', () => {+ render(() => (+ <EventDetails+ event={event({+ organizerName: 'Hana Host',+ organizerEmail: '[email protected]',+ })}+ timeFormat="12-hour"+ />+ ));++ expect(screen.getByText('Hana Host')).toBeTruthy();+ expect(screen.getByText('[email protected]')).toBeTruthy();+ });++ it('shows an organizer known only by address once', () => {+ render(() => (+ <EventDetails+ event={event({ organizerEmail: '[email protected]' })}+ timeFormat="12-hour"+ />+ ));++ expect(screen.getAllByText('[email protected]')).toHaveLength(1);+ });+});diff --git a/apps/web/src/features/calendar/components/EventDetails.tsx b/apps/web/src/features/calendar/components/EventDetails.tsxindex 5df73ac9e8..b59b86df20 100644--- a/apps/web/src/features/calendar/components/EventDetails.tsx+++ b/apps/web/src/features/calendar/components/EventDetails.tsx@@ -125,6 +125,7 @@ function resolveCalendarAttendee(function CalendarUserItem(props: {displayName: Accessor<string>;+ email?: string;iconProps?: UserIconProps;isSelf: boolean;secondaryLabel?: JSX.Element;@@ -134,6 +135,8 @@ function CalendarUserItem(props: {nameClass?: string;}) {const secondaryLabelPosition = () => props.secondaryLabelPosition ?? 'below';+ const nameIsEmail = () => props.displayName() === props.email;+ const email = () => (props.email && !nameIsEmail() ? props.email : undefined);return (<div class="flex min-w-0 items-center gap-4 sm:gap-3">@@ -168,13 +171,21 @@ function CalendarUserItem(props: {</Show><spanclass={cn(- 'block select-text truncate text-ink-muted',+ 'block select-text text-ink-muted',+ nameIsEmail() ? 'wrap-anywhere' : 'truncate',props.nameClass)}>{props.displayName()}<Show when={props.isSelf}> (you)</Show></span>+ <Show when={email()}>+ {(address) => (+ <span class="block select-text text-xs text-ink-extra-muted wrap-anywhere sm:text-xxs">+ {address()}+ </span>+ )}+ </Show><Showwhen={secondaryLabelPosition() === 'below' && props.secondaryLabel}>@@ -228,6 +239,7 @@ function CalendarAttendeeItem(props: {return (<CalendarUserItemdisplayName={props.item.displayName}+ email={attendee.email}iconProps={props.item.iconProps}isSelf={attendee.isSelf}secondaryLabel={secondaryLabel}@@ -429,6 +441,7 @@ function CalendarOrganizerItem(props: { organizer: CalendarPerson }) {<div class="min-w-0"><CalendarUserItemdisplayName={displayName}+ email={props.organizer.email}iconProps={iconProps}isSelf={props.organizer.isSelf}secondaryLabel="Organizer"diff --git a/docs/agent-guide/calendar.md b/docs/agent-guide/calendar.mdindex 6d0b929083..b375ceaf00 100644--- a/docs/agent-guide/calendar.md+++ b/docs/agent-guide/calendar.md@@ -545,6 +545,15 @@ selected, since the presets never end. Either is saved as written while untouchestart to another weekday keeps a custom rule on the day the editor shows. Event details (desktoppopover and phone drawer) and Forward by email's summary name the day too (`Weekly on Saturday ·3 occurrences`), read from the occurrence's original slot in the event's own time zone.+Each guest in event details (desktop popover and phone drawer) shows their name with their+address on a muted line under it, as the user card shows a person, followed by `Organizer` or+`Optional` and any comment; the viewer's own row (`(you)`) does too, which tells their inboxes+apart. A guest Macro has no name for (no Macro profile or email contact) shows the address+once, as the name. The address wraps instead of truncating in a narrow popover or on a phone.+The `Organizer` row under the calendar row, shown when someone other than the calendar+organizes the event, adds the organizer's address the same way. Teammates' read-only event+details (`Shared in Macro · Read only`) list guests by provider name, or by address when there+is none.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,