Skip to content

feat(workbuddy): 发内容前需要审核 - #117

Merged
VicarDa merged 2 commits into
mainfrom
feat/workbuddy-content-review
Oct 5, 2026
Merged

VicarDa merged 2 commits into
mainfrom
feat/workbuddy-content-review

Conversation

@VicarDa

@VicarDa VicarDa commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

基于 #114(叠加在 feat/workbuddy-takeover-emulator 之上),仅涉及 workbuddy-plugin/。

内容

发内容前需要审核(内容审核模式)

  • 入口:创建任务确认页「执行设备」下方新增「高级选项」,提供「发内容前需要审核」开关,旁边「?」悬停显示机制说明。
    • 默认关闭。
    • 只能由用户在确认页开启,模型不能开关;任务开始后不可更改,恢复任务时沿用。
  • 审核范围:发帖、评论、回复、私信等带文字的对外发布。点赞、关注、收藏等不含文字的操作,以及搜索、表单等普通输入不需要审核。不做批量审核。
  • 运行时强制(WorkBuddy 模型和后台配置的模型走同一入口):
    • 开启后,每次点击、滑动、回车都必须标明 externalSideEffect,否则拒绝(content_action_unclassified)。
    • 标为 publish/send 的动作必须带已批准的 reviewId,否则拒绝(review_required)。
    • 沿用原有的逐字读回核对和发布后截图核验;每次批准只能用于一次发布。
  • 工具:opengui_review_comment 新增 kind(post / comment / reply / message)和 title。
    • 帖子和私信可在同一位置多次发布,但相同文字不能重复(content_already_published)。
    • 评论和回复仍是同一账号对同一目标只发一条。
  • 界面与报告:
    • 审核卡片显示内容类型、标题和对应的位置说明。
    • 进度显示「已发布并核验」。
    • 报告概要表标明「发内容前审核:已开启」,「内容审核」一节列出类型、标题、各版本、决定和核验记录。
  • 文档:新增 docs/content-review.zh-CN.md;README / README.zh-CN 增加说明;SKILL 增加对应流程。
  • 「评论」场景原有行为不变;开关关闭时行为与之前一致。

修复:手机剪贴板为空时读回输入框失败

  • 现象:设备剪贴板为空时(Android 13+ 会自动清空),scrcpy 对读取剪贴板请求不回复,导致读回输入框超时,报 comment_input_unreadable,审核流程卡住。
  • 修复:首次读取最多等待 2 秒,无回复视为空剪贴板,并补充测试。

验证

  • npm run check 通过;vitest 59 个文件 / 465 个测试全部通过(新增 tests/content-review.spec.ts,以及确认页开关、空剪贴板的测试)。
  • 在 Android 模拟器 + QA 评论页上,用安装后的插件端到端验证:
    • 开关默认关闭,勾选后会话显示 contentReview: true;
    • 未标明的点击和未审核的发送均被拒;
    • 提交审核 → 工作台批准 → 按原文输入、读回一致 → 发送并核验;
    • 批准不能重复使用;
    • 报告包含「发内容前审核」与「内容审核」一节。

🤖 Generated with Claude Code

VicarDa and others added 2 commits October 5, 2026 16:24
scrcpy sends no reply to a clipboard read when the device clipboard is
empty (Android 13+ also clears it on its own), so comment read-back timed
out with comment_input_unreadable. The first read now waits 2 s and treats
silence as an empty clipboard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Start page 高级选项: opt-in switch with a ? hover explanation, off by
  default; only the person can turn it on, and it is fixed for the task.
- Runtime gates: every tap, swipe and Enter must declare
  externalSideEffect (content_action_unclassified); publish/send needs an
  approved review (review_required); exact read-back is still enforced.
- opengui_review_comment gains kind (post/comment/reply/message) and
  title; posts and messages may repeat on one target but never with the
  same text (content_already_published).
- Review cards, progress text and the report's 内容审核 section show the
  content kind and title; the summary table records the option.
- Docs: docs/content-review.zh-CN.md, README sections, SKILL guidance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@VicarDa
VicarDa changed the base branch from feat/workbuddy-takeover-emulator to main October 5, 2026 15:08
@VicarDa
VicarDa merged commit 36028ef into main Oct 5, 2026
17 of 18 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