▸case-22 We are optimizing the performance of a pure mathematical utility function `calculateTax(amount, rate)`. Its parameters and return type signature remain identical, but internal calculation loops are optimized. What testing strategy should be used to verify mathematical equivalence? | pass→pass | 12,988 | 8,671 | -33% | 1 | 1 | 0% | 2,147 | 1,641 | -24% | 0 | 0 | — |
▸case-01 准备对公共 Hook `useProjectList` 的契约进行重构,既有字段重命名也有废弃参数的删除。请指导我如何按标准流程同步更新导出类型、全局调用点以及验证改动是否收敛。 | fail→fail | 18,357 | 8,423 | -54% | 1 | 1 | 0% | 2,972 | 1,609 | -46% | 0 | 0 | — |
▸case-02 We are renaming `fetchData` to `loadData` in the public React custom hook `useUserProfile`. A teammate suggests keeping `fetchData` as an optional deprecated alias or deferring the update of calling components to a later sprint. What is the required strategy for consumer code updates? | fail→pass | 10,275 | 4,692 | -54% | 1 | 1 | 0% | 1,766 | 977 | -45% | 0 | 0 | — |
▸case-03 In `useOrderFilter`, we removed the deprecated `legacySort` parameter from the hook definition. In several calling components, callers pass `{ legacySort: 'asc', category: 'shoes' }` as an object literal option. Should we keep `legacySort` in caller options objects for backward compatibility? | fail→pass | 71,751 | 4,202 | -94% | 1 | 1 | 0% | 1,593 | 882 | -45% | 0 | 0 | — |
▸case-04 After renaming `refresh` to `reload` in `useTableData`, a developer updated the return tuple destructuring `const { reload } = useTableData()`. However, the component has `useEffect(() => { refresh(); }, [refresh])`. What updates are necessary for the effect and its array? | pass→pass | 5,220 | 3,969 | -24% | 1 | 1 | 0% | 875 | 920 | +5% | 0 | 0 | — |
▸case-05 In `useAuthToken`, the return object key `token_id` was renamed to `tokenId`. Some legacy components access this key via bracket property indexing like `auth['token_id']`. Is updating destructuring statements like `const { tokenId } = useAuthToken()` sufficient? | pass→pass | 6,606 | 5,136 | -22% | 1 | 1 | 0% | 1,263 | 1,023 | -19% | 0 | 0 | — |
▸case-06 When refactoring the return type of `useDashboardMetrics`, what is the correct sequence between modifying exported TypeScript types, searching call sites, cleaning object literals, and running compiler checks? | pass→pass | 7,939 | 3,185 | -60% | 1 | 1 | 0% | 1,347 | 684 | -49% | 0 | 0 | — |
▸case-07 During a refactor of `useFormState`, parameter `initialError` was removed from `FormConfig`. Calling components pass object literals like `useFormState({ initialError: null, initialValues: {} })`. How should object literals be handled across all call sites? | pass→pass | 11,243 | 5,052 | -55% | 1 | 1 | 0% | 1,926 | 1,021 | -47% | 0 | 0 | — |
▸case-08 After completing field renames across 15 components for `useNavigationTree`, how should contract convergence be validated to ensure no broken references remain before opening a pull request? | fail→pass | 14,862 | 6,771 | -54% | 1 | 1 | 0% | 2,170 | 1,373 | -37% | 0 | 0 | — |
▸case-09 A public hook `useFeatureFlag` is used across 8 separate page modules. A PR author wants to rename `isEnabled` to `active` in the hook and update only 3 pages now, leaving the other 5 for separate Jira tickets. How should this refactoring PR be handled? | fail→pass | 8,979 | 6,262 | -30% | 1 | 1 | 0% | 1,544 | 1,248 | -19% | 0 | 0 | — |
▸case-10 When refactoring `useFetchUser`, the return function `refetchUser` was renamed to `mutateUser`. A reviewer notices that `useCallback` inside a consumer component still lists `refetchUser` in its dependency array. What action must be taken? | pass→pass | 6,236 | 3,860 | -38% | 1 | 1 | 0% | 1,177 | 843 | -28% | 0 | 0 | — |
▸case-11 We are deleting the `timeout` parameter from `useHttpPolling`. Should we search and edit all 20 component files first to remove `timeout` before touching `useHttpPolling.ts`, or modify the hook definition first? | pass→pass | 8,535 | 4,864 | -43% | 1 | 1 | 0% | 1,420 | 950 | -33% | 0 | 0 | — |
▸case-12 In `useCartStore`, the state property `cartItems` was renamed to `items`. A caller uses `cartState['cartItems']` in a dynamic getter helper. How should this caller code be refactored? | pass→pass | 8,681 | 5,770 | -34% | 1 | 1 | 0% | 1,502 | 1,180 | -21% | 0 | 0 | — |
▸case-13 When `useAnalytics` removes the `debugMode` option from its configuration type `AnalyticsOptions`, several caller files instantiate configuration objects before passing them to the hook. What step must be taken regarding these configuration objects? | pass→pass | 5,877 | 2,385 | -59% | 1 | 1 | 0% | 931 | 537 | -42% | 0 | 0 | — |
▸case-14 After updating `usePermission` exported types and updating all destructured call sites, what specific check should be executed locally to verify contract convergence? | pass→pass | 7,445 | 2,905 | -61% | 1 | 1 | 0% | 1,202 | 652 | -46% | 0 | 0 | — |
▸case-21 Our backend API changed its REST endpoint path from `/api/v1/users` to `/api/v2/users`. How should we update the HTTP client baseURL or endpoint routing constants in our application? | pass→fail | 12,479 | 8,282 | -34% | 1 | 1 | 0% | 1,865 | 1,665 | -11% | 0 | 0 | — |
▸case-15 In `usePaymentGateway`, `charge` was renamed to `executePayment`. A consumer component uses both destructuring (`const { charge } = usePayment()`) and direct property indexing (`paymentObj['charge']`). What must be updated at this call site? | pass→pass | 4,000 | 4,396 | +10% | 1 | 1 | 0% | 773 | 903 | +17% | 0 | 0 | — |
▸case-16 Can we rename `isLoading` to `isPending` in `useAsyncAction` by adding a getter property for `isLoading` on the return object to support legacy callers during a two-week deprecation period? | fail→pass | 9,347 | 6,624 | -29% | 1 | 1 | 0% | 1,687 | 1,261 | -25% | 0 | 0 | — |
▸case-17 The parameter object for `useWebSocket` no longer accepts `reconnectInterval`. Existing code passes `useWebSocket({ reconnectInterval: 5000, url: 'wss://...' })`. What is the correct refactoring action for the options object? | fail→pass | 15,157 | 4,327 | -71% | 1 | 1 | 0% | 2,904 | 865 | -70% | 0 | 0 | — |
▸case-18 Please list the step-by-step workflow for refactoring the parameter signature or public fields of a shared React hook like `usePagination`. | fail→fail | 14,859 | 4,519 | -70% | 1 | 1 | 0% | 2,769 | 934 | -66% | 0 | 0 | — |
▸case-19 Inside a private custom hook `useCounter`, we want to change the internal `useState` count logic from `useState(0)` to `useReducer(counterReducer, initialCount)`. The exported return signature `const [count, increment, decrement] = useCounter()` remains completely unchanged. Do we need to search global call sites and update consuming components? | pass→pass | 6,252 | 3,839 | -39% | 1 | 1 | 0% | 1,121 | 804 | -28% | 0 | 0 | — |
▸case-20 In our React UI library, we are renaming a CSS Module class name `.btn-primary-v2` to `.btn-primary` inside `Button.module.css`. What is the standard process for updating CSS class name selectors in stylesheet files? | pass→pass | 13,602 | 8,020 | -41% | 1 | 1 | 0% | 2,372 | 1,587 | -33% | 0 | 0 | — |