refactor: move WebWrapper files from packages/platform to apps/web/modules - #9
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ee1dfafbf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| import { useSession } from "next-auth/react"; | ||
| import { useSearchParams, usePathname, useRouter } from "next/navigation"; | ||
| import { useMemo, useCallback, useEffect, useRef } from "react"; | ||
| import { useSearchParams, usePathname } from "next/navigation"; | ||
| import { useMemo, useCallback, useEffect } from "react"; |
There was a problem hiding this comment.
Restore router hook for BookerWebWrapper
The refactor drops the useRouter import/initialization, but this component still calls router.push in multiple handlers (e.g., overlay toggle and navigation actions). That leaves router undefined at build time, producing a TypeScript compile error (“cannot find name 'router'”) or a runtime ReferenceError if it slips through. Reintroduce useRouter() (or replace those calls with a valid navigation API) so the handlers have a defined router instance.
Useful? React with 👍 / 👎.
| if (isRRWeightsEnabled) { | ||
| if (weightA === weightB) { | ||
| return priorityA - priorityB; | ||
| } else { |
There was a problem hiding this comment.
Keep priority sort descending when weights tie
Moving sortHosts into hostGroupUtils changed the tie‑breaker to priorityA - priorityB, which flips the priority order when weights are equal. The UI and other code paths expect higher numeric priority (e.g., 4 = “highest”) to sort first, so this change reverses that behavior and will reorder hosts incorrectly for round‑robin with equal weights. Use the original descending comparison (priorityB - priorityA) to preserve the intended priority ordering.
Useful? React with 👍 / 👎.
Benchmark PR from agentic-review-benchmarks#9