From 4a9850f61adf8a077a34709a69b1b8b8a04e2350 Mon Sep 17 00:00:00 2001 From: Agnik47 <140933190+Agnik47@users.noreply.github.com> Date: Sat, 5 Sep 2026 08:01:15 +0530 Subject: [PATCH] fix(web): resolve CHROME_EXTENSION_URL via the mapped @lib alias Three web components imported the Chrome extension URL through `@repo/lib/constants`, an alias that nothing maps. `apps/web/tsconfig.json` maps `@repo/ui/*`, `@ui/*`, `@lib/*` and `@hooks/*`, but not `@repo/lib/*`, so resolution fell through to the package's own exports map `{"./*": "./*"}`. That points at the extensionless `packages/lib/constants`, and TypeScript's `bundler` resolution does not append extensions after an exports-map substitution: error TS2307: Cannot find module '@repo/lib/constants' or its corresponding type declarations. Bundlers resolve extensions more permissively, so these still built at runtime, but the imports were unsound and contributed to the red `check-types` run. Switch all three to `@lib/constants`, matching the 233 other uses of the mapped alias across the app. `@repo/lib/` now has no remaining occurrences in the repository. Closes #1548 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_018ahq7SvSerSAVxkQR6GhuS --- apps/web/components/integrations/chrome-detail.tsx | 2 +- apps/web/components/nova/nova-empty-state.tsx | 2 +- apps/web/components/onboarding/x-bookmarks-detail-view.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/components/integrations/chrome-detail.tsx b/apps/web/components/integrations/chrome-detail.tsx index 6a63dbf14..268e1d6bd 100644 --- a/apps/web/components/integrations/chrome-detail.tsx +++ b/apps/web/components/integrations/chrome-detail.tsx @@ -1,6 +1,6 @@ "use client" -import { CHROME_EXTENSION_URL } from "@repo/lib/constants" +import { CHROME_EXTENSION_URL } from "@lib/constants" import { cn } from "@lib/utils" import { dmSans125ClassName } from "@/lib/fonts" import { ChromeIcon } from "@/components/integration-icons" diff --git a/apps/web/components/nova/nova-empty-state.tsx b/apps/web/components/nova/nova-empty-state.tsx index 46a79e601..1cf4f2588 100644 --- a/apps/web/components/nova/nova-empty-state.tsx +++ b/apps/web/components/nova/nova-empty-state.tsx @@ -1,6 +1,6 @@ "use client" -import { CHROME_EXTENSION_URL } from "@repo/lib/constants" +import { CHROME_EXTENSION_URL } from "@lib/constants" import type { IntegrationParamValue } from "@/lib/search-params" import { cn } from "@lib/utils" import { dmSansClassName } from "@/lib/fonts" diff --git a/apps/web/components/onboarding/x-bookmarks-detail-view.tsx b/apps/web/components/onboarding/x-bookmarks-detail-view.tsx index d65d35e22..e0bf95abb 100644 --- a/apps/web/components/onboarding/x-bookmarks-detail-view.tsx +++ b/apps/web/components/onboarding/x-bookmarks-detail-view.tsx @@ -4,7 +4,7 @@ import { Button } from "@ui/components/button" import { cn } from "@lib/utils" import { dmSansClassName } from "@/lib/fonts" import Image from "next/image" -import { CHROME_EXTENSION_URL } from "@repo/lib/constants" +import { CHROME_EXTENSION_URL } from "@lib/constants" interface XBookmarksDetailViewProps { onBack: () => void