You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/components/Commute.jsx fails to compile, and since Commute is a static top-level import in App.jsx (L25, rendered L1310), the entire app build aborts — not just the Commute tab.
Confirmed with esbuild:
ERROR: The symbol "saveLocation" has already been declared
ERROR: The symbol "deleteSavedLocation" has already been declared
A botched merge (last commit f390850 Merge branch 'main' into feature/decompose-commute-component-621) moved the save/delete logic into the useRouteHistory hook but left the old inline copies behind, producing three layered defects in one file:
Duplicate const (build-breaking):saveLocation / deleteSavedLocation are destructured from useRouteHistory() (L45-46) and re-declared as local functions (L86, L101) in the same scope.
Undefined references in those leftovers: they call setSavedLocations(...) (L90, L102) and SAVED_LOCATIONS_KEY (L95, L104), neither of which exists in this file (both live in the hook) — a ReferenceError even if UI Enhancement: Improve Dashboard Layout, Alignment & Responsiveness #1 were fixed.
Missing imports:getAQIBand is used at module-eval time in LEGEND_ITEMS (L22) but never imported → ReferenceError on load; and eventBus.emit("ROUTE_PLANNED", ...) (L68) is used but eventBus is never imported → the route handler throws (caught locally, surfacing the generic "Error calculating route" alert on every successful search and never firing the ROUTE_PLANNED achievement).
Steps to Reproduce
npm run build (or start the dev server) → build aborts with the two "already been declared" errors above.
Fix
Delete the two leftover local definitions (L86-107); the destructured hook versions already do this correctly and are the ones passed to CommuteForm.
Description
src/components/Commute.jsxfails to compile, and sinceCommuteis a static top-level import inApp.jsx(L25, rendered L1310), the entire app build aborts — not just the Commute tab.Confirmed with esbuild:
A botched merge (last commit
f390850 Merge branch 'main' into feature/decompose-commute-component-621) moved the save/delete logic into theuseRouteHistoryhook but left the old inline copies behind, producing three layered defects in one file:const(build-breaking):saveLocation/deleteSavedLocationare destructured fromuseRouteHistory()(L45-46) and re-declared as local functions (L86, L101) in the same scope.setSavedLocations(...)(L90, L102) andSAVED_LOCATIONS_KEY(L95, L104), neither of which exists in this file (both live in the hook) — aReferenceErroreven if UI Enhancement: Improve Dashboard Layout, Alignment & Responsiveness #1 were fixed.getAQIBandis used at module-eval time inLEGEND_ITEMS(L22) but never imported →ReferenceErroron load; andeventBus.emit("ROUTE_PLANNED", ...)(L68) is used buteventBusis never imported → the route handler throws (caught locally, surfacing the generic "Error calculating route" alert on every successful search and never firing theROUTE_PLANNEDachievement).Steps to Reproduce
npm run build(or start the dev server) → build aborts with the two "already been declared" errors above.Fix
CommuteForm.(
RouteResults.jsx,RouteMap.jsx,routePlanner.js,useRouteHistory.jsare all correct — just unreachable until this compiles.)Happy to fix if assigned.
Contributing as part of Elite Coders Summer of Code (ECSoC 2026).