crbench//

← all cases

fix: instant booking location lookup

Tier 2 hard typescript · local · real merged PR from calcom/cal.com #27517

Ground-truth defects

d1 · correctness · high
In useBookings, this PR renames the instant-booking query parameter from bookingId (a number) to bookingUid (a string), but the getInstantBookingLocation query is still gated only on `enabled: !!bookingUid` with no isInstantMeeting guard. A non-instant "additional seats" booking flow carries a bookingUid in the URL (Booker store setSeatedEventData), so the query now fires for it; when the existing booking's metadata has a videoCallUrl, RedirectToInstantMeetingModal pushes the booker to that video page, and otherwise an error toast shows. Either way the seat cannot be booked. Before the rename the value was read as `parseInt(getQueryParam("bookingId") ?? "0")`, which was 0 (falsy, query disabled) on those URLs, so the rename is what newly triggers the path. The fix gates both the query and the redirect effect on isInstantMeeting.

The change under review

diff
diff --git a/apps/web/modules/bookings/hooks/useBookings.ts b/apps/web/modules/bookings/hooks/useBookings.ts
index c87ba5949de873..a55433f15b742e 100644
--- a/apps/web/modules/bookings/hooks/useBookings.ts
+++ b/apps/web/modules/bookings/hooks/useBookings.ts
@@ -158,13 +158,13 @@ const setInstantCooldownNow = (eventTypeId?: number | null) => {
 const storeInLocalStorage = ({
   eventTypeId,
   expiryTime,
-  bookingId,
+  bookingUid,
 }: {
   eventTypeId: number;
   expiryTime: Date;
-  bookingId: number;
+  bookingUid: string;
 }) => {
-  const value = JSON.stringify({ eventTypeId, expiryTime, bookingId });
+  const value = JSON.stringify({ eventTypeId, expiryTime, bookingUid });
   localStorage.setItem(STORAGE_KEY, value);
 };
 
@@ -194,7 +194,7 @@ export const useBookings = ({ event, hashedLink, bookingForm, metadata, isBookin
 
   const isRescheduling = !!rescheduleUid && !!bookingData;
 
-  const bookingId = parseInt(getQueryParam("bookingId") ?? "0");
+  const bookingUid = getQueryParam("bookingUid") ?? "";
 
   useEffect(() => {
     if (!isInstantMeeting) return;
@@ -213,7 +213,7 @@ export const useBookings = ({ event, hashedLink, bookingForm, metadata, isBookin
 
       if (parsedInstantBookingInfo) {
         setExpiryTime(parsedInstantBookingInfo.expiryTime);
-        updateQueryParam("bookingId", parsedInstantBookingInfo.bookingId);
+        updateQueryParam("bookingUid", parsedInstantBookingInfo.bookingUid);
       }
     }
   }, [eventTypeId, isInstantMeeting]);
@@ -222,10 +222,10 @@ export const useBookings = ({ event, hashedLink, bookingForm, metadata, isBookin
 
   const _instantBooking = trpc.viewer.bookings.getInstantBookingLocation.useQuery(
     {
-      bookingId: bookingId,
+      bookingUid: bookingUid,
     },
     {
-      enabled: !!bookingId,
+      enabled: !!bookingUid,
       refetchInterval: 2000,
       refetchIntervalInBackground: true,
     }
@@ -421,12 +421,12 @@ export const useBookings = ({ event, hashedLink, bookingForm, metadata, isBookin
         storeInLocalStorage({
           eventTypeId,
           expiryTime: responseData.expires,
-          bookingId: responseData.bookingId,
+          bookingUid: responseData.bookingUid,
         });
         setInstantCooldownNow(eventTypeId);
       }
 
-      updateQueryParam("bookingId", responseData.bookingId);
+      updateQueryParam("bookingUid", responseData.bookingUid);
       setExpiryTime(responseData.expires);
     },
     onError: (err) => {
diff --git a/packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.handler.ts b/packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.handler.ts
index f1e808ef349093..8faeaabc36db7d 100644
--- a/packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.handler.ts
+++ b/packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.handler.ts
@@ -12,11 +12,11 @@ type GetOptions = {
 
 export const getHandler = async ({ ctx, input }: GetOptions) => {
   const { prisma } = ctx;
-  const { bookingId } = input;
+  const { bookingUid } = input;
 
   const booking = await prisma.booking.findUnique({
     where: {
-      id: bookingId,
+      uid: bookingUid,
       status: BookingStatus.ACCEPTED,
     },
     select: {
diff --git a/packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.schema.ts b/packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.schema.ts
index f7d10a5fce67c1..9c8910a7819e40 100644
--- a/packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.schema.ts
+++ b/packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.schema.ts
@@ -1,9 +1,9 @@
 import { z } from "zod";
 
 export type TInstantBookingInputSchema = {
-  bookingId: number;
+  bookingUid: string;
 };
 
 export const ZInstantBookingInputSchema: z.ZodType<TInstantBookingInputSchema> = z.object({
-  bookingId: z.number(),
+  bookingUid: z.string(),
 });

Leaderboard for this case

hard · 2 of 9 bots fully caught it (22% solve rate) · 22% avg coverage.

#BotResultCaughtCoverageFindingsFalse alarms
1 Drape (Deep Review) solved 1/1 100.0% 3 0
2 Drape (Review) solved 1/1 100.0% 3 0
3 Claude Code (Opus 5.5) miss 0/1 0.0% 2 0
4 Cubic miss 0/1 0.0% 2 0
5 cursor miss 0/1 0.0% 1 0
6 greptile miss 0/1 0.0% 2 0
7 Mjolnir (Opus 5.5) miss 0/1 0.0% 2 0
8 Mjolnir (Sonnet 5.5) miss 0/1 0.0% 4 0
9 qodo miss 0/1 0.0% 2 0

Bot results

Claude Code (Opus 5.5) · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 high ✗ —
valid · impact high
Booker.tsx:317 still reads the `bookingId` query param, but the hook now only writes `bookingUid`. So the prop is always 0, and RedirectToInstantMeetingModal's `open={!!bookingId && !!expiryTime}` is always false. The change made this an incomplete migration. [grounded: tree apps/web/modules/bookings/components/Booker.tsx] [consensus 3/3: valid=3]
valid · impact low
An unexpired localStorage entry from before the change has no `bookingUid`. updateQueryParam only removes the param for "" or "null", so the template string sets it to "undefined". `enabled: !!bookingUid` is then true and the query polls with a uid that matches nothing. This is limited to the short expiry window, so impact is low. [grounded: diff] [consensus 3/3: valid=3]
raw comments (2)
apps/web/modules/bookings/components/Booker.tsx:317
This change makes useBookings write the `bookingUid` query param instead of `bookingId`, but Booker.tsx still passes `bookingId={parseInt(getQueryParam("bookingId") || "0")}` to RedirectToInstantMeetingModal. Nothing sets `bookingId` any more, so the prop is always 0. The modal's `open={!!bookingId && !!expiryTime}` is then always false. After an instant booking is created, the waiting/redirect modal never shows: the booker gets no countdown, no 'go back' option and no redirect to the meeting URL.
apps/web/modules/bookings/hooks/useBookings.ts:216
Instant-booking entries saved in localStorage before this change hold `bookingId` and no `bookingUid`. If such an entry hasn't expired, `parsedInstantBookingInfo.bookingUid` is undefined and `updateQueryParam` turns it into the literal string "undefined". The hook then polls getInstantBookingLocation every 2s with uid "undefined" and never gets a result. Old entries should be ignored or migrated.
Cubic · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 high ✗ —
valid · impact high
Booker.tsx:317 still passes `bookingId={parseInt(getQueryParam("bookingId") || "0")}` to RedirectToInstantMeetingModal, which renders `<Dialog open={!!bookingId && !!expiryTime}>`. The hook now writes only `bookingUid`, so bookingId is 0 and the dialog never opens. The change left this consumer behind. [grounded: diff] [consensus 3/3: valid=3]
valid · impact low
Records saved by the old version hold only `bookingId`, so `parsedInstantBookingInfo.bookingUid` is undefined. updateQueryParam does not filter out undefined and calls `url.searchParams.set(param, `${value}`)`, so the URL gets the string "undefined". The query then looks up a booking with that UID and finds none, so the restore fails until the stored record expires. The effect is real but short-lived. [grounded: diff] [consensus 3/3: valid=3]
raw comments (3)
apps/web/modules/bookings/hooks/useBookings.ts:429
<!-- cubic:v=3ce1d50b-fed6-4aa2-9795-5fbfe8b93835 --> <!-- cubic:review-run=2af52b17-0741-512f-abab-1166a824445d --> <!-- metadata:{"confidence":10} --> P2: After an instant booking is created, `RedirectToInstantMeetingModal` still reads `bookingId`, so its `Dialog` stays closed because this hook now sets only `bookingUid`. Update the consumer and modal contract to use the UID as well, or preserve the old parameter until all consumers migrate. <details> <summary>Prompt for AI agents</summary> ```text Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/modules/bookings/hooks/useBookings.ts, line 429: <comment>After an instant booking is created, `RedirectToInstantMeetingModal` still reads `bookingId`, so its `Dialog` stays closed because this hook now sets only `bookingUid`. Update the consumer and modal contract to use the UID as well, or preserve the old parameter until all consumers migrate.</comment> <file context> @@ -421,12 +421,12 @@ export const useBookings = ({ event, hashedLink, bookingForm, metadata, isBookin } - updateQueryParam("bookingId", responseData.bookingId); + updateQueryParam("bookingUid", responseData.bookingUid); setExpiryTime(responseData.expires); }, </file context> ``` </details>
apps/web/modules/bookings/hooks/useBookings.ts:216
<!-- cubic:v=5707ee66-0820-4fa0-8ca6-1cf745b95c41 --> <!-- cubic:review-run=2af52b17-0741-512f-abab-1166a824445d --> <!-- metadata:{"confidence":9} --> P2: When a user has an active instant booking from the previous version, this migration treats the old `bookingId` record as valid but sends an undefined UID to the new lookup. Version or validate the stored data and invalidate/migrate legacy records, or retain a compatible legacy lookup during the transition. <details> <summary>Prompt for AI agents</summary> ```text Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/modules/bookings/hooks/useBookings.ts, line 216: <comment>When a user has an active instant booking from the previous version, this migration treats the old `bookingId` record as valid but sends an undefined UID to the new lookup. Version or validate the stored data and invalidate/migrate legacy records, or retain a compatible legacy lookup during the transition.</comment> <file context> @@ -213,7 +213,7 @@ export const useBookings = ({ event, hashedLink, bookingForm, metadata, isBookin if (parsedInstantBookingInfo) { setExpiryTime(parsedInstantBookingInfo.expiryTime); - updateQueryParam("bookingId", parsedInstantBookingInfo.bookingId); + updateQueryParam("bookingUid", parsedInstantBookingInfo.bookingUid); } } </file context> ``` </details>
PR-level
<!-- cubic:review-summary:start --> **2 issues found** across 3 files <!-- cubic:review-summary:end --> <details> <summary>Prompt for AI agents (unresolved issues)</summary> ```text Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately. <file name="apps/web/modules/bookings/hooks/useBookings.ts"> <violation number="1" location="apps/web/modules/bookings/hooks/useBookings.ts:216"> P2: When a user has an active instant booking from the previous version, this migration treats the old `bookingId` record as valid but sends an undefined UID to the new lookup. Version or validate the stored data and invalidate/migrate legacy records, or retain a compatible legacy lookup during the transition.</violation> <violation number="2" location="apps/web/modules/bookings/hooks/useBookings.ts:429"> P2: After an instant booking is created, `RedirectToInstantMeetingModal` still reads `bookingId`, so its `Dialog` stays closed because this hook now sets only `bookingUid`. Update the consumer and modal contract to use the UID as well, or preserve the old parameter until all consumers migrate.</violation> </file> ``` </details> <sub>Reply with feedback, questions, or to request a fix.<br /><br />[Re-trigger cubic](https://www.cubic.dev/action/re-review/pr/drape-io/crbench-cubic-2026-09/88/ai_pr_review_github_delivery_3f05877ae6d7730292b86d83070cf5f275192b985df84b0dd94f34ab47d8643c?returnTo=https%3A%2F%2Fgithub.com%2Fdrape-io%2Fcrbench-cubic-2026-09%2Fpull%2F88)</sub> <!-- cubic:review-post:ai_pr_review_github_delivery_3f05877ae6d7730292b86d83070cf5f275192b985df84b0dd94f34ab47d8643c:351402d4f86df19adee01b68a21c28b56c66deae:2af52b17-0741-512f-abab-1166a824445d -->
cursor · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 high ✗ —
valid · impact high
The diff now writes only the `bookingUid` query param. In the repo, `Booker.tsx:317` still passes `bookingId={parseInt(getQueryParam("bookingId") || "0")}`, and `RedirectToInstantMeetingModal` opens only on `!!bookingId && !!expiryTime`. That prop is now always 0, so the waiting modal never opens. [grounded: diff] [consensus 3/5: valid=3, invalid=2]
raw comments (2)
apps/web/modules/bookings/hooks/useBookings.ts:429
### Instant meeting modal never opens **High Severity** <!-- DESCRIPTION START --> The query param was renamed from `bookingId` to `bookingUid`, but `RedirectToInstantMeetingModal` still reads `bookingId` via `getQueryParam`. After an instant booking is created, that param is never set, so the waiting dialog stays closed and the guest never sees the connecting state. <!-- DESCRIPTION END --> <!-- BUGBOT_BUG_ID: a4553d71-36ea-441e-b175-1688863abb5a --> <!-- LOCATIONS START apps/web/modules/bookings/hooks/useBookings.ts#L428-L429 apps/web/modules/bookings/hooks/useBookings.ts#L215-L216 LOCATIONS END --> <details> <summary>Additional Locations (1)</summary> - [`apps/web/modules/bookings/hooks/useBookings.ts#L215-L216`](https://github.com/drape-io/crbench-cursor-2026-09/blob/9da083769be215227200700d02df39780b6e4c4b/apps/web/modules/bookings/hooks/useBookings.ts#L215-L216) </details> <div><a href="https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90Ojg1ZGZkNjdhLTRkNzMtNGY4OC1iYmVlLWM4YTEyMTRkMjlmNiIsImVuY3J5cHRpb25LZXkiOiJ1TndWUUN5YnJidHFjUUtkeC03TEtrZ3pJV2RzU2JUSGVHYS14eHRzQlFVIiwiYnJhbmNoIjoidDItY2FsLWNvbS0yNzUxNyIsInJlcG9Pd25lciI6ImRyYXBlLWlvIiwicmVwb05hbWUiOiJjcmJlbmNoLWN1cnNvci0yMDI2LTA5IiwicHJvdmlkZXIiOiJnaXRodWIifX0" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-cursor-light.png"><img alt="Fix in Cursor" width="115" height="28" src="https://cursor.com/assets/images/fix-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90Ojg1ZGZkNjdhLTRkNzMtNGY4OC1iYmVlLWM4YTEyMTRkMjlmNiIsImVuY3J5cHRpb25LZXkiOiJ1TndWUUN5YnJidHFjUUtkeC03TEtrZ3pJV2RzU2JUSGVHYS14eHRzQlFVIiwiYnJhbmNoIjoidDItY2FsLWNvbS0yNzUxNyIsInJlcG9Pd25lciI6ImRyYXBlLWlvIiwicmVwb05hbWUiOiJjcmJlbmNoLWN1cnNvci0yMDI2LTA5IiwicHJOdW1iZXIiOjIzLCJjb21taXRTaGEiOiI5ZGEwODM3NjliZTIxNTIyNzIwMDcwMGQwMmRmMzk3ODBiNmU0YzRiIiwicHJvdmlkZXIiOiJnaXRodWIifX0" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-web-light.png"><img alt="Fix in Web" width="99" height="28" src="https://cursor.com/assets/images/fix-in-web-dark.png"></picture></a></div> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 9da083769be215227200700d02df39780b6e4c4b. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
PR-level
<!-- BUGBOT_REVIEW --> Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue. <!-- BUGBOT_FIX_ALL --> <a href="https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9BTExfSU5fQ1VSU09SIiwiZGF0YSI6eyJyZWRpc0tleSI6ImJ1Z2JvdC1tdWx0aTowZmQ4M2ViYS03YTA1LTRlM2YtYmUxMy1mNTdiMWVmYjRjNjMiLCJlbmNyeXB0aW9uS2V5IjoiSVk0b29jNjI5S2tRdW1vXzJZTHZ2REw5WVlQc3E4NmhZcENBZmR1cmRnYyIsImJyYW5jaCI6InQyLWNhbC1jb20tMjc1MTciLCJyZXBvT3duZXIiOiJkcmFwZS1pbyIsInJlcG9OYW1lIjoiY3JiZW5jaC1jdXJzb3ItMjAyNi0wOSIsInByb3ZpZGVyIjoiZ2l0aHViIn19" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-cursor-light.png"><img alt="Fix All in Cursor" width="115" height="28" src="https://cursor.com/assets/images/fix-in-cursor-dark.png"></picture></a> <!-- /BUGBOT_FIX_ALL --> <!-- BUGBOT_AUTOFIX_REVIEW_FOOTNOTE_BEGIN --> <sup>❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot).</sup> <!-- BUGBOT_AUTOFIX_REVIEW_FOOTNOTE_END --> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 9da083769be215227200700d02df39780b6e4c4b. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
Drape (Deep Review) · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 high ✓ exact
valid · impact high
The hook used to write the `bookingId` query param and now writes `bookingUid`, but Booker.tsx still reads `bookingId`. That makes the modal's `bookingId` 0, so `open={!!bookingId && !!expiryTime}` is always false. The change updated only one side, which breaks code it left alone. [grounded: tree apps/web/modules/bookings/components/Booker.tsx] [consensus 3/3: valid=3]
valid · impact low
An entry saved before this change has no `bookingUid` field, so `updateQueryParam` gets undefined. Neither of its guards catches that (`get()` returns null, not undefined, and the value isn't ""), so it calls `searchParams.set` and the URL gets the string "undefined". The query is then enabled and polls with it. Old entries are only restored before they expire, so this only lasts a short time. [grounded: diff] [consensus 3/3: valid=3]
valid · matches d1 · impact high
raw comments (3)
apps/web/modules/bookings/components/Booker.tsx:317
**Instant meeting waiting dialog never opens** The hook now writes the `bookingUid` query param, but this component still reads `bookingId`. It always gets 0, so `RedirectToInstantMeetingModal` stays closed after an instant booking is made. Read `bookingUid` here as well, and change the modal's prop to a string uid. ``` apps/web/modules/bookings/hooks/useBookings.ts:429 updateQueryParam("bookingUid", responseData.bookingUid); apps/web/modules/bookings/hooks/useBookings.ts:216 updateQueryParam("bookingUid", parsedInstantBookingInfo.bookingUid); apps/web/modules/bookings/hooks/useBookings.ts:197 const bookingUid = getQueryParam("bookingUid") ?? ""; apps/web/modules/bookings/components/Booker.tsx:317 bookingId={parseInt(getQueryParam("bookingId") || "0")} apps/web/modules/bookings/components/RedirectToInstantMeetingModal.tsx:82 <Dialog open={!!bookingId && !!expiryTime}> ```
apps/web/modules/bookings/hooks/useBookings.ts:216
**Old saved bookings put 'undefined' in URL** localStorage entries saved before this change only have `bookingId`. Restoring one passes `parsedInstantBookingInfo.bookingUid` (undefined) to `updateQueryParam`, so the URL gets `bookingUid=undefined` and the page keeps polling with it. Only restore when `parsedInfo.bookingUid` is a non-empty string. ``` apps/web/modules/bookings/hooks/useBookings.ts:214 if (parsedInstantBookingInfo) { apps/web/modules/bookings/hooks/useBookings.ts:215 setExpiryTime(parsedInstantBookingInfo.expiryTime); apps/web/modules/bookings/hooks/useBookings.ts:216 updateQueryParam("bookingUid", parsedInstantBookingInfo.bookingUid); apps/web/modules/bookings/hooks/useBookings.ts:217 } packages/features/bookings/Booker/utils/query-param.ts:11 url.searchParams.set(param, `${value}`); ```
apps/web/modules/bookings/hooks/useBookings.ts:197
**Seated-event bookers redirected into existing meeting** Picking a partly-filled seat puts the existing booking's `bookingUid` in the URL. `useBookings` now treats it as an instant booking: it polls the booking's location and the modal pushes to its video URL. Use a separate query param for instant bookings, or only enable the query when `isInstantMeeting` is true. ``` apps/web/modules/bookings/hooks/useBookings.ts:197 const bookingUid = getQueryParam("bookingUid") ?? ""; apps/web/modules/bookings/hooks/useBookings.ts:223 const _instantBooking = trpc.viewer.bookings.getInstantBookingLocation.useQuery( apps/web/modules/bookings/hooks/useBookings.ts:224 { apps/web/modules/bookings/hooks/useBookings.ts:225 bookingUid: bookingUid, packages/features/bookings/Booker/store.ts:579 updateQueryParam("bookingUid", seatedEventData.bookingUid ?? "null"); apps/web/modules/bookings/components/RedirectToInstantMeetingModal.tsx:74 useEffect(() => { apps/web/modules/bookings/components/RedirectToInstantMeetingModal.tsx:75 if (!!instantVideoMeetingUrl) { apps/web/modules/bookings/components/RedirectToInstantMeetingModal.tsx:76 window.removeEventListener("beforeunload", handleBeforeUnload); apps/web/modules/bookings/components/RedirectToInstantMeetingModal.tsx:77 router.push(instantVideoMeetingUrl); apps/web/modules/bookings/components/RedirectToInstantMeetingModal.tsx:78 } ```
Drape (Review) · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 high ✓ exact
valid · impact low
Entries saved before this change contain only bookingId, so parsedInfo.bookingUid is undefined. updateQueryParam stringifies the value, which writes bookingUid="undefined" to the URL and starts polling with that bogus uid. The impact is small because instant-booking entries expire quickly. [grounded: diff] [consensus 3/3: valid=3]
valid · matches d1 · impact high
valid · impact high
The hook now writes only bookingUid to the URL, but Booker.tsx still reads bookingId, which now parses to 0. Because the modal's open condition is `!!bookingId && !!expiryTime`, the modal never opens. This is an incomplete rename. [grounded: tree apps/web/modules/bookings/components/Booker.tsx] [consensus 3/5: valid=3, invalid=2]
raw comments (3)
apps/web/modules/bookings/hooks/useBookings.ts:216
**Old localStorage entries set bookingUid to undefined** Stored instant-booking info written before this change has `bookingId` but no `bookingUid`. The restore effect sets the expiry time and calls `updateQueryParam("bookingUid", undefined)`. Only restore when parsedInfo.bookingUid is a string. ``` apps/web/modules/bookings/hooks/useBookings.ts:216 updateQueryParam("bookingUid", parsedInstantBookingInfo.bookingUid); ```
apps/web/modules/bookings/hooks/useBookings.ts:197
**Seated slots trigger instant-booking polling and redirects** A seated slot's existing booking uid goes into the `bookingUid` URL param. useBookings then polls getInstantBookingLocation with it, which shows an error toast or redirects to that booking's video URL. Gate the query on isInstantMeeting, or use a separate param. ``` apps/web/modules/bookings/hooks/useBookings.ts:197 const bookingUid = getQueryParam("bookingUid") ?? ""; apps/web/modules/bookings/hooks/useBookings.ts:216 updateQueryParam("bookingUid", parsedInstantBookingInfo.bookingUid); apps/web/modules/bookings/hooks/useBookings.ts:429 updateQueryParam("bookingUid", responseData.bookingUid); packages/features/bookings/Booker/store.ts:579 updateQueryParam("bookingUid", seatedEventData.bookingUid ?? "null"); apps/web/modules/bookings/components/BookerWebWrapper.tsx:60 const bookingUid = apps/web/modules/bookings/components/BookerWebWrapper.tsx:61 typeof window !== "undefined" ? new URLSearchParams(window.location.search).get("bookingUid") : null; ```
apps/web/modules/bookings/components/Booker.tsx:317
**Instant booking modal never opens after rename** The hook now writes `bookingUid` to the URL, but Booker still reads the old `bookingId` param and passes it to `RedirectToInstantMeetingModal`. The modal's `open` is `!!bookingId && !!expiryTime`, so it stays closed. Pass the bookingUid (string) from getQueryParam("bookingUid") to RedirectToInstantMeetingModal and change its prop and open check accordingly. ``` apps/web/modules/bookings/hooks/useBookings.ts:197 const bookingUid = getQueryParam("bookingUid") ?? ""; apps/web/modules/bookings/hooks/useBookings.ts:429 updateQueryParam("bookingUid", responseData.bookingUid); ```
greptile · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 high ✗ —
valid · impact high
Booker.tsx still reads the `bookingId` query param to open the modal (`open={!!bookingId && !!expiryTime}`), but the hook now writes only `bookingUid`. That leaves the modal closed. The PR updated only one of the two places that read this param. [grounded: tree apps/web/modules/bookings/components/Booker.tsx] [consensus 3/3: valid=3]
valid · impact low
Records stored under the same STORAGE_KEY before this change have only `bookingId`. After the change, restoring one sets bookingUid to undefined, so `enabled: !!bookingUid` is false and polling never starts. This only affects records that are still unexpired when the deploy goes out. [grounded: diff] [consensus 3/3: valid=3]
raw comments (3)
apps/web/modules/bookings/hooks/useBookings.ts:429
<a href="#"><img alt="P1" src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=9" align="top"></a> **Connecting modal stays closed** Successful instant bookings now write only `bookingUid`, but `RedirectToInstantMeetingModal` still opens only when the old numeric `bookingId` query parameter is present. The connecting modal therefore stays closed while the location is polled, leaving users without the countdown or “do not close” guidance and allowing them to interact with the booking form again before the eventual redirect.
apps/web/modules/bookings/hooks/useBookings.ts:216
<a href="#"><img alt="P1" src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=9" align="top"></a> **Stored bookings stop polling** Matching, unexpired `instantBookingData` records are restored as though they contain `bookingUid`, but records written before this change contain only `bookingId` under the same storage key. If a user reloads across deployment while an instant booking is pending, `bookingUid` is undefined, the location query remains disabled, and the client cannot discover or redirect to the booking's meeting URL. The stored payload needs migration or backward-compatible handling.
PR-level
<h3>Greptile Summary</h3> This PR changes instant-booking location polling from the internal numeric booking ID to the public booking UID across browser state and the tRPC endpoint. - Updates the browser query parameter and local-storage payload to carry `bookingUid`. - Changes the tRPC input schema and database lookup to use the unique booking UID. - Leaves the connecting modal tied to the removed `bookingId` URL parameter and does not migrate active records stored with the old payload. <h3>Confidence Score: 3/5</h3> The PR is not yet safe to merge because new instant bookings lose their connecting-modal state and active bookings persisted before deployment can stop polling after reload. The UID migration is consistent through creation and server lookup, but two client-side transition paths still rely on the old identifier representation, causing concrete failures in the instant-meeting workflow. **Files Needing Attention:** apps/web/modules/bookings/hooks/useBookings.ts <details><summary><h3>Important Files Changed</h3></summary> | Filename | Overview | |----------|----------| | apps/web/modules/bookings/hooks/useBookings.ts | Migrates client persistence and polling to booking UIDs, but breaks the modal's identifier contract and legacy stored-record restoration. | | packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.handler.ts | Looks up accepted bookings by their required unique UID instead of numeric ID. | | packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.schema.ts | Changes the endpoint input contract from a numeric booking ID to a string booking UID. | </details> <details open><summary><h3>Sequence Diagram</h3></summary> ```mermaid sequenceDiagram participant Client as Booking client participant Storage as localStorage participant API as getInstantBookingLocation participant DB as Booking database Client->>Storage: Store eventTypeId, expiryTime, bookingUid Client->>Client: Write bookingUid query parameter loop Every 2 seconds Client->>API: Query with bookingUid API->>DB: findUnique(uid, ACCEPTED) DB-->>API: Booking metadata API-->>Client: Meeting location end Client->>Client: Redirect to videoCallUrl ``` </details> <!-- greptile_other_comments_section --> <sub>Reviews (1): Last reviewed commit: ["Update apps/web/modules/bookings/hooks/u..."](https://github.com/drape-io/crbench-greptile-2026-09/commit/4e896f8eb5bf8f9bddea8bb52fc938e477cad33f) | [Re-trigger Greptile](https://app.greptile.com/api/retrigger?id=64288932)</sub>
Mjolnir (Opus 5.5) · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 high ✗ —
valid · impact high
The diff replaces updateQueryParam("bookingId", ...) with updateQueryParam("bookingUid", ...). Booker.tsx was not changed and still reads the bookingId param. The modal opens only when `!!bookingId && !!expiryTime`, so it now never opens. [grounded: tree apps/web/modules/bookings/components/Booker.tsx] [consensus 3/3: valid=3]
valid · impact high
Same issue as finding 0. Booker still reads the bookingId param, which neither the post-booking path nor the localStorage restore path writes any more. bookingId is therefore always 0 and the dialog stays closed. [grounded: tree apps/web/modules/bookings/components/RedirectToInstantMeetingModal.tsx] [consensus 3/3: valid=3]
raw comments (2)
apps/web/modules/bookings/hooks/useBookings.ts:429
[P1] Instant meeting modal never opens because the `bookingId` query param is no longer set The hook now writes only `bookingUid` to the URL, both here and in the localStorage restore at line 216. But `apps/web/modules/bookings/components/Booker.tsx:317` still passes `bookingId={parseInt(getQueryParam("bookingId") || "0")}` to `RedirectToInstantMeetingModal`, and that modal only opens when `!!bookingId && !!expiryTime` (`RedirectToInstantMeetingModal.tsx:82`). After this change, `bookingId` is always 0 for a new instant booking, so the dialog never appears. The user doesn't see the "connecting/waiting" screen, the countdown, or the join link, even though the location query still polls in the background. The modal and the Booker call site need to switch to `bookingUid` too, or this change breaks the web instant-meeting flow.
apps/web/modules/bookings/hooks/useBookings.ts:429
[P1] Instant meeting redirect modal can no longer open because `bookingId` is not set anymore This change writes `bookingUid` to the URL in place of `bookingId`, but `apps/web/modules/bookings/components/Booker.tsx:317` still passes `bookingId={parseInt(getQueryParam("bookingId") || "0")}` to `RedirectToInstantMeetingModal`. That modal only renders when `open={!!bookingId && !!expiryTime}` (`RedirectToInstantMeetingModal.tsx:82`). After someone books an instant meeting, the `bookingId` query param is never set, so `bookingId` is always 0 and the modal stays closed. This happens both right after booking and when the booking is restored from localStorage. The location query still polls in the background, but the booker never sees the "connecting / join meeting" dialog or the join link, so the instant meeting flow is broken. Booker.tsx (and the modal prop, if needed) should be switched to `bookingUid` as well.
Mjolnir (Sonnet 5.5) · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 high ✗ —
valid · impact high
The hook now only writes `bookingUid`, but Booker still reads `bookingId`, which now parses to 0. RedirectToInstantMeetingModal opens only when `!!bookingId && !!expiryTime`, so it never opens. The change broke this unchanged consumer. [grounded: tree apps/web/modules/bookings/components/Booker.tsx] [consensus 3/3: valid=3]
valid · impact low
Entries stored before the change have no `bookingUid`. updateQueryParam stringifies the undefined value to "undefined" in the URL, so the poll runs with an invalid uid and finds nothing. The impact is short-lived. [grounded: diff] [consensus 3/3: valid=3]
valid · impact high
This is the same issue as finding 0: Booker still reads the removed `bookingId` param, so the modal's open condition is never met. [grounded: tree apps/web/modules/bookings/components/Booker.tsx] [consensus 3/3: valid=3]
valid · impact low
Legacy entries cause "undefined" to be written into the URL. One detail is wrong: the finding says no poll runs, but a poll does run with "undefined". The core claim still holds, with low impact. [grounded: diff] [consensus 3/3: valid=3]
raw comments (4)
apps/web/modules/bookings/components/Booker.tsx:317
[P1] Booker still reads the removed `bookingId` query param, so the instant-meeting modal never opens The diff changes `useBookings` to write only `bookingUid` to the URL, but `Booker.tsx` still passes `bookingId={parseInt(getQueryParam("bookingId") || "0")}` to `RedirectToInstantMeetingModal`. That modal opens with `open={!!bookingId && !!expiryTime}`. After this change `bookingId` is never in the URL, so it parses to 0 and the dialog stays closed. This affects every instant-meeting booking: the booking is created and the `getInstantBookingLocation` polling runs, but the host-waiting dialog and countdown never show. The user sees nothing, so they may re-submit. The `Booker.tsx` prop and `RedirectToInstantMeetingModal`'s `bookingId` prop need to move to `bookingUid`, or the `bookingId` param needs to be kept.
apps/web/modules/bookings/hooks/useBookings.ts:216
[P3] Stale localStorage entries from before this change have no `bookingUid` A user who has an unexpired stored entry from before deploy has `{eventTypeId, expiryTime, bookingId}` in localStorage with no `bookingUid`. The restore effect still calls `setExpiryTime(...)` and then `updateQueryParam("bookingUid", undefined)`, which sets `?bookingUid=undefined`. The polling query then runs with the string "undefined" and finds no booking. This lasts only until the stored expiry, so impact is small. The restore code could skip entries that lack `bookingUid`.
apps/web/modules/bookings/hooks/useBookings.ts:429
[P1] Instant-meeting modal never opens because Booker still reads `bookingId` The hook now writes only the `bookingUid` query param, and the old `bookingId` param is no longer set. `apps/web/modules/bookings/components/Booker.tsx:317` still passes `bookingId={parseInt(getQueryParam("bookingId") || "0")}` to `RedirectToInstantMeetingModal`. That value is always 0 after this change. The modal's `‹Dialog open={!!bookingId && !!expiryTime}›` therefore stays closed for every instant booking, and the user sees no waiting/redirect UI even though the booking was created and the polling query is running. `Booker.tsx` and the modal's `bookingId: number` prop need to move to `bookingUid` as well.
apps/web/modules/bookings/hooks/useBookings.ts:216
[P3] Stale localStorage entries write an undefined `bookingUid` into the URL Entries saved by the previous version have `bookingId` and no `bookingUid`. If such an entry has the same `eventTypeId` and has not yet expired, `parsedInstantBookingInfo.bookingUid` is `undefined`. The code still calls `setExpiryTime` and `updateQueryParam("bookingUid", undefined)`. No poll runs because `bookingUid` stays empty, and the URL param can end up set to the string "undefined". This only affects users who still have an unexpired pre-deploy entry, which is a short window. Checking that `bookingUid` is present before using the stored entry would avoid it.
qodo · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 high ✗ —
valid · impact high
Booker.tsx:317 still passes `bookingId={parseInt(getQueryParam("bookingId") || "0")}`, and RedirectToInstantMeetingModal opens only on `!!bookingId && !!expiryTime`. The change stopped writing `bookingId` to the URL, so the modal never opens. The change caused this by not updating a peer consumer. [grounded: diff] [consensus 3/3: valid=3]
valid · impact low
Older localStorage records contain only `bookingId`, so `bookingUid` comes back undefined. updateQueryParam then calls `url.searchParams.set(param, `${value}`)`, which writes the literal string "undefined". The schema change also rejects requests from old bundles that still send `bookingId`. This only happens during rollout and stops once the stored records expire. [grounded: diff] [consensus 3/3: valid=3]
raw comments (4)
apps/web/modules/bookings/hooks/useBookings.ts:429
<img src="https://img.shields.io/badge/High-634FD1?style=flat-square" height="20px" alt="Action required"> 1\. Instant callers lose the waiting screen <code>🐞 Bug</code> <code>≡ Correctness</code> <pre> <b><i>createInstantBookingMutation</i></b> now writes only <b><i>bookingUid</i></b> to the URL, but <b><i>Booker</i></b> still opens <b><i>RedirectToInstantMeetingModal</i></b> only when the former <b><i>bookingId</i></b> parameter parses to a nonzero number. Every newly created instant booking therefore keeps showing the booking form without the countdown or unload guard while it polls for an assignee, and failures remain invisible until expiry. </pre> <details> <summary><strong>Agent Prompt</strong></summary> ``` ## Issue description New instant bookings write `bookingUid`, while the waiting modal is still gated by `bookingId`, so the waiting experience never opens. ## Fix Focus Areas - apps/web/modules/bookings/hooks/useBookings.ts[429-430] - apps/web/modules/bookings/components/Booker.tsx[315-323] - apps/web/modules/bookings/components/RedirectToInstantMeetingModal.tsx[16-28] ## Recommended Fix Replace the modal's numeric `bookingId` gate with a string `bookingUid` gate, pass the new query parameter from `Booker`, and use its presence to control the dialog. ``` <code>ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools</code> </details>
packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.schema.ts:8
<img src="https://img.shields.io/badge/High-634FD1?style=flat-square" height="20px" alt="Action required"> 2\. Live instant meetings break on deploy <code>🐞 Bug</code> <code>☼ Reliability</code> <pre> <b><i>ZInstantBookingInputSchema</i></b> no longer accepts <b><i>bookingId</i></b>, while the restoration effect blindly reads <b><i>bookingUid</i></b> from the same unversioned local-storage key whose existing records contain only <b><i>bookingId</i></b>. During rollout, tabs running the prior bundle are rejected by input validation and refreshed tabs turn the missing UID into the literal <b><i>undefined</i></b> query value, so both stop retrieving the assigned meeting location. </pre> <details> <summary><strong>Agent Prompt</strong></summary> ``` ## Issue description Removing `bookingId` immediately breaks already-loaded clients and saved instant-booking records created by the prior frontend bundle. ## Fix Focus Areas - packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.schema.ts[3-8] - packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.handler.ts[13-20] - apps/web/modules/bookings/hooks/useBookings.ts[202-228] ## Recommended Fix Temporarily accept either `bookingUid` or legacy `bookingId`, select the booking using the supplied identifier, and make local-storage restoration detect legacy records and query with their ID. Continue writing only UID records, then remove the compatibility path after existing records and cached frontend bundles can no longer remain active. ``` <code>ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools</code> </details>
PR-level
<h3>PR Summary by Qodo</h3> Use booking UIDs for instant meeting location lookup <code>🐞 Bug fix</code> <code>✨ Enhancement</code> <code>🕐 10-20 Minutes</code> <img src="https://www.qodo.ai/wp-content/uploads/2025/11/light-grey-line.svg" height="10%" alt="Grey Divider"> <details> <summary>AI Description</summary> <dl> <dd> <br/> ><pre> >• Tracks instant meetings by booking UID across URLs and local storage. >• Looks up accepted booking locations by UID instead of internal numeric IDs. ></pre> </dd> </dl> </details> <details> <summary>Diagram</summary> <dl> <dd> <br/> ```mermaid graph TD API["Instant booking API"] -->|"bookingUid"| Hook["Bookings hook"] --> State["URL and storage"] State -->|"bookingUid"| Hook --> Schema["tRPC input"] --> Handler["Location handler"] --> DB[("Booking database")] DB -->|"accepted booking"| Handler -->|"location metadata"| Hook ``` </dd> </dl> </details> <details> <summary>High-Level Assessment</summary> <dl> <dd> <br/> >The PR’s end-to-end UID migration is the appropriate approach because booking UIDs are stable public identifiers and avoid exposing predictable internal database IDs. Retaining numeric IDs or translating them only within the handler would preserve unnecessary client exposure and contract ambiguity. </dd> </dl> </details> <details> <summary> Files changed (3) <code> +13 / -13 </code> </summary> <dl> <dd> <br/> <details> <summary>Enhancement (2) <code> +4 / -4 </code></summary> <dl> <dd> <details> <summary>getInstantBookingLocation.handler.ts<code>Find accepted instant bookings by UID</code> <code>+2/-2</code></summary> <br/> >Find accepted instant bookings by UID > ><pre> >• Changes the location lookup handler to query the booking’s unique UID rather than its internal numeric ID while retaining the accepted-status filter. ></pre> > ><a href='https://github.com/drape-io/crbench-qodo-2026-09/pull/22/files#diff-7f0036ce65d77856580c7ddcb6b0cc58d7f21f86f4a313bf02785978e124f201'>packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.handler.ts</a> </details> <details> <summary>getInstantBookingLocation.schema.ts<code>Accept booking UID lookup input</code> <code>+2/-2</code></summary> <br/> >Accept booking UID lookup input > ><pre> >• Updates the tRPC input type and Zod schema from a numeric booking ID to a string booking UID, aligning the server contract with the client. ></pre> > ><a href='https://github.com/drape-io/crbench-qodo-2026-09/pull/22/files#diff-bab1f001e22fbf55a961db86a444838690843621cc903270dc37071fe2a4a1fb'>packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.schema.ts</a> </details> </dd> </dl> </details> <details> <summary>Bug fix (1) <code> +9 / -9 </code></summary> <dl> <dd> <details> <summary>useBookings.ts<code>Track instant bookings using booking UIDs</code> <code>+9/-9</code></summary> <br/> >Track instant bookings using booking UIDs > ><pre> >• Replaces the numeric booking ID query parameter with a booking UID. Persists and restores the UID through local storage, uses it to enable location polling, and records the UID returned after instant booking creation. ></pre> > ><a href='https://github.com/drape-io/crbench-qodo-2026-09/pull/22/files#diff-f2ab5178d0da9d76913efe252dd194a28b5b8e5340f57a054522bb7b1cb032bd'>apps/web/modules/bookings/hooks/useBookings.ts</a> </details> </dd> </dl> </details> </dd> </dl> </details>
PR-level
<h3>Code Review by Qodo</h3> <code>🐞 Bugs (2)</code> <code>📘 Rule violations (0)</code> <code>📜 Skill insights (0)</code> <img src="https://www.qodo.ai/wp-content/uploads/2025/11/light-grey-line.svg" height="10%" alt="Grey Divider"> <br/> <img src="https://img.shields.io/badge/High-634FD1?style=flat-square" height="20px" alt="Action required"> <details> <summary> 1. Instant callers lose the waiting screen <code>🐞 Bug</code> <code>≡ Correctness</code></summary> <br/> > <details open> ><summary>Description</summary> ><br/> > ><pre> ><b><i>createInstantBookingMutation</i></b> now writes only <b><i>bookingUid</i></b> to the URL, but <b><i>Booker</i></b> still opens ><b><i>RedirectToInstantMeetingModal</i></b> only when the former <b><i>bookingId</i></b> parameter parses to a nonzero >number. Every newly created instant booking therefore keeps showing the booking form without the >countdown or unload guard while it polls for an assignee, and failures remain invisible until >expiry. ></pre> ></details> > <details> ><summary>Code</summary> ><br/> > ><code>[apps/web/modules/bookings/hooks/useBookings.ts[429]](https://github.com/drape-io/crbench-qodo-2026-09/pull/22/files#diff-f2ab5178d0da9d76913efe252dd194a28b5b8e5340f57a054522bb7b1cb032bdR429-R429)</code> > >```diff >+ updateQueryParam("bookingUid", responseData.bookingUid); >``` ></details> > <details> ><summary>Evidence</summary> ><br/> > ><pre> >The successful mutation writes <b><i>bookingUid</i></b>, while <b><i>Booker</i></b> still reads <b><i>bookingId</i></b> and the modal >requires that numeric value to open. The same modal owns the countdown, unload protection, expiry >message, and automatic meeting redirect. ></pre> > > <code>[apps/web/modules/bookings/hooks/useBookings.ts[417-430]](https://github.com/drape-io/crbench-qodo-2026-09/blob/1aefd58b3508817deb81d73910dcea2e85b7bb41/apps/web/modules/bookings/hooks/useBookings.ts/#L417-L430)</code> > <code>[apps/web/modules/bookings/components/Booker.tsx[315-323]](https://github.com/drape-io/crbench-qodo-2026-09/blob/1aefd58b3508817deb81d73910dcea2e85b7bb41/apps/web/modules/bookings/components/Booker.tsx/#L315-L323)</code> > <code>[apps/web/modules/bookings/components/RedirectToInstantMeetingModal.tsx[41-82]](https://github.com/drape-io/crbench-qodo-2026-09/blob/1aefd58b3508817deb81d73910dcea2e85b7bb41/apps/web/modules/bookings/components/RedirectToInstantMeetingModal.tsx/#L41-L82)</code> ></details> > <details> ><summary>Agent prompt</summary> ><br/> > >``` >The issue below was found during a code review. Follow the provided context and guidance below and implement a solution > >## Issue description >New instant bookings write `bookingUid`, while the waiting modal is still gated by `bookingId`, so the waiting experience never opens. > >## Fix Focus Areas >- apps/web/modules/bookings/hooks/useBookings.ts[429-430] >- apps/web/modules/bookings/components/Booker.tsx[315-323] >- apps/web/modules/bookings/components/RedirectToInstantMeetingModal.tsx[16-28] > >## Recommended Fix >Replace the modal's numeric `bookingId` gate with a string `bookingUid` gate, pass the new query parameter from `Booker`, and use its presence to control the dialog. >``` > <code>ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools</code> ></details> <hr/> </details> <details> <summary> 2. Live instant meetings break on deploy <code>🐞 Bug</code> <code>☼ Reliability</code></summary> <br/> > <details open> ><summary>Description</summary> ><br/> > ><pre> ><b><i>ZInstantBookingInputSchema</i></b> no longer accepts <b><i>bookingId</i></b>, while the restoration effect blindly >reads <b><i>bookingUid</i></b> from the same unversioned local-storage key whose existing records contain only ><b><i>bookingId</i></b>. During rollout, tabs running the prior bundle are rejected by input validation and >refreshed tabs turn the missing UID into the literal <b><i>undefined</i></b> query value, so both stop >retrieving the assigned meeting location. ></pre> ></details> > <details> ><summary>Code</summary> ><br/> > ><code>[packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.schema.ts[8]](https://github.com/drape-io/crbench-qodo-2026-09/pull/22/files#diff-bab1f001e22fbf55a961db86a444838690843621cc903270dc37071fe2a4a1fbR8-R8)</code> > >```diff >+ bookingUid: z.string(), >``` ></details> > <details> ><summary>Evidence</summary> ><br/> > ><pre> >The public procedure validates every polling request through the now-UID-only schema, so an old >bundle&#x27;s ID payload is rejected before reaching the handler. Existing storage is read without shape >validation, and <b><i>updateQueryParam</i></b> stringifies an undefined value as <b><i>undefined</i></b>, enabling polling >for a nonexistent UID. ></pre> > > <code>[packages/trpc/server/routers/viewer/bookings/_router.tsx[103-112]](https://github.com/drape-io/crbench-qodo-2026-09/blob/1aefd58b3508817deb81d73910dcea2e85b7bb41/packages/trpc/server/routers/viewer/bookings/_router.tsx/#L103-L112)</code> > <code>[packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.schema.ts[3-8]](https://github.com/drape-io/crbench-qodo-2026-09/blob/1aefd58b3508817deb81d73910dcea2e85b7bb41/packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.schema.ts/#L3-L8)</code> > <code>[apps/web/modules/bookings/hooks/useBookings.ts[202-228]](https://github.com/drape-io/crbench-qodo-2026-09/blob/1aefd58b3508817deb81d73910dcea2e85b7bb41/apps/web/modules/bookings/hooks/useBookings.ts/#L202-L228)</code> > <code>[packages/features/bookings/Booker/utils/query-param.ts[1-12]](https://github.com/drape-io/crbench-qodo-2026-09/blob/1aefd58b3508817deb81d73910dcea2e85b7bb41/packages/features/bookings/Booker/utils/query-param.ts/#L1-L12)</code> ></details> > <details> ><summary>Agent prompt</summary> ><br/> > >``` >The issue below was found during a code review. Follow the provided context and guidance below and implement a solution > >## Issue description >Removing `bookingId` immediately breaks already-loaded clients and saved instant-booking records created by the prior frontend bundle. > >## Fix Focus Areas >- packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.schema.ts[3-8] >- packages/trpc/server/routers/viewer/bookings/getInstantBookingLocation.handler.ts[13-20] >- apps/web/modules/bookings/hooks/useBookings.ts[202-228] > >## Recommended Fix >Temporarily accept either `bookingUid` or legacy `bookingId`, select the booking using the supplied identifier, and make local-storage restoration detect legacy records and query with their ID. Continue writing only UID records, then remove the compatibility path after existing records and cached frontend bundles can no longer remain active. >``` > <code>ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools</code> ></details> <hr/> </details> <img src="https://www.qodo.ai/wp-content/uploads/2025/11/light-grey-line.svg" height="10%" alt="Grey Divider"> <!-- qodo-context:start --> <details><summary><strong>Context sources</strong></summary> <div>Review mode: <code>⚖️ Balanced</code>: This is a runtime API and query-contract change spanning client persistence, URL parameters, and a server lookup, so it carries behavioral compatibility risk despite the small diff.</div> <!-- qodo-context:end --> </details> <img src="https://www.qodo.ai/wp-content/uploads/2025/11/light-grey-line.svg" height="10%" alt="Grey Divider"> <!-- qodo-daily-tip:start --> <details> <summary><strong>Tip of the day</strong></summary> <br/> <pre>💡 Did you know, you can reply &#x27;qodo&#x27; on any finding to push back, ask questions, or dig deeper</pre> <a href="https://docs.qodo.ai/tips-and-tricks">More tips ↗</a> | <a href="https://app.qodo.ai/configurations?tab=display-preferences">Customize Qodo ↗</a> | <a href="https://docs.qodo.ai">Qodo docs ↗</a> </details> <img src="https://www.qodo.ai/wp-content/uploads/2025/11/light-grey-line.svg" height="10%" alt="Grey Divider"> <!-- qodo-daily-tip:end --> <!-- https://github.com/drape-io/crbench-qodo-2026-09/commit/1aefd58b3508817deb81d73910dcea2e85b7bb41 --> <a href="https://www.qodo.ai"><img src="https://www.qodo.ai/wp-content/uploads/2025/03/qodo-logo.svg" width="80" alt="Qodo Logo"></a>