This commit is contained in:
shafi54 2026-10-17 16:14:49 +05:30
parent be5c075970
commit ad13964d4c
18 changed files with 2281 additions and 2 deletions

57
MULTI_REGION_I2_REVIEW.md Normal file
View file

@ -0,0 +1,57 @@
# MULTI_REGION_I2 Code Review
Comparison: `main...MULTI_REGION_I2`
## Findings
1. **[P1] Name searches bypass regional customer isolation** — `packages/db_helper_sqlite/src/admin-apis/user.ts:224`
The predicate becomes `(inRegion AND mobile LIKE … OR name LIKE …)`. A regional admin searching by name receives matching customers from other regions, including their mobile numbers. Group the search predicates with Drizzle’s `or()`.
2. **[P1] Web discovery sends the wrong required parameter** — `apps/web-ui/src/hooks/prominent-api-hooks.ts:25–27`
The hook sends `{ regionId }`, but `essentialConsts` now requires `{ boundId }`. Every discovery request fails validation after selecting a region, leaving catalog and slot requests disabled. Pass the selected bound and remove the masking `as any`.
3. **[P1] Global-product updates discard existing SKU IDs** — `apps/backend/src/trpc/apis/superadmin-apis/apis/global-products.ts:95–107`
`skuInput` does not declare `id`, so Zod strips the IDs before the resolver reads them. Saving existing variants therefore inserts duplicates instead of updating them. Suspending an existing variant creates a suspended duplicate while the original remains purchasable. Preserve optional SKU IDs in the update schema.
4. **[P1] Rejected regional edits can delete a global store’s image** — `apps/backend/src/trpc/apis/admin-apis/apis/store.ts:93–110`
The visibility check now accepts global stores, and the resolver deletes their old image before the database helper rejects regional writes. A regional staff member can consequently remove an image shared across all regions despite the mutation failing. Check edit ownership before deleting assets.
5. **[P1] Regional cache requests suppress pending global regeneration** — `apps/backend/src/jobs/cache-creator.ts:25–33`
A global request leaves `pendingRegions` unchanged. If a regional request occurs in the same debounce window, the alarm regenerates only that region. For example, a global-product edit followed by a region-A banner edit leaves every other region’s catalog stale. Persist an explicit “all regions pending” flag that regional requests cannot narrow.
6. **[P1] Scheduled web checkout always submits rejected slot IDs** — `apps/backend/src/trpc/apis/user-apis/apis/order.ts:190–194`
The new validation rejects null scheduled slots, but `apps/web-ui/src/routes/home.checkout.tsx:93–101` still submits `slotId: null` for every item. Every nonempty scheduled web checkout fails. Forward each cart line’s selected slot ID.
7. **[P1] New-region cache generation is detached from the Worker lifetime** — `apps/backend/src/trpc/apis/superadmin-apis/apis/regions.ts:88–93`
Cache generation starts without being awaited, registered with `waitUntil`, or scheduled through the Durable Object. In production, Cloudflare can cancel it after the response, leaving a successfully created region without usable catalog/discovery files. Schedule durable generation or attach the work to the execution context.
8. **[P2] Global-product Edit retains the create form’s draft** — `apps/superadmin-ui/src/routes/global-products.tsx:274–282`
Both branches render the same unkeyed component, whose fields initialize only on mount. Clicking Edit therefore retains the empty create draft—or another product’s draft—while submission targets the selected product. Key the form by product ID or explicitly reset its state when the product changes.
9. **[P2] Global ID windows hide orders from quieter regions** — `packages/db_helper_sqlite/src/admin-apis/order.ts:415–427`
The new regional filter is combined with a pagination threshold derived from the globally newest order ID. Once another region creates more than `limit + 5` newer orders, a quiet region’s list becomes empty and returns no next cursor, even when it has pending orders. Paginate matching regional rows rather than bounded global ID ranges.
10. **[P2] Startup address selection deletes or rolls back persisted carts** — `apps/user-ui/src/lib/region-switch.ts:34–41`
The region store starts null on every launch, but carts remain persisted. Selecting the same address through the startup chooser skips stashing the live carts, clears them, and restores an absent or older snapshot. Persist cart ownership independently of the transient browsing region before performing this reset.
11. **[P2] Unrelated market edits undo regional suspension** — `packages/db_helper_sqlite/src/admin-apis/product.ts:539–545`
Regional forms initialize suspension from `sku.isSuspended`, but the response mapper returns the global structural flag instead of `marketStats.isSuspendedInRegion`. Suspend a global SKU regionally, reopen it, and save a price change: this writes false and re-enables it. Return and edit the regional suspension separately.
12. **[P2] Coupon allocation can persist negative sub-order totals** — `packages/shared/cart-pricing.ts:411–423`
Each coupon’s shares are rounded independently without respecting each sub-order’s remaining balance. With two ₹101 sub-orders and two stackable ₹101 coupons, the resulting discounts are ₹100 and ₹102, producing totals of ₹1 and **−₹1**. Allocate against remaining per-order balances and reconcile without exceeding them.
13. **[P2] Migration erases historical discount amounts** — `packages/db_helper_sqlite/drizzle/0006_regions_and_superadmins.sql:488–489`
Every existing order receives `discount_amount = '0'`, including orders whose stored total already includes a coupon discount. Both new order-detail APIs exclusively read this column, so historical invoices incorrectly report no discount. Backfill the charged discount from historical item totals, delivery charge, and order total.
14. **[P2] Changing a global coupon to flat discount retains its percentage** — `apps/backend/src/trpc/apis/superadmin-apis/apis/global-coupons.ts:137–138`
Switching a 20% coupon to ₹50 sends only `flatDiscount`; the update preserves the existing percentage. Both values are stored, and pricing continues prioritizing 20%, despite the successful save. Explicitly clear the opposite discount field and validate the merged coupon.
15. **[P2] Browser reload disables vendor-snippet slot selection** — `apps/admin-web/src/components/VendorSnippetForm.tsx:25–28`
Session restoration loads only the JWT, leaving `staff` and `regionId` null. The new query condition then permanently disables slot loading after a reload, making nonpermanent snippet creation impossible until another login. Restore the staff identity or obtain the region from the authenticated staff endpoint.
16. **[P2] Dedicated superadmin login breaks Admin Notifs** — `apps/superadmin-ui/src/lib/auth-context.tsx:37`
The new login produces a superadmin-only principal, but the retained notification page calls `admin.staffUser.sendAdminNotification`, whose guard accepts only users or staff. Every send now fails with `UNAUTHORIZED`. Expose an appropriately guarded superadmin notification endpoint and update the caller.
## Verification Notes
No files were changed during the review. The test suite and migrations were not run.

View file

@ -1,6 +1,35 @@
bunx wrangler d1 execute --remote freshyo-backend-dev --file=../../packages/db_helper_sqlite/drizzle/0004_staff_notif_creds.sql --config wrangler.dev.toml
Review and fix the top 3 React Doctor findings in user-ui. Leave the rest for a follow-up.
1. WARN Maintainability: React function has high control-flow complexity (×15)
`Login` has cyclomatic complexity 30, cognitive complexity 30, and maximum nesting depth 3, so its React logic is hard to understand and change. Extract independent branches into components or hooks.
Curl with no cache & follow the canonical fix and false positive check recipe before fixing: https://react.doctor/docs/rules/react-doctor/no-high-complexity-react-function
- app/(auth)/login.tsx:15
- app/(drawer)/(tabs)/me/my-orders/[id].tsx:14
- app/(drawer)/(tabs)/me/my-orders/index.tsx:74
- +11 more files
2. WARN Maintainability: Large component is hard to read and change (×11)
Component "Login" is over 300 lines long, which is hard to read & change. Split it into a few smaller components.
Curl with no cache & follow the canonical fix and false positive check recipe before fixing: https://react.doctor/docs/rules/react-doctor/no-giant-component
- app/(auth)/login.tsx:15
- app/(drawer)/(tabs)/me/my-orders/[id].tsx:14
- components/PaymentAndOrderComponent.tsx:32
- +8 more files
3. WARN Performance: State only used in handlers (×10)
Each update to "passwordBackTo" redraws your component for nothing because this useState is set but never shown on screen.
Curl with no cache & follow the canonical fix and false positive check recipe before fixing: https://react.doctor/docs/rules/react-doctor/rerender-state-only-in-handlers
- app/(auth)/login.tsx:19
- app/(drawer)/(tabs)/me/my-orders/index.tsx:373
- components/ProductCard.tsx:55
- +3 more files
I've created the both namespaces. show the option in all places where an order has a kebab menu in admin app.
Full results for all 121 issues (diagnostics.json + a .txt per rule): /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-d12050a6-1365-4f35-8c90-23fa748a45bd
Read each file and fix the root cause — don't suppress or silence the rule.
Findings that share a `fixGroupId` (in diagnostics.json) are one root cause — a single fix clears all of them, so treat each `fixGroupId` as ONE task, not one per site.
Verify against the real thing, don't assume: confirm each change matches the canonical fix recipe you fetched for that rule, then re-run `npx react-doctor@latest --verbose` and check the issue is actually gone against the real tool before moving on.
Teach me as you go: for every issue you touch, explain it in plain language (no jargon) — what the problem is, why it's a problem, and how serious it is in human terms. Describe the real-world impact and severity concretely (e.g. "this crashes the page for users on Safari" vs. "this is a minor cleanup with no user impact") so I understand why it matters, not just what changed.
Stop after this pass. Summarize the remaining findings for a follow-up.

View file

@ -0,0 +1,302 @@
# admin-ui ↔ admin-web parity audit
**Goal:** `apps/admin-ui` (React Native / Expo) and `apps/admin-web` (React web) are meant to be mirrors — same screens, sections, copy, behaviour and ordering.
**Method:** static read of both apps by four parallel audit passes (shell/home/auth · orders · catalog · users/coupons/settings), then hand-verification of every high-impact claim. Line numbers are from this working tree. `admin-ui:` = `apps/admin-ui/`, `admin-web:` = `apps/admin-web/`.
**Types:** `CONTENT` (text/value), `STRUCTURE` (missing/extra/reordered), `BEHAVIOUR` (state, action, refetch, validation, availability), `PLATFORM` (inherent RN-vs-web).
**Spot-verified by hand:** `VariantStockDialog` absent on web, image keys vs presigned URLs, web CouponForm missing "First Order Only" (and not round-tripping it), hardcoded "Staff Member" + no staff persistence on web, "Send Welcome Msg" mobile-only, "Load more" web-only on orders/users/coupons/complaints, missing sequence refetch on web, TagForm inline errors web-only, login alert vs inline error, MultiSelect "Clear" button web-only.
## Parity baseline (already identical — no action)
- **Sidebar entries:** all 14 labels in the same order on both sides (Dashboard · Products · Prices Overview · Product Groupings · Dashboard Banners · Slots · Complaints · Manage Orders · Coupons · Vendor Snippets · Stores · User Management · Send Notifications · Logout).
- **Dashboard home:** same tiles, descriptions, category titles and category order ("Orders", "Products & Inventory", "Marketing & Promotions", "User Management", "Settings & Configuration"); no loading/empty/error states on either side.
- **Login copy:** "Admin Login", "Staff Name", "Password", "Enter your name", "Enter your password", "Login" / "Logging in...", "Login failed".
- **Empty/loading/error strings** match across products, tags, groupings, slots, stores, banners, orders, sequences, coupons, complaints, snippets, customize-app.
---
## 1. Executive summary — the biggest gaps
1. **Per-variant stock management exists only on admin-ui.** Web replaces `VariantStockDialog` with a single whole-product toggle and mislabels it: the button reads "Out" when the product is in stock, and web has no "Partial" state and no "{n} of {m} variants are out of stock" view. *Verified.*
2. **Image storage differs:** admin-ui converts uploads to bucket-relative keys (`toImageKey`) before saving; admin-web saves the raw **presigned URLs** (`images: variantUrls`, `.map((img) => img.url)`), which expire and break product images. *Verified.*
3. **"First Order Only" is missing from the web coupon form** — no field, no Yup rule, and not round-tripped when editing an existing coupon. *Verified.*
4. **Staff identity is not persisted on web:** no `staff_session` equivalent, `staff` is null after reload, and the sidebar block is gated on it — so the block shows the hardcoded "Staff Member" and can disappear entirely; admin-ui also shows the region line ("Region #id"/"No region"). *Verified.*
5. **"Send Welcome Msg" (first-order WhatsApp) exists only on admin-ui**, and only admin-ui passes `isFirstOrder` into `OrderOptionsMenu` from the orders list and the sequences screen. *Verified.*
6. **List loading differs everywhere:** admin-ui auto-loads on scroll; web adds explicit **"Load more"** buttons (orders, users, coupons, complaints) — web users can think a list is complete.
7. **Missing refetches on web:** delivery-sequence save/assign (`refetchSequence`/`refetchOrders` on admin-ui only), attach-location after coordinates, review-reply invalidation + form reset, banner slot-empty (no refetch), product-group/slot/store/banner edit invalidations. *Verified for sequences.*
8. **Feedback mechanism differs wholesale:** native `Alert.alert(title, body)` (+ `window.confirm`-style multi-button confirmations) vs web `window.alert("Title: body")`, `ErrorToast(...)` and browser `window.confirm` (OK/Cancel instead of "No"/"Yes, Cancel", "Cancel"/"Remove", "Cancel"/"Delete"). Every admin confirmation reads differently.
9. **Destructive confirmations lose their titles/verbs on web** (e.g. "Cancel Order" → `window.confirm('Cancel Order? ...')`, "Remove Delivery Cost" → OK/Cancel).
10. **Utility-component UX diverges:** web `MultiSelect` shows "N selected" + a **Clear** button and placeholder behaviour; admin-ui `BottomDropdown` joins all labels and has no Clear. Web also renders a label above the trigger where admin-ui doesn't, and in-dialog search placeholder/empty copy differ.
11. **TagForm validation is invisible on admin-ui** (errors destructured but never rendered) while web shows inline messages under Tag Name/Description. *Verified.*
12. **A desktop-only dead control on web:** the header hamburger opens an overlay drawer that is `md:hidden`, so on desktop it is a visible no-op.
---
## 2. Shell / navigation / login / auth
### Shell
- `PLATFORM` `admin-ui: app/(drawer)/_layout.tsx:79-172` ↔ `admin-web: dashboard.tsx:57-70` — icons come from different libraries (MaterialIcons vs lucide); glyphs differ for Products, Banners, Complaints, Coupons (inventory/Package, view-carousel/Images, report-problem/TriangleAlert, local-offer/TicketPercent).
- `CONTENT` `admin-ui: app/(drawer)/_layout.tsx:64-72` ↔ `admin-web: dashboard.tsx:121-124` — identity block: admin-ui shows the region line (place icon + region name, "Region #<id>", "No region"); admin-web shows the hardcoded "Staff Member" and no region. *Verified.*
- `CONTENT` `admin-ui: app/(drawer)/_layout.tsx:45` ↔ `admin-web: dashboard.tsx:122` — name fallback "Unknown user" has no web counterpart.
- `STRUCTURE` `admin-ui: app/(drawer)/_layout.tsx:53-75` ↔ `admin-web: dashboard.tsx:118` — admin-ui always renders the drawer profile header; web renders it only when `staff` is truthy (so it vanishes on reload — see auth).
- `BEHAVIOUR` `admin-ui: app/(drawer)/_layout.tsx:41-50` ↔ `admin-web: dashboard.tsx:80,122` — admin-ui sources name/region from `trpc.admin.staffUser.me` (server truth, falls back to stored); web uses only in-memory context.
- `BEHAVIOUR` `admin-ui: app/(drawer)/_layout.tsx:219-222` ↔ `admin-web: dashboard.tsx:155,167-173` — the hamburger opens a real drawer on admin-ui; on web it opens an overlay that is `md:hidden` → desktop no-op at feature roots / on /dashboard.
- `PLATFORM` `admin-ui: app/(drawer)/_layout.tsx:221` ↔ `admin-web: dashboard.tsx:168` — `router.back()` vs `window.history.back()`.
- `PLATFORM` `admin-ui: app/(drawer)/_layout.tsx:76-173` ↔ `admin-web: dashboard.tsx:113-114,132-138` — web highlights the active nav entry; admin-ui passes no `focused` so there is no active-item highlight.
- `BEHAVIOUR` `admin-ui: app/(drawer)/_layout.tsx:78` ↔ `admin-web: dashboard.tsx:105-106` — "Dashboard": `router.dismissTo` (pops) vs `navigate` (pushes).
- `PLATFORM` `admin-ui: packages/ui/src/lib/refresh-context.tsx:8-11` ↔ `admin-web: src/lib/refresh-context.tsx:13-16` — `refreshAll`: `queryClient.clear()` vs `invalidateQueries()`. (Both header buttons emit REFRESH_EVENT — parity.)
- `PLATFORM` `admin-ui: app/_layout.tsx:10,35`, `services/notif-service/notif-checker.tsx:37-70` ↔ `admin-web: (none)` — admin-ui-only push-permission dialog: "Notification Permission Denied" / "It seems you have denied notification permissions. Please enable them in your device settings." / "Cancel" + "Settings".
- `PLATFORM` `admin-ui: app/_layout.tsx:36` ↔ `admin-web: __root.tsx:45` — react-native-toast-message vs sonner.
- `PLATFORM` `admin-ui: (none)` ↔ `admin-web: __root.tsx:46,51-59` — web always mounts ReactQueryDevtools + TanStackDevtools.
### Dashboard home
- `STRUCTURE` `admin-ui: dashboard/index.tsx:113,31-33` ↔ `admin-web: dashboard.index.tsx:127-135,48-51` — admin-ui sets `testID`/`accessibilityLabel` on tiles (`add-product-menu-item`); web's quick tile and menu button have no `data-testid`.
- `PLATFORM` `admin-ui: dashboard/index.tsx:248` ↔ `admin-web: dashboard.index.tsx:263` — quick-tile sizing: fixed `calc(25% - 9px)` vs `flex-1`.
- `PLATFORM` `admin-ui: dashboard/index.tsx:79-201` ↔ `admin-web: dashboard.index.tsx:99-220` — tile/category icon sets differ (library), semantic pairs match.
- `PLATFORM` `admin-ui: dashboard/index.tsx:224` ↔ `admin-web: dashboard.index.tsx:252` — ScrollView vs div.
### Login
- `PLATFORM`/`BEHAVIOUR` `admin-ui: login.tsx:18` ↔ `admin-web: login.tsx:17-21,68-72` — empty-field validation: `Alert.alert("Error", "Please enter both name and password")` vs inline red text via `setLocalError` (same string). Web's inline slot shows `localError ?? loginError`; admin-ui's only shows server `loginError`. *Verified.*
- `PLATFORM` `admin-ui: login.tsx:63` ↔ `admin-web: login.tsx:57,63-65` — password masking (`secureTextEntry` vs `type="password"`) and web's Enter-to-submit handler (absent on admin-ui).
- `PLATFORM` `admin-ui: login.tsx:53,66` ↔ `admin-web: login.tsx:47,60` — field spacing 30px vs 32px (cosmetic).
### Auth context / session
- `BEHAVIOUR` `admin-ui: components/context/staff-auth-context.tsx:64,43`, `src/hooks/useJWT.ts:4,29-45` ↔ `admin-web: components/context/staff-auth-context.tsx:59-62,38-40`, `src/hooks/useJWT.ts:3` — admin-ui persists the staff identity (`staff_session`) and restores it on reload; web saves the JWT only, so `staff` stays null (identity block hidden). *Verified.*
- `BEHAVIOUR` `admin-ui: components/context/staff-auth-context.tsx:77-78` ↔ `admin-web: components/context/staff-auth-context.tsx:73` — logout clears the staff key on admin-ui; web has none to clear. Both clear the query cache and redirect.
- `PLATFORM` `admin-ui: components/context/staff-auth-context.tsx:4,86` ↔ `admin-web: components/context/staff-auth-context.tsx:4,81` — `DeviceEventEmitter` vs `EventBus` for force-logout (same event name/string).
---
## 3. Orders
### Orders hub
- `CONTENT` `admin-ui: manage-orders/index.tsx:46` ↔ `admin-web: dashboard.orders.tsx:52` — flash notice: titled `Alert.alert('Flash Deliveries', 'Flash deliveries do not have delivery sequences. Use the Orders menu to manage flash deliveries.')` vs `window.alert('Flash Deliveries: …')`.
- `BEHAVIOUR` `admin-ui: manage-orders/index.tsx:56-61` ↔ `admin-web: dashboard.orders.tsx:62-67` — Orders nav: admin-ui pushes `/manage-orders/orders` (drops the selected slot, or `?filter=flash`); web passes `{ filter, slotId }`.
- `BEHAVIOUR` `admin-ui: manage-orders/index.tsx:49` ↔ `admin-web: dashboard.orders.tsx:55` — Delivery Sequences nav with no slot: admin-ui interpolates `slotId=null` (dead-end "No slot selected" screen); web sends `''` and auto-selects the first slot.
- `PLATFORM` `admin-ui: manage-orders/index.tsx:90-96` ↔ `admin-web: dashboard.orders.tsx:75-81` — slot picker: `BottomDropdown placeholder="Select Slot"` vs `Dropdown` with no placeholder.
### Orders list
- `BEHAVIOUR` `admin-ui: orders/index.tsx:482` ↔ `admin-web: dashboard.orders.list.tsx:511,529-539` — web reads and applies `slotId` from the URL (`'flash'` or numeric); admin-ui ignores it.
- `BEHAVIOUR` `admin-ui: orders/index.tsx:549-554,607-614` ↔ `admin-web: dashboard.orders.list.tsx:632-645` — infinite scroll (`onEndReached`, footer spinner + "Loading more...") vs explicit **"Load more"** button. *Verified.*
- `BEHAVIOUR` `admin-ui: orders/index.tsx:37,41` ↔ `admin-web: dashboard.orders.list.tsx:68,79` — notes result: `Alert.alert('Success','Notes updated successfully')` / `Alert.alert('Error', …)` vs `window.alert('Success: …')` / `ErrorToast(…)`.
- `BEHAVIOUR` `admin-ui: orders/index.tsx:29-48` ↔ `admin-web: dashboard.orders.list.tsx:58-79` — Save button: never disabled on admin-ui vs `disabled={updateNotesMutation.isPending}` on web.
- `STRUCTURE` `admin-ui: orders/index.tsx:348-365` ↔ `admin-web: dashboard.orders.list.tsx:379-395` — admin-ui passes `isFirstOrder` into `OrderOptionsMenu`; web omits it.
- `PLATFORM` `admin-ui: orders/index.tsx:216` ↔ `admin-web: dashboard.orders.list.tsx:244` — checkbox fill gray500 (#717680) vs #6B7280.
- `PLATFORM` `admin-ui: orders/index.tsx:21-27` ↔ `admin-web: dashboard.orders.list.tsx:49-56` — notes input: RN `TextInput multiline` vs `MyInput numberOfLines={4}`.
- `PLATFORM` `admin-ui: orders/index.tsx:527-531` ↔ `admin-web: dashboard.orders.list.tsx:559-563` — spinner vs CSS spin ("Loading orders..." identical).
- `PLATFORM` `admin-ui: orders/index.tsx:156-160` ↔ `admin-web: dashboard.orders.list.tsx:185-191` — web adds `role="button"`, `tabIndex`, Enter key handling, `aria-label="Order options"`.
- (List emptiness: neither side renders an empty-state message — parity.)
### Order details
- `CONTENT`/`PLATFORM` `admin-ui: order-details/[id].tsx:437-448` ↔ `admin-web: dashboard.orders.$id.tsx:428` — remove delivery cost: `Alert.alert('Remove Delivery Cost', '…', [Cancel, Remove])` vs `window.confirm('Remove Delivery Cost: …')` (OK/Cancel).
- `CONTENT`/`PLATFORM` `admin-ui: order-details/[id].tsx:46` ↔ `admin-web: dashboard.orders.$id.tsx:62` — success: `Alert.alert("Success","Delivery charge has been removed")` vs `window.alert('Success: …')`.
- `BEHAVIOUR` `admin-ui: order-details/[id].tsx:40,50,59` ↔ `admin-web: dashboard.orders.$id.tsx:56,66` — mutation errors: `Alert.alert('Error', …)` vs `ErrorToast(…)`.
- `STRUCTURE` `admin-ui: order-details/[id].tsx:379-383,393-397` ↔ `admin-web: dashboard.orders.$id.tsx:372-374,385-387` — packaging toggle icon: admin-ui swaps to "hourglass-empty" and uses check-box/outline; web uses one Check icon with colour change.
- `STRUCTURE` `admin-ui: order-details/[id].tsx:163-165` ↔ `admin-web: dashboard.orders.$id.tsx:173-175` — delivery-time row: `bg-brand50` + `text-brand800` vs no background + `text-brand-800`.
- `PLATFORM` `admin-ui: order-details/[id].tsx:562-564` ↔ `admin-web: dashboard.orders.$id.tsx:538` — bottom bar `absolute` + iOS padding vs `fixed`.
- `PLATFORM` `admin-ui: order-details/[id].tsx:78` ↔ `admin-web: dashboard.orders.$id.tsx:92` — error "Go Back": `router.back()` vs `window.history.back()`.
- (Loading/error copy identical: "Loading order details...", "Oops!", "Failed to load order details".)
### Delivery sequences
- `CONTENT`/`PLATFORM` `admin-ui: delivery-sequences/index.tsx:452` ↔ `admin-web: dashboard.orders.sequence.tsx:469` — save: `Alert.alert("Success","Delivery sequence updated successfully")` vs `window.alert('Success: …')`.
- `BEHAVIOUR` `admin-ui: delivery-sequences/index.tsx:455-456` ↔ `admin-web: dashboard.orders.sequence.tsx:467-470` — admin-ui refetches sequence + orders after save; **web does not** (can show stale rows). *Verified.*
- `CONTENT`/`PLATFORM` `admin-ui: delivery-sequences/index.tsx:609-612,653-656` ↔ `admin-web: dashboard.orders.sequence.tsx:619-621,661-663` — assign/unassign: "Orders unassigned/assigned successfully" as titled alert vs prefixed `window.alert`.
- `BEHAVIOUR` `admin-ui: delivery-sequences/index.tsx:614-620,658-664,743-745,758-760` ↔ `admin-web: dashboard.orders.sequence.tsx:623-628,665-671,740-742,755-757` — errors: `Alert.alert` vs `ErrorToast`.
- `BEHAVIOUR` `admin-ui: delivery-sequences/index.tsx:772-775` ↔ `admin-web: dashboard.orders.sequence.tsx:769` — attach location: admin-ui refetches orders + sequence; web passes a no-op.
- `STRUCTURE` `admin-ui: delivery-sequences/index.tsx:580-681` ↔ `admin-web: dashboard.orders.sequence.tsx:589-679` — assign control: FAB + `BottomDropdown` labelled "Assign To" vs a persistent panel (w-56) with `SearchableSelect`.
- `STRUCTURE` `admin-ui: delivery-sequences/index.tsx:713-727` ↔ `admin-web: dashboard.orders.sequence.tsx:711-724` — `isFirstOrder` passed only by admin-ui.
- `PLATFORM` `admin-ui: delivery-sequences/index.tsx:507-527` ↔ `admin-web: dashboard.orders.sequence.tsx:517-534` — placeholder texts ("Select slot"/"Select user") only on admin-ui dropdowns.
- `PLATFORM` `admin-ui: delivery-sequences/index.tsx:545-575` ↔ `admin-web: dashboard.orders.sequence.tsx:444-451,554-584` — drag: long-press DraggableFlatList vs dnd-kit PointerSensor (delay 200/tolerance 8).
- `STRUCTURE` `admin-ui: delivery-sequences/index.tsx:572-574` ↔ `admin-web: dashboard.orders.sequence.tsx:553` — `SlotProgress`: list header (scrolls) vs static block above the list.
- `PLATFORM` `admin-ui: delivery-sequences/index.tsx:531-542` ↔ `admin-web: dashboard.orders.sequence.tsx:539-546` — spinner style; empty icon assignment-late vs ClipboardList (copy identical).
### Rebalance
- `STRUCTURE` `admin-ui: rebalance-orders/index.tsx:171-175` ↔ `admin-web: dashboard.rebalance.tsx:175-179` — web-only "{n} slot(s) selected".
- `CONTENT`/`PLATFORM` `admin-ui: rebalance-orders/index.tsx:141,154` ↔ `admin-web: dashboard.rebalance.tsx:146,159` — "Rebalance Complete"/"Rebalancing..." titled alerts vs prefixed `window.alert` (including "Please wait while we rebalance the selected slots.").
- `CONTENT` `admin-ui: rebalance-orders/index.tsx:106` ↔ `admin-web: dashboard.rebalance.tsx:111` — "+N more" colour: `text-pink1` vs `#2E90FA`.
- `PLATFORM` `admin-ui: rebalance-orders/index.tsx:198-218` ↔ `admin-web: dashboard.rebalance.tsx:208-232` — FAB absolute + LinearGradient vs fixed + CSS gradient + `aria-label`.
### Shared order components
- `STRUCTURE` `admin-ui: components/OrderOptionsMenu.tsx:309-331` ↔ `admin-web: (no equivalent)` — **"Send Welcome Msg"** ("First order — welcome the customer on WhatsApp"), gated on `order.isFirstOrder` and reading the `welcomeMessage` region constant, exists only on admin-ui. *Verified.*
- `BEHAVIOUR` `admin-ui: components/OrderOptionsMenu.tsx:168-218` ↔ `admin-web: components/OrderOptionsMenu.tsx:150-184` — toggle rows: single responder View vs a Checkbox nested inside a button that also has `onClick` (one click can fire the handler twice).
- `CONTENT`/`PLATFORM` `admin-ui: components/OrderOptionsMenu.tsx:64-67,79,82,96,103,116,125` ↔ `admin-web: components/OrderOptionsMenu.tsx:67,71,74,86,88,97,106` — attach-location and fallback messages: titled native alerts ("Permission Denied", "Success", "Error", "No phone number found", "No location coordinates available") vs prefixed `window.alert`; WhatsApp via `whatsapp://send?phone=+91…` vs `https://wa.me/91…`.
- `CONTENT`/`PLATFORM` `admin-ui: components/OrderNotesForm.tsx:24,33,36` ↔ `admin-web: components/OrderNotesForm.tsx:23,32,35` — "Please enter some notes" / "Notes updated successfully" / "Failed to update notes": titled alerts vs prefixed `window.alert`.
- `PLATFORM` `admin-ui: components/OrderNotesForm.tsx:63-69` ↔ `admin-web: components/OrderNotesForm.tsx:54-60` — Cancel button: `fillColor="gray1"` vs `variant="blue" className="bg-gray-400 hover:bg-gray-500"`.
- `CONTENT`/`PLATFORM` `admin-ui: components/CancelOrderDialog.tsx:19,23-48` ↔ `admin-web: components/CancelOrderDialog.tsx:17,21-24,35` — confirm: `Alert.alert('Cancel Order','Are you sure you want to cancel this order? This action cannot be undone.',[No, Yes, Cancel])` vs `window.confirm('Cancel Order? …')`; validation/error titled alerts vs `window.alert`.
- `CONTENT`/`PLATFORM` `admin-ui: components/UserIncidentsView.tsx:26,33,41` ↔ `admin-web: components/UserIncidentsView.tsx:25,32,40` — "Incident added successfully" / "Please enter a comment or negativity score": titled alerts vs prefixed `window.alert`.
- `ProductListDialog.tsx` and `SnippetOrdersView.tsx`: copy/behaviour identical (only DOM primitives differ).
---
## 4. Catalog
### Products — list
- `BEHAVIOUR` `admin-ui: products/index.tsx:23-36,186-202` ↔ `admin-web: dashboard.products.tsx:63-71,121-123` — stock aggregation: admin-ui computes per-variant state (In/Partial/Out, IN/OUT counters from the aggregate); web reads only `skus[0]` and renders `{isOut ? 'Out' : 'In'}` (no Partial). *Verified.*
- `CONTENT` `admin-ui: products/index.tsx:122-124` ↔ `admin-web: dashboard.products.tsx:196-198` — "{skuCount} Variants · {outCount} out" vs "{n} Variants".
- `STRUCTURE` `admin-ui: products/index.tsx:145-151,320-325` ↔ `admin-web: dashboard.products.tsx:218-227` — action button: "Stock" → `VariantStockDialog` vs a direct whole-product `toggleOutOfStock` with a label that flips "{isOut ? 'Stock' : 'Out'}". *Verified.*
- `PLATFORM` `admin-ui: products/index.tsx:291` ↔ `admin-web: dashboard.products.tsx:244` — empty icon inventory vs Package.
- `PLATFORM` `admin-ui: products/index.tsx:313` ↔ `admin-web: dashboard.products.tsx:264,277` — pull-to-refresh vs no refresh control.
### Products — create / edit
- `BEHAVIOUR` `admin-ui: products/add.tsx:12-15,76` + `products/edit.tsx:14-17,150-156` ↔ `admin-web: dashboard.products.new.tsx:68-77` + `dashboard.products.edit.tsx:145-149` — admin-ui stores bucket-relative **keys** (`toImageKey`, "Send keys, not the presigned URLs"); web stores **presigned URLs** (`images: variantUrls`, `.map((img) => img.url)`) which expire. *Verified.*
- `CONTENT` `admin-ui: products/add.tsx:29,41,49,111,113` ↔ `admin-web: dashboard.products.new.tsx:24,36,44,105,107` — same validation/success strings, titled `Alert.alert` vs title-less `window.alert`.
- `CONTENT` `admin-ui: products/edit.tsx:97,109,117,195,198,240,242` ↔ `admin-web: dashboard.products.edit.tsx:93,105,113,188,191,232,234` — same messages, titles dropped on web.
- `STRUCTURE` `admin-ui: products/edit.tsx:246-252` ↔ `admin-web: dashboard.products.edit.tsx:238-246` — global-product branch rendered bare vs wrapped in `AppContainer`.
### Products — detail
- `BEHAVIOUR` `admin-ui: products/detail/[id].tsx:29,79,82-84` ↔ `admin-web: dashboard.products.$id.tsx:77-80` — after a review reply admin-ui invalidates `getProductReviews` and clears the textarea; web does neither. *Verified pattern (same class as the sequence-refetch gap).*
- `CONTENT` `admin-ui: products/detail/[id].tsx:80,86` ↔ `admin-web: dashboard.products.$id.tsx:77,82` — "Response submitted"/errors: titled vs title-less alerts.
- `PLATFORM` `admin-ui: products/detail/[id].tsx:32-52,109-114,194-199` ↔ `admin-web: dashboard.products.$id.tsx:41-51,102-109,190-193` — native picker vs `<input type="file">`; carousel prop names differ.
### ProductForm / GlobalProductForm
- `CONTENT` `admin-ui: src/components/ProductForm.tsx:592,639` ↔ `admin-web: src/components/ProductForm.tsx:599,649` — "Duplicate"/"Check your form" alerts: titled vs folded into the message.
- `PLATFORM` `admin-ui: src/components/ProductForm.tsx:6` ↔ `admin-web: src/components/ProductForm.tsx:5,56-71` — web re-implements `InfoDialog` locally instead of importing it.
- `CONTENT` `admin-ui: src/components/GlobalProductForm.tsx:179` ↔ `admin-web: src/components/GlobalProductForm.tsx:146-153` — submit label: always "Save market data" (spinner only) vs label swapped to "Saving...".
### VariantStockDialog
- `STRUCTURE` `admin-ui: src/components/VariantStockDialog.tsx` (whole file; used at `products/index.tsx:320`) ↔ `admin-web: (no equivalent)` — per-variant stock UI is admin-ui-only: title "Stock", "{outCount} of {skus.length} variants are out of stock", "Variants ({selected}/{total})", "Select all"/"Clear all", per-variant In/Out, "Mark out of stock"/"Mark in stock"/"Cancel". *Verified.*
### Product groupings
- `CONTENT` `admin-ui: product-groupings/index.tsx:146-162` ↔ `admin-web: dashboard.product-groupings.tsx:124` — delete: titled alert with Cancel/Delete vs `window.confirm('Are you sure you want to delete this group?')`.
- `BEHAVIOUR` `admin-ui: components/ProductGroupForm.tsx:72` ↔ `admin-web: src/components/ProductGroupForm.tsx:67` — admin-ui invalidates `getGroups` after save; web does not.
- `CONTENT` `admin-ui: components/ProductGroupForm.tsx:75` ↔ `admin-web: src/components/ProductGroupForm.tsx:69` — save error: titled alert vs prefixed `window.alert`.
- `BEHAVIOUR` `admin-ui: components/ProductGroupForm.tsx:134-141` ↔ `admin-web: src/components/ProductGroupForm.tsx:128-133` — admin-ui disables Save while pending; web's Save is a plain div with no disabled state.
- `PLATFORM` `admin-ui: product-groupings/index.tsx:42-46,102` ↔ `admin-web: dashboard.product-groupings.tsx:37,79-82` — icons; count colour `text-brand500` vs `text-blue-600`.
### Product tags
- `BEHAVIOUR` `admin-ui: product-tags/index.tsx:81,91-95,138-140` ↔ `admin-web: (none)` — admin-ui tag list has pull-to-refresh; web has none.
- `CONTENT` `admin-ui: src/components/TagForm.tsx:266` ↔ `admin-web: src/components/TagForm.tsx:306-308` — "Long press and drag to reorder • {n} items" vs "Drag to reorder • {n} items".
- `STRUCTURE` `admin-ui: src/components/TagForm.tsx:157,173-231` ↔ `admin-web: src/components/TagForm.tsx:216-231` — web renders inline validation under Tag Name/Description; admin-ui never renders them (same Yup messages, invisible to native users). *Verified.*
- `CONTENT` `admin-ui: src/components/TagMenu.tsx:42-53,59,64` ↔ `admin-web: src/components/TagMenu.tsx:42-44,53,58` — delete confirm title inlined on web ("Delete Tag? …"); "Tag deleted successfully" titled vs prefixed.
- `CONTENT` `admin-ui: product-tags/add.tsx:47-55` ↔ `admin-web: dashboard.product-tags.new.tsx:48-52` — create success: alert with an explicit OK-then-back vs `window.alert` + `history.back()`.
- `CONTENT` `admin-ui: product-tags/edit/index.tsx:65-73` ↔ `admin-web: dashboard.product-tags.edit.tsx:63-67` — update success/error same pattern.
- `BEHAVIOUR` `admin-ui: product-tags/edit/index.tsx:64` ↔ `admin-web: (none)` — admin-ui invalidates `getProductTagById` after update; web does not.
- `CONTENT` `admin-ui: product-tags/order.tsx:167,171` ↔ `admin-web: dashboard.product-tags.order.tsx:165,169` — success/error titles dropped on web.
- `PLATFORM` `admin-ui: product-tags/index.tsx:65,72,145` ↔ `admin-web: dashboard.product-tags.tsx:67,74,133` — icons; copy identical ("Tag Orders", "Add New Tag", "No tags yet", "Create your first product tag", "Dashboard Tag", "Failed to load tags", "Retry").
- `PLATFORM` `admin-ui: src/components/TagForm.tsx:8,271-280` ↔ `admin-web: src/components/TagForm.tsx:8-10,312-318` — drag lib, related-stores control (BottomDropdown multiple vs MultiSelect), image picker.
### Prices overview
- `CONTENT` `admin-ui: prices-overview/index.tsx:242,247,252,284,287` ↔ `admin-web: dashboard.prices.tsx:237,242,247,279,282` — "Please enter a valid price/market price/flash price", "Prices updated successfully", "Failed to update prices: …": titled vs title-less.
- `PLATFORM` `admin-ui: prices-overview/index.tsx:299-306` ↔ `admin-web: dashboard.prices.tsx:294-300` — store filter: BottomDropdown(multiple) vs MultiSelect. Field labels/placeholders match.
### Slots
- `CONTENT` `admin-ui: slots/index.tsx:42-50` ↔ `admin-web: dashboard.slots.tsx:45-52` — capacity toggle: titled alerts vs `window.alert('Success: …')` / `ErrorToast`.
- `PLATFORM` `admin-ui: slots/index.tsx:272-273` ↔ `admin-web: dashboard.slots.tsx:277-278` — pull-to-refresh vs no refresh affordance on web's MyFlatList.
- `BEHAVIOUR` `admin-ui: slots/slot-details.tsx:128-137` ↔ `admin-web: dashboard.slots.detail.tsx:126-138` — "Share": native Share sheet vs `navigator.share` else clipboard + extra `window.alert('Link copied to clipboard')`; failure alert vs ErrorToast.
- `BEHAVIOUR` `admin-ui: components/SlotForm.tsx:90-93` ↔ `admin-web: src/components/SlotForm.tsx:87-90` — admin-ui invalidates the slots query after update; web does not.
- `CONTENT` `admin-ui: components/SlotForm.tsx:63,68,90,98,107,111` ↔ `admin-web: src/components/SlotForm.tsx:61,66,88,94,103,107` — "Please fill all fields", "Freeze time must be before or equal to delivery time", "Slot created/updated successfully!", "Failed to create/update slot": titles dropped.
### Stores
- `CONTENT` `admin-ui: stores/index.tsx:113-132` ↔ `admin-web: dashboard.stores.tsx:108-115` — delete: titled alert with Cancel/Delete vs `window.confirm('Delete Store: …')`; success/error titles dropped.
- `CONTENT` `admin-ui: stores/add.tsx:20,24`, `stores/edit.tsx:27-32` ↔ `admin-web: dashboard.stores.new.tsx:24,28`, `dashboard.stores.edit.tsx:30-36` — success/error titles dropped; admin-ui invalidates `getStores` after update, web does not.
- `CONTENT` `admin-ui: components/StoreForm.tsx:115` ↔ `admin-web: src/components/StoreForm.tsx:109` — upload failure: `Alert.alert('Error','Failed to upload image')` vs `window.alert('Error: …')`.
- `PLATFORM` `admin-ui: stores/index.tsx:173` ↔ `admin-web: dashboard.stores.tsx:179` — two-column list + RefreshControl vs CSS grid. Copy matches ("Manage your outlets", "{n} Locations", "No stores found", "Get started by adding your first store location.", "Oops!", "We couldn't load the stores. Please try again.", "Retry").
### Banners
- `BEHAVIOUR` `admin-ui: dashboard-banners/index.tsx:152` ↔ `admin-web: dashboard.banners.tsx:160-177` — emptying a slot refetches on admin-ui; web only updates local state (save does refetch).
- `CONTENT` `admin-ui: dashboard-banners/index.tsx:122-198` ↔ `admin-web: dashboard.banners.tsx:136-202` — same messages, titles dropped/prefixed.
- `CONTENT` `admin-ui: dashboard-banners/index.tsx:184-187` ↔ `admin-web: dashboard.banners.tsx:195` — delete: titled alert vs `window.confirm('Delete Banner: …')`.
- `CONTENT` `admin-ui: dashboard-banners/create.tsx:30,46,54` ↔ `admin-web: dashboard.banners.new.tsx:32,48,51` — "Image is required" as alert vs `ErrorToast`; create success alert-with-OK vs `window.alert` + `history.back()`.
- `BEHAVIOUR` `admin-ui: dashboard-banners/edit/[id].tsx:110` ↔ `admin-web: dashboard.banners.$id.edit.tsx:95-96` — admin-ui invalidates `getBanner` after update; web does not.
- `CONTENT` `admin-ui: dashboard-banners/edit/[id].tsx:60,65,111,118` ↔ `admin-web: dashboard.banners.$id.edit.tsx:47,52,96,99` — load/success feedback: alert vs ErrorToast/`window.alert`.
- `CONTENT` `admin-ui: components/BannerForm.tsx:109` ↔ `admin-web: src/components/BannerForm.tsx:99` — upload failure as above.
- `PLATFORM` `admin-ui: dashboard-banners/index.tsx:237-244` ↔ `admin-web: dashboard.banners.tsx:59-61` — pull-to-refresh vs `useManualRefresh`. Banner slot copy matches.
---
## 5. Users / coupons / customize-app / notifications / complaints / snippets
### Users
- `STRUCTURE` `admin-ui: user-management/index.tsx:108-126` ↔ `admin-web: dashboard.users.tsx:97-121` — web's list header adds "Refresh"/"Refreshing..." (with refreshing/onRefresh props); admin-ui has only the search bar + "Showing N users".
- `BEHAVIOUR` `admin-ui: user-management/index.tsx:237-251` ↔ `admin-web: dashboard.users.tsx:233-262` — admin-ui: infinite scroll + pull-to-refresh + sticky header; web: none of these.
- `STRUCTURE` `admin-ui: user-management/index.tsx:128-135,246` ↔ `admin-web: dashboard.users.tsx:123-139,246-248` — web footer shows a "Load more" button; admin-ui shows only a spinner. *Verified.*
- `BEHAVIOUR` `admin-ui: user-management/index.tsx:112-116` ↔ `admin-web: dashboard.users.tsx:100-105` — web's SearchBar gets `onSearch` (Enter/submit); admin-ui's doesn't.
- `STRUCTURE` `admin-ui: user-management/index.tsx:192-194` ↔ `admin-web: dashboard.users.tsx:110-112` — row/order links differ by route naming (same destinations).
- `PLATFORM` `admin-ui: user-management/index.tsx:214,254` ↔ `admin-web: dashboard.users.tsx:215,251` — icons.
- `PLATFORM` `admin-ui: user-management/[id].tsx:161,169` ↔ `admin-web: dashboard.users.$id.tsx:157,166` — ScrollView vs div; `router.back()` vs `window.history.back()`. Everything else (fields, "Suspend User", "Prevent user from placing orders", "Order History", "No orders yet", "Registered …") is an exact mirror.
### Coupons
- `STRUCTURE`/`CONTENT` `admin-ui: src/components/CouponForm.tsx:384-396,46,138` + `coupons/edit/[id].tsx:80` ↔ `admin-web: src/components/CouponForm.tsx:42-65` + `dashboard.coupons.$id.edit.tsx:101-114` — **"First Order Only"** toggle (helper "Valid only on the customer's first order") exists only on admin-ui; web has no field, no Yup rule and doesn't round-trip the value on edit. *Verified.*
- `BEHAVIOUR` `admin-ui: src/components/CouponForm.tsx:50` ↔ `admin-web: src/components/CouponForm.tsx:42-65` — admin-ui validates `skuIds` (array of numbers); web's schema has no rule.
- `BEHAVIOUR` `admin-ui: src/components/CouponForm.tsx:469-475` ↔ `admin-web: src/components/CouponForm.tsx:483-496` — applicable-users paging: auto `onEndReached` + "Loading..." vs "Load more" button + "Loading...".
- `CONTENT` `admin-ui: src/components/CouponForm.tsx:547-553` ↔ `admin-web: src/components/CouponForm.tsx:570-574` — submit label: always "Create Coupon" (spinner only) vs "Creating...".
- `CONTENT` `admin-ui: coupons/index.tsx:265-283` ↔ `admin-web: dashboard.coupons.tsx:266-277` — delete: titled alert with Cancel/Delete + "Coupon deleted successfully" vs `window.confirm('Delete Coupon: …')` + `window.alert('Success: …')`; error alert vs ErrorToast.
- `STRUCTURE` `admin-ui: coupons/index.tsx:333-358` ↔ `admin-web: dashboard.coupons.tsx:327-356` — web footer has "Loading more..." + "Load more"; admin-ui auto-loads. *Verified.*
- `CONTENT` `admin-ui: coupons/create.tsx:29-45` ↔ `admin-web: dashboard.coupons.new.tsx:45-59` — "At least one coupon code is required", create success/error: titled alerts vs ErrorToast/`window.alert` + `history.back()`.
- `CONTENT` `admin-ui: coupons/edit/[id].tsx:38-44` ↔ `admin-web: dashboard.coupons.$id.edit.tsx:71-76` — update success/error same pattern. ("Loading..."/"Coupon not found" match.)
- `PLATFORM` `admin-ui: coupons/index.tsx:316-331,498-516` ↔ `admin-web: dashboard.coupons.tsx:310-325,500-513` — status filter BottomDropdown vs MultiSelect; swipeable TabView (indicator #F83758) vs plain tab buttons.
- `PLATFORM` `admin-ui: coupons/index.tsx:288,297,349` ↔ `admin-web: dashboard.coupons.tsx:282,291,347` — icons.
- `PLATFORM` `admin-ui: src/components/CouponForm.tsx:349` ↔ `admin-web: src/components/CouponForm.tsx:368` — date control DateTimePickerMod vs DateTimeInput; user list FlatList vs overflow-auto list. All other labels/copy match.
### Customize app
- `CONTENT` `admin-ui: customize-app/index.tsx:610-613` ↔ `admin-web: dashboard.customize-app.tsx:596-602` — web-only subtitle "Modify application settings. Changes will take effect immediately.".
- `CONTENT` `admin-ui: customize-app/index.tsx:443-446` ↔ `admin-web: dashboard.customize-app.tsx:443-446` — bound blurb: "**The** Effective bound (lowest priority) is the one whose settings apply to checkout." vs "Only the effective bound (lowest priority) settings apply to checkout.".
- `CONTENT` `admin-ui: customize-app/index.tsx:341,349,353,381,389,393` ↔ `admin-web: dashboard.customize-app.tsx:343,351,355,383,391,395` — "No Changes"/"Updated N settings successfully."/"Failed to update settings. Please try again.": titled alerts vs `window.alert`.
- `CONTENT` `admin-ui: customize-app/popular-items.tsx:164-178,212,216` ↔ `admin-web: dashboard.customize-app.popular.tsx:158,195,199` — remove confirm titled alert with Cancel/Remove vs `window.confirm`; save success/error titled vs plain.
- `CONTENT` `admin-ui: customize-app/all-items-order.tsx:178,182` ↔ `admin-web: dashboard.customize-app.ordering.tsx:174,178` — save success/error titled vs plain.
- `PLATFORM` `admin-ui: customize-app/index.tsx:150,171,412,430,506,244` ↔ `admin-web: dashboard.customize-app.tsx:152,172,414,431,496,232-244` — nav glyphs and error/empty icons differ; admin-ui's welcomeMessage input adds `min-h-24`, web's doesn't.
- `PLATFORM` `admin-ui: customize-app/popular-items.tsx:333,349,401` ↔ `admin-web: dashboard.customize-app.popular.tsx:306,38-68,367` — icons; long-press DraggableFlatList vs dnd-kit handle.
- `PLATFORM` `admin-ui: customize-app/all-items-order.tsx:231,283` ↔ `admin-web: dashboard.customize-app.ordering.tsx:225,275` — icons; drag implementation.
### Notifications
- `CONTENT` `admin-ui: send-notifications/index.tsx:42,49,62,67,95` ↔ `admin-web: dashboard.notifications.tsx:30,36,49,54,73` — "Notification sent successfully!", "Failed to send notification", "Please enter a title", "Please enter a message": titled alerts vs prefixed `window.alert`.
- `CONTENT`/`BEHAVIOUR` `admin-ui: send-notifications/index.tsx:74-85` ↔ `admin-web: dashboard.notifications.tsx:60-62` — send-to-all: `Alert.alert('Send to All Users?','This will send the notification to all users with push tokens. Continue?',[Cancel, Send])` vs `window.confirm('Send to All Users? This will send the notification to all users with push tokens. Continue?')`.
- `PLATFORM` `admin-ui: send-notifications/index.tsx:161-169` ↔ `admin-web: dashboard.notifications.tsx:138-144` — user selector: BottomDropdown("Select Users", placeholder "Select users", multiple) vs MultiSelect (no placeholder) → empty trigger reads "Select users" vs "Select Users".
### Complaints
- `STRUCTURE` `admin-ui: complaints/index.tsx:233-240` ↔ `admin-web: dashboard.complaints.tsx:238-248` — web footer shows "Load more"; admin-ui is spinner-only. *Verified.*
- `BEHAVIOUR` `admin-ui: complaints/index.tsx:124-125` ↔ `admin-web: dashboard.complaints.tsx:126-250` — admin-ui auto-loads via `onEndReached`; web relies on the button.
- `CONTENT` `admin-ui: complaints/index.tsx:69,75-78` ↔ `admin-web: dashboard.complaints.tsx:76,82` — "Complaint marked as resolved" / "Failed to resolve complaint": titled alerts vs prefixed `window.alert`.
- `STRUCTURE` `admin-ui: complaints/index.tsx:174-179` ↔ `admin-web: dashboard.complaints.tsx:266-311` — images: `ImageViewerURI` thumbnails vs plain `<img>` + a bespoke full-screen viewer with ‹/› and an "N / total" counter.
- `PLATFORM` `admin-ui: complaints/index.tsx:98,156,185,196,223` ↔ `admin-web: dashboard.complaints.tsx:108,159,190,201,228` — icons.
- Resolve dialog itself is an exact mirror ("Resolve Complaint" / "Add admin notes for this resolution:" / "Resolve" / "Cancel"). No filters/search on either side.
### Vendor snippets
- `BEHAVIOUR` `admin-ui: vendor-snippets/index.tsx:55-67` ↔ `admin-web: dashboard.vendor-snippets.tsx:42-58` — Share: native share sheet (error alert "Failed to share link") vs `navigator.share` else clipboard + an extra `window.alert('Link copied to clipboard')`.
- `CONTENT` `admin-ui: vendor-snippets/index.tsx:314,317` ↔ `admin-web: dashboard.vendor-snippets.tsx:294,297` — fetch-orders errors titled vs prefixed.
- `CONTENT` `admin-ui: components/SnippetMenu.tsx:56-67,73` ↔ `admin-web: src/components/SnippetMenu.tsx:63-65,74` — delete confirm titled with Cancel/Delete vs `window.confirm('Delete Snippet? …')`; "No URL available to copy" titled vs prefixed (success toast "URL copied to clipboard" identical).
- `CONTENT` `admin-ui: components/VendorSnippetForm.tsx:85,88,94` ↔ `admin-web: src/components/VendorSnippetForm.tsx:84,87,93` — updated/created/save-error: titled vs prefixed.
- `CONTENT` `admin-ui: components/VendorSnippetForm.tsx:172-178` ↔ `admin-web: src/components/VendorSnippetForm.tsx:168-174` — slot dropdown placeholder "Choose a delivery slot" only on admin-ui.
- `PLATFORM` `admin-ui: vendor-snippets/index.tsx:385` ↔ `admin-web: dashboard.vendor-snippets.tsx:363` — empty icon code-working vs Code2.
- `PLATFORM` `admin-ui: components/SnippetMenu.tsx:115` ↔ `admin-web: src/components/SnippetMenu.tsx:122` — trigger icon dots-three-vertical vs MoreVertical (menu title/option order identical).
- `PLATFORM` `admin-ui: components/VendorSnippetForm.tsx:203,149-162` ↔ `admin-web: src/components/VendorSnippetForm.tsx:199,148-158` — date control DatePicker vs DateInput; themed checkbox vs Checkbox component (labels/helpers match).
- `SnippetOrdersView`: copy-identical; only the icon differs.
### Utility components (web has dedicated files; admin-ui uses common-ui)
- `CONTENT` `admin-ui: packages/ui/src/components/bottom-dropdown.tsx:108-121` ↔ `admin-web: src/components/MultiSelect.tsx:46-53` — trigger text: all selected labels joined with ", " vs "N selected".
- `BEHAVIOUR` `admin-ui: packages/ui/src/components/bottom-dropdown.tsx:335-345` ↔ `admin-web: src/components/MultiSelect.tsx:130-145` — web dialog has **Clear** + Done; admin-ui has only Done (no way to clear a multi-select in one tap). *Verified.*
- `CONTENT` `admin-ui: packages/ui/src/components/bottom-dropdown.tsx:223` ↔ `admin-web: src/components/MultiSelect.tsx:92`, `SearchableSelect.tsx:77` — in-dialog search placeholder "Search options..." vs "Search...".
- `CONTENT` `admin-ui: packages/ui/src/components/bottom-dropdown.tsx:239-244` ↔ `admin-web: src/components/MultiSelect.tsx:126-128`, `SearchableSelect.tsx:104-106` — empty state `No options found for "{query}"` vs "No options found".
- `BEHAVIOUR` `admin-ui: packages/ui/src/components/bottom-dropdown.tsx:85-92` ↔ `admin-web: src/components/MultiSelect.tsx:94-98`, `SearchableSelect.tsx:79-83` — admin-ui debounces `onSearch` by 2000 ms; web fires per keystroke.
- `CONTENT` `admin-ui: packages/ui/src/components/bottom-dropdown.tsx:157-164,215` ↔ `admin-web: src/components/MultiSelect.tsx:70-76,90`, `SearchableSelect.tsx:61,75` — web renders a label above the trigger (`topLabel ?? label`) and uses it as the dialog title; admin-ui shows only `topLabel` above the trigger and always titles the dialog with `label`.
- `PLATFORM` `admin-ui: packages/ui/src/components/date-picker.tsx:25-65` ↔ `admin-web: src/components/DateInput.tsx:18-29` — native `DateTimePicker` + iOS modal (value via `toLocaleDateString()`) vs `<input type="date">` (yyyy-mm-dd); both default "Select Date".
- `PLATFORM` `admin-ui: packages/ui/src/components/date-time-picker.tsx:66-125` ↔ `admin-web: src/components/DateTimeInput.tsx:24-80` — native pickers vs two native inputs; labels/timeOnly/value-preservation match.
- `PLATFORM` `admin-ui: packages/ui/src/components/bottom-dropdown.tsx:61-353` ↔ `admin-web: src/components/SearchableSelect.tsx:26-114` — no dedicated admin-ui single-select/searchable component (single selects reuse BottomDropdown); common-ui also ships an unrelated `multi-select.tsx` that is not the web MultiSelect.
---
## 6. Platform-inherent (expected — do not "fix")
- Native `Alert.alert` / `window.confirm` vs `window.alert` / `ErrorToast` / `window.confirm` — the *mechanism* differs by design; the **copy** it carries should still match (that is the `CONTENT` items above).
- Bottom sheets, bottom dropdowns, native pickers, FlatList/infinite scroll, RefreshControl vs DOM dialogs, `<input type>`, grids, buttons and keyboard/ARIA affordances.
- Icons: `@expo/vector-icons` vs lucide-react.
- Mobile-only: push-permission dialog (`.tsx` above), native share sheet.
- Web-only: devtools panels, active nav highlight, `aria-label`s.
---
## 7. Suggested fix order
1. **`VariantStockDialog` on web** (per-variant In/Out + "N of M variants are out of stock", "Partial" state) — the only whole feature missing.
2. **Image keys, not presigned URLs** on web product create/edit (`toImageKey`).
3. **"First Order Only" on the web coupon form** (+ Yup rule + round-trip on edit).
4. **Persist staff identity on web** (staff key + restore) and replace the hardcoded "Staff Member" with the real name/region line.
5. **"Send Welcome Msg"** — port to web or remove from mobile (also pass `isFirstOrder` on web).
6. **Load-more model** — pick one (web buttons vs mobile infinite scroll) across orders, users, coupons, complaints.
7. **Missing refetches/invalidations on web**: sequence save/assign, attach-location, review reply (+ clear the form), banner slot-empty, product-group/slot/store/banner edit.
8. **Feedback copy parity**: keep the title/body split everywhere (e.g. "Cancel Order" + "Are you sure…", "Remove Delivery Cost", "Delete Store", "Send to All Users?") so the two apps read identically even if the alert API differs.
9. **Multi-select parity**: show "N selected" or the joined labels consistently, and add **Clear** to admin-ui's BottomDropdown.
10. **TagForm inline validation** on admin-ui (render the Yup errors already computed).
11. **Desktop hamburger** on web: hide it on `md+`, or make it open the sidebar.
12. **Copy sweep** for the remaining label list (bound blurb wording, "Modify application settings…" subtitle, "Search options..."/"Search...", `No options found for "{q}"`/"No options found", "Choose a delivery slot"/no placeholder, "Select users"/"Select Users", "Creating..." vs spinner-only submit labels).

View file

@ -0,0 +1,249 @@
Resolving dependencies
Resolved, downloaded and extracted [2]
Agent guidance
- Treat React Doctor diagnostics as starting hypotheses. Read the relevant code before confirming or suppressing each finding.
- For each group, decide true positive, false positive, or needs-human-review, then assign high/medium/low confidence.
- Do not suppress a finding without evidence from the file in question. Confidence requires code context.
- Understand the root cause before editing. Fix the underlying code instead of changing react-doctor config or suppressing rules unless explicitly asked.
- Investigate deeply where relevant: race conditions, security-sensitive flows, state propagation, multi-file refactors, and downstream dependency chains.
- Ignore pure style preferences, theoretical issues without real impact, missing features, and unrelated pre-existing code.
- Start with high-confidence fixes that preserve behavior. Leave low-confidence or product-dependent changes as notes.
- Run `npx react-doctor@latest --verbose --scope changed` before and after changes, plus relevant tests after each focused batch.
- When available, spawn subagents or isolated worktrees for independent rule families, then review and merge only the best safe fixes.
- Split unrelated, broad, or behavior-changing work into separate PRs/branches instead of one large cleanup.
- When one rule spans dozens of files (a migration-scale change), fix a representative sample first, confirm the recipe holds, and get the code owner's sign-off before changing the rest. Don't mass-fix a broad pattern in one unreviewed pass.
- For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.
- If a fix needs an API, UX, or architecture decision, stop and ask before editing.
✔ Scanned 169 files in 2.7s
React Doctor — admin-ui
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
145 issues
Bugs: 5 errors, 71 warnings
Maintainability: 34 warnings
Performance: 32 warnings
Correctness: 2 warnings
Security: 1 error
⚠ Array index used as a key ×13
react-doctor/no-array-index-as-key
app/(drawer)/dashboard/complaints/index.tsx:175
app/(drawer)/dashboard/manage-orders/delivery-sequences/index.tsx:77
app/(drawer)/dashboard/manage-orders/order-details/[id].tsx:357
app/(drawer)/dashboard/manage-orders/orders/index.tsx:399
app/(drawer)/dashboard/products/detail/[id].tsx:337
app/(drawer)/dashboard/products/detail/[id].tsx:363
app/(drawer)/dashboard/products/detail/[id].tsx:417
app/(drawer)/dashboard/products/detail/[id].tsx:433
components/SlotForm.tsx:177
components/SnippetOrdersView.tsx:68
components/SnippetOrdersView.tsx:140
src/components/CouponForm.tsx:211
src/components/TagMenu.tsx:101
⚠ Inline handler in list renderItem ×5
react-doctor/rn-list-callback-per-row
app/(drawer)/dashboard/complaints/index.tsx:187
app/(drawer)/dashboard/complaints/index.tsx:198
app/(drawer)/dashboard/complaints/index.tsx:210
src/components/CouponForm.tsx:459
src/components/CouponForm.tsx:464
⚠ React function has high control-flow complexity ×10
react-doctor/no-high-complexity-react-function
app/(drawer)/dashboard/coupons/index.tsx:11
app/(drawer)/dashboard/customize-app/index.tsx:130
app/(drawer)/dashboard/customize-app/popular-items.tsx:113
app/(drawer)/dashboard/dashboard-banners/index.tsx:15
app/(drawer)/dashboard/manage-orders/delivery-sequences/index.tsx:264
app/(drawer)/dashboard/manage-orders/order-details/[id].tsx:18
app/(drawer)/dashboard/manage-orders/orders/index.tsx:82
app/(drawer)/dashboard/prices-overview/index.tsx:33
app/(drawer)/dashboard/products/detail/[id].tsx:141
components/VendorSnippetForm.tsx:18
⚠ Duplicated JSX structure ×8
react-doctor/duplicate-jsx-subtree
app/(drawer)/dashboard/coupons/index.tsx:77
app/(drawer)/dashboard/customize-app/all-items-order.tsx:192
app/(drawer)/dashboard/customize-app/all-items-order.tsx:218
app/(drawer)/dashboard/customize-app/all-items-order.tsx:251
app/(drawer)/dashboard/rebalance-orders/index.tsx:66
app/(drawer)/dashboard/rebalance-orders/index.tsx:92
app/(drawer)/dashboard/rebalance-orders/index.tsx:221
app/(drawer)/dashboard/user-management/[id].tsx:134
⚠ Array lookup inside a loop ×18
react-doctor/js-set-map-lookups
app/(drawer)/dashboard/coupons/index.tsx:245
app/(drawer)/dashboard/coupons/index.tsx:393
app/(drawer)/dashboard/dashboard-banners/index.tsx:372
app/(drawer)/dashboard/manage-orders/delivery-sequences/index.tsx:363
app/(drawer)/dashboard/manage-orders/delivery-sequences/index.tsx:596
app/(drawer)/dashboard/manage-orders/delivery-sequences/index.tsx:631
app/(drawer)/dashboard/prices-overview/index.tsx:218
app/(drawer)/dashboard/product-tags/edit/index.tsx:100
app/(drawer)/dashboard/product-tags/edit/index.tsx:101
components/ProductsSelector.tsx:60
components/ProductsSelector.tsx:61
components/ProductsSelector.tsx:80
components/ProductsSelector.tsx:105
components/SlotForm.tsx:192
components/SlotForm.tsx:195
components/SlotForm.tsx:202
components/SnippetOrdersView.tsx:65
src/components/VariantStockDialog.tsx:112
⚠ Loading flag reset outside finally ×7
react-doctor/no-loading-flag-reset-outside-finally
app/(drawer)/dashboard/coupons/index.tsx:253
app/(drawer)/dashboard/coupons/index.tsx:401
app/(drawer)/dashboard/dashboard-banners/index.tsx:50
app/(drawer)/dashboard/product-tags/index.tsx:94
app/(drawer)/dashboard/rebalance-orders/index.tsx:133
app/(drawer)/dashboard/slots/index.tsx:244
app/(drawer)/dashboard/user-management/index.tsx:182
⚠ Dimensions.get over useWindowDimensions
react-doctor/rn-no-dimensions-get
app/(drawer)/dashboard/coupons/index.tsx:505
⚠ Legacy platform-specific shadow styles ×6
react-doctor/rn-no-legacy-shadow-styles
app/(drawer)/dashboard/customize-app/all-items-order.tsx:317
app/(drawer)/dashboard/customize-app/all-items-order.tsx:334
app/(drawer)/dashboard/product-tags/order.tsx:305
app/(drawer)/dashboard/product-tags/order.tsx:322
src/components/TagForm.tsx:307
src/components/TagForm.tsx:322
⚠ Large component is hard to read and change ×11
react-doctor/no-giant-component
app/(drawer)/dashboard/customize-app/index.tsx:262
app/(drawer)/dashboard/customize-app/popular-items.tsx:113
app/(drawer)/dashboard/dashboard-banners/index.tsx:15
app/(drawer)/dashboard/manage-orders/delivery-sequences/index.tsx:264
app/(drawer)/dashboard/manage-orders/order-details/[id].tsx:18
app/(drawer)/dashboard/manage-orders/orders/index.tsx:82
app/(drawer)/dashboard/manage-orders/orders/index.tsx:480
app/(drawer)/dashboard/products/detail/[id].tsx:141
components/OrderOptionsMenu.tsx:43
src/components/CouponForm.tsx:77
src/components/ProductForm.tsx:161
⚠ Non-virtualized mapped list in ScrollView ×6
react-doctor/rn-no-scrollview-mapped-list
app/(drawer)/dashboard/customize-app/index.tsx:450
app/(drawer)/dashboard/products/detail/[id].tsx:336
app/(drawer)/dashboard/products/detail/[id].tsx:416
app/(drawer)/dashboard/products/detail/[id].tsx:432
components/ProductListDialog.tsx:26
src/components/GlobalProductForm.tsx:103
⚠ array.find() inside a loop ×2
react-doctor/js-index-maps
app/(drawer)/dashboard/customize-app/popular-items.tsx:147
src/components/TagForm.tsx:107
⚠ Missing effect dependencies ×18
react-doctor/exhaustive-deps
app/(drawer)/dashboard/dashboard-banners/edit/[id].tsx:73
app/(drawer)/dashboard/dashboard-banners/index.tsx:45
app/(drawer)/dashboard/manage-orders/delivery-sequences/index.tsx:422
app/(drawer)/dashboard/prices-overview/index.tsx:186
app/(drawer)/dashboard/prices-overview/index.tsx:201
app/(drawer)/dashboard/prices-overview/index.tsx:213
app/(drawer)/dashboard/products/index.tsx:193
app/(drawer)/dashboard/products/index.tsx:197
app/(drawer)/dashboard/products/index.tsx:201
app/(drawer)/dashboard/products/index.tsx:203
components/ProductsSelector.tsx:99
components/VendorSnippetForm.tsx:106
components/context/staff-auth-context.tsx:55
components/context/staff-auth-context.tsx:95
services/notif-service/notif-checker.tsx:29
services/notif-service/notif-context.tsx:95
src/components/GlobalProductForm.tsx:49
src/components/VariantStockDialog.tsx:52
⚠ State only used in handlers ×5
react-doctor/rerender-state-only-in-handlers
app/(drawer)/dashboard/dashboard-banners/index.tsx:23
app/(drawer)/dashboard/products/detail/[id].tsx:24
app/(drawer)/dashboard/products/detail/[id].tsx:25
components/BannerForm.tsx:53
src/components/CouponForm.tsx:83
✖ Numeric && renders bare zero ×2
react-doctor/rn-no-falsy-and-render
app/(drawer)/dashboard/manage-orders/orders/index.tsx:301
components/UserIncidentsView.tsx:153
⚠ Inline renderItem on list ×4
react-doctor/rn-no-inline-flatlist-renderitem
app/(drawer)/dashboard/prices-overview/index.tsx:351
app/(drawer)/dashboard/rebalance-orders/index.tsx:227
app/(drawer)/dashboard/slots/index.tsx:301
src/components/CouponForm.tsx:457
⚠ fetch Response consumed without status check ×7
react-doctor/no-fetch-response-used-without-status-check
app/(drawer)/dashboard/product-tags/add.tsx:26
app/(drawer)/dashboard/product-tags/edit/index.tsx:39
app/(drawer)/dashboard/products/add.tsx:60
app/(drawer)/dashboard/products/detail/[id].tsx:42
app/(drawer)/dashboard/products/edit.tsx:131
components/BannerForm.tsx:75
components/StoreForm.tsx:72
⚠ await inside a loop ×2
react-doctor/async-await-in-loop
app/(drawer)/dashboard/products/add.tsx:60
app/(drawer)/dashboard/products/edit.tsx:131
⚠ useMemo before an early return
react-doctor/rerender-memo-before-early-return
app/(drawer)/dashboard/products/index.tsx:230
⚠ Empty default prop breaks memo ×2
react-doctor/rerender-memo-with-default-value
components/ProductsSelector.tsx:44
components/ProductsSelector.tsx:46
✖ Module removed from react-native core
react-doctor/rn-no-deprecated-modules
components/SnippetMenu.tsx:2
⚠ Unstable context provider value ×2
react-doctor/jsx-no-constructed-context-values
components/context/staff-auth-context.tsx:99
services/notif-service/notif-context.tsx:99
⚠ react-doctor/expo-gitignore
react-doctor/expo-gitignore
package.json
⚠ react-doctor/expo-lockfile
react-doctor/expo-lockfile
package.json
✖ socket/low-supply-chain-score
socket/low-supply-chain-score
package.json:28
⚠ Non-component export in component file ×5
react-doctor/only-export-components
services/notif-service/notif-context.tsx:22
services/toaster.tsx:5
services/toaster.tsx:17
services/toaster.tsx:28
services/toaster.tsx:39
⚠ Effects chained together
react-doctor/no-effect-chain
src/components/CouponForm.tsx:106
⚠ State adjusted after a prop changes ×3
react-doctor/no-adjust-state-on-prop-change
src/components/TagForm.tsx:76
src/components/TagForm.tsx:86
src/components/TagForm.tsx:88
✖ Hook called conditionally ×2
react-doctor/rules-of-hooks
src/components/TagForm.tsx:159
src/components/TagForm.tsx:169
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-a8073fcc-df20-44d2-b93a-66b36001605b
────────────────────────────────────────────────────────────
Docs: https://react.doctor/docs
Learn more about fixing issues, setting up CI/CD, and
configuring rules with a config file
GitHub: https://github.com/millionco/react-doctor
Report issues and star the repository!
React Doctor is not installed in this project.
Ask the user if they would like to set it up, then run:
npx react-doctor install --yes
This adds agent skill files, a `doctor` package script, and react-doctor as a dev dependency.

View file

@ -0,0 +1,271 @@
Resolving dependencies
Resolved, downloaded and extracted [2]
Agent guidance
- Treat React Doctor diagnostics as starting hypotheses. Read the relevant code before confirming or suppressing each finding.
- For each group, decide true positive, false positive, or needs-human-review, then assign high/medium/low confidence.
- Do not suppress a finding without evidence from the file in question. Confidence requires code context.
- Understand the root cause before editing. Fix the underlying code instead of changing react-doctor config or suppressing rules unless explicitly asked.
- Investigate deeply where relevant: race conditions, security-sensitive flows, state propagation, multi-file refactors, and downstream dependency chains.
- Ignore pure style preferences, theoretical issues without real impact, missing features, and unrelated pre-existing code.
- Start with high-confidence fixes that preserve behavior. Leave low-confidence or product-dependent changes as notes.
- Run `npx react-doctor@latest --verbose --scope changed` before and after changes, plus relevant tests after each focused batch.
- When available, spawn subagents or isolated worktrees for independent rule families, then review and merge only the best safe fixes.
- Split unrelated, broad, or behavior-changing work into separate PRs/branches instead of one large cleanup.
- When one rule spans dozens of files (a migration-scale change), fix a representative sample first, confirm the recipe holds, and get the code owner's sign-off before changing the rest. Don't mass-fix a broad pattern in one unreviewed pass.
- For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.
- If a fix needs an API, UX, or architecture decision, stop and ask before editing.
✔ Scanned 82 files in 3.9s
React Doctor — admin-web
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
161 issues
Security: 2 errors
Performance: 31 warnings
Maintainability: 27 warnings
Bugs: 5 errors, 46 warnings
Accessibility: 50 warnings
✖ socket/low-supply-chain-score ×2
socket/low-supply-chain-score
package.json:24
package.json:29
⚠ State only used in handlers ×4
react-doctor/rerender-state-only-in-handlers
src/components/BannerForm.tsx:49
src/routes/dashboard.banners.tsx:23
src/routes/dashboard.banners.tsx:29
src/routes/dashboard.products.$id.tsx:34
⚠ Large component is hard to read and change ×11
react-doctor/no-giant-component
src/components/CouponForm.tsx:92
src/components/ProductForm.tsx:179
src/routes/dashboard.banners.tsx:20
src/routes/dashboard.complaints.tsx:12
src/routes/dashboard.customize-app.popular.tsx:103
src/routes/dashboard.customize-app.tsx:259
src/routes/dashboard.orders.$id.tsx:34
src/routes/dashboard.orders.list.tsx:112
src/routes/dashboard.orders.list.tsx:510
src/routes/dashboard.orders.sequence.tsx:270
src/routes/dashboard.products.$id.tsx:135
⚠ Effects chained together
react-doctor/no-effect-chain
src/components/CouponForm.tsx:121
⚠ Array index used as a key ×16
react-doctor/no-array-index-as-key
src/components/CouponForm.tsx:222
src/components/SlotForm.tsx:171
src/components/SnippetOrdersView.tsx:67
src/components/SnippetOrdersView.tsx:141
src/components/TagMenu.tsx:103
src/routes/dashboard.complaints.tsx:178
src/routes/dashboard.orders.$id.tsx:352
src/routes/dashboard.orders.list.tsx:429
src/routes/dashboard.orders.sequence.tsx:92
src/routes/dashboard.orders.tsx:86
src/routes/dashboard.products.$id.tsx:313
src/routes/dashboard.products.$id.tsx:333
src/routes/dashboard.products.$id.tsx:381
src/routes/dashboard.products.$id.tsx:396
src/routes/dashboard.rebalance.tsx:239
src/routes/dashboard.slots.tsx:298
⚠ Control missing accessible label ×24
react-doctor/control-has-associated-label
src/components/DateInput.tsx:22
src/components/DateTimeInput.tsx:48
src/components/DateTimeInput.tsx:62
src/components/DateTimeInput.tsx:72
src/routes/dashboard.customize-app.ordering.tsx:190
src/routes/dashboard.customize-app.ordering.tsx:215
src/routes/dashboard.customize-app.ordering.tsx:245
src/routes/dashboard.customize-app.popular.tsx:91
src/routes/dashboard.customize-app.popular.tsx:215
src/routes/dashboard.customize-app.popular.tsx:243
src/routes/dashboard.customize-app.popular.tsx:276
src/routes/dashboard.customize-app.popular.tsx:339
src/routes/dashboard.prices.tsx:99
src/routes/dashboard.prices.tsx:109
src/routes/dashboard.prices.tsx:119
src/routes/dashboard.prices.tsx:129
src/routes/dashboard.prices.tsx:324
src/routes/dashboard.product-groupings.tsx:50
src/routes/dashboard.product-groupings.tsx:56
src/routes/dashboard.product-tags.order.tsx:181
src/routes/dashboard.product-tags.order.tsx:203
src/routes/dashboard.product-tags.order.tsx:230
src/routes/dashboard.products.$id.tsx:201
src/routes/dashboard.products.$id.tsx:432
⚠ Missing effect dependencies ×9
react-doctor/exhaustive-deps
src/components/GlobalProductForm.tsx:47
src/components/ProductsSelector.tsx:98
src/components/VendorSnippetForm.tsx:105
src/routes/dashboard.banners.tsx:51
src/routes/dashboard.orders.sequence.tsx:430
src/routes/dashboard.prices.tsx:181
src/routes/dashboard.prices.tsx:196
src/routes/dashboard.prices.tsx:208
src/routes/dashboard.products.tsx:75
⚠ Click handler missing keyboard handler ×5
react-doctor/click-events-have-key-events
src/components/MultiSelect.tsx:105
src/components/ProductGroupForm.tsx:122
src/components/ProductGroupForm.tsx:128
src/routes/dashboard.complaints.tsx:177
src/routes/dashboard.tsx:156
⚠ Interaction on static element ×4
react-doctor/no-static-element-interactions
src/components/MultiSelect.tsx:105
src/components/ProductGroupForm.tsx:122
src/components/ProductGroupForm.tsx:128
src/routes/dashboard.tsx:156
⚠ Empty default prop breaks memo ×2
react-doctor/rerender-memo-with-default-value
src/components/ProductsSelector.tsx:43
src/components/ProductsSelector.tsx:45
⚠ Array lookup inside a loop ×18
react-doctor/js-set-map-lookups
src/components/ProductsSelector.tsx:59
src/components/ProductsSelector.tsx:60
src/components/ProductsSelector.tsx:79
src/components/ProductsSelector.tsx:104
src/components/SlotForm.tsx:186
src/components/SlotForm.tsx:189
src/components/SlotForm.tsx:195
src/components/SnippetOrdersView.tsx:64
src/routes/dashboard.banners.tsx:341
src/routes/dashboard.coupons.tsx:247
src/routes/dashboard.coupons.tsx:390
src/routes/dashboard.orders.sequence.tsx:371
src/routes/dashboard.orders.sequence.tsx:573
src/routes/dashboard.orders.sequence.tsx:606
src/routes/dashboard.orders.sequence.tsx:639
src/routes/dashboard.prices.tsx:213
src/routes/dashboard.product-tags.edit.tsx:93
src/routes/dashboard.product-tags.edit.tsx:94
⚠ State adjusted after a prop changes ×3
react-doctor/no-adjust-state-on-prop-change
src/components/TagForm.tsx:133
src/components/TagForm.tsx:143
src/components/TagForm.tsx:145
⚠ array.find() inside a loop ×2
react-doctor/js-index-maps
src/components/TagForm.tsx:164
src/routes/dashboard.customize-app.popular.tsx:134
✖ Hook called conditionally ×2
react-doctor/rules-of-hooks
src/components/TagForm.tsx:195
src/components/TagForm.tsx:205
⚠ React function has high control-flow complexity ×10
react-doctor/no-high-complexity-react-function
src/components/VendorSnippetForm.tsx:17
src/routes/dashboard.banners.tsx:20
src/routes/dashboard.coupons.tsx:14
src/routes/dashboard.customize-app.popular.tsx:103
src/routes/dashboard.customize-app.tsx:133
src/routes/dashboard.orders.$id.tsx:34
src/routes/dashboard.orders.list.tsx:112
src/routes/dashboard.orders.sequence.tsx:270
src/routes/dashboard.prices.tsx:28
src/routes/dashboard.products.$id.tsx:135
⚠ Locale/timezone formatting during render ×4
react-doctor/no-locale-format-in-render
src/components/VendorSnippetForm.tsx:108
src/routes/dashboard.banners.tsx:404
src/routes/dashboard.coupons.tsx:89
src/routes/dashboard.products.$id.tsx:336
⚠ Unstable context provider value ×2
react-doctor/jsx-no-constructed-context-values
src/components/context/staff-auth-context.tsx:94
src/lib/refresh-context.tsx:17
⚠ Whole Zustand store subscribed during render
react-doctor/zustand-no-whole-store-destructure
src/lib/navigation-target.ts:25
✖ Ref mutated during render ×3
react-doctor/no-ref-current-in-render
src/lib/refresh-context.tsx:28
src/lib/refresh-context.tsx:40
src/lib/refresh-context.tsx:56
⚠ Non-component export in component file
react-doctor/only-export-components
src/lib/refresh-context.tsx:54
⚠ Loading flag reset outside finally ×6
react-doctor/no-loading-flag-reset-outside-finally
src/routes/dashboard.banners.tsx:56
src/routes/dashboard.coupons.tsx:255
src/routes/dashboard.coupons.tsx:398
src/routes/dashboard.rebalance.tsx:138
src/routes/dashboard.slots.tsx:248
src/routes/dashboard.users.tsx:183
⚠ Async mutating handler without re-entry guard
react-doctor/no-async-event-handler-without-reentry-guard
src/routes/dashboard.banners.tsx:160
⚠ Handler on non-interactive element
react-doctor/no-noninteractive-element-interactions
src/routes/dashboard.complaints.tsx:177
⚠ Duplicated JSX structure ×5
react-doctor/duplicate-jsx-subtree
src/routes/dashboard.coupons.tsx:80
src/routes/dashboard.customize-app.ordering.tsx:187
src/routes/dashboard.customize-app.ordering.tsx:212
src/routes/dashboard.customize-app.ordering.tsx:244
src/routes/dashboard.users.$id.tsx:131
⚠ navigate() called during render
react-doctor/tanstack-start-no-navigate-in-render
src/routes/dashboard.customize-app.tsx:262
⚠ ARIA button handles only one activation key ×5
react-doctor/role-button-requires-complete-keyboard-activation
src/routes/dashboard.orders.list.tsx:187
src/routes/dashboard.rebalance.tsx:37
src/routes/dashboard.slots.tsx:61
src/routes/dashboard.users.$id.tsx:45
src/routes/dashboard.users.tsx:39
⚠ Interactive control contains another focusable control ×10
react-doctor/html-no-nested-interactive
src/routes/dashboard.orders.list.tsx:224
src/routes/dashboard.orders.list.tsx:297
src/routes/dashboard.orders.list.tsx:344
src/routes/dashboard.orders.list.tsx:355
src/routes/dashboard.rebalance.tsx:104
src/routes/dashboard.slots.tsx:79
src/routes/dashboard.slots.tsx:96
src/routes/dashboard.slots.tsx:148
src/routes/dashboard.slots.tsx:160
src/routes/dashboard.slots.tsx:211
⚠ fetch Response consumed without status check ×4
react-doctor/no-fetch-response-used-without-status-check
src/routes/dashboard.product-tags.edit.tsx:39
src/routes/dashboard.product-tags.new.tsx:27
src/routes/dashboard.products.edit.tsx:127
src/routes/dashboard.products.new.tsx:55
⚠ createObjectURL without revokeObjectURL
react-doctor/no-create-object-url-without-revoke
src/routes/dashboard.products.$id.tsx:50
⚠ Field relies on placeholder text for its label
react-doctor/no-placeholder-only-field
src/routes/dashboard.products.$id.tsx:93
⚠ await inside a loop ×2
react-doctor/async-await-in-loop
src/routes/dashboard.products.edit.tsx:127
src/routes/dashboard.products.new.tsx:55
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-bb92b47e-e51e-4e36-aeb7-7603e73464dd
────────────────────────────────────────────────────────────
Docs: https://react.doctor/docs
Learn more about fixing issues, setting up CI/CD, and
configuring rules with a config file
GitHub: https://github.com/millionco/react-doctor
Report issues and star the repository!
React Doctor is not installed in this project.
Ask the user if they would like to set it up, then run:
npx react-doctor install --yes
This adds agent skill files, a `doctor` package script, and react-doctor as a dev dependency.

View file

@ -0,0 +1,107 @@
Resolving dependencies
Resolved, downloaded and extracted [2]
Agent guidance
- Treat React Doctor diagnostics as starting hypotheses. Read the relevant code before confirming or suppressing each finding.
- For each group, decide true positive, false positive, or needs-human-review, then assign high/medium/low confidence.
- Do not suppress a finding without evidence from the file in question. Confidence requires code context.
- Understand the root cause before editing. Fix the underlying code instead of changing react-doctor config or suppressing rules unless explicitly asked.
- Investigate deeply where relevant: race conditions, security-sensitive flows, state propagation, multi-file refactors, and downstream dependency chains.
- Ignore pure style preferences, theoretical issues without real impact, missing features, and unrelated pre-existing code.
- Start with high-confidence fixes that preserve behavior. Leave low-confidence or product-dependent changes as notes.
- Run `npx react-doctor@latest --verbose --scope changed` before and after changes, plus relevant tests after each focused batch.
- When available, spawn subagents or isolated worktrees for independent rule families, then review and merge only the best safe fixes.
- Split unrelated, broad, or behavior-changing work into separate PRs/branches instead of one large cleanup.
- When one rule spans dozens of files (a migration-scale change), fix a representative sample first, confirm the recipe holds, and get the code owner's sign-off before changing the rest. Don't mass-fix a broad pattern in one unreviewed pass.
- For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.
- If a fix needs an API, UX, or architecture decision, stop and ask before editing.
✔ Scanned 127 files in 2.9s
React Doctor — backend
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
50 issues
Performance: 34 warnings
Bugs: 16 warnings
⚠ await inside a loop ×26
react-doctor/async-await-in-loop
scripts/check-polygon-2.ts:24
scripts/check-polygon.ts:24
src/jobs/cache-creator.ts:75
src/lib/admin-notif.ts:24
src/lib/cloud_cache.ts:127
src/lib/flash-delivery-cron.ts:33
src/lib/flash-delivery-cron.ts:35
src/lib/gen-store.ts:24
src/lib/gen-store.ts:49
src/lib/gen-store.ts:68
src/lib/post-order-handler.ts:117
src/lib/queue-consumer.ts:18
src/lib/queue-consumer.ts:41
src/lib/queue-consumer.ts:53
src/stores/product-tag-store.ts:130
src/stores/user-negativity-store.ts:86
src/trpc/apis/admin-apis/apis/complaint.ts:90
src/trpc/apis/admin-apis/apis/coupon.ts:90
src/trpc/apis/admin-apis/apis/coupon.ts:277
src/trpc/apis/admin-apis/apis/user.ts:216
src/trpc/apis/superadmin-apis/apis/global-coupons.ts:84
src/trpc/apis/user-apis/apis/order.ts:147
src/trpc/apis/user-apis/apis/order.ts:181
src/trpc/apis/user-apis/apis/order.ts:196
src/trpc/apis/user-apis/apis/order.ts:358
src/trpc/apis/user-apis/apis/order.ts:411
⚠ Sequential independent awaits ×11
react-doctor/server-sequential-independent-await
src/lib/cloud_cache.ts:79
src/lib/cloud_cache.ts:150
src/lib/cloud_cache.ts:193
src/trpc/apis/admin-apis/apis/user.ts:54
src/trpc/apis/admin-apis/apis/user.ts:98
src/trpc/apis/admin-apis/apis/user.ts:105
src/trpc/apis/admin-apis/apis/user.ts:168
src/trpc/apis/admin-apis/apis/vendor-snippets.ts:288
src/trpc/apis/superadmin-apis/apis/regions.ts:224
src/trpc/apis/user-apis/apis/auth.ts:342
src/trpc/apis/user-apis/apis/order.ts:454
⚠ fetch Response consumed without status check ×4
react-doctor/no-fetch-response-used-without-status-check
src/lib/cloud_cache.ts:251
src/lib/otp-utils.ts:36
src/lib/otp-utils.ts:58
src/lib/telegram-service.ts:18
⚠ Array lookup inside a loop ×7
react-doctor/js-set-map-lookups
src/trpc/apis/admin-apis/apis/product.ts:155
src/trpc/apis/admin-apis/apis/vendor-snippets.ts:206
src/trpc/apis/admin-apis/apis/vendor-snippets.ts:213
src/trpc/apis/admin-apis/apis/vendor-snippets.ts:305
src/trpc/apis/admin-apis/apis/vendor-snippets.ts:312
src/trpc/apis/common-apis/common.ts:104
src/trpc/apis/common-apis/common.ts:105
⚠ Independent awaits run sequentially
react-doctor/async-parallel
src/trpc/apis/admin-apis/apis/user.ts:53
⚠ Non-inlinable process.env access (Expo)
react-doctor/expo-no-non-inlined-env
tests/helpers/env.ts:15 (test file)
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-b4b05f8a-860b-4327-a0f6-5444b5bebdcb
────────────────────────────────────────────────────────────
Docs: https://react.doctor/docs
Learn more about fixing issues, setting up CI/CD, and
configuring rules with a config file
GitHub: https://github.com/millionco/react-doctor
Report issues and star the repository!
React Doctor is not installed in this project.
Ask the user if they would like to set it up, then run:
npx react-doctor install --yes
This adds agent skill files, a `doctor` package script, and react-doctor as a dev dependency.

View file

@ -0,0 +1,76 @@
Resolving dependencies
Resolved, downloaded and extracted [2]
Agent guidance
- Treat React Doctor diagnostics as starting hypotheses. Read the relevant code before confirming or suppressing each finding.
- For each group, decide true positive, false positive, or needs-human-review, then assign high/medium/low confidence.
- Do not suppress a finding without evidence from the file in question. Confidence requires code context.
- Understand the root cause before editing. Fix the underlying code instead of changing react-doctor config or suppressing rules unless explicitly asked.
- Investigate deeply where relevant: race conditions, security-sensitive flows, state propagation, multi-file refactors, and downstream dependency chains.
- Ignore pure style preferences, theoretical issues without real impact, missing features, and unrelated pre-existing code.
- Start with high-confidence fixes that preserve behavior. Leave low-confidence or product-dependent changes as notes.
- Run `npx react-doctor@latest --verbose --scope changed` before and after changes, plus relevant tests after each focused batch.
- When available, spawn subagents or isolated worktrees for independent rule families, then review and merge only the best safe fixes.
- Split unrelated, broad, or behavior-changing work into separate PRs/branches instead of one large cleanup.
- When one rule spans dozens of files (a migration-scale change), fix a representative sample first, confirm the recipe holds, and get the code owner's sign-off before changing the rest. Don't mass-fix a broad pattern in one unreviewed pass.
- For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.
- If a fix needs an API, UX, or architecture decision, stop and ask before editing.
✔ Scanned 34 files in 1.5s
React Doctor — @packages/db_helper_postgres
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
27 issues
Performance: 21 warnings
Bugs: 6 warnings
⚠ await inside a loop ×21
react-doctor/async-await-in-loop
src/admin-apis/const.ts:18
src/admin-apis/order.ts:596
src/admin-apis/order.ts:600
src/admin-apis/slots.ts:192
src/admin-apis/slots.ts:267
src/db/porter.ts:36
src/db/porter.ts:54
src/db/porter.ts:72
src/db/porter.ts:90
src/db/seed.ts:19
src/db/seed.ts:31
src/db/seed.ts:43
src/db/seed.ts:66
src/db/seed.ts:81
src/db/seed.ts:125
src/lib/seed.ts:15
src/lib/seed.ts:31
src/lib/seed.ts:47
src/lib/seed.ts:67
src/lib/seed.ts:100
src/user-apis/auth.ts:215
⚠ Sequential independent awaits ×6
react-doctor/server-sequential-independent-await
src/admin-apis/product.ts:129
src/admin-apis/product.ts:238
src/db/seed.ts:55
src/db/seed.ts:59
src/db/seed.ts:61
src/user-apis/product.ts:107
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-b58ef157-fc87-44ee-9be7-5224edb5c8d7
────────────────────────────────────────────────────────────
Docs: https://react.doctor/docs
Learn more about fixing issues, setting up CI/CD, and
configuring rules with a config file
GitHub: https://github.com/millionco/react-doctor
Report issues and star the repository!
React Doctor is not installed in this project.
Ask the user if they would like to set it up, then run:
npx react-doctor install --yes
This adds agent skill files, a `doctor` package script, and react-doctor as a dev dependency.

View file

@ -0,0 +1,99 @@
Resolving dependencies
Resolved, downloaded and extracted [2]
Agent guidance
- Treat React Doctor diagnostics as starting hypotheses. Read the relevant code before confirming or suppressing each finding.
- For each group, decide true positive, false positive, or needs-human-review, then assign high/medium/low confidence.
- Do not suppress a finding without evidence from the file in question. Confidence requires code context.
- Understand the root cause before editing. Fix the underlying code instead of changing react-doctor config or suppressing rules unless explicitly asked.
- Investigate deeply where relevant: race conditions, security-sensitive flows, state propagation, multi-file refactors, and downstream dependency chains.
- Ignore pure style preferences, theoretical issues without real impact, missing features, and unrelated pre-existing code.
- Start with high-confidence fixes that preserve behavior. Leave low-confidence or product-dependent changes as notes.
- Run `npx react-doctor@latest --verbose --scope changed` before and after changes, plus relevant tests after each focused batch.
- When available, spawn subagents or isolated worktrees for independent rule families, then review and merge only the best safe fixes.
- Split unrelated, broad, or behavior-changing work into separate PRs/branches instead of one large cleanup.
- When one rule spans dozens of files (a migration-scale change), fix a representative sample first, confirm the recipe holds, and get the code owner's sign-off before changing the rest. Don't mass-fix a broad pattern in one unreviewed pass.
- For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.
- If a fix needs an API, UX, or architecture decision, stop and ask before editing.
✔ Scanned 49 files in 2.5s
React Doctor — @packages/db_helper_sqlite
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
46 issues
Performance: 36 warnings
Bugs: 10 warnings
⚠ await inside a loop ×35
react-doctor/async-await-in-loop
src/admin-apis/const.ts:22
src/admin-apis/const.ts:45
src/admin-apis/const.ts:68
src/admin-apis/const.ts:98
src/admin-apis/order.ts:617
src/admin-apis/order.ts:624
src/admin-apis/product.ts:471
src/admin-apis/product.ts:548
src/admin-apis/product.ts:670
src/admin-apis/product.ts:1286
src/admin-apis/slots.ts:63
src/db/porter.ts:36
src/db/porter.ts:54
src/db/porter.ts:72
src/db/porter.ts:90
src/db/seed.ts:27
src/db/seed.ts:39
src/db/seed.ts:51
src/db/seed.ts:74
src/db/seed.ts:89
src/db/seed.ts:124
src/db/seed.ts:141
src/lib/run-batched.ts:33
src/lib/seed.ts:15
src/lib/seed.ts:31
src/lib/seed.ts:47
src/lib/seed.ts:67
src/lib/seed.ts:100
src/lib/seed.ts:120
src/superadmin-apis/regions.ts:471
src/superadmin-apis/regions.ts:513
src/user-apis/auth.ts:220
src/user-apis/order.ts:355
src/user-apis/user-regions.ts:56
src/user-apis/user-regions.ts:73
⚠ Dimensions.get over useWindowDimensions
react-doctor/rn-no-dimensions-get
src/admin-apis/order.ts:621
⚠ Sequential independent awaits ×9
react-doctor/server-sequential-independent-await
src/admin-apis/product.ts:1010
src/db/seed.ts:63
src/db/seed.ts:67
src/db/seed.ts:69
src/superadmin-apis/regions.ts:108
src/superadmin-apis/regions.ts:166
src/user-apis/product.ts:56
src/user-apis/product.ts:125
src/user-apis/stores.ts:21
⚠ Array lookup inside a loop
react-doctor/js-set-map-lookups
src/user-apis/user-regions.ts:71
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-e2a05c4e-527a-40ef-9729-5487af566504
────────────────────────────────────────────────────────────
Docs: https://react.doctor/docs
Learn more about fixing issues, setting up CI/CD, and
configuring rules with a config file
GitHub: https://github.com/millionco/react-doctor
Report issues and star the repository!
React Doctor is not installed in this project.
Ask the user if they would like to set it up, then run:
npx react-doctor install --yes
This adds agent skill files, a `doctor` package script, and react-doctor as a dev dependency.

View file

@ -0,0 +1,116 @@
Resolving dependencies
Resolved, downloaded and extracted [2]
Agent guidance
- Treat React Doctor diagnostics as starting hypotheses. Read the relevant code before confirming or suppressing each finding.
- For each group, decide true positive, false positive, or needs-human-review, then assign high/medium/low confidence.
- Do not suppress a finding without evidence from the file in question. Confidence requires code context.
- Understand the root cause before editing. Fix the underlying code instead of changing react-doctor config or suppressing rules unless explicitly asked.
- Investigate deeply where relevant: race conditions, security-sensitive flows, state propagation, multi-file refactors, and downstream dependency chains.
- Ignore pure style preferences, theoretical issues without real impact, missing features, and unrelated pre-existing code.
- Start with high-confidence fixes that preserve behavior. Leave low-confidence or product-dependent changes as notes.
- Run `npx react-doctor@latest --verbose --scope changed` before and after changes, plus relevant tests after each focused batch.
- When available, spawn subagents or isolated worktrees for independent rule families, then review and merge only the best safe fixes.
- Split unrelated, broad, or behavior-changing work into separate PRs/branches instead of one large cleanup.
- When one rule spans dozens of files (a migration-scale change), fix a representative sample first, confirm the recipe holds, and get the code owner's sign-off before changing the rest. Don't mass-fix a broad pattern in one unreviewed pass.
- For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.
- If a fix needs an API, UX, or architecture decision, stop and ask before editing.
✔ Scanned 35 files in 2.8s
React Doctor — fallback-ui
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
40 issues
Security: 2 errors
Maintainability: 7 warnings
Bugs: 2 errors, 7 warnings
Accessibility: 19 warnings
Performance: 3 warnings
✖ socket/low-supply-chain-score ×2
socket/low-supply-chain-score
package.json:20
package.json:26
⚠ Large component is hard to read and change ×2
react-doctor/no-giant-component
src/components/3d/Characters.tsx:119
src/routes/inauguration.tsx:5
⚠ fetch Response consumed without status check
react-doctor/no-fetch-response-used-without-status-check
src/routes/demo.tsx:51
⚠ Control missing accessible label ×6
react-doctor/control-has-associated-label
src/routes/demo.tsx:110
src/routes/user-connect.tsx:124
src/routes/user-connect.tsx:140
src/routes/user-connect.tsx:170
src/routes/user-connect.tsx:254
src/routes/user-connect.tsx:284
⚠ Field relies on placeholder text for its label ×8
react-doctor/no-placeholder-only-field
src/routes/demo.tsx:121
src/routes/demo.tsx:139
src/routes/demo.tsx:150
src/routes/order-details.tsx:187
src/routes/order-details.tsx:193
src/routes/user-connect.tsx:89
src/routes/user-details.tsx:173
src/routes/user-details.tsx:179
⚠ Label missing associated control ×5
react-doctor/label-has-associated-control
src/routes/demo.tsx:138
src/routes/demo.tsx:149
src/routes/demo.tsx:211
src/routes/demo.tsx:218
src/routes/user-connect.tsx:123
⚠ Array index used as a key ×4
react-doctor/no-array-index-as-key
src/routes/demo.tsx:170
src/routes/demo.tsx:245
src/routes/order-details.tsx:225
src/routes/vendor-order-list.tsx:137
⚠ State update after await in an effect
react-doctor/no-set-state-after-await-in-effect
src/routes/home.tsx:10
✖ Effect subscription or timer never cleaned up ×2
react-doctor/effect-needs-cleanup
src/routes/inauguration.tsx:74
src/routes/location-marker.tsx:37
⚠ transition: all animates everything ×2
react-doctor/no-transition-all
src/routes/inauguration.tsx:283
src/routes/inauguration.tsx:286
⚠ State only used in handlers
react-doctor/rerender-state-only-in-handlers
src/routes/location-marker.tsx:32
⚠ React function has high control-flow complexity ×4
react-doctor/no-high-complexity-react-function
src/routes/order-details.tsx:17
src/routes/user-connect.tsx:4
src/routes/user-details.tsx:17
src/routes/vendor-order-list.tsx:31
⚠ Duplicated JSX structure
react-doctor/duplicate-jsx-subtree
src/routes/order-details.tsx:154
⚠ Missing effect dependencies
react-doctor/exhaustive-deps
src/routes/vendor-order-list.tsx:129
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-cab1d2de-dc17-4d09-b810-08dc13ba8e54
────────────────────────────────────────────────────────────
Docs: https://react.doctor/docs
Learn more about fixing issues, setting up CI/CD, and
configuring rules with a config file
GitHub: https://github.com/millionco/react-doctor
Report issues and star the repository!
React Doctor is not installed in this project.
Ask the user if they would like to set it up, then run:
npx react-doctor install --yes
This adds agent skill files, a `doctor` package script, and react-doctor as a dev dependency.

View file

@ -0,0 +1,42 @@
Resolving dependencies
Resolved, downloaded and extracted [2]
Agent guidance
- Treat React Doctor diagnostics as starting hypotheses. Read the relevant code before confirming or suppressing each finding.
- For each group, decide true positive, false positive, or needs-human-review, then assign high/medium/low confidence.
- Do not suppress a finding without evidence from the file in question. Confidence requires code context.
- Understand the root cause before editing. Fix the underlying code instead of changing react-doctor config or suppressing rules unless explicitly asked.
- Investigate deeply where relevant: race conditions, security-sensitive flows, state propagation, multi-file refactors, and downstream dependency chains.
- Ignore pure style preferences, theoretical issues without real impact, missing features, and unrelated pre-existing code.
- Start with high-confidence fixes that preserve behavior. Leave low-confidence or product-dependent changes as notes.
- Run `npx react-doctor@latest --verbose --scope changed` before and after changes, plus relevant tests after each focused batch.
- When available, spawn subagents or isolated worktrees for independent rule families, then review and merge only the best safe fixes.
- Split unrelated, broad, or behavior-changing work into separate PRs/branches instead of one large cleanup.
- When one rule spans dozens of files (a migration-scale change), fix a representative sample first, confirm the recipe holds, and get the code owner's sign-off before changing the rest. Don't mass-fix a broad pattern in one unreviewed pass.
- For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.
- If a fix needs an API, UX, or architecture decision, stop and ask before editing.
✔ Scanned 1 file in 1.6s
React Doctor — symbuyote-info-site
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
✔ No issues found!
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-d169e412-3f40-45b4-8301-ca4f30855037
────────────────────────────────────────────────────────────
Docs: https://react.doctor/docs
Learn more about fixing issues, setting up CI/CD, and
configuring rules with a config file
GitHub: https://github.com/millionco/react-doctor
Report issues and star the repository!
React Doctor is not installed in this project.
Ask the user if they would like to set it up, then run:
npx react-doctor install --yes
This adds agent skill files, a `doctor` package script, and react-doctor as a dev dependency.

View file

@ -0,0 +1,42 @@
Resolving dependencies
Resolved, downloaded and extracted [2]
Agent guidance
- Treat React Doctor diagnostics as starting hypotheses. Read the relevant code before confirming or suppressing each finding.
- For each group, decide true positive, false positive, or needs-human-review, then assign high/medium/low confidence.
- Do not suppress a finding without evidence from the file in question. Confidence requires code context.
- Understand the root cause before editing. Fix the underlying code instead of changing react-doctor config or suppressing rules unless explicitly asked.
- Investigate deeply where relevant: race conditions, security-sensitive flows, state propagation, multi-file refactors, and downstream dependency chains.
- Ignore pure style preferences, theoretical issues without real impact, missing features, and unrelated pre-existing code.
- Start with high-confidence fixes that preserve behavior. Leave low-confidence or product-dependent changes as notes.
- Run `npx react-doctor@latest --verbose --scope changed` before and after changes, plus relevant tests after each focused batch.
- When available, spawn subagents or isolated worktrees for independent rule families, then review and merge only the best safe fixes.
- Split unrelated, broad, or behavior-changing work into separate PRs/branches instead of one large cleanup.
- When one rule spans dozens of files (a migration-scale change), fix a representative sample first, confirm the recipe holds, and get the code owner's sign-off before changing the rest. Don't mass-fix a broad pattern in one unreviewed pass.
- For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.
- If a fix needs an API, UX, or architecture decision, stop and ask before editing.
✔ Scanned 5 files in 953ms
React Doctor — @packages/migrator
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
✔ No issues found!
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-51f9ced8-7618-4e03-855e-b37d24038d9e
────────────────────────────────────────────────────────────
Docs: https://react.doctor/docs
Learn more about fixing issues, setting up CI/CD, and
configuring rules with a config file
GitHub: https://github.com/millionco/react-doctor
Report issues and star the repository!
React Doctor is not installed in this project.
Ask the user if they would like to set it up, then run:
npx react-doctor install --yes
This adds agent skill files, a `doctor` package script, and react-doctor as a dev dependency.

View file

@ -0,0 +1,42 @@
Resolving dependencies
Resolved, downloaded and extracted [2]
Agent guidance
- Treat React Doctor diagnostics as starting hypotheses. Read the relevant code before confirming or suppressing each finding.
- For each group, decide true positive, false positive, or needs-human-review, then assign high/medium/low confidence.
- Do not suppress a finding without evidence from the file in question. Confidence requires code context.
- Understand the root cause before editing. Fix the underlying code instead of changing react-doctor config or suppressing rules unless explicitly asked.
- Investigate deeply where relevant: race conditions, security-sensitive flows, state propagation, multi-file refactors, and downstream dependency chains.
- Ignore pure style preferences, theoretical issues without real impact, missing features, and unrelated pre-existing code.
- Start with high-confidence fixes that preserve behavior. Leave low-confidence or product-dependent changes as notes.
- Run `npx react-doctor@latest --verbose --scope changed` before and after changes, plus relevant tests after each focused batch.
- When available, spawn subagents or isolated worktrees for independent rule families, then review and merge only the best safe fixes.
- Split unrelated, broad, or behavior-changing work into separate PRs/branches instead of one large cleanup.
- When one rule spans dozens of files (a migration-scale change), fix a representative sample first, confirm the recipe holds, and get the code owner's sign-off before changing the rest. Don't mass-fix a broad pattern in one unreviewed pass.
- For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.
- If a fix needs an API, UX, or architecture decision, stop and ask before editing.
✔ Scanned 21 files in 586ms
React Doctor — @packages/shared
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
✔ No issues found!
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-de6cd22c-da28-40da-8554-453ecd5a9917
────────────────────────────────────────────────────────────
Docs: https://react.doctor/docs
Learn more about fixing issues, setting up CI/CD, and
configuring rules with a config file
GitHub: https://github.com/millionco/react-doctor
Report issues and star the repository!
React Doctor is not installed in this project.
Ask the user if they would like to set it up, then run:
npx react-doctor install --yes
This adds agent skill files, a `doctor` package script, and react-doctor as a dev dependency.

View file

@ -0,0 +1,57 @@
React Doctor — monorepo summary
Generated: 2026-10-17 16:07:12
Tool: bunx react-doctor@latest (per project; --no-telemetry --verbose)
Note: repository-secret-file and key-lifecycle-risk findings removed (private self-hosted git).
project scanned issues errors warns
------------------------------ ------- ----- ----- -----
apps/admin-ui 169 145 6 139
apps/admin-web 82 161 7 154
apps/backend 127 50 0 50
apps/fallback-ui 35 40 4 36
apps/info-site 1 0 0 0
apps/superadmin-ui 32 30 2 28
apps/user-ui 219 121 6 115
apps/web-ui 83 160 5 155
packages/db_helper_postgres 34 27 0 27
packages/db_helper_sqlite 49 46 0 46
packages/migrator 5 0 0 0
packages/shared 21 0 0 0
packages/ui 47 27 3 24
packages/web-components 30 32 1 31
------------------------------ ------- ----- ----- -----
TOTAL 934 839 34 805
No issues found: apps/info-site, packages/migrator, packages/shared.
Blocking errors (severity: error) — grouped by rule
rule where
---------------------------------------- -----
react-doctor/effect-needs-cleanup apps/fallback-ui ✖ Effect subscription or timer never cleaned up ×2, apps/web-ui ✖ Effect subscription or timer never cleaned up
react-doctor/no-impure-state-updater apps/user-ui ✖ State updater has side effects ×2, apps/web-ui ✖ State updater has side effects ×2
react-doctor/no-ref-current-in-render apps/admin-web ✖ Ref mutated during render ×3, packages/ui ✖ Ref mutated during render, packages/web-components ✖ Ref mutated during render
react-doctor/rn-no-deprecated-modules apps/admin-ui ✖ Module removed from react-native core
react-doctor/rn-no-falsy-and-render apps/admin-ui ✖ Numeric && renders bare zero ×2, apps/user-ui ✖ Numeric && renders bare zero ×2
react-doctor/rn-no-scroll-state apps/user-ui ✖ setState in onScroll handler, packages/ui ✖ setState in onScroll handler
react-doctor/rules-of-hooks apps/admin-ui ✖ Hook called conditionally ×2, apps/admin-web ✖ Hook called conditionally ×2
socket/low-supply-chain-score apps/admin-ui ✖ socket/low-supply-chain-score, apps/admin-web ✖ socket/low-supply-chain-score ×2, apps/fallback-ui ✖ socket/low-supply-chain-score ×2, apps/superadmin-ui ✖ socket/low-supply-chain-score ×2, apps/user-ui ✖ socket/low-supply-chain-score, apps/web-ui ✖ socket/low-supply-chain-score ×2, packages/ui ✖ socket/low-supply-chain-score
Per-project reports (this directory)
project report
------------------------------ ------------------------------
apps/admin-ui react-scan-reports/admin-ui.txt
apps/admin-web react-scan-reports/admin-web.txt
apps/backend react-scan-reports/backend.txt
apps/fallback-ui react-scan-reports/fallback-ui.txt
apps/info-site react-scan-reports/info-site.txt
apps/superadmin-ui react-scan-reports/superadmin-ui.txt
apps/user-ui react-scan-reports/user-ui.txt
apps/web-ui react-scan-reports/web-ui.txt
packages/db_helper_postgres react-scan-reports/db_helper_postgres.txt
packages/db_helper_sqlite react-scan-reports/db_helper_sqlite.txt
packages/migrator react-scan-reports/migrator.txt
packages/shared react-scan-reports/shared.txt
packages/ui react-scan-reports/ui.txt
packages/web-components react-scan-reports/web-components.txt

View file

@ -0,0 +1,107 @@
Resolving dependencies
Resolved, downloaded and extracted [2]
Agent guidance
- Treat React Doctor diagnostics as starting hypotheses. Read the relevant code before confirming or suppressing each finding.
- For each group, decide true positive, false positive, or needs-human-review, then assign high/medium/low confidence.
- Do not suppress a finding without evidence from the file in question. Confidence requires code context.
- Understand the root cause before editing. Fix the underlying code instead of changing react-doctor config or suppressing rules unless explicitly asked.
- Investigate deeply where relevant: race conditions, security-sensitive flows, state propagation, multi-file refactors, and downstream dependency chains.
- Ignore pure style preferences, theoretical issues without real impact, missing features, and unrelated pre-existing code.
- Start with high-confidence fixes that preserve behavior. Leave low-confidence or product-dependent changes as notes.
- Run `npx react-doctor@latest --verbose --scope changed` before and after changes, plus relevant tests after each focused batch.
- When available, spawn subagents or isolated worktrees for independent rule families, then review and merge only the best safe fixes.
- Split unrelated, broad, or behavior-changing work into separate PRs/branches instead of one large cleanup.
- When one rule spans dozens of files (a migration-scale change), fix a representative sample first, confirm the recipe holds, and get the code owner's sign-off before changing the rest. Don't mass-fix a broad pattern in one unreviewed pass.
- For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.
- If a fix needs an API, UX, or architecture decision, stop and ask before editing.
✔ Scanned 32 files in 2.1s
React Doctor — superadmin-ui
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
30 issues
Security: 2 errors, 1 warning
Accessibility: 10 warnings
Bugs: 5 warnings
Maintainability: 6 warnings
Performance: 6 warnings
✖ socket/low-supply-chain-score ×2
socket/low-supply-chain-score
package.json:24
package.json:29
⚠ Click handler missing keyboard handler
react-doctor/click-events-have-key-events
src/components/AppShell.tsx:79
⚠ Interaction on static element
react-doctor/no-static-element-interactions
src/components/AppShell.tsx:79
⚠ Missing effect dependencies ×2
react-doctor/exhaustive-deps
src/components/ProtectedRoute.tsx:16
src/components/ui/dialog-host.tsx:113
⚠ Non-component export in component file ×3
react-doctor/only-export-components
src/components/ui/dialog-host.tsx:58
src/components/ui/dialog-host.tsx:66
src/components/ui/dialog-host.tsx:74
⚠ State only used in handlers
react-doctor/rerender-state-only-in-handlers
src/components/ui/dialog-host.tsx:97
⚠ Auth token in web storage
react-doctor/auth-token-in-web-storage
src/lib/auth-context.tsx:58
⚠ Unstable context provider value
react-doctor/jsx-no-constructed-context-values
src/lib/auth-context.tsx:86
⚠ State initializer runs on every render
react-doctor/rerender-lazy-state-init
src/routes/coupons.tsx:58
⚠ React function has high control-flow complexity ×2
react-doctor/no-high-complexity-react-function
src/routes/coupons.tsx:284
src/routes/global-products.tsx:331
⚠ Array lookup inside a loop
react-doctor/js-set-map-lookups
src/routes/coupons.tsx:418
⚠ State adjusted after a prop changes
react-doctor/no-adjust-state-on-prop-change
src/routes/global-products.tsx:124
⚠ Field relies on placeholder text for its label ×6
react-doctor/no-placeholder-only-field
src/routes/global-products.tsx:162
src/routes/global-products.tsx:567
src/routes/global-products.tsx:573
src/routes/regions.tsx:271
src/routes/regions.tsx:409
src/routes/send-notifications.tsx:71
⚠ Large component is hard to read and change
react-doctor/no-giant-component
src/routes/global-products.tsx:331
⚠ createObjectURL without revokeObjectURL
react-doctor/no-create-object-url-without-revoke
src/routes/global-products.tsx:373
⚠ await inside a loop
react-doctor/async-await-in-loop
src/routes/global-products.tsx:408
⚠ Array index used as a key ×2
react-doctor/no-array-index-as-key
src/routes/global-products.tsx:504
src/routes/regions.tsx:240
⚠ Control missing accessible label ×2
react-doctor/control-has-associated-label
src/routes/global-products.tsx:522
src/routes/global-products.tsx:534
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-0630a984-ccf6-4c44-aab6-f0be068c2339
────────────────────────────────────────────────────────────
Docs: https://react.doctor/docs
Learn more about fixing issues, setting up CI/CD, and
configuring rules with a config file
GitHub: https://github.com/millionco/react-doctor
Report issues and star the repository!

107
react-scan-reports/ui.txt Normal file
View file

@ -0,0 +1,107 @@
Resolving dependencies
Resolved, downloaded and extracted [2]
Agent guidance
- Treat React Doctor diagnostics as starting hypotheses. Read the relevant code before confirming or suppressing each finding.
- For each group, decide true positive, false positive, or needs-human-review, then assign high/medium/low confidence.
- Do not suppress a finding without evidence from the file in question. Confidence requires code context.
- Understand the root cause before editing. Fix the underlying code instead of changing react-doctor config or suppressing rules unless explicitly asked.
- Investigate deeply where relevant: race conditions, security-sensitive flows, state propagation, multi-file refactors, and downstream dependency chains.
- Ignore pure style preferences, theoretical issues without real impact, missing features, and unrelated pre-existing code.
- Start with high-confidence fixes that preserve behavior. Leave low-confidence or product-dependent changes as notes.
- Run `npx react-doctor@latest --verbose --scope changed` before and after changes, plus relevant tests after each focused batch.
- When available, spawn subagents or isolated worktrees for independent rule families, then review and merge only the best safe fixes.
- Split unrelated, broad, or behavior-changing work into separate PRs/branches instead of one large cleanup.
- When one rule spans dozens of files (a migration-scale change), fix a representative sample first, confirm the recipe holds, and get the code owner's sign-off before changing the rest. Don't mass-fix a broad pattern in one unreviewed pass.
- For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.
- If a fix needs an API, UX, or architecture decision, stop and ask before editing.
✔ Scanned 47 files in 1.7s
React Doctor — common-ui
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
27 issues
Maintainability: 2 warnings
Performance: 6 warnings
Bugs: 2 errors, 15 warnings
Correctness: 1 warning
Security: 1 error
⚠ Non-component export in component file
react-doctor/only-export-components
hooks/theme-context.tsx:12
⚠ Unstable context provider value ×2
react-doctor/jsx-no-constructed-context-values
hooks/theme-context.tsx:30
src/lib/refresh-context.tsx:12
⚠ Missing effect dependencies ×3
react-doctor/exhaustive-deps
hooks/useDrawerTitle.ts:18
src/components/dialog.tsx:28
src/components/dialog.tsx:88
⚠ Listener re-subscribes on every handler change
react-doctor/advanced-event-handler-refs
hooks/useManualRefresh.ts:6
✖ Ref mutated during render
react-doctor/no-ref-current-in-render
hooks/useMarkDataFetchers.ts:9
⚠ Whole Zustand store subscribed during render
react-doctor/zustand-no-whole-store-destructure
hooks/useNavigationTarget.ts:24
⚠ react-doctor/expo-lockfile
react-doctor/expo-lockfile
package.json
✖ socket/low-supply-chain-score
socket/low-supply-chain-score
package.json:16
✖ setState in onScroll handler
react-doctor/rn-no-scroll-state
src/components/ImageCarousel.tsx:29
⚠ Array index used as a key ×4
react-doctor/no-array-index-as-key
src/components/ImageCarousel.tsx:64
src/components/ImageUploader.tsx:25
src/components/ImageUploader.tsx:40
src/components/ImageUploaderNeo.tsx:45
⚠ Legacy platform-specific shadow styles ×4
react-doctor/rn-no-legacy-shadow-styles
src/components/ImageCarousel.tsx:83
src/components/date-picker.tsx:77
src/components/date-time-picker.tsx:135
src/components/dialog.tsx:132
⚠ React function has high control-flow complexity
react-doctor/no-high-complexity-react-function
src/components/bottom-dropdown.tsx:61
⚠ Array lookup inside a loop
react-doctor/js-set-map-lookups
src/components/bottom-dropdown.tsx:114
⚠ Platform-specific shadow keys over boxShadow ×2
react-doctor/rn-style-prefer-boxshadow
src/components/date-picker.tsx:77
src/components/date-time-picker.tsx:135
⚠ Eager constructor in useState initializer ×2
react-doctor/no-eager-new-in-use-state-initializer
src/components/dialog.tsx:11
src/components/dialog.tsx:71
⚠ Dimensions.get over useWindowDimensions
react-doctor/rn-no-dimensions-get
src/components/image-viewer.tsx:21
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-41950915-da76-4a99-bded-93319ceb4bd7
────────────────────────────────────────────────────────────
Docs: https://react.doctor/docs
Learn more about fixing issues, setting up CI/CD, and
configuring rules with a config file
GitHub: https://github.com/millionco/react-doctor
Report issues and star the repository!
React Doctor is not installed in this project.
Ask the user if they would like to set it up, then run:
npx react-doctor install --yes
This adds agent skill files, a `doctor` package script, and react-doctor as a dev dependency.

View file

@ -0,0 +1,222 @@
Resolving dependencies
Resolved, downloaded and extracted [2]
Agent guidance
- Treat React Doctor diagnostics as starting hypotheses. Read the relevant code before confirming or suppressing each finding.
- For each group, decide true positive, false positive, or needs-human-review, then assign high/medium/low confidence.
- Do not suppress a finding without evidence from the file in question. Confidence requires code context.
- Understand the root cause before editing. Fix the underlying code instead of changing react-doctor config or suppressing rules unless explicitly asked.
- Investigate deeply where relevant: race conditions, security-sensitive flows, state propagation, multi-file refactors, and downstream dependency chains.
- Ignore pure style preferences, theoretical issues without real impact, missing features, and unrelated pre-existing code.
- Start with high-confidence fixes that preserve behavior. Leave low-confidence or product-dependent changes as notes.
- Run `npx react-doctor@latest --verbose --scope changed` before and after changes, plus relevant tests after each focused batch.
- When available, spawn subagents or isolated worktrees for independent rule families, then review and merge only the best safe fixes.
- Split unrelated, broad, or behavior-changing work into separate PRs/branches instead of one large cleanup.
- When one rule spans dozens of files (a migration-scale change), fix a representative sample first, confirm the recipe holds, and get the code owner's sign-off before changing the rest. Don't mass-fix a broad pattern in one unreviewed pass.
- For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.
- If a fix needs an API, UX, or architecture decision, stop and ask before editing.
✔ Scanned 219 files in 2.4s
React Doctor — user-ui
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
121 issues
Maintainability: 30 warnings
Performance: 19 warnings
Bugs: 5 errors, 65 warnings
Correctness: 1 warning
Security: 1 error
⚠ React function has high control-flow complexity ×15
react-doctor/no-high-complexity-react-function
app/(auth)/login.tsx:15
app/(drawer)/(tabs)/me/my-orders/[id].tsx:14
app/(drawer)/(tabs)/me/my-orders/index.tsx:74
components/PaymentAndOrderComponent.tsx:32
components/ProductCard.tsx:40
components/ProductDetail.tsx:45
components/ProductDetail.tsx:708
components/cart-page.tsx:277
components/checkout-page.tsx:23
components/floating-cart-bar.tsx:90
components/registration-form.tsx:27
src/components/AddToCartDialog.tsx:41
src/components/LocationAttacher.tsx:19
src/components/location/LocationFallbackFlow.tsx:57
src/hooks/useRegion.ts:66
⚠ Large component is hard to read and change ×11
react-doctor/no-giant-component
app/(auth)/login.tsx:15
app/(drawer)/(tabs)/me/my-orders/[id].tsx:14
components/PaymentAndOrderComponent.tsx:32
components/ProductDetail.tsx:45
components/QuickDeliveryAddressSelector.tsx:23
components/cart-page.tsx:277
components/checkout-page.tsx:23
components/floating-cart-bar.tsx:90
components/registration-form.tsx:27
src/components/AddressForm.tsx:19
src/components/location/LocationFallbackFlow.tsx:57
⚠ State only used in handlers ×10
react-doctor/rerender-state-only-in-handlers
app/(auth)/login.tsx:19
app/(drawer)/(tabs)/me/my-orders/index.tsx:373
app/(drawer)/(tabs)/me/my-orders/index.tsx:374
components/ProductCard.tsx:55
components/ProductDetail.tsx:51
components/ProductDetail.tsx:52
components/ProductDetail.tsx:711
components/SlotSpecificView.tsx:341
components/SlotSpecificView.tsx:449
src/components/LocationAttacher.tsx:38
✖ State updater has side effects ×2
react-doctor/no-impure-state-updater
app/(auth)/login.tsx:78
app/(drawer)/(tabs)/home/index.tsx:555
⚠ Side effect inside a state updater function ×2
react-doctor/no-side-effect-in-state-updater-function
app/(auth)/login.tsx:80
app/(drawer)/(tabs)/home/index.tsx:557
⚠ Missing effect dependencies ×19
react-doctor/exhaustive-deps
app/(drawer)/(tabs)/flash-delivery/(products)/index.tsx:40
app/(drawer)/(tabs)/flash-delivery/(products)/index.tsx:74
app/(drawer)/(tabs)/home/index.tsx:552
app/(drawer)/(tabs)/home/index.tsx:601
app/(drawer)/(tabs)/home/index.tsx:667
app/(drawer)/(tabs)/home/search-results/index.tsx:75
components/ProductDetail.tsx:210
components/QuickDeliveryAddressSelector.tsx:57
components/cart-page.tsx:375
components/cart-page.tsx:701
components/cart-page.tsx:739
components/cart-page.tsx:767
components/cart-page.tsx:788
components/cart-page.tsx:834
components/floating-cart-bar.tsx:134
components/floating-cart-bar.tsx:155
services/notif-service/notif-checker.tsx:32
services/notif-service/notif-context.tsx:101
src/components/AddressForm.tsx:86
✖ Numeric && renders bare zero ×2
react-doctor/rn-no-falsy-and-render
app/(drawer)/(tabs)/flash-delivery/order-success.tsx:47
app/(drawer)/(tabs)/home/order-success.tsx:47
⚠ Non-virtualized mapped list in ScrollView ×8
react-doctor/rn-no-scrollview-mapped-list
app/(drawer)/(tabs)/home/index.tsx:231
app/(drawer)/(tabs)/me/my-orders/[id].tsx:294
app/(drawer)/(tabs)/stores/store-detail/[id].tsx:194
components/CheckoutAddressSelector.tsx:208
components/NextOrderGlimpse.tsx:198
components/ProductDetail.tsx:663
components/floating-cart-bar.tsx:288
src/components/AddToCartDialog.tsx:198
⚠ useMemo before an early return
react-doctor/rerender-memo-before-early-return
app/(drawer)/(tabs)/home/index.tsx:655
⚠ Inline renderItem on list ×3
react-doctor/rn-no-inline-flatlist-renderitem
app/(drawer)/(tabs)/home/index.tsx:726
app/(drawer)/(tabs)/stores/index.tsx:104
components/ProductDetail.tsx:556
⚠ Inline object in list renderItem ×4
react-doctor/rn-no-inline-object-in-list-item
app/(drawer)/(tabs)/home/index.tsx:736
app/(drawer)/(tabs)/stores/index.tsx:112
components/ProductDetail.tsx:595
components/ProductDetail.tsx:617
⚠ Inline handler in list renderItem ×5
react-doctor/rn-list-callback-per-row
app/(drawer)/(tabs)/home/search-results/index.tsx:98
app/(drawer)/(tabs)/me/my-orders/index.tsx:494
app/(drawer)/(tabs)/stores/store-detail/[id].tsx:131
components/SlotSpecificView.tsx:421
components/SlotSpecificView.tsx:538
⚠ Dimensions.get over useWindowDimensions ×2
react-doctor/rn-no-dimensions-get
app/(drawer)/(tabs)/me/addresses/index.tsx:262
components/QuickDeliveryAddressSelector.tsx:235
⚠ Array index used as a key ×7
react-doctor/no-array-index-as-key
app/(drawer)/(tabs)/me/my-orders/[id].tsx:295
app/(drawer)/(tabs)/me/my-orders/index.tsx:189
components/CheckoutAddressSelector.tsx:252
components/NextOrderGlimpse.tsx:213
components/ProductDetail.tsx:453
components/ProductDetail.tsx:524
components/ProductDetail.tsx:665
⚠ Data passed to parent via effect
react-doctor/no-pass-data-to-parent
components/CheckoutAddressSelector.tsx:81
✖ setState in onScroll handler
react-doctor/rn-no-scroll-state
components/CheckoutAddressSelector.tsx:94
⚠ Loading flag reset outside finally ×3
react-doctor/no-loading-flag-reset-outside-finally
components/CheckoutAddressSelector.tsx:164
components/ProductDetail.tsx:199
src/components/AddressForm.tsx:280
⚠ fetch Response consumed without status check ×3
react-doctor/no-fetch-response-used-without-status-check
components/ComplaintForm.tsx:46
components/ProductDetail.tsx:728
components/registration-form.tsx:170
⚠ URL hook value only read in handlers
react-doctor/rerender-defer-reads-hook
components/LoginWall.tsx:28
⚠ Non-component export in component file ×3
react-doctor/only-export-components
components/OrderStatusTracker.tsx:15
services/notif-service/notif-context.tsx:22
services/toaster.tsx:5
⚠ State adjusted after a prop changes ×7
react-doctor/no-adjust-state-on-prop-change
components/ProductCard.tsx:106
components/ProductCard.tsx:107
components/ProductCard.tsx:111
components/ProductCard.tsx:112
components/cart-page.tsx:787
components/cart-page.tsx:832
components/floating-cart-bar.tsx:133
⚠ State update after await in an effect
react-doctor/no-set-state-after-await-in-effect
components/ProductDetail.tsx:206
⚠ await inside a loop ×2
react-doctor/async-await-in-loop
components/ProductDetail.tsx:774
hooks/cart-query-hooks.tsx:218
⚠ Array lookup inside a loop ×2
react-doctor/js-set-map-lookups
components/cart-page.tsx:569
components/cart-page.tsx:570
⚠ Duplicated JSX structure
react-doctor/duplicate-jsx-subtree
components/cart-page.tsx:899
⚠ useEffect state synchronization flashes after paint
react-doctor/rendering-hydration-no-flicker
hooks/useColorScheme.web.ts:10
⚠ react-doctor/expo-lockfile
react-doctor/expo-lockfile
package.json
✖ socket/low-supply-chain-score
socket/low-supply-chain-score
package.json:28
⚠ Unstable context provider value
react-doctor/jsx-no-constructed-context-values
services/notif-service/notif-context.tsx:105
⚠ Context value from an unmemoized local literal
react-doctor/context-provider-value-from-unmemoized-local-literal
src/contexts/AuthContext.tsx:309
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-329589f6-4770-4c88-9d7e-35cbe9eea9c9
────────────────────────────────────────────────────────────
Docs: https://react.doctor/docs
Learn more about fixing issues, setting up CI/CD, and
configuring rules with a config file
GitHub: https://github.com/millionco/react-doctor
Report issues and star the repository!

View file

@ -0,0 +1,94 @@
Resolving dependencies
Resolved, downloaded and extracted [2]
Agent guidance
- Treat React Doctor diagnostics as starting hypotheses. Read the relevant code before confirming or suppressing each finding.
- For each group, decide true positive, false positive, or needs-human-review, then assign high/medium/low confidence.
- Do not suppress a finding without evidence from the file in question. Confidence requires code context.
- Understand the root cause before editing. Fix the underlying code instead of changing react-doctor config or suppressing rules unless explicitly asked.
- Investigate deeply where relevant: race conditions, security-sensitive flows, state propagation, multi-file refactors, and downstream dependency chains.
- Ignore pure style preferences, theoretical issues without real impact, missing features, and unrelated pre-existing code.
- Start with high-confidence fixes that preserve behavior. Leave low-confidence or product-dependent changes as notes.
- Run `npx react-doctor@latest --verbose --scope changed` before and after changes, plus relevant tests after each focused batch.
- When available, spawn subagents or isolated worktrees for independent rule families, then review and merge only the best safe fixes.
- Split unrelated, broad, or behavior-changing work into separate PRs/branches instead of one large cleanup.
- When one rule spans dozens of files (a migration-scale change), fix a representative sample first, confirm the recipe holds, and get the code owner's sign-off before changing the rest. Don't mass-fix a broad pattern in one unreviewed pass.
- For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.
- If a fix needs an API, UX, or architecture decision, stop and ask before editing.
✔ Scanned 30 files in 1.8s
React Doctor — web-components
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
32 issues
Performance: 2 warnings
Accessibility: 22 warnings
Bugs: 1 error, 7 warnings
⚠ transition: all animates everything
react-doctor/no-transition-all
src/components/checkbox.tsx:31
⚠ Click handler missing keyboard handler ×3
react-doctor/click-events-have-key-events
src/components/dialog.tsx:28
src/components/image-uploader-neo.tsx:64
src/components/search-bar.tsx:53
⚠ Interaction on static element ×3
react-doctor/no-static-element-interactions
src/components/dialog.tsx:28
src/components/image-uploader-neo.tsx:64
src/components/search-bar.tsx:53
⚠ Field relies on placeholder text for its label
react-doctor/no-placeholder-only-field
src/components/dialog.tsx:80
⚠ Control missing accessible label ×15
react-doctor/control-has-associated-label
src/components/dropdown.tsx:27
src/components/image-carousel.tsx:32
src/components/image-gallery-with-delete.tsx:24
src/components/image-uploader-neo.tsx:80
src/components/image-uploader.tsx:27
src/components/image-uploader.tsx:42
src/components/image-uploader.tsx:51
src/components/image-viewer.tsx:24
src/components/image-viewer.tsx:31
src/components/image-viewer.tsx:45
src/components/quantifier.tsx:25
src/components/quantifier.tsx:38
src/components/quantifier.tsx:61
src/components/quantifier.tsx:74
src/components/search-bar.tsx:84
⚠ Array index used as a key ×7
react-doctor/no-array-index-as-key
src/components/image-carousel.tsx:19
src/components/image-carousel.tsx:33
src/components/image-gallery-with-delete.tsx:18
src/components/image-gallery.tsx:11
src/components/image-uploader-neo.tsx:58
src/components/image-uploader.tsx:21
src/components/image-uploader.tsx:36
⚠ createObjectURL without revokeObjectURL
react-doctor/no-create-object-url-without-revoke
src/components/image-uploader-neo.tsx:45
✖ Ref mutated during render
react-doctor/no-ref-current-in-render
src/hooks/use-focus-callback.ts:5
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-417da00d-48b0-4a0f-b434-4a7ba9cf1dca
────────────────────────────────────────────────────────────
Docs: https://react.doctor/docs
Learn more about fixing issues, setting up CI/CD, and
configuring rules with a config file
GitHub: https://github.com/millionco/react-doctor
Report issues and star the repository!
React Doctor is not installed in this project.
Ask the user if they would like to set it up, then run:
npx react-doctor install --yes
This adds agent skill files, a `doctor` package script, and react-doctor as a dev dependency.

View file

@ -0,0 +1,260 @@
Resolving dependencies
Resolved, downloaded and extracted [2]
Agent guidance
- Treat React Doctor diagnostics as starting hypotheses. Read the relevant code before confirming or suppressing each finding.
- For each group, decide true positive, false positive, or needs-human-review, then assign high/medium/low confidence.
- Do not suppress a finding without evidence from the file in question. Confidence requires code context.
- Understand the root cause before editing. Fix the underlying code instead of changing react-doctor config or suppressing rules unless explicitly asked.
- Investigate deeply where relevant: race conditions, security-sensitive flows, state propagation, multi-file refactors, and downstream dependency chains.
- Ignore pure style preferences, theoretical issues without real impact, missing features, and unrelated pre-existing code.
- Start with high-confidence fixes that preserve behavior. Leave low-confidence or product-dependent changes as notes.
- Run `npx react-doctor@latest --verbose --scope changed` before and after changes, plus relevant tests after each focused batch.
- When available, spawn subagents or isolated worktrees for independent rule families, then review and merge only the best safe fixes.
- Split unrelated, broad, or behavior-changing work into separate PRs/branches instead of one large cleanup.
- When one rule spans dozens of files (a migration-scale change), fix a representative sample first, confirm the recipe holds, and get the code owner's sign-off before changing the rest. Don't mass-fix a broad pattern in one unreviewed pass.
- For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.
- If a fix needs an API, UX, or architecture decision, stop and ask before editing.
✔ Scanned 83 files in 2.7s
React Doctor — web-ui
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
160 issues
Security: 2 errors, 2 warnings
Maintainability: 25 warnings
Accessibility: 92 warnings
Bugs: 3 errors, 24 warnings
Performance: 12 warnings
✖ socket/low-supply-chain-score ×2
socket/low-supply-chain-score
package.json:21
package.json:26
⚠ React function has high control-flow complexity ×12
react-doctor/no-high-complexity-react-function
src/components/AddToCartDialog.tsx:24
src/components/AddressForm.tsx:23
src/components/FloatingCartBar.tsx:28
src/components/PaymentAndOrderComponent.tsx:19
src/components/ProductCard.tsx:18
src/routes/home.index.tsx:80
src/routes/home.product.$id.tsx:23
src/routes/me.addresses.tsx:87
src/routes/me.edit-profile.tsx:12
src/routes/me.orders.$id.tsx:14
src/routes/me.orders.tsx:45
src/routes/me.orders.tsx:287
⚠ Control missing accessible label ×18
react-doctor/control-has-associated-label
src/components/AddToCartDialog.tsx:152
src/components/AddressForm.tsx:302
src/components/ComplaintForm.tsx:91
src/components/ComplaintForm.tsx:112
src/components/Dialog.tsx:37
src/components/me/MeOrderMenu.tsx:180
src/components/me/MeOrderMenu.tsx:210
src/routes/home.index.tsx:496
src/routes/home.index.tsx:504
src/routes/home.index.tsx:514
src/routes/home.product.$id.tsx:169
src/routes/home.product.$id.tsx:197
src/routes/login.tsx:210
src/routes/me.edit-profile.tsx:199
src/routes/me.edit-profile.tsx:311
src/routes/me.orders.$id.tsx:128
src/routes/me.orders.$id.tsx:380
src/routes/slot-view.tsx:179
⚠ Click handler missing keyboard handler ×28
react-doctor/click-events-have-key-events
src/components/AddToCartDialog.tsx:159
src/components/AddToCartDialog.tsx:195
src/components/AddToCartDialog.tsx:227
src/components/CheckoutAddressSelector.tsx:87
src/components/CheckoutAddressSelector.tsx:102
src/components/CheckoutAddressSelector.tsx:114
src/components/CheckoutAddressSelector.tsx:168
src/components/CheckoutAddressSelector.tsx:177
src/components/Dialog.tsx:26
src/components/FloatingCartBar.tsx:259
src/components/PaymentAndOrderComponent.tsx:122
src/components/ProductCard.tsx:96
src/components/ProductCard.tsx:153
src/routes/flash.tsx:223
src/routes/flash.tsx:246
src/routes/home.checkout.tsx:117
src/routes/home.index.tsx:532
src/routes/home.index.tsx:574
src/routes/login.tsx:227
src/routes/login.tsx:284
src/routes/slot-view.tsx:312
src/routes/slot-view.tsx:343
src/routes/slot-view.tsx:415
src/routes/slot-view.tsx:440
src/routes/stores.$storeId.product.$productId.tsx:43
src/routes/stores.$storeId.tsx:151
src/routes/stores.tsx:122
src/routes/stores.tsx:162
⚠ Interaction on static element ×28
react-doctor/no-static-element-interactions
src/components/AddToCartDialog.tsx:159
src/components/AddToCartDialog.tsx:195
src/components/AddToCartDialog.tsx:227
src/components/CheckoutAddressSelector.tsx:87
src/components/CheckoutAddressSelector.tsx:102
src/components/CheckoutAddressSelector.tsx:114
src/components/CheckoutAddressSelector.tsx:168
src/components/CheckoutAddressSelector.tsx:177
src/components/Dialog.tsx:26
src/components/FloatingCartBar.tsx:259
src/components/PaymentAndOrderComponent.tsx:122
src/components/ProductCard.tsx:96
src/components/ProductCard.tsx:153
src/routes/flash.tsx:223
src/routes/flash.tsx:246
src/routes/home.checkout.tsx:117
src/routes/home.index.tsx:532
src/routes/home.index.tsx:574
src/routes/login.tsx:227
src/routes/login.tsx:284
src/routes/slot-view.tsx:312
src/routes/slot-view.tsx:343
src/routes/slot-view.tsx:415
src/routes/slot-view.tsx:440
src/routes/stores.$storeId.product.$productId.tsx:43
src/routes/stores.$storeId.tsx:151
src/routes/stores.tsx:122
src/routes/stores.tsx:162
⚠ Large component is hard to read and change ×7
react-doctor/no-giant-component
src/components/AddressForm.tsx:23
src/components/PaymentAndOrderComponent.tsx:19
src/routes/home.index.tsx:80
src/routes/home.product.$id.tsx:23
src/routes/login.tsx:12
src/routes/me.edit-profile.tsx:12
src/routes/me.orders.$id.tsx:14
⚠ Label missing associated control ×4
react-doctor/label-has-associated-control
src/components/AddressForm.tsx:301
src/routes/me.edit-profile.tsx:172
src/routes/me.edit-profile.tsx:185
src/routes/me.edit-profile.tsx:198
⚠ iframe missing sandbox attribute
react-doctor/iframe-missing-sandbox
src/components/AddressForm.tsx:387
⚠ Async mutating handler without re-entry guard ×2
react-doctor/no-async-event-handler-without-reentry-guard
src/components/ComplaintForm.tsx:69
src/components/me/MeOrderMenu.tsx:90
⚠ Field relies on placeholder text for its label ×12
react-doctor/no-placeholder-only-field
src/components/ComplaintForm.tsx:97
src/components/PaymentAndOrderComponent.tsx:134
src/components/me/MeOrderMenu.tsx:185
src/components/me/MeOrderMenu.tsx:222
src/routes/me.coupons.tsx:148
src/routes/me.edit-profile.tsx:173
src/routes/me.edit-profile.tsx:186
src/routes/me.edit-profile.tsx:265
src/routes/me.edit-profile.tsx:272
src/routes/me.edit-profile.tsx:328
src/routes/me.orders.$id.tsx:256
src/routes/me.orders.$id.tsx:392
⚠ State adjusted after a prop changes
react-doctor/no-adjust-state-on-prop-change
src/components/FloatingCartBar.tsx:54
⚠ Missing effect dependencies ×9
react-doctor/exhaustive-deps
src/components/FloatingCartBar.tsx:55
src/components/ProtectedRoute.tsx:16
src/hooks/checkout-hooks.ts:57
src/routes/flash.tsx:44
src/routes/home.index.tsx:168
src/routes/home.index.tsx:187
src/routes/home.index.tsx:216
src/routes/home.search.tsx:69
src/routes/location-selector.tsx:272
⚠ transition: all animates everything ×8
react-doctor/no-transition-all
src/components/FloatingCartBar.tsx:116
src/components/PaymentAndOrderComponent.tsx:164
src/components/ProductCard.tsx:96
src/routes/flash.tsx:223
src/routes/home.index.tsx:489
src/routes/home.index.tsx:496
src/routes/home.index.tsx:504
src/routes/stores.tsx:120
⚠ Time or random value in JSX
react-doctor/rendering-hydration-mismatch-time
src/components/FloatingCartBar.tsx:163
⚠ Array index used as a key ×7
react-doctor/no-array-index-as-key
src/components/me/NextOrderGlimpse.tsx:78
src/routes/home.index.tsx:515
src/routes/home.product.$id.tsx:198
src/routes/home.product.$id.tsx:320
src/routes/home.product.$id.tsx:383
src/routes/home.product.$id.tsx:401
src/routes/me.orders.$id.tsx:285
⚠ Interactive control contains another focusable control ×2
react-doctor/html-no-nested-interactive
src/components/me/NextOrderGlimpse.tsx:99
src/routes/me.orders.tsx:195
⚠ Data passed to parent via effect
react-doctor/no-pass-data-to-parent
src/hooks/checkout-hooks.ts:54
⚠ Auth token in web storage
react-doctor/auth-token-in-web-storage
src/lib/auth-context.tsx:74
⚠ Unstable context provider value
react-doctor/jsx-no-constructed-context-values
src/lib/auth-context.tsx:116
⚠ Duplicated JSX structure ×6
react-doctor/duplicate-jsx-subtree
src/routes/cart.tsx:42
src/routes/cart.tsx:58
src/routes/cart.tsx:72
src/routes/cart.tsx:118
src/routes/cart.tsx:121
src/routes/flash.checkout.tsx:134
✖ State updater has side effects ×2
react-doctor/no-impure-state-updater
src/routes/home.index.tsx:199
src/routes/login.tsx:53
⚠ Side effect inside a state updater function ×2
react-doctor/no-side-effect-in-state-updater-function
src/routes/home.index.tsx:201
src/routes/login.tsx:55
✖ Effect subscription or timer never cleaned up
react-doctor/effect-needs-cleanup
src/routes/location-selector.tsx:209
⚠ State only used in handlers ×2
react-doctor/rerender-state-only-in-handlers
src/routes/login.tsx:17
src/routes/me.edit-profile.tsx:19
⚠ Button missing explicit type
react-doctor/button-has-type
src/routes/login.tsx:232
⚠ createObjectURL without revokeObjectURL
react-doctor/no-create-object-url-without-revoke
src/routes/me.edit-profile.tsx:83
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-4f05b8a9-b1e2-41ab-b0c3-ac7526509c0d
────────────────────────────────────────────────────────────
Docs: https://react.doctor/docs
Learn more about fixing issues, setting up CI/CD, and
configuring rules with a config file
GitHub: https://github.com/millionco/react-doctor
Report issues and star the repository!
React Doctor is not installed in this project.
Ask the user if they would like to set it up, then run:
npx react-doctor install --yes
This adds agent skill files, a `doctor` package script, and react-doctor as a dev dependency.