Move the flag-off AI chat page and drawer into legacy-ai-chat

Merged
CH
14h ago
+159-261

Why

The AI chat used before the inbox (the /chat page and the drawer's "AI" list) is still served with the inbox flag off, but its code is mixed into the inbox: NavigationDrawerInboxContent branches on the flag in six places, and the /chat page sits next to the page files the inbox shares. This PR moves the flag-off experience into its own legacy-ai-chat place, so the inbox code no longer carries it and the legacy part can be deleted in one go once the inbox is on for everyone.

What

  • modules/legacy-ai-chat/components/LegacyAiChatNavigationDrawerContent: the flag-off drawer, favorite chats and every recent chat with load more; thread clicks open the side panel as before.
  • NavigationDrawerInboxContent has no flag check left; NavigationDrawerTabbedContent picks the inbox or the legacy drawer.
  • pages/ai-chat/AiChatPage moves to pages/legacy-ai-chat/LegacyAiChatPage with its test and stories. With the inbox on it now redirects to the matching inbox route (/chat/:id to /inbox/:id, /chat to /inbox/new), the mirror of InboxPage redirecting to /chat with the inbox off.
  • AiChatThreadPageContent, AiChatNewThreadPageContent and AiChatPageEffects stay in pages/ai-chat: the inbox and the side panel use them too.
  • The flag-off drawer cases move from the inbox drawer test to a test of the legacy drawer.

Screenshots

No change on screen. Checked on a local stack:

  • Inbox on: /chat/:id lands on /inbox/:id, and the drawer still shows Triage, Channels and Recent.
  • Inbox off: /inbox/:id lands on /chat/:id, and the drawer is the legacy AI list (no triage or channels, Recent not capped, the open chat highlighted).