Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 0 additions & 11 deletions changes/2500-computer-tabs.md

This file was deleted.

11 changes: 0 additions & 11 deletions changes/2500-host-feed.md

This file was deleted.

11 changes: 11 additions & 0 deletions changes/2500-remote-hosts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
section: Added
---

## en

- The channel list can show Remote Hosts. In the channel list's **+** menu, **Add remote** takes the pairing link from another Host's Settings → Devices → Pair a phone, so a browser can list, open and answer that Host's chats over Tailscale. Once a Remote Host is paired, an icon strip appears above the list: **All** (the default), **This host**, and one icon per Remote Host. Hover an icon for its name and unread count; an offline Host is greyed out. Each new Remote Host gets its own symbol and colour, and right-click changes the icon (symbols, emoji, colour) or removes the Host. Icons are stored in this browser only ([#2500](https://github.com/BotHarness/DeepSeekBot/issues/2500)).

## zh

- 频道列表可以显示远程 Host。在频道列表的 **+** 菜单里选 **添加远程**,粘贴另一台 Host「设置 → 设备 → 配对手机」的配对链接,浏览器就能通过 Tailscale 列出、打开并回复那台 Host 的聊天。配对远程后,列表上方出现一排图标:**全部**(默认)、**本机**,以及每个远程各一个。悬停图标可看名称和未读数;离线的远程显示为灰色。每个新远程会自动分到不同的符号和颜色,右键可更改图标(符号、Emoji、颜色)或移除。图标只保存在这个浏览器里([#2500](https://github.com/BotHarness/DeepSeekBot/issues/2500))。
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ A phone and a browser can now both reach Remote Hosts (ADR-0242), but the Web Cl
- **The device owns its Device Notification Preference.** Device A stores which kinds of item it wants from each Host and is the place the Human changes them. Because a Host sends phone pushes while the app is closed, A pushes a copy to each Host it is paired with; the Host uses that copy only to decide sends. After a re-pairing, A pushes its preference again.
- **A phone is only ever a Paired Device.** It never hosts PersonaBots. A browser on Host A is a Paired Device of Host B; A never relays B or stores B's credential.
- **Browser alerts while open.** The Web Client shows Remote Host alerts with browser notifications only while the page is open, honouring the Device Notification Preference. Web Push for a closed page is a later decision.
- **Remote Host parity follows the phone.** What a client can see and change on a Remote Host is the phone's per-Host list: chats with full message rendering (images, cards, approvals), Activity Center items with their actions, the Bot page (Memory, model, Routines, Workspace grants, per-Bot notifications), group settings, the Computer and Browser viewers, and Host-level models, usage and storage. Clients share the phone's platform-neutral `apps/mobile/src/host/` modules and supply their own adapters (carrier, storage) the way `native-*` modules do for the phone.
- **No full-client fallback on the desktop.** The Web Client does not open a Remote Host's full Web Client. Remote chats join the channel list and Remote Host attention is handled in Activity Center, so one machine is enough to answer every Host.
- **Host looks are device-local.** The icon, colour and name a device shows for a Host are that device's own setting, stored on the device; a Host never stores how other devices show it.
- **No environment tabs above the chat list.** **All** is the default view, and every row already carries its Host's icon after the name. On the phone, the left drawer chooses the view (All first, then This Host, each Remote Host and cloud workspaces) and holds adding, pairing, customizing and removing Hosts; the chat list no longer pages sideways, which frees the horizontal swipe for row actions (pin, add to a section, mute). On the desktop, the channel list keeps a compact strip of Host icons only (All, This Host, each Remote Host), with the name in a tooltip, an unread badge, a greyed icon while offline and management on right-click; **Add remote** sits in the channel panel header's add menu. With no Remote Host the strip is hidden.
- **Distinct default looks.** Pairing assigns each Host an unused preset icon and colour so icon-only switching stays readable; the device can change it at any time (looks stay device-local).
- **Language.** The glossary uses This Host and Remote Host; the Chinese UI says 本机 and 远程, never 电脑, so the Computer (the PersonaBots' shared desktop) keeps its meaning.

## Consequences
Expand Down
107 changes: 106 additions & 1 deletion packages/browser/lib/client.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/browser/lib/client.js.map

Large diffs are not rendered by default.

39 changes: 33 additions & 6 deletions packages/client/src/client/bot-sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { Menu } from './appearance-primitives.js';
import { ALL_HOSTS, remoteHosts } from './remote-hosts.js';
import { useChannelDockActive } from './channel-dock.js';
import { RemoteHostMark, HostTabs, RemoteHostRows, useRemoteHosts } from './host-tabs.js';
import {
AddRemoteHostDialog,
HostMark,
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';
Expand Down Expand Up @@ -699,7 +705,7 @@ function BotRow({
<span className="bh-body">
<span className="bh-top">
<span className="bh-name">{bot.displayName}</span>
{source ? <RemoteHostMark /> : null}
{source ? <HostMark /> : null}
{muted ? <MutedMark t={t} /> : null}
<ChannelMessageTime channel={channel} now={now} t={t} />
</span>
Expand Down Expand Up @@ -832,7 +838,7 @@ function ChannelRow({
<span className="bh-body">
<span className="bh-top">
<span className="bh-name">{channel.name}</span>
{source ? <RemoteHostMark /> : null}
{source ? <HostMark /> : null}
{muted ? <MutedMark t={t} /> : null}
<ChannelMessageTime channel={channel} now={now} t={t} />
</span>
Expand Down Expand Up @@ -1018,6 +1024,7 @@ export function BotSidebar({
}: SidebarProps): ReactElement {
const state = useClientStore(keepClientState, rosterInputs);
const hostTabs = useChannelDockActive();
const [addingRemote, setAddingRemote] = useState(false);
const remoteHostsState = useRemoteHosts();
const remoteOpen = hostTabs && remoteHostsState.open !== undefined;
const channelUnread = state.humanInbox.channelUnread;
Expand Down Expand Up @@ -1504,6 +1511,7 @@ export function BotSidebar({
if (id === 'channel') setCreateRequest({ kind: 'channel' });
if (id === 'section') setCreateRequest({ kind: 'section' });
if (id === 'marketplace') setCreateRequest({ kind: 'marketplace' });
if (id === 'remote') setAddingRemote(true);
};

const selectSortMenu = (id: string): void => {
Expand Down Expand Up @@ -2178,14 +2186,22 @@ export function BotSidebar({
</button>
</Tooltip>
}
items={menuItems(t, gitReady(state.git))}
items={menuItems(t, gitReady(state.git), hostTabs)}
onSelect={selectMenu}
onClose={() => {
setMenuOpen(false);
}}
/>
</div>
{headerEnd}
{addingRemote ? (
<AddRemoteHostDialog
onClose={() => {
setAddingRemote(false);
}}
t={t}
/>
) : null}
</div>
);
const remoteTab = hostTabs
Expand Down Expand Up @@ -3750,7 +3766,7 @@ function botCreateSource(id: string): 'empty' | 'git' | 'zip' | undefined {
return undefined;
}

function menuItems(t: BotHarnessTranslate, gitAvailable: boolean): MenuEntry[] {
function menuItems(t: BotHarnessTranslate, gitAvailable: boolean, remotes: boolean): MenuEntry[] {
const disabled = !gitAvailable;
return [
{
Expand Down Expand Up @@ -3778,9 +3794,20 @@ function menuItems(t: BotHarnessTranslate, gitAvailable: boolean): MenuEntry[] {
label: t('roster.menu.marketplace'),
icon: <IconGlobeOutlineRegular size={16} />,
},
...(remotes
? [
{
id: 'remote',
label: t('remoteHosts.add'),
icon: <ChannelSidebarIcon name="monitor" size={16} />,
},
]
: []),
];
}

function sectionCreateMenuItems(t: BotHarnessTranslate, gitAvailable: boolean): MenuEntry[] {
return menuItems(t, gitAvailable).filter((item) => item.id === 'bot' || item.id === 'channel');
return menuItems(t, gitAvailable, false).filter(
(item) => item.id === 'bot' || item.id === 'channel',
);
}
114 changes: 113 additions & 1 deletion packages/client/src/client/channel-sidebar-icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,12 @@ const glyphs: Record<string, readonly [string, Record<string, string | number>][
],
'bell-off': [
['path', { d: 'M10.268 21a2 2 0 0 0 3.464 0' }],
['path', { d: 'M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742' }],
[
'path',
{
d: 'M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742',
},
],
['path', { d: 'm2 2 20 20' }],
['path', { d: 'M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05' }],
],
Expand Down Expand Up @@ -653,6 +658,113 @@ const glyphs: Record<string, readonly [string, Record<string, string | number>][
},
],
],
laptop: [
[
'path',
{
d: 'M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z',
},
],
['path', { d: 'M20.054 15.987H3.946' }],
],
server: [
['rect', { width: '20', height: '8', x: '2', y: '2', rx: '2', ry: '2' }],
['rect', { width: '20', height: '8', x: '2', y: '14', rx: '2', ry: '2' }],
['line', { x1: '6', x2: '6.01', y1: '6', y2: '6' }],
['line', { x1: '6', x2: '6.01', y1: '18', y2: '18' }],
],
building: [
['path', { d: 'M12 10h.01' }],
['path', { d: 'M12 14h.01' }],
['path', { d: 'M12 6h.01' }],
['path', { d: 'M16 10h.01' }],
['path', { d: 'M16 14h.01' }],
['path', { d: 'M16 6h.01' }],
['path', { d: 'M8 10h.01' }],
['path', { d: 'M8 14h.01' }],
['path', { d: 'M8 6h.01' }],
['path', { d: 'M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3' }],
['rect', { x: '4', y: '2', width: '16', height: '20', rx: '2' }],
],
briefcase: [
['path', { d: 'M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16' }],
['rect', { width: '20', height: '14', x: '2', y: '6', rx: '2' }],
],
'flask-conical': [
[
'path',
{
d: 'M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2',
},
],
['path', { d: 'M6.453 15h11.094' }],
['path', { d: 'M8.5 2h7' }],
],
'gamepad-2': [
['line', { x1: '6', x2: '10', y1: '11', y2: '11' }],
['line', { x1: '8', x2: '8', y1: '9', y2: '13' }],
['line', { x1: '15', x2: '15.01', y1: '12', y2: '12' }],
['line', { x1: '18', x2: '18.01', y1: '10', y2: '10' }],
[
'path',
{
d: 'M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z',
},
],
],
paintbrush: [
['path', { d: 'm14.622 17.897-10.68-2.913' }],
[
'path',
{
d: 'M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z',
},
],
[
'path',
{
d: 'M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15',
},
],
],
'book-open': [
['path', { d: 'M12 5v16' }],
[
'path',
{
d: 'M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z',
},
],
],
zap: [
[
'path',
{
d: 'M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z',
},
],
],
heart: [
[
'path',
{
d: 'M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5',
},
],
],
leaf: [
[
'path',
{
d: 'M11 20a10 10 0 0010-10 25.9 25.9 0 00-1.04-7.281 1 1 0 00-1.755-.325C15.833 5.5 13 5.5 9.8 6.1A7 7 0 0011 20',
},
],
['path', { d: 'M2 21a5 5 0 012.911-4.544C7.613 15.212 8.351 15.24 11 13' }],
],
tv: [
['path', { d: 'm17 2-5 5-5-5' }],
['rect', { width: '20', height: '15', x: '2', y: '7', rx: '2' }],
],
};

export function ChannelSidebarIcon({
Expand Down
Loading
Loading