-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat(meet): Recall Calendar auto-join that replies, connect card on Meetings page, reply-name setting #4391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
graycyrus
merged 5 commits into
tinyhumansai:main
from
YellowSnnowmann:feat/recall-calendar-connect-ui
Jul 2, 2026
+2,136
−34
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c0ea7f8
feat(meetings): add reply display name functionality in MeetDefaultsD…
YellowSnnowmann 544b14e
Merge upstream/main into feat/recall-calendar-connect-ui
YellowSnnowmann f541eb5
fix(meet): gate reply-mode joins behind a wake phrase; settle Recall …
YellowSnnowmann 9cffb23
refactor(meetings): streamline UpcomingTable and enhance testing for …
YellowSnnowmann bf733d0
fix(recall): invalidate connectivity probe cache on connect/disconnect
YellowSnnowmann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
app/src/components/meetings/__tests__/MeetingsPage.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| import { cleanup, fireEvent, screen, waitFor } from '@testing-library/react'; | ||
| import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; | ||
|
|
||
| import { renderWithProviders } from '../../../test/test-utils'; | ||
| import MeetingsPage from '../MeetingsPage'; | ||
|
|
||
| // --------------------------------------------------------------------------- | ||
| // Mock the Tauri bridge so the page believes it's running in Tauri and we | ||
| // control the meet-settings payload it loads on mount / after the drawer closes. | ||
| // --------------------------------------------------------------------------- | ||
|
|
||
| const getMeetSettingsMock = vi.fn(); | ||
|
|
||
| vi.mock('../../../utils/tauriCommands', () => ({ | ||
| isTauri: () => true, | ||
| openhumanGetMeetSettings: (...args: unknown[]) => getMeetSettingsMock(...args), | ||
| })); | ||
|
|
||
| // --------------------------------------------------------------------------- | ||
| // Stub the heavy children so the test stays focused on MeetingsPage's own | ||
| // settings-loading + drawer-close re-fetch wiring. | ||
| // --------------------------------------------------------------------------- | ||
|
|
||
| // UpcomingTable is the consumer we assert on — surface the replyDisplayName prop. | ||
| vi.mock('../UpcomingTable', () => ({ | ||
| UpcomingTable: ({ replyDisplayName }: { replyDisplayName: string }) => ( | ||
| <div data-testid="upcoming-table" data-reply-name={replyDisplayName} /> | ||
| ), | ||
| })); | ||
|
|
||
| // The remaining children carry no behavior relevant here — trivial stubs. | ||
| vi.mock('../../recallCalendar/RecallCalendarCard', () => ({ | ||
| default: () => <div data-testid="recall-calendar-card-stub" />, | ||
| })); | ||
| vi.mock('../MeetComposer', () => ({ | ||
| MeetComposer: () => <div data-testid="meet-composer-stub" />, | ||
| })); | ||
| vi.mock('../ActiveMeetingBanner', () => ({ | ||
| ActiveMeetingBanner: () => <div data-testid="active-meeting-banner-stub" />, | ||
| })); | ||
| vi.mock('../HistorySection', () => ({ default: () => <div data-testid="history-section-stub" /> })); | ||
|
|
||
| // Lightweight drawer stub: renders a Close button (which calls onClose) only | ||
| // while open, so the drawer-close re-fetch path in MeetingsPage can be driven | ||
| // without pulling in the real drawer's own settings load. | ||
| vi.mock('../MeetDefaultsDrawer', () => ({ | ||
| MeetDefaultsDrawer: ({ open, onClose }: { open: boolean; onClose: () => void }) => | ||
| open ? ( | ||
| <button type="button" data-testid="drawer-close-stub" onClick={onClose}> | ||
| close-drawer | ||
| </button> | ||
| ) : null, | ||
| })); | ||
|
|
||
| function mockSettings(reply_display_name: string, watch_calendar = true) { | ||
| getMeetSettingsMock.mockResolvedValue({ result: { watch_calendar, reply_display_name } }); | ||
| } | ||
|
|
||
| describe('MeetingsPage', () => { | ||
| beforeEach(() => { | ||
| getMeetSettingsMock.mockReset(); | ||
| mockSettings('Alex Kim'); | ||
| }); | ||
|
|
||
| afterEach(() => cleanup()); | ||
|
|
||
| it('loads reply_display_name and passes it to UpcomingTable', async () => { | ||
| renderWithProviders(<MeetingsPage />); | ||
|
|
||
| await waitFor(() => | ||
| expect(screen.getByTestId('upcoming-table')).toHaveAttribute('data-reply-name', 'Alex Kim') | ||
| ); | ||
| expect(getMeetSettingsMock).toHaveBeenCalledOnce(); | ||
| }); | ||
|
|
||
| it('refreshes settings after the meeting-defaults drawer closes', async () => { | ||
| renderWithProviders(<MeetingsPage />); | ||
|
|
||
| // On-mount fetch settles first. | ||
| await waitFor(() => | ||
| expect(screen.getByTestId('upcoming-table')).toHaveAttribute('data-reply-name', 'Alex Kim') | ||
| ); | ||
| expect(getMeetSettingsMock).toHaveBeenCalledOnce(); | ||
|
|
||
| // The gear button opens the drawer (aria-label from i18n → "Meeting defaults"). | ||
| fireEvent.click(screen.getByRole('button', { name: /meeting defaults/i })); | ||
|
|
||
| // A subsequent load returns an updated display name so we can prove the | ||
| // re-fetch actually re-threads the value into UpcomingTable. | ||
| mockSettings('Sam Rivers'); | ||
| fireEvent.click(screen.getByTestId('drawer-close-stub')); | ||
|
|
||
| await waitFor(() => expect(getMeetSettingsMock).toHaveBeenCalledTimes(2)); | ||
| await waitFor(() => | ||
| expect(screen.getByTestId('upcoming-table')).toHaveAttribute('data-reply-name', 'Sam Rivers') | ||
| ); | ||
| }); | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.