diff --git a/.agents/skills/dsh-dev/SKILL.md b/.agents/skills/dsh-dev/SKILL.md index 5018a6f996..e2a682c32c 100644 --- a/.agents/skills/dsh-dev/SKILL.md +++ b/.agents/skills/dsh-dev/SKILL.md @@ -409,3 +409,9 @@ different facts rejected an otherwise hash-matching installed package. Compare p to `productImProvider.upstream.dsh`, preserve source and runtime digest checks, and qualify the current composition separately. Do not rewrite the original Provider provenance to make it look newly qualified. + +### Remote Host QA profiles and hidden sidebar copies (#2500) + +The launcher and `verify-app` share a temporary cookie jar named from `basename(DSH_HOME)`. Two isolated homes named `home` in different parent folders overwrite that jar, so the second launch can make the first Host's doctor return 401 while its own browser still works. Give concurrent homes distinct basenames (`host-a`, `host-b`), preserve the first refusal and verify each Host separately. Do not treat this verification-cookie collision as a product authentication failure. + +The qualified workspace retains a hidden sidebar copy beside the visible Channels panel. The two Add remote buttons can have the same accessible name. A first-match selector can click or fill the hidden copy; choose visible elements as the two-Host journey requires, and wait for the submit button to become enabled after input. The real Windows Web baseline paired successfully after the driver selected visible controls and used keyboard input; no product change was required. 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/.github/pr-screenshots/2500-t0/after-add-light.png b/.github/pr-screenshots/2500-t0/after-add-light.png new file mode 100644 index 0000000000..891c478191 Binary files /dev/null and b/.github/pr-screenshots/2500-t0/after-add-light.png differ diff --git a/.github/pr-screenshots/2500-t0/after-dark.png b/.github/pr-screenshots/2500-t0/after-dark.png new file mode 100644 index 0000000000..8fc16e57b2 Binary files /dev/null and b/.github/pr-screenshots/2500-t0/after-dark.png differ diff --git a/.github/pr-screenshots/2500-t0/after-light.png b/.github/pr-screenshots/2500-t0/after-light.png new file mode 100644 index 0000000000..65fe3db632 Binary files /dev/null and b/.github/pr-screenshots/2500-t0/after-light.png differ diff --git a/.github/pr-screenshots/2500-t0/before-add-light.png b/.github/pr-screenshots/2500-t0/before-add-light.png new file mode 100644 index 0000000000..3204acdb48 Binary files /dev/null and b/.github/pr-screenshots/2500-t0/before-add-light.png differ diff --git a/.github/pr-screenshots/2500-t0/before-dark.png b/.github/pr-screenshots/2500-t0/before-dark.png new file mode 100644 index 0000000000..7b3c7e2919 Binary files /dev/null and b/.github/pr-screenshots/2500-t0/before-dark.png differ diff --git a/.github/pr-screenshots/2500-t0/before-light.png b/.github/pr-screenshots/2500-t0/before-light.png new file mode 100644 index 0000000000..1823e8ccf8 Binary files /dev/null and b/.github/pr-screenshots/2500-t0/before-light.png differ 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/docs/architecture/botharness-architecture.md b/docs/architecture/botharness-architecture.md index 8d12576d2a..02a65b8450 100644 --- a/docs/architecture/botharness-architecture.md +++ b/docs/architecture/botharness-architecture.md @@ -1134,6 +1134,12 @@ The application-defined mobile conversation directory combines the selected Host Chats shares its persisted device-local conversation filter with Activity. The native source pager derives tabs from verified Organization listings, including empty memberships and authorized guest labels, in enrolled-source order. Source/account-qualified keys preserve identity while swiping; tab selection does not switch Host management authority. Unsupported Cloud Activity has an explicit notice and no borrowed Computer badge; All discloses partial Computer-only coverage. This first slice retains one active Computer. See the Chats environment extension in [ADR-0229](../adr/0229-mobile-cloud-sessions-are-independent-of-host-pairing.md). +### Browser Remote Hosts and Host Feed (#2500) + +The application-defined browser `RemoteHosts` owner keeps its pairings and selected Host tab in device-local storage. Each Remote Host reuses the phone's Host client and conversation module through the device gateway; This Host never relays the Remote Host's credential. The shared `createInbox(client, { activity: true })` supplies each Remote Host's Human Inbox and unread snapshot. The first browser subscriber starts the client and Inbox, and the last stops them while retaining the last Inbox snapshot. Authenticated avatar fetches publish an immutable URL-to-object-URL map; removal, roster replacement and final unsubscribe release obsolete objects and discard late fetch results. The storage-key rename imports existing browser pairings and the selected tab. See [ADR-0242](../adr/0242-a-browser-pairs-other-computers-through-their-device-gateway.md) and [ADR-0243](../adr/0243-every-client-reads-every-host-through-one-host-feed.md). + +This scaffold does not yet display remote avatars, activity, unread counts or Activity Center items. This Host still reads its existing bridge/store until those Host Feed slices migrate. Device Notification Preference remains a subsequent device-owned slice; the browser has no closed-page notification path. + ### Version-bound Memory image previews (#2214, first Web slice) The application-defined Memory Service exposes bounded PNG representations alongside its existing current-file and Git-diff queries. Metadata identifies worktree/index/exact reachable commit plus a SHA-256 byte revision; authenticated image transfer rechecks that owner, repository selector, path and revision before returning `image/png` with no-store semantics. It does not accept arbitrary blob IDs, revision expressions or Host paths. Current reads retain path containment, control-directory exclusion and safe-open checks; Git reads accept regular-file blobs only. A changed mutable source returns an explicit stale refusal rather than current bytes under an old version label. 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 ( -