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
2 changes: 1 addition & 1 deletion .agents/skills/verify-deepseekbot/features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ One file per user-facing feature. Each file has four sections: `Sub-features`, `
| Disposable Memory history, restore and stale-head refusal | no | `scripts/e2e-memory-restore.mjs` | [memory-restore.md](memory-restore.md) |
| Version-bound Memory images, Markdown previews and CLI export | no | `scripts/e2e-memory-images.mjs`, `scripts/e2e-memory-markdown.mjs`, `scripts/e2e-memory-formats.mjs` | [memory-images.md](memory-images.md) |

| Activity Center: approvals, Remote Host actions, Channel mute and independent control-rail indicator; page and Dock | yes (real pending requests) | `scripts/e2e-inbox-tool-approval.mjs`, `scripts/e2e-activity-live.mjs`, `scripts/e2e-activity-approve-sync.mjs`, `scripts/e2e-activity-load.mjs` | [activity-inline-approval.md](activity-inline-approval.md) |
| Activity Center: shared header Environment selector, per-item source badges, approvals, Remote Host actions, Channel mute and independent control-rail indicator; page and Dock | yes (real pending requests) | `scripts/e2e-inbox-tool-approval.mjs`, `scripts/e2e-activity-live.mjs`, `scripts/e2e-activity-approve-sync.mjs`, `scripts/e2e-activity-load.mjs` | [activity-inline-approval.md](activity-inline-approval.md) |

| Assignment Report identity, continuation, restart and refusals | no for reads; yes to produce reports | none (isolated Host CLI journey) | [assignment-report-continuation.md](assignment-report-continuation.md) |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
- Dock decides the card's own Channel request while another Channel remains selected.
- Batch controls appear only in explicit Select mode. Needs you, For you and Other unread are independently collapsible sections; initial state is expanded, with browser/Host-origin collapse preferences. History stays in the header menu.
- Search expands inside the header like the Channel list, uses the Host query across all eligible results (not just loaded rows), and retains section order. Each section paginates independently; failed reads retain existing rows and offer retry.
- The Environment selector lives in the header on both surfaces. All merges each category across Hosts once, without Host sections. Every item carries its source icon and name at the upper right, including in a single Environment. Equal attention/Channel/message IDs on different Hosts remain independently selectable and route actions to their own Host.

## How to get to it (user POV)

Enter Bot mode and open Activity Center from the workspace control rail on desktop.
Use the header Environment selector to switch between All and one Host. With unread messages on both Hosts, verify one Needs you / For you / Other unread heading each, per-item source badges, source navigation and a mixed selection's read acknowledgement against both canonical Host timelines. Stop only a task-owned Host and retain its named unavailable status and cached rows; restore it before testing pagination and query changes.
This opens Dock even without a selected Channel. The narrow Web shell exposes Activity
Center in its Bot mode navigation and opens the full page. Wait for responsive navigation
to finish mounting after resizing. Toggle the other panels off from the rail for a wide
Expand Down Expand Up @@ -136,9 +138,9 @@ Use real ordinary messages, Human mentions/replies and a pending Group join requ

For the narrow-dock layout regression, use the default left Activity panel beside an open conversation at a 1440×1000 viewport, then widen that same panel. Measure each local and remote mention row, summary and action area. At the observed 229px row width, the summary must retain the row's content width and actions must wrap below it without hiding controls; wide rows may keep them alongside. Exercise long Chinese and English content, loading and failed requests, and expanded request details. Details must span the row. Capture matching light/dark before and after states; the offline Chromium layout regression in `packages/client/test/activity-list-layout.test.tsx` does not replace this real Host journey.

The page and Dock group each paired Remote Host's Needs you, For you and Other unread under its Host name and a Remote mark. ActivityListView receives a Host-scoped source for identities, commands and request cards. Approvals and questions reuse the existing cards with the shared request module; join requests, snooze and clear use shared attention-actions. Source links open the remote conversation, not an exact historical message. Search, category, history and sorting query each Host. The Bot and Channel pickers contain This Host's identities, so either filter hides remote groups.
The page and Dock merge selected Hosts into one Needs you, For you and Other unread list per category, without Host headings. Every item shows its source icon and name, including in a single Environment. ActivityListView retains each remote item's Host-scoped source for identities, commands and request cards. Approvals and questions reuse the existing cards with the shared request module; join requests, snooze and clear use shared attention-actions. Source links open the remote conversation, not an exact historical message. Search, category, history and sorting query each Host. The Bot and Channel pickers contain This Host's identities, so either filter excludes remote items. Serving-Host bulk read/clear options are hidden in remote-only scope; remote items remain operable through source-bound row and selection actions. Concurrent operations keep independent busy keys, and completing an old operation cannot close a newly opened detail.

Use two task-local Hosts with different home basenames and ports. Pair B from A through Add remote in the header add menu. Retain the browser profile for baseline and changed captures. Give their built-in Tob different display names and use distinct DM messages to prove same-slug isolation. Use disposable ordinary Bots with deepseek-v4-pro for real pending approvals, questions, joins and group mentions. Never fabricate Inbox rows.
Use two task-local Hosts with different home basenames and ports. Pair B from A through Add remote in the Environment panel header. Retain the browser profile for baseline and changed captures. Give their built-in Tob different display names and use distinct DM messages to prove same-slug isolation. Use disposable ordinary Bots with deepseek-v4-pro for real pending approvals, questions, joins and group mentions. Never fabricate Inbox rows.

Open Activity from A's rail and narrow page. Inspect all three sections, names and avatars in light/dark. Open B's approval and question details; submit a decision/answer, and verify B's canonical state changes while A has no matching write. Snooze a join, inspect Later, cancel snooze, then accept or decline it. Clear a reply and verify B's dismissed query; failures must stay visible, not look successful. Source links open B's conversation and the narrow Back path returns to Activity. Search and load-more use B's device gateway.

Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/verify-deepseekbot/features/remote-hosts.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ E11 remote Connections: open Environment → Manage the named remote Host → Co

E11 recovery boundaries: revoking this browser must explain re-adding and authorizing it, rather than recovering by another route; Cancel leaves access intact. Native independent-device revocation and a route stop must acknowledge the exact requested operation, retain sibling access and read back the owning Host. Controlled boundary regressions cover malformed HTTP200 acknowledgements retaining unknown, a persisted credential replacement before storage-event delivery refusing dispatch, and a same-grant route change while waiting for the credential transaction requiring fresh disconnection consent. Expired or failed preflight checks create no new execution record or Host write. Partial storage failures leave one recoverable generation and never replay it; invalid legacy references or cleanup keys cannot delete credentials. A new nonempty version3 execution index must reject both older array-only and version2 Client parsers globally, including an older writer on another Host, so it cannot discard another unknown record. Reload a current Client for readback, retain unresolved legacy facts, and require same-pin readback after a genuine grant replacement. Do not forge live storage or responses to manufacture runtime evidence; use controlled regressions for those failures.

Enter Bot mode, then Messages. Open the channel header's add menu and choose Add remote. Paste a link from the other Host's Settings → Devices → Pair a phone. Choose All or the Remote Host icon, then a Bot or group row. Right-click the Host icon and choose Remove to remove it. A remote Bot DM with Browser or Computer access shows the corresponding header button. Open its viewer, choose Pause Bot and take control, interact with the screen or send text, then Resume Bot or Close viewer. Groups have no viewer entry.
Enter Bot mode, then Environments. Use the header's Add remote plus icon; the list body has no add footer, and the Channels create menu has no Add remote item. Paste a link from the other Host's Settings → Devices → Pair a phone. Choose All or the Remote Host icon, then a Bot or group row. Right-click the Host icon and choose Remove to remove it. A remote Bot DM with Browser or Computer access shows the corresponding header button. Open its viewer, choose Pause Bot and take control, interact with the screen or send text, then Resume Bot or Close viewer. Groups have no viewer entry.

## Driving it with verify-app

Expand Down
11 changes: 11 additions & 0 deletions changes/4223-activity-environment-headers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
section: Fixed
---

## en

- Activity uses the shared environment selector in its header and labels each item with its source instead of repeating Host sections. Add remote now lives in the Environment panel header and no longer appears in the Channels creation menu ([#4223](https://github.com/BotHarness/DeepSeekBot/issues/4223)).

## zh

- 活动面板在标题栏复用环境选择器,每条活动标明来源,不再重复显示 Host 分区。“添加远程”移至环境面板标题栏,并从频道创建菜单中移除([#4223](https://github.com/BotHarness/DeepSeekBot/issues/4223))。
2 changes: 1 addition & 1 deletion docs/architecture/botharness-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ The application-defined browser `RemoteHosts` owner keeps its pairings and selec

Remote conversation presentation retains the source Channel Journal entry through the shared conversation and message-display modules, then uses the existing Web message body and request cards. A conversation-scoped adapter supplies the source Host client and validates the active Host/Channel before decisions. Attachment reads resolve through that client's `resource(path)` and device credential, with no local-store or local-URL fallback; changing conversations aborts reads and releases object URLs. Activity and conversation cards share `createHostRequestActions`, with request references from the Inbox and Journal respectively. Only a Host-accepted decision completes a submission; stale decisions trigger the existing cards' status reload. Decisions reuse the shared attention actions and remain subject to the source Host's ownership and permission checks.

Activity consumes each Remote Host's shared Inbox through `RemoteHosts.activity`, reusing the existing `ActivityListView` for Host groups. Its Host-scoped source supplies identity, pagination, source navigation and commands; it never receives This Host's `BridgeActions`. `createHostActivityActions` adapts the shared attention and request operations to the existing approval and question cards. Each operation resolves the current pairing before calling its Host client, and confirmed changes refresh that Host's Inbox. Filtered observers share the Host client and stop with their last subscriber. This Host still reads its existing bridge/store until that Host Feed slice migrates.
Activity consumes each Remote Host's shared Inbox through `RemoteHosts.activity` and merges the selected Environments into one `ActivityListView` per category. The shared Environment selector lives in the panel header; every item displays its source icon and name. Each remote item retains its Host-scoped source for identity, pagination, source navigation and commands, including retained detail and retiring rows; that source never receives This Host's `BridgeActions`. Selection, focus, busy and detail identities include the Host as well as the attention and Source Event IDs, so equal IDs from different Hosts remain independent. Pagination advances only sources with their own cursor, and failed or unavailable sources retain their named status alongside available results. `createHostActivityActions` adapts the shared attention and request operations to the existing approval and question cards. Each operation resolves the current pairing before calling its Host client, and confirmed changes refresh that Host's Inbox. Filtered observers share the Host client and stop with their last subscriber. This Host still reads its existing bridge/store until that Host Feed slice migrates.

The phone owns its persisted four-kind Device Notification Preference and copies it to every paired Host on changes, pairing and retry. Existing Host switches seed it only before a device choice exists. The Host stores the copy independently of its Expo token and reads it only for delivery; Activity facts are unchanged. A browser owns per-Remote-Host choices and consumes the shared Inbox while subscribed, suppressing the initial snapshot and reconnect backlog, deduplicating Host-scoped items and closing notifications on disposal. The browser retains exact seen attention identities per Host and credential for the active owner lifetime, including ordinary reconnects and overlapping subscriber changes. Source Event creation time is not attention arrival order. While the same Host connection and credential remain active, stale or failed Inbox reads preserve an established notification baseline and its seen identities; incomplete responses are not consumed. A connection interruption requires a new complete silent baseline for the reconnect backlog but retains identity history. An owner without a completed baseline stays uninitialized through read failures. There is no timestamp watermark or identity eviction: memory is O(distinct identities seen), not bounded to 2,000 entries. Removing the Host, replacing its credential or releasing the final subscriber clears this history; the next owner establishes a complete silent baseline. Permanent removal also deletes that Host's persisted browser notification choice through the notification owner and cancels pending activation. Reloading or pairing that Host again starts with notifications off and default kinds; temporary disconnect, page disposal and other Hosts' choices are unaffected. This does not delete the phone's global Device Notification Preference. If notification storage refuses deletion, removal still clears the in-memory choice, cancels activation, closes handles and revokes the pairing; a bounded redacted `remote-notification-forget-persistence-failed` diagnostic reports that persistence failed. Reload may still read the old choice in that refusal case. The browser has no closed-page notification path. Notification discovery uses the existing Host Feed client and live invalidation, with `humanAttention({ notifications: true })` paging Host-decided actions, unread group mentions/replies and ordinary DM replies independently of the Activity UI window. The shared Inbox publishes notification items only after every page completes; invalidation during a scan restarts it, and a failed page cannot replace the notification baseline. Browser activation keeps the previous choice until a fresh complete shared-Inbox scan succeeds; this acknowledged commit is the enable boundary, so an in-flight backlog cannot become new alerts. Activation has a ten-second deadline and is cancelled on target change, settings close, permission loss, removal or disposal; these cancellations do not create another feed. `deepseekbot activity --notifications` exposes the same Host query. Phone copy failures retry while foreground with bounded backoff (1–30 seconds), without subscribing to every paired Host feed; backgrounding cancels the timer. Development-client AX invokes the existing phone owner through a precisely targeted loopback Metro inspector (`phone-notifications`); this does not provide release-client CLI parity.

Expand Down
10 changes: 7 additions & 3 deletions packages/client/src/client/activity-approval.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState, type ReactElement } from 'react';
import { useState, type ReactElement, type ReactNode } from 'react';
import { Button } from '@deepseek-ai/dsh-client-ui-primitives';
import type { BridgeActions } from './actions.js';
import { PersonaBotAvatar } from './avatar.js';
Expand All @@ -15,13 +15,15 @@ export function ActivityApproval({
t,
leaving,
onFocus,
origin,
}: {
source: HumanAttentionItem;
actions: BridgeActions;
bots: readonly BotSummary[];
t: BotHarnessTranslate;
leaving: boolean;
onFocus: () => void;
origin?: ReactNode;
}): ReactElement {
const [message, setMessage] = useState<ChannelMessage>();
const [failed, setFailed] = useState(false);
Expand Down Expand Up @@ -99,6 +101,7 @@ export function ActivityApproval({
{source.channelId?.startsWith('dm-') ? t('identity.kind.dm') : source.channelName}
</span>
</div>
{origin}
<time dateTime={source.createdAt}>
{new Date(source.createdAt).toLocaleTimeString(undefined, {
hour: '2-digit',
Expand Down Expand Up @@ -168,6 +171,7 @@ export function useActivityRows(
items: readonly HumanAttentionItem[],
scope: string,
enabled: boolean,
identify: (item: HumanAttentionItem) => string = (item) => item.id,
) {
const [state, setState] = useState(() => ({
items,
Expand All @@ -176,11 +180,11 @@ export function useActivityRows(
}));
let rows = state.rows;
if (state.items !== items || state.scope !== scope) {
const currentIds = new Set(items.map((item) => item.id));
const currentIds = new Set(items.map(identify));
rows = items.map((item) => ({ item, leaving: false }));
if (enabled && state.scope === scope) {
state.rows.forEach((row, index) => {
if (!currentIds.has(row.item.id) && row.item.kind === 'tool-approval')
if (!currentIds.has(identify(row.item)) && row.item.kind === 'tool-approval')
rows.splice(Math.min(index, rows.length), 0, { ...row, leaving: true });
});
}
Expand Down
Loading
Loading