Skip to content

refactor(chat): update chat components to use chatId instead of roomId#1765

Open
ahmednahima0-beep wants to merge 5 commits into
testfrom
feat/drop-legacy-chat-transport
Open

refactor(chat): update chat components to use chatId instead of roomId#1765
ahmednahima0-beep wants to merge 5 commits into
testfrom
feat/drop-legacy-chat-transport

Conversation

@ahmednahima0-beep
Copy link
Copy Markdown
Collaborator

@ahmednahima0-beep ahmednahima0-beep commented Jun 1, 2026

This commit removes the InstantChatRoom component and updates various hooks and components to replace references of roomId with chatId. The changes ensure that chat functionality is aligned with the new session-scoped architecture, improving consistency across the chat system. Additionally, the sessionId is now required in several components to streamline the chat transport process.


Summary by cubic

Refactored chat to use session-scoped chatId routes, require sessionId across the stack, and remove the legacy transport. Centralized URL helpers for navigation and emails; kept hard-nav behavior in Artist and fixed new-chat URL handling.

  • Refactors

    • Removed app/chat/[roomId]/page.tsx; replaced roomId with chatId across hooks/components; sidebar derives the active chat from /sessions/:sessionId/chats/:chatId.
    • sessionId is now required in Chat, useVercelChat, useChatTransport, useMessageLoader, and VercelChatProvider; context exposes sessionId.
    • Transport always posts to POST /api/chat/workflow, injecting sessionId, chatId, and the bearer token; legacy /api/chat path removed.
    • Added lib/chat/chatPaths (getChatPath, getChatUrl, isActiveChatRoomPath) with tests; used for URL updates, email CTAs, and route guards. Replaced usePathname with window.location.pathname and hard-nav via window.location.href in Header/Artist and OrganizationProvider to avoid Next router desync; Recent Chats parsing updated for session-scoped paths.
    • Fixed URL handling when creating a new chat by casting newRoomId to string in useCreateArtistTool.
  • Migration

    • Pass sessionId and chatId to VercelChatProvider and Chat.
    • Rename any roomId params/routes to chatId; use /sessions/[sessionId]/chats/[chatId].
    • Use getChatPath/getChatUrl for links and history updates; remove any dependency on the legacy /api/chat transport.
    • Update generateTxtFileEmail calls to pass sessionId along with the conversation id.

Written for commit 7233350. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Refactor
    • Chat routing restructured to use session-based URL paths instead of legacy routes
    • Sessions are now required for all chat operations
    • Chat transport updated to use workflow endpoint with consistent session and chat context
    • Chat navigation and URL generation aligned with new session-scoped path pattern

This commit removes the InstantChatRoom component and updates various hooks and components to replace references of roomId with chatId. The changes ensure that chat functionality is aligned with the new session-scoped architecture, improving consistency across the chat system. Additionally, the sessionId is now required in several components to streamline the chat transport process.
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview Jun 1, 2026 7:24pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

Warning

Review limit reached

@ahmednahima0-beep, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 33 minutes and 16 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1e7a4658-c1a5-4437-aa1d-3f4abe49e660

📥 Commits

Reviewing files that changed from the base of the PR and between 6631237 and 7233350.

⛔ Files ignored due to path filters (1)
  • lib/chat/__tests__/chatPaths.test.ts is excluded by !**/*.test.* and included by lib/**
📒 Files selected for processing (3)
  • components/Header/Artist.tsx
  • hooks/useCreateArtistTool.ts
  • providers/OrganizationProvider.tsx
📝 Walkthrough

Walkthrough

The PR completes a migration from the legacy /chat/{roomId} routing scheme to a canonical session-scoped /sessions/{sessionId}/chats/{chatId} routing. It introduces path utilities, threads required sessionId through providers and hooks, switches the chat transport to unconditional workflow usage, updates route detection, and removes the legacy page component.

Changes

Session-scoped routing migration

Layer / File(s) Summary
Chat path utilities foundation
lib/chat/chatPaths.ts
New module exports getChatPath(sessionId, chatId), getChatUrl(sessionId, chatId), and isActiveChatRoomPath(pathname) to standardize path construction and active-route detection across the codebase.
Provider-level sessionId enforcement
providers/VercelChatProvider.tsx
VercelChatContextType declares required sessionId: string field; VercelChatProviderProps makes sessionId required (no longer optional); provider populates sessionId in context value for downstream hooks.
Transport layer migration to workflow
hooks/useChatTransport.ts
UseChatTransportOptions.sessionId becomes required; useChatTransport unconditionally uses workflow transport (POST /api/chat/workflow) with transport-level body() and headers() that inject session/chat IDs and conditionally include Privy token; removes legacy /api/chat fallback path.
Chat component and hook routing updates
components/VercelChat/chat.tsx, hooks/useVercelChat.ts
ChatProps.sessionId required; ChatContentMemoized switches from roomId to chatId via useParams; useVercelChat derives routeChatId from params and uses getChatPath(sessionId, id) for history updates; first-message logic checks routeChatId absence instead of roomId.
Message loader sessionId requirement
hooks/useMessageLoader.ts
sessionId parameter made required; initial loading state and effect early-exit narrowed to check only chatId presence rather than both sessionId and chatId.
Route detection standardization
components/Header/Artist.tsx, providers/OrganizationProvider.tsx
Both files replace hardcoded pathname string checks (pathname.includes("/chat/")) with calls to isActiveChatRoomPath(pathname) for consistent chat-room route identification.
Sidebar active chat derivation
components/Sidebar/RecentChats/useRecentChats.ts
useRecentChats parses activeChatId from /sessions/{sessionId}/chats/{chatId} pathname pattern using regex; falls back to params.chatId when pattern does not match.
Chat redirection and email utilities
hooks/useCreateArtistTool.ts, lib/email/generateTxtFileEmail.ts
useCreateArtistTool imports getChatPath, pulls sessionId from context, and redirects via getChatPath(sessionId, result.newRoomId) instead of hardcoded path; generateTxtFileEmail now requires sessionId parameter and constructs CTA URL via getChatUrl(sessionId, conversationId).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • recoupable/chat#1752: Parallel session-scoped routing migration including removal of app/chat/[roomId]/page.tsx and threading of sessionId through chat components.
  • recoupable/chat#1748: Related workflow-transport cutover in useChatTransport and sessionId threading through useVercelChat/VercelChat components.
  • recoupable/chat#1756: Sidebar chat-link updates to use the canonical /sessions/{sessionId}/chats/{chatId} routing matching this PR's path utilities.

Suggested reviewers

  • sweetmantech
  • cubic-dev-ai

Poem

🎯 From rooms to sessions, the routing takes flight,
With paths now canonical, and sessionId in sight.
Legacy shadows fade as the workflow takes hold,
Each hook now threads truth in a pattern so bold. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Solid & Clean Code ⚠️ Warning Violates DRY with repeated state-reset patterns; useVercelChat (375 lines) violates SRP with 68+ declarations; VercelChatContextType has 18+ properties; hardcoded domain in chatPaths.ts. Extract repeated state-reset into utility; separate file mention logic into dedicated hook; split context into multiple concerns; extract domain to constant.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/drop-legacy-chat-transport

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

`/sessions/${sessionId}/chats/${id}`,

P2 Badge Update chat-route guards for session URLs

This now moves new chats onto /sessions/${sessionId}/chats/${id}, but the existing organization-change guard still only recognizes pathname?.startsWith("/chat/") in providers/OrganizationProvider.tsx:58. In the scenario where a user changes organization while viewing one of these new session URLs, the guard no longer navigates away, and subsequent sends in the same chat use the newly selected organizationId from chatRequestBody, mixing org context into an existing conversation.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread app/chat/[roomId]/page.tsx
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 7 files

Confidence score: 2/5

  • There is a clear user-facing regression risk: removing app/chat/[roomId]/page.tsx means /chat/{id} can 404 while the app still generates and navigates to those URLs.
  • Because this issue is high severity (8/10) with high confidence (8/10) and affects core navigation flows, merge risk is high until routing and link generation are aligned.
  • Pay close attention to app/chat/[roomId]/page.tsx, useCreateArtistTool, and generateTxtFileEmail - they currently appear to disagree on whether /chat/{id} is a valid destination.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread app/chat/[roomId]/page.tsx
This commit enhances the chat components by introducing the `sessionId` in various hooks and updating the URL handling to utilize new utility functions for generating chat paths. The changes improve the consistency and maintainability of chat navigation, ensuring that the application correctly reflects the session-scoped architecture.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
hooks/useVercelChat.ts (1)

282-290: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Skip persisted-history loading for route-less chats.

A fresh chat opened from / or /chat still passes id into useMessageLoader, so it shows the loading state and makes a history request before the first message even though there is no persisted chatId yet. Gate this path on routeChatId, not just id.

Proposed fix
+  const persistedChatId = routeChatId ? id : undefined;
+
   const { isLoading: isMessagesLoading, hasError } = useMessageLoader(
     sessionId,
-    messages.length === 0 ? id : undefined,
+    messages.length === 0 ? persistedChatId : undefined,
     userId,
     setMessages,
   );
 
   // Only show loading state when fetching persisted history for an existing chat.
-  const isLoading = isMessagesLoading && !!id && messages.length === 0;
+  const isLoading =
+    isMessagesLoading && !!persistedChatId && messages.length === 0;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hooks/useVercelChat.ts` around lines 282 - 290, The loading and history fetch
are being triggered for route-less chats because useMessageLoader is passed id;
change the call and gating to use the route-specific identifier (routeChatId)
instead of id: call useMessageLoader(sessionId, messages.length === 0 ?
routeChatId : undefined, userId, setMessages) and compute isLoading as
isMessagesLoading && !!routeChatId && messages.length === 0 so the
persisted-history path only runs when a routed chatId exists; update references
to use routeChatId in this block (isMessagesLoading, isLoading, and the ternary
argument).
hooks/useCreateArtistTool.ts (1)

21-88: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Prevent this effect from replaying the same copy workflow.

Once finally resets isProcessing to false, this effect is eligible to run again with the same result, which can call copyMessages(...) and refetchConversations() multiple times for one artist creation. Since copyMessages is a write, that makes the migration non-idempotent and can duplicate/corrupt the new chat state. A stable “already handled this result” guard is needed here instead of relying on isProcessing alone.

Suggested fix
-import { useEffect, useState } from "react";
+import { useEffect, useRef, useState } from "react";
@@
 export function useCreateArtistTool(result: CreateArtistResult) {
   const { status, id, sessionId } = useVercelChatContext();
@@
   const [isProcessing, setIsProcessing] = useState(false);
   const [isSuccess, setIsSuccess] = useState(false);
   const [error, setError] = useState<string | null>(null);
+  const processedResultKeyRef = useRef<string | null>(null);

   useEffect(() => {
@@
+    const resultKey = `${result.artist?.account_id ?? ""}:${result.newRoomId ?? ""}`;
+
     const shouldSkip =
       !result.artist ||
       !result.artist.account_id ||
       isProcessing ||
-      !isFinishedStreaming;
+      !isFinishedStreaming ||
+      processedResultKeyRef.current === resultKey;
     if (shouldSkip) {
       return;
     }

     const processCreateArtistResult = async () => {
       try {
+        processedResultKeyRef.current = resultKey;
         setIsProcessing(true);
@@
           if (success) {
@@
             setIsSuccess(true);
           } else {
             console.error("Failed to copy messages");
             setError("Failed to copy messages to the new artist");
+            processedResultKeyRef.current = null;
           }
         } else {
           setIsSuccess(true);
         }
       } catch (error) {
         console.error("Error in useCreateArtistTool:", error);
         setError(error instanceof Error ? error.message : "Unknown error");
+        processedResultKeyRef.current = null;
       } finally {
         setIsProcessing(false);
       }
     };
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hooks/useCreateArtistTool.ts` around lines 21 - 88, The effect can re-run and
re-apply the copy workflow because isProcessing is reset in finally; add a
stable "already handled" guard (e.g., a useRef or state like
processedNewRoomIdRef / handledRoomIds) and check that before calling
processCreateArtistResult so the same result.newRoomId is only processed once;
inside processCreateArtistResult set that guard (mark result.newRoomId as
handled) immediately after a successful copy or when you decide not to copy, and
use the guard in the effect's shouldSkip logic (alongside result.newRoomId, id,
status) to prevent re-processing the same newRoomId even after isProcessing
flips to false. Ensure the guard keys on result.newRoomId (or a unique result
identifier) and that refetchConversations/copyMessages are only invoked when the
guard indicates the newRoomId hasn't been handled.
🧹 Nitpick comments (2)
hooks/useChatTransport.ts (1)

35-48: ⚡ Quick win

Duplicate getAccessToken() calls within the same request cycle.

Both headers() (line 36) and body() (line 40) independently call getAccessToken(). When DefaultChatTransport builds a request, both callbacks are invoked, resulting in two token fetches per message. Consider fetching once and sharing the result.

♻️ Proposed refactor to fetch token once
   const transport = useMemo(
-    () =>
-      new DefaultChatTransport({
+    () => {
+      let cachedTokenPromise: Promise<string | null> | null = null;
+      const getToken = () => {
+        if (!cachedTokenPromise) {
+          cachedTokenPromise = getAccessToken().catch(() => null);
+        }
+        return cachedTokenPromise;
+      };
+
+      return new DefaultChatTransport({
         api: `${baseUrl}/api/chat/workflow`,
         headers: async (): Promise<Record<string, string>> => {
-          const accessToken = await getAccessToken().catch(() => null);
+          const accessToken = await getToken();
           return accessToken ? { Authorization: `Bearer ${accessToken}` } : {};
         },
         body: async () => {
-          const recoupAccessToken = await getAccessToken().catch(() => null);
+          const recoupAccessToken = await getToken();
           const body: {
             sessionId: string;
             chatId: string;
             recoupAccessToken?: string;
           } = { sessionId, chatId };
           if (recoupAccessToken) body.recoupAccessToken = recoupAccessToken;
           return body;
         },
-      }),
+      });
+    },
     [baseUrl, chatId, sessionId, getAccessToken],
   );
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hooks/useChatTransport.ts` around lines 35 - 48, The headers() and body()
callbacks both call getAccessToken(), causing duplicate token fetches; modify
useChatTransport so the token is fetched once per request and shared by both
callbacks (e.g., call getAccessToken() once before constructing the headers/body
functions or store its Promise in a local variable) and then have headers() and
body() reference that shared result; update references in this file for the
headers, body, getAccessToken, and DefaultChatTransport request construction so
only a single getAccessToken() invocation occurs per message.
components/Sidebar/RecentChats/useRecentChats.ts (1)

23-44: ⚡ Quick win

Derive activeChatId from Next navigation state instead of mirroring it in local state.

activeChatId is fully route-derived here, so the extra state/effect pair plus window.location.pathname adds another sync path and ties sidebar highlighting to conversations refreshes. Reading usePathname() directly keeps this in lockstep with navigation and trims the bookkeeping.

♻️ Proposed simplification
-import { useParams } from "next/navigation";
+import { useParams, usePathname } from "next/navigation";
@@
   const isMobile = useMobileDetection();
   const params = useParams();
+  const pathname = usePathname();
@@
-  const [activeChatId, setActiveChatId] = useState<string | null>(
-    typeof params?.chatId === "string" ? params.chatId : null,
-  );
-
-  useEffect(() => {
-    const updateActiveChatId = () => {
-      const match = window.location.pathname.match(
-        /\/sessions\/[^/]+\/chats\/([^/]+)/,
-      );
-
-      if (match?.[1]) {
-        setActiveChatId(match[1]);
-        return;
-      }
-
-      setActiveChatId(
-        typeof params?.chatId === "string" ? params.chatId : null,
-      );
-    };
-
-    updateActiveChatId();
-  }, [params, conversations]);
+  const activeChatId =
+    pathname?.match(/\/sessions\/[^/]+\/chats\/([^/]+)/)?.[1] ??
+    (typeof params?.chatId === "string" ? params.chatId : null);

As per coding guidelines, "Write minimal code - use only the absolute minimum code needed".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/Sidebar/RecentChats/useRecentChats.ts` around lines 23 - 44,
activeChatId is derived from the route so remove the local state and effect
(activeChatId, setActiveChatId and the useEffect that reads
window.location.pathname) and instead compute it from Next's usePathname()
inside useRecentChats; parse the pathname with the same regex
(/\/sessions\/[^/]+\/chats\/([^/]+)/) to extract the id, fall back to
params?.chatId if not present, and remove the conversations dependency and any
window references so the sidebar highlighting follows navigation state directly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@hooks/useCreateArtistTool.ts`:
- Around line 21-88: The effect can re-run and re-apply the copy workflow
because isProcessing is reset in finally; add a stable "already handled" guard
(e.g., a useRef or state like processedNewRoomIdRef / handledRoomIds) and check
that before calling processCreateArtistResult so the same result.newRoomId is
only processed once; inside processCreateArtistResult set that guard (mark
result.newRoomId as handled) immediately after a successful copy or when you
decide not to copy, and use the guard in the effect's shouldSkip logic
(alongside result.newRoomId, id, status) to prevent re-processing the same
newRoomId even after isProcessing flips to false. Ensure the guard keys on
result.newRoomId (or a unique result identifier) and that
refetchConversations/copyMessages are only invoked when the guard indicates the
newRoomId hasn't been handled.

In `@hooks/useVercelChat.ts`:
- Around line 282-290: The loading and history fetch are being triggered for
route-less chats because useMessageLoader is passed id; change the call and
gating to use the route-specific identifier (routeChatId) instead of id: call
useMessageLoader(sessionId, messages.length === 0 ? routeChatId : undefined,
userId, setMessages) and compute isLoading as isMessagesLoading && !!routeChatId
&& messages.length === 0 so the persisted-history path only runs when a routed
chatId exists; update references to use routeChatId in this block
(isMessagesLoading, isLoading, and the ternary argument).

---

Nitpick comments:
In `@components/Sidebar/RecentChats/useRecentChats.ts`:
- Around line 23-44: activeChatId is derived from the route so remove the local
state and effect (activeChatId, setActiveChatId and the useEffect that reads
window.location.pathname) and instead compute it from Next's usePathname()
inside useRecentChats; parse the pathname with the same regex
(/\/sessions\/[^/]+\/chats\/([^/]+)/) to extract the id, fall back to
params?.chatId if not present, and remove the conversations dependency and any
window references so the sidebar highlighting follows navigation state directly.

In `@hooks/useChatTransport.ts`:
- Around line 35-48: The headers() and body() callbacks both call
getAccessToken(), causing duplicate token fetches; modify useChatTransport so
the token is fetched once per request and shared by both callbacks (e.g., call
getAccessToken() once before constructing the headers/body functions or store
its Promise in a local variable) and then have headers() and body() reference
that shared result; update references in this file for the headers, body,
getAccessToken, and DefaultChatTransport request construction so only a single
getAccessToken() invocation occurs per message.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 42a932ec-46de-45ea-8784-9ed2893c56c0

📥 Commits

Reviewing files that changed from the base of the PR and between 36a3e14 and 6631237.

⛔ Files ignored due to path filters (1)
  • lib/chat/__tests__/chatPaths.test.ts is excluded by !**/*.test.* and included by lib/**
📒 Files selected for processing (12)
  • app/chat/[roomId]/page.tsx
  • components/Header/Artist.tsx
  • components/Sidebar/RecentChats/useRecentChats.ts
  • components/VercelChat/chat.tsx
  • hooks/useChatTransport.ts
  • hooks/useCreateArtistTool.ts
  • hooks/useMessageLoader.ts
  • hooks/useVercelChat.ts
  • lib/chat/chatPaths.ts
  • lib/email/generateTxtFileEmail.ts
  • providers/OrganizationProvider.tsx
  • providers/VercelChatProvider.tsx
💤 Files with no reviewable changes (1)
  • app/chat/[roomId]/page.tsx

This commit updates the `useCreateArtistTool` hook to explicitly cast `result.newRoomId` to a string when generating the chat path. This change prevents potential type-related issues and ensures consistent URL formatting. Additionally, it adds an import statement for testing utilities in the chat paths test file, enhancing test coverage and maintainability.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 8 files (changes from recent commits).

Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.

Re-trigger cubic

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 2 files (changes from recent commits).

Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.

Re-trigger cubic

Resolve Artist.tsx: keep test hard-nav behavior, use isActiveChatRoomPath.
…e with window.location.pathname

This commit removes the usePathname hook from both Artist.tsx and OrganizationProvider.tsx, replacing it with direct access to window.location.pathname. This change simplifies the code and maintains the intended navigation behavior without relying on Next.js's router for pathname management.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 2 files (changes from recent commits).

Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.

Re-trigger cubic

@ahmednahima0-beep
Copy link
Copy Markdown
Collaborator Author

1 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant