Send chat links, expand and the onboarding fallback to the inbox when it is on

Merged
CH
14h ago
+117-35

Why

With the inbox on, a chat can still open on the legacy /chat page: expanding the side panel, a link to a chat record, a chat's record page and the onboarding fallback all go there. So the same thread shows up on two routes depending on how you got to it. This PR sends those entry points to the inbox when it is on, so /chat is only reached with the inbox off. It is the first step of splitting the code into the inbox, the legacy chat and the shared chat.

What

  • useNavigateToAiChatPage (expand from the side panel, full-page new chat, thread clicks from outside a chat page) goes to /inbox/:threadId or /inbox/new when the inbox is on, and to /chat otherwise.
  • getLinkToShowPage and the chat record page redirect in RecordShowPage point at /inbox/:threadId. With the inbox off, InboxPage already redirects that to /chat/:threadId.
  • The onboarding fallback, used when the default home page is in settings, opens /inbox/new when the inbox is on. WorkspaceSetupChatSidePanelEffect skips opening the setup chat in the side panel whenever the page itself shows a chat (getCurrentAiChatPageThreadId), instead of only on /chat.

Screenshots

No visual change. Checked on a local stack with the inbox on:

  • Opening /object/agentChatThread/:id lands on /inbox/:id.
  • Leaving an inbox thread continues it in the side panel; Expand chat then lands on /inbox/:id with the side panel closed.