Skip to content

feat(web): global 清空回收站, browser data size and 查看引用 (29) - #174

Merged
yxflc11 merged 5 commits into
mainfrom
codex/claude-ui-storage-follow-ups
Oct 3, 2026
Merged

yxflc11 merged 5 commits into
mainfrom
codex/claude-ui-storage-follow-ups

Conversation

@yxflc11

@yxflc11 yxflc11 commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

Step 29: the UI for C22, C23 and C24, the fixes recorded in the storage follow-up research.

The backend landed in #175. This PR is the UI only.

  • C22 · 清空回收站… in 设置 › 存储空间.
    • The 回收站 row says how many files are kept and how many can go, and offers 清空回收站… (tinted red).
    • The confirmation reads 「永久删除 9 个文件?」 with the exact size from trash.sizeBytes − referencedSizeBytes, and says how many referenced files will stay.
    • The request is POST /api/v1/storage/trash/cleanup with a fresh requestKey. An unclear result keeps the confirmation open with 重试 and the same key, so the 服务电脑 replays its saved result.
    • The result says what was removed, the space freed and how many files were kept. An older 服务电脑 (404) gets a pointer to the per-channel 回收站.
  • C23 · browser data size.
    • 设置 › 员工浏览器: 检查状态 now adds 「浏览器数据 52.0 MB」, or 「浏览器数据量不出」 when profileBytes is null.
    • 设置 › 存储空间: a separate group 「工作电脑上的浏览器数据」 appears when any Bot uses the 员工浏览器. 测量 reads each Bot's status (only on request), shows the measured total and a per-Bot list, and counts the Bots that could not be measured.
    • It is never added to the 服务电脑 total and never shows an unknown size as 0.
    • Until the upstream agent-computer contribution is deployed, real working computers report 「量不出」. That is honest, and it is said so in the docs.
  • C24 · 查看引用 ›.
    • A kept file in 频道文件 › 回收站 gets 查看引用 ›. It lists the referencing messages (author: 你, the Bot's name, or 系统消息; time; the server's preview) and tasks (status and title), newest first, with a note when there are more.
    • Choosing a message closes the dialog and shows it in the conversation. If it is older than what is loaded, the conversation reads older pages first, at most 10. A message still not found gives a hint toast instead of loading the whole history.
    • Choosing a task opens 任务详情. This works from the composer's 频道文件, the 频道信息 rail and the Bot rail.
  • Preview: synthetic references, global cleanup and browser status; two preview Bots now use the 员工浏览器.
  • Docs (en/zh): the DESIGN screen map no longer lists the three deviations; C22–C24 are marked integrated; step 29 added.

Acceptance journey

  1. npm run design:preview -w @openbot/web, then ?scene=dialog-trash: under 渠道数据-8月.xlsx, 查看引用 › lists 你, 研究助理 and 系统消息.
  2. ?scene=settings&section=storage:
    • 清空回收站… opens 「永久删除 9 个文件?… 共 900 MB」.
    • 测量 shows 186 MB for 研究助理 and 「量不出」 for 发布助手.
  3. In the app: 查看引用 › → a message scrolls into view in the conversation.

Open-source research

  • Research artifact: docs/research/storage-cleanup-follow-ups.md (amended on Codex's branch with the implemented C22–C24 evidence)
  • Selected upstream/standard: CopilotKit/OpenBot agent-computer for C23 (upstream contribution feat(agent-computer): report bounded per-Bot profile bytes CopilotKit/OpenBot#730); local extensions of the C21/C19 contracts for C22 and C24
  • Version or commit: agent-computer 257c1280d684089be9adb0b35cce262efc7064bf (deployed pin; reports null until the contribution lands)
  • License: MIT (agent-computer); no new dependency for C22/C24 or the UI
  • Decision: global cleanup with one replayable key, per-Bot profile bytes through browser status, an Owner-only reference list; the UI shows unknown sizes as 「量不出」
  • OpenBot-specific gap: the three step-25 deviations recorded in the research record
  • Source copied or substantially adapted: no

Verification

  • Automated commands: the full npm run check sequence passes on this branch (FULL_CHECK_OK). Web: 651 tests pass with --maxWorkers=2, as on CI.
  • Tests:
    • AttachmentsManager: the reference list with author labels; message and task choices.
    • ChannelWorkspace: jumping reads an older page and focuses the message; another channel's request is ignored. The test waits for the result rather than a fixed 50 ms, which was too short on hosted CI.
    • channel-attachment-client: the references route; 410 purged.
    • SettingsStorage: global cleanup with the same key on retry and the exact size; browser data measured only on request, with unknown not shown as zero.
    • SettingsBrowser: profile size in the status line.
  • Manual path: the reference list, the global cleanup confirmation and the browser measurement were checked in the design preview.
  • Platforms actually tested: macOS arm64 browser rendering.
  • Support level claimed: Integrated

Security impact

  • No new privilege or external side effect
  • New privilege documented with fail-closed tests
  • No credentials or private user data included

The UI calls only the Owner-only C22–C24 routes. Global cleanup runs only after an explicit second confirmation, and the 服务电脑 keeps referenced files and audits each deletion. Browser status is read only when the Owner presses 测量.

Documentation and compatibility

  • User-visible claims distinguish implemented, experimental, and planned behavior
  • English source docs and maintained translations were updated, or this change is not user-visible
  • Cross-platform impact was tested or explicitly documented as out of scope

AI or automation assistance

Implemented with Claude Code (Claude Opus 5.5) under the repository owner's direction, against the owner's approved design canvas.

🤖 Generated with Claude Code

yxflc11 and others added 5 commits October 3, 2026 16:40
- C22: 设置 › 存储空间 offers 清空回收站… for every channel after a
  second confirmation with the exact size; an unclear result is retried
  with the same request key.
- C23: browser status shows each Bot's profile size; 存储空间 measures
  them on request, apart from the 服务电脑 total, and shows 「量不出」
  rather than zero when a working computer cannot measure.
- C24: 查看引用 › on a kept 回收站 file lists the referencing messages
  and tasks; a message opens in the conversation (reading older pages,
  bounded) and a task opens 任务详情.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ge-follow-ups

# Conflicts:
#	docs/design/desktop-ui-2026-10/IMPLEMENTATION.md
#	docs/design/desktop-ui-2026-10/IMPLEMENTATION.zh-CN.md
Reading the older page took longer on hosted CI (1.4 s run), so the fixed delay checked focus too early.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yxflc11
yxflc11 merged commit 0cf07cb into main Oct 3, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant