From cf5bea1a3fff0e73e8b454ef76ec741c7513eb57 Mon Sep 17 00:00:00 2001 From: DoodleBears Date: Wed, 21 Oct 2026 22:59:54 +0900 Subject: [PATCH 1/3] feat(client): name Remote Hosts and scaffold their shared Host Feed Issue: #2500 Agent-Task: codex/local/01a15ebb-a278-7f21-8363-dd343bbf7c0f --- .../verify-deepseekbot/features/README.md | 1 + .../features/remote-hosts.md | 28 ++ changes/2500-host-feed.md | 11 + packages/client/src/client/bot-sidebar.tsx | 45 ++- packages/client/src/client/channel-dock.tsx | 4 +- .../{computer-tabs.tsx => host-tabs.tsx} | 152 ++++----- packages/client/src/client/locale.ts | 121 +++---- .../src/client/remote-conversation-view.tsx | 28 +- .../{computer-sources.ts => remote-hosts.ts} | 199 ++++++++--- packages/client/test/computer-sources.test.ts | 161 --------- packages/client/test/remote-hosts.test.ts | 317 ++++++++++++++++++ scripts/cli-ui-inventory.json | 14 +- 12 files changed, 695 insertions(+), 386 deletions(-) create mode 100644 .agents/skills/verify-deepseekbot/features/remote-hosts.md create mode 100644 changes/2500-host-feed.md rename packages/client/src/client/{computer-tabs.tsx => host-tabs.tsx} (69%) rename packages/client/src/client/{computer-sources.ts => remote-hosts.ts} (56%) delete mode 100644 packages/client/test/computer-sources.test.ts create mode 100644 packages/client/test/remote-hosts.test.ts diff --git a/.agents/skills/verify-deepseekbot/features/README.md b/.agents/skills/verify-deepseekbot/features/README.md index 34ec59291a..520dab909b 100644 --- a/.agents/skills/verify-deepseekbot/features/README.md +++ b/.agents/skills/verify-deepseekbot/features/README.md @@ -2,6 +2,7 @@ | Feature | Needs a model | Scripted journey | File | | --- | --- | --- | --- | +| Browser Remote Host pairing, tabs and Host Feed | only for a reply | `verify-app` two-Host path | [remote-hosts.md](remote-hosts.md) | | VRM companion Panel | yes for speaking | `scripts/e2e-vrm-companion.mjs` | [vrm-companion.md](vrm-companion.md) | | Desktop whole-window zoom (controlled S1 / Windows candidate) | no | `scripts/e2e-desktop-zoom-launch.mjs`, `scripts/e2e-desktop-zoom-windows.mjs`, `scripts/e2e-dock-zoom.mjs`, `scripts/e2e-workspace-chrome.mjs` | [desktop-window-zoom.md](desktop-window-zoom.md) | | Global search: Alt/Option+K, settings results and pinyin matching | no | `verify-app` Bot mode path | [global-search.md](global-search.md) | diff --git a/.agents/skills/verify-deepseekbot/features/remote-hosts.md b/.agents/skills/verify-deepseekbot/features/remote-hosts.md new file mode 100644 index 0000000000..47ca3cd349 --- /dev/null +++ b/.agents/skills/verify-deepseekbot/features/remote-hosts.md @@ -0,0 +1,28 @@ +# Browser Remote Hosts + +The browser pairs a Remote Host as a Paired Device and reads its Host Feed through the shared mobile Host client. This Host remains the management context. + +## Sub-features + +- `pair`: Add remote redeems the other Host's pairing link. +- `tabs`: All, This host and each Remote Host filter the channel list; Chinese uses 全部、本机、远程. +- `open`: a remote row opens a Host-scoped conversation. +- `upgrade`: existing browser pairings and the selected tab survive the storage-key rename. +- `remove`: removing a Host forgets its rows, stops its Inbox and releases cached avatar object URLs. + +## How to get to it (user POV) + +Enter Bot mode, then Messages. Choose Add remote above the channel list. Paste a link from the other Host's Settings → Devices → Pair a phone. Choose All or the Remote Host tab, then a Bot or group row. Right-click the Host tab to remove it. + +## Driving it with verify-app + +Launch two independently named instances with `node scripts/verify-app.mjs launch --name `. Run `doctor` for each. Open both local login URLs. Pair from Host A's browser using the link created on Host B. Verify the new tab, All rows, remote conversation header and canonical device record on Host B. Capture tabs and the Add remote dialog in English and Chinese, light and dark. For the rename baseline, run the pre-change Client with the same browser storage, upgrade, and verify the pairing and selected Host remain without another offer. + +Read the browser console and run `node scripts/verify-app.mjs observe --name ` after startup and relevant actions. For a reply test select `deepseek-v4-pro`, send a uniquely marked message and compare the visible response to Host B's canonical timeline. Inspect the remote timeline in reverse DOM order: newest is first. + +## Gotchas + +- The Inbox and authenticated avatar cache are scaffold state; rows do not yet display their counts or avatars in Track 0. +- Remote chat displays text and attachment names; images and cards are not qualified. +- The Host look is still per phone. DSH Desktop and two physical machines over a real tailnet are not qualified by a two-Host local run. +- Dismiss Continue and Skip onboarding overlays before selecting Messages. Retain any failed drive evidence before retrying. diff --git a/changes/2500-host-feed.md b/changes/2500-host-feed.md new file mode 100644 index 0000000000..78f708ace2 --- /dev/null +++ b/changes/2500-host-feed.md @@ -0,0 +1,11 @@ +--- +section: Changed +--- + +## en + +- Browser tabs now say **This host** and **Add remote**, preserving existing pairings and the selected Host while preparing shared Host Feed inbox and avatar state ([#2500](https://github.com/BotHarness/DeepSeekBot/issues/2500)). + +## zh + +- 网页标签改用**本机**和**添加远程**,保留已有配对及所选 Host,并为共享 Host Feed 的收件箱和头像状态做好准备([#2500](https://github.com/BotHarness/DeepSeekBot/issues/2500))。 diff --git a/packages/client/src/client/bot-sidebar.tsx b/packages/client/src/client/bot-sidebar.tsx index 6e90768196..6b6175e7fb 100644 --- a/packages/client/src/client/bot-sidebar.tsx +++ b/packages/client/src/client/bot-sidebar.tsx @@ -1,12 +1,7 @@ import { Menu } from './appearance-primitives.js'; -import { ALL_COMPUTERS, computerSources } from './computer-sources.js'; +import { ALL_HOSTS, remoteHosts } from './remote-hosts.js'; import { useChannelDockActive } from './channel-dock.js'; -import { - ComputerSourceMark, - ComputerTabs, - RemoteComputerRows, - useComputerSources, -} from './computer-tabs.js'; +import { RemoteHostMark, HostTabs, RemoteHostRows, useRemoteHosts } from './host-tabs.js'; import { plainMarkdown } from '../../../core/src/channels/message-preview.js'; import { PointerMenu } from './ds/pointer-menu.js'; import { PanelEmptyState } from './ds/empty-state.js'; @@ -704,7 +699,7 @@ function BotRow({ {bot.displayName} - {source ? : null} + {source ? : null} {muted ? : null} @@ -837,7 +832,7 @@ function ChannelRow({ {channel.name} - {source ? : null} + {source ? : null} {muted ? : null} @@ -1022,9 +1017,9 @@ export function BotSidebar({ t, }: SidebarProps): ReactElement { const state = useClientStore(keepClientState, rosterInputs); - const computerTabs = useChannelDockActive(); - const computers = useComputerSources(); - const remoteOpen = computerTabs && computers.open !== undefined; + const hostTabs = useChannelDockActive(); + const remoteHostsState = useRemoteHosts(); + const remoteOpen = hostTabs && remoteHostsState.open !== undefined; const channelUnread = state.humanInbox.channelUnread; const mutedChannelSet = new Set(state.roster.muted); const prefs = useBotModePrefs((value) => value); @@ -1334,7 +1329,7 @@ export function BotSidebar({ : [...railPinnedChannels, ...railChannels].map((channel) => channel.id); const shortcutIdsRef = useRef(shortcutIds); const openLocalConversation = (): void => { - computerSources().close(); + remoteHosts().close(); onOpenConversation?.(); }; const openConversationRef = useRef(openLocalConversation); @@ -1940,7 +1935,7 @@ export function BotSidebar({ dragActiveRef.current = channelDragActive || sectionDragActive; const showSource = - computerTabs && computers.tab === ALL_COMPUTERS && computers.computers.length > 0; + hostTabs && remoteHostsState.tab === ALL_HOSTS && remoteHostsState.hosts.length > 0; const renderChannelRow = (channel: ChannelSummary, scopeId: ScopeId): ReactElement => { const drag = channelDragProps(scopeId, channel.id); const bot = channel.botSlug === undefined ? undefined : botBySlug.get(channel.botSlug); @@ -2193,8 +2188,8 @@ export function BotSidebar({ {headerEnd} ); - const remoteTab = computerTabs - ? computers.computers.find((computer) => computer.host.hostId === computers.tab) + const remoteTab = hostTabs + ? remoteHostsState.hosts.find((remote) => remote.host.hostId === remoteHostsState.tab) : undefined; if (remoteTab !== undefined) return ( @@ -2202,10 +2197,10 @@ export function BotSidebar({ {headerTarget ? createPortal({header}, headerTarget) : header} - +
- {header}, headerTarget) : header} - {computerTabs ? : null} + {hostTabs ? : null} {state.status === 'loading' && state.bots.length === 0 ? ( ) : null} @@ -2859,11 +2854,11 @@ export function BotSidebar({
); })} - {computerTabs && computers.tab === ALL_COMPUTERS - ? computers.computers.map((computer) => ( - ( + ; const panels: Record = { [MESSAGE_LEAF]: { label: dock.t('workspace.messages'), content: }, diff --git a/packages/client/src/client/computer-tabs.tsx b/packages/client/src/client/host-tabs.tsx similarity index 69% rename from packages/client/src/client/computer-tabs.tsx rename to packages/client/src/client/host-tabs.tsx index e37cbae047..77a337f530 100644 --- a/packages/client/src/client/computer-tabs.tsx +++ b/packages/client/src/client/host-tabs.tsx @@ -1,8 +1,8 @@ import { useState, useSyncExternalStore, type ReactElement } from 'react'; import * as stylex from '@stylexjs/stylex'; -import type { RemoteComputer, RemoteConversationTarget } from './computer-sources.js'; -import { ALL_COMPUTERS, computerSources, THIS_COMPUTER } from './computer-sources.js'; +import type { RemoteHost, RemoteConversationTarget } from './remote-hosts.js'; +import { ALL_HOSTS, remoteHosts, THIS_HOST } from './remote-hosts.js'; import { ChannelSidebarIcon } from './channel-sidebar-icon.js'; import { ConfirmDialog, FormDialog } from './ds/form-dialog.js'; import { IconButton } from './ds/icon-button.js'; @@ -72,12 +72,12 @@ const styles = stylex.create({ }, }); -interface LocalComputer { +interface ThisHostInfo { id?: string; name?: string; } -let local: LocalComputer = {}; +let local: ThisHostInfo = {}; let localRequested = false; const localListeners = new Set<() => void>(); @@ -104,7 +104,7 @@ function subscribeLocal(listener: () => void): () => void { }; } -export function useLocalComputer(): LocalComputer { +export function useThisHost(): ThisHostInfo { return useSyncExternalStore( subscribeLocal, () => local, @@ -112,46 +112,44 @@ export function useLocalComputer(): LocalComputer { ); } -export function useComputerSources() { - const sources = computerSources(); +export function useRemoteHosts() { + const sources = remoteHosts(); return useSyncExternalStore(sources.subscribe, sources.getSnapshot, sources.getSnapshot); } -export function ComputerSourceMark(): ReactElement { +export function RemoteHostMark(): ReactElement { return ( -