The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(remote): Continue on phone says which phone shows a shared chat (D8)
purple5aa8808b02fa
diff --git a/src/components/chat/ContinueOnPhoneButton.tsx b/src/components/chat/ContinueOnPhoneButton.tsxindex 5d0801ee..4765725f 100644--- a/src/components/chat/ContinueOnPhoneButton.tsx+++ b/src/components/chat/ContinueOnPhoneButton.tsx@@ -1,6 +1,7 @@import { Smartphone } from 'lucide-react'import { useChatStore } from '../../stores/chatStore'import { HEADER_CHIP } from './header-chip'+import { SHARED_CHATS_PHONE_NOTE } from './shared-chats-note'/*** "Continue on phone" in the chat's own strip (CHATS-V1.md): shares the open@@ -12,6 +13,7 @@ export function ContinueOnPhoneButton() {const shared = useChatStore((s) => !!s.conversations.find((c) => c.id === s.activeConversationId)?.remoteShared)if (!id) return nullconst label = shared ? 'Shared with your phone. Click to stop sharing.' : 'Continue on phone'+ const title = `${shared ? label : `${label}.`} ${SHARED_CHATS_PHONE_NOTE}`return (<buttontype="button"@@ -21,7 +23,7 @@ export function ContinueOnPhoneButton() {? 'border-green-500/40 text-green-600 dark:text-green-400 hover:border-green-500/70': 'border-gray-200 dark:border-white/[0.06] hover:border-gray-400 dark:hover:border-white/15 text-gray-500'}`}- title={label}+ title={title}aria-label={label}aria-pressed={shared}data-testid="continue-on-phone"diff --git a/src/components/chat/__tests__/continue-on-phone-honest.test.tsx b/src/components/chat/__tests__/continue-on-phone-honest.test.tsxnew file mode 100644index 00000000..70fb5301--- /dev/null+++ b/src/components/chat/__tests__/continue-on-phone-honest.test.tsx@@ -0,0 +1,36 @@+// @vitest-environment jsdom+/**+ * D8 (Discord, 02.11.): "Continue on phone" shared the chat, but nothing on+ * the phone showed it. The phone app 3.0.7 and the browser remote do not read+ * shared chats at all; only the next phone app does. The desktop says so, at+ * the button and above the list of shared chats.+ */+import { describe, it, expect, afterEach } from 'vitest'+import { render, cleanup, screen, act } from '@testing-library/react'+import { useChatStore } from '../../../stores/chatStore'+import { ContinueOnPhoneButton } from '../ContinueOnPhoneButton'+import { SharedChatsSettings } from '../../settings/SharedChatsSettings'++afterEach(() => {+ cleanup()+ useChatStore.setState({ conversations: [], activeConversationId: null })+})++describe('Continue on phone says which phone shows a shared chat', () => {+ it('the button names the next phone app, shared or not', () => {+ const id = useChatStore.getState().createConversation('qwen', '')+ render(<ContinueOnPhoneButton />)+ expect(screen.getByTestId('continue-on-phone').getAttribute('title')).toMatch(/next LU phone app/)+ expect(screen.getByTestId('continue-on-phone').getAttribute('title')).toMatch(/browser remote/)+ act(() => useChatStore.getState().setRemoteShared(id, true))+ expect(screen.getByTestId('continue-on-phone').getAttribute('title')).toMatch(/^Shared with your phone\. .*next LU phone app/)+ })++ it('the list of shared chats says it once, with what reaches the phone until then', () => {+ render(<SharedChatsSettings />)+ const note = screen.getByTestId('shared-chats-phone-note')+ expect(note.textContent).toMatch(/next LU phone app/)+ expect(note.textContent).toMatch(/phone app 3\.0\.7 and the browser remote/)+ expect(note.textContent).toMatch(/does not go back to the phone/)+ })+})diff --git a/src/components/chat/shared-chats-note.ts b/src/components/chat/shared-chats-note.tsnew file mode 100644index 00000000..589e9f0a--- /dev/null+++ b/src/components/chat/shared-chats-note.ts@@ -0,0 +1,10 @@+/**+ * Which phone shows a shared chat (D8, Discord 02.11.). Only the next LU+ * phone app reads shared chats; the phone app 3.0.7 and the browser remote+ * only send chats started on the phone to this computer. Remove these lines+ * when the phone app with shared chats is out.+ */+export const SHARED_CHATS_PHONE_NOTE = "Shared chats show up in the next LU phone app. The phone app 3.0.7 and the browser remote don't show them yet."++/** The same, with what reaches the phone until then. */+export const SHARED_CHATS_PHONE_NOTE_LONG = `${SHARED_CHATS_PHONE_NOTE} Until then, chats started on the phone reach this computer, but what you write here does not go back to the phone.`diff --git a/src/components/settings/SharedChatsSettings.tsx b/src/components/settings/SharedChatsSettings.tsxindex bb735eaa..26085697 100644--- a/src/components/settings/SharedChatsSettings.tsx+++ b/src/components/settings/SharedChatsSettings.tsx@@ -2,6 +2,7 @@ import { Smartphone, X } from 'lucide-react'import { useChatStore } from '../../stores/chatStore'import { useSettingsStore } from '../../stores/settingsStore'import { useUIStore } from '../../stores/uiStore'+import { SHARED_CHATS_PHONE_NOTE_LONG } from '../chat/shared-chats-note'/** The id and title of every shared chat, as a stable string so a streaming* answer does not repaint this list. */@@ -25,6 +26,7 @@ export function SharedChatsSettings() {<Smartphone size={12} className="text-gray-500" /><span className="t-micro font-medium text-gray-400">Shared with your phone</span></div>+ <p className="t-micro text-gray-500 dark:text-gray-600" data-testid="shared-chats-phone-note">{SHARED_CHATS_PHONE_NOTE_LONG}</p><label className="flex items-start gap-2 cursor-pointer"><inputtype="checkbox"