Skip to content

feat(webapp): add Meet Now modal and instant meeting flow [WPB-25057]#21886

Merged
thisisamir98 merged 34 commits into
mainfrom
meet-now
Jul 21, 2026
Merged

feat(webapp): add Meet Now modal and instant meeting flow [WPB-25057]#21886
thisisamir98 merged 34 commits into
mainfrom
meet-now

Conversation

@thisisamir98

@thisisamir98 thisisamir98 commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator
TaskWPB-25057 [Web] "Meet now" flow

Summary

  • Add a Meet Now modal (title + optional participants) wired from the header dropdown and empty meetings list.
  • Create ad-hoc meetings with RFC instant time defaults (start now, end +1h or midnight cap) and join the call directly with no preparation room.
  • Reuse existing meeting creation, participant sync, list refresh, and join-call plumbing; inject serviceTasks at the meetings composition root.

Test plan

  • Open Meetings → Meet now (header menu + empty list) and confirm modal opens
  • Submit without title → inline validation error
  • Submit with title, no participants → enters call directly; meeting shows as ongoing in list
  • Submit with participants → enters call; participants synced
  • Confirm Schedule Meeting flow is unchanged
  • yarn nx run webapp:test --testFile=src/script/components/Meeting/MeetNowModal/useMeetNowSubmit.test.tsx
  • yarn nx run webapp:test --testFile=src/script/components/Meeting/meetingStore/createMeetingStore.test.ts
  • yarn nx run webapp:test --testFile=src/script/components/Meeting/ScheduleMeetingModal/scheduleMeetingService.test.ts

Wire Meet Now entry points to a modal that creates an ad-hoc meeting with a required title and optional participants, applies RFC instant time defaults, refreshes the meetings list, and joins the call directly without a preparation room. Inject meeting store service tasks at the composition root and reuse existing schedule-meeting creation and join plumbing.
Comment thread apps/webapp/src/script/components/Meeting/MeetNowModal/useMeetNowSubmit.ts Outdated
Comment thread apps/webapp/src/script/components/Meeting/meetNowModal/useMeetNowSubmit.ts Outdated
Comment thread apps/webapp/src/script/components/Meeting/meetingStore/createMeetingStore.test.ts Outdated
Comment thread apps/webapp/src/script/components/Meeting/meetNowModal/useMeetNowModal.ts Outdated
Comment thread apps/webapp/src/script/components/Meeting/meetNowModal/meetNowForm.tsx Outdated
Comment thread apps/webapp/src/script/components/Meeting/shared/service/meetingService.ts Outdated
Comment thread apps/webapp/src/script/components/Meeting/meetNowModal/meetNowModal.styles.ts Outdated
Pass ConversationState from MeetNowModal instead of resolving it inside
the hook, so the create-and-join flow can be tested with explicit deps.
Assert the created conversation is passed into join, and document that
submit returns true for creation success even when join is blocked or fails.
Rename the meetNowModal directory and its PascalCase file names to match
the agreed camelCase convention for paths introduced in this PR.
Replace the submit boolean with a MeetNowSubmitResult that separates
creation failure from join success, blocked join, and join failure.
Await joining before submit resolves so the result reflects the full flow.
Block close, backdrop, and Escape while submission is in progress, and
ignore stale submit completions after the modal session was dismissed.
Replace the Meet Now form wrapper with a real form and wire the footer
submit button through the HTML form attribute so Enter and click share
the same onSubmit path.
Map Meet Now and Schedule Meeting form state into explicit command
types before calling meetNowMeeting and scheduleMeeting, so services
no longer depend on modal presentation fields like participantsFilter.
Move defaults, styles, participants, commands, service logic, and submit
helpers into Components/Meeting/shared so Meet Now and Schedule Meeting
no longer depend on each other's internal modules.
Move the meet now submit flow into a plain submitMeetNow function with
explicit dependencies, following the same pattern as useScheduleMeetingSubmit.
The hook now only wires React state and dependencies.
Add direct tests for add_permission null and enum values on the shared
conversation schema, matching backend conversation response semantics.
Remove createMeetingStoreServiceTasks and wire schedule, meet now, and
update meeting operations directly in the Meetings composition root.
Use explicit Ok and Just checks in loadMeetingForEdit tests instead of
match fallbacks with sentinel values.
Replace invalid `.value` access on true-myth Maybe<Date> with
`unwrapOr`, matching the pattern used in other Meeting tests.
Use required TranslationKey | undefined fields, explicit undefined checks,
and Result-based validators so error presence is clear in Meet Now and
Schedule Meeting flows.
Drop Meet Now test identifiers that nothing references, and make
MeetingParticipantsPicker dataUieName optional so callers can omit it.
Use a neutral success type for the shared createMeetingAndSyncParticipants
helper since both schedule and meet-now flows call it.
Remove the re-export facade from meetNowModal.styles and import shell
styles from the shared meeting styles module, matching Schedule Meeting.
Reorder imports and keep runtime values out of type-only imports after
running eslint --fix on affected Meeting files.
Comment thread apps/webapp/src/script/components/Meeting/meetNowModal/submitMeetNow.ts Outdated
Comment thread apps/webapp/src/script/components/Meeting/meetingStore/createMeetingStore.test.ts Outdated
Comment thread apps/webapp/src/script/components/Meeting/meetingStore/createMeetingStore.test.ts Outdated
Comment thread apps/webapp/src/script/components/Meeting/meetingStore/createMeetingStore.test.ts Outdated
Comment thread apps/webapp/src/script/components/Meeting/shared/service/meetingService.ts Outdated
Comment thread apps/webapp/src/script/components/Meeting/meetNowModal/useMeetNowModal.ts Outdated
When meeting creation succeeded but conversation setup failed, the flow
returned creationFailed and kept the modal open, so retrying could create
duplicate meetings. Distinguish those cases with setupFailed and a new
conversationSetupFailed service error, and add regression tests.
Update the scheduleMeeting store test to pass the command shape used in
production, with concrete Date values and an assertion on the forwarded
command.
Replace unwrapOr sentinel fallbacks with assert(maybe.isJust(...)) and
read .value directly for start and end date assertions.
Map schedule edit form state to a neutral command before entering
meetingService, matching the create flow and removing the shared to
ScheduleMeetingModal dependency from the service layer.
Replace string truthiness with is.emptyString(title.trim()) in Meet Now
and Schedule Meeting validation so both flows express the condition clearly.
Add a component test that closes and reopens the modal before a queued
submission completes, so stale callbacks cannot dismiss the new instance.
Comment thread apps/webapp/src/script/components/Meeting/meetNowModal/submitMeetNow.ts Outdated
Comment thread apps/webapp/src/script/components/Meeting/meetNowModal/meetNowModal.test.tsx Outdated
Comment thread apps/webapp/src/script/components/Meeting/mapScheduleFormToMeetingCommand.ts Outdated
Schedule Meeting now returns explicit submit outcomes and closes the
modal when the meeting was already saved, matching Meet Now. Update
also reports conversationSetupFailed after a successful backend update
so the list refreshes instead of showing a full update failure.
Meet Now now has its own error mapping instead of schedule/update
strings. Shared setup failure messages also describe conversation
save errors correctly for both Meet Now and Schedule Meeting.
Replace the queued fire-and-forget test double with the executing
invoker and defer meetNowMeeting instead, so pending submit behavior
and the generation guard are tested closer to production.
Add a dedicated missingTimes field to schedule meeting form validation
and map ScheduleFormErrors exhaustively, so missing dates no longer
surface as endBeforeStart copy.
Reorder submitMeetNow imports to satisfy import/order, and commit the
translate-merge output so generated i18n artifacts stay in sync with CI.
@thisisamir98
thisisamir98 enabled auto-merge July 21, 2026 13:27
@thisisamir98
thisisamir98 disabled auto-merge July 21, 2026 14:24
@thisisamir98
thisisamir98 merged commit e91ba32 into main Jul 21, 2026
18 checks passed
@thisisamir98
thisisamir98 deleted the meet-now branch July 21, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants