7.3 KiB
7.3 KiB
Task: 简化微信渠道账号连接和对话界面
Identity
- Task ID: 20260914-wechat-scan-owner-ml-b4169ea9
- Mode: Feature
- Branch: codex/20260914-wechat-scan-owner-ml-b4169ea9-wechat-scan-owner
- Worktree: D:\Datas\OthersProjects.codex-worktrees\makelore\20260914-wechat-scan-owner-ml-b4169ea9
- Base commit:
a721b8fb7e - Owner: codex
- Status: Ready for Integration
Scope
- Simplify the MakeLore personal WeChat channel to one scanning owner per account while preserving multi-account routing, connection, pause/enable, disconnect, activity, conversation, attachment, and approval flows.
- Remove the audience selector, contact invitations, caller authorization management, and their obsolete Renderer, shared operation, Electron Main route, recovery, and test surfaces.
- Update visible channel wording from creator/self-specific labels to account-scoped WeChat conversation wording.
- Own only
shared/cloud-agents.ts, the cloud-agent Electron service/operation/journal surfaces, CloudAgents channel Renderer components, their focused unit/Electron tests, the root README product contract, and this task-scoped record. Yuxi and canonical project memory remain read-only.
Intent And Constraints
- Concurrent Task Gate passed for the exact registered task, feature mode, branch, base, and isolated worktree. Planning Gate passed after reading the required project memory, accepted personal-cloud-agent decision, relevant indexes, and peer scopes.
- The scanning WeChat identity is the only caller for its account. Accounts remain independently connected and routed, multiple accounts may target one published Agent, account sessions stay isolated, and the creator remains the payer.
- Existing invited sessions are not reclassified as the scanning identity. Keep the existing self-history backend endpoint naming because it still projects only the actual scanning identity.
- Removed product operations must not remain callable from the typed Host/Main boundary or recoverable from the UI. A legacy recovery record for a removed operation must be explicitly discarded without invoking the removed API or blocking unrelated account operations; do not add a compatibility framework.
- Preserve all unrelated changes and do not modify, commit, merge, push, deploy, package, or claim live WeChat acceptance.
Outcome
- Replaced the channel detail panel's connection/audience/caller-management surface with account-scoped activity and WeChat conversation tabs. The user-level channel page remains the single place for account creation, QR connection and verification, published-Agent routing, enable/pause, and disconnect.
- Removed the four retired Yuxi operations (
channelPolicy,createChannelPairing,channelCallers, andrevokeChannelCaller) from shared operation types and Electron Main route validation/projection. Removed their policy/pairing DTOs and account-level audience fields. - Removed invitation, audience, caller revocation, and enable-confirmation UI/tests. Updated channel, conversation, schedule-notification, and Agent workspace copy to use account-scoped “微信对话” wording without creator/self or invited-contact labels.
- Preserved
channelSelfCallersand its fixed self-only server query for scheduled notification targets, and preserved channel history, controls/approval, files, activity/delivery, and retry operations. Existing invited sessions remain excluded by the server's scanning-identity projection rather than being relabeled. - Legacy journal entries for the four removed operations are deleted locally by Main with an explicit
retiredresult before any operation plan or network request. The global recovery UI exposes only “丢弃旧记录” for them; the account detail panel excludes them from its file-retry gate. - Updated the root README channel contract to describe one scanning identity per account, account-isolated conversations, no invitation/caller management, creator billing, retained account controls/activity/files/approval, and the existing deployment boundary.
- The authorized fresh read-only Reviewer completed Standards and Spec review with PASS. Both findings were remediated and rechecked, with no unresolved P1/P2 issue.
- No merge, push, package, deployment, production mutation, or live WeChat request was performed. Implementation is ready for integration.
Verification
pnpm install --frozen-lockfile: passed with repository-pinned pnpm 10.33.4; dependencies were linked from the local store.- Focused Vitest: 6 files / 71 tests passed, covering channel UI, multi-account routing, conversation/approval/file behavior, Main operation removal, and legacy journal discard.
pnpm run typecheck: passed.- Changed-file ESLint: passed with no output.
pnpm run lint:check: passed with 0 errors and 8 warnings in unchanged files.pnpm run build:vite: passed for Renderer, Electron Main, Preload, and utility targets after the final edits; only existing chunk/dynamic-import warnings were reported.pnpm exec playwright test tests/e2e/cloud-agent-channels.spec.ts: 1/1 passed after the final build. The Electron scenario covers QR verification, two accounts routed to one Agent, route switching without a new login, activity/conversation labels, approval, artifact save, compact layout, and absence of retired calls/UI.pnpm test: 235 files passed, 1 file failed; 2,048 tests passed, 2 skipped, 1 failed. The sole failure is outside this task intests/unit/pi-managed-worker-opener.test.ts, which expectsmakelore-runtime-v6.mjswhile the base product emitsmakelore-runtime-v7.mjs. An isolated rerun reproduced the same 1/2 failure.tests/unit/coding-chat-pressure.test.tsxpassed 1/1 when run separately because the scripted full suite stopped before it.git diff --check: passed after the Reviewer-requested README and task-record update.check_doc_drift.py --task-id 20260914-wechat-scan-owner-ml-b4169ea9: passed after the Reviewer-requested README and task-record update.
Follow-ups
- A compatible Yuxi implementation and real connected-WeChat smoke remain external release requirements.
- The authorized fresh read-only Reviewer identified and then closed the stale README contract finding. Final Standards/Spec verdict: PASS, with no unresolved P1/P2 issue.
- The unrelated stale Pi runtime filename assertion remains outside this task.
Promotion Candidates
- Target:
.project-docs/10-decisions/ADR-2026-09-11-personal-cloud-agents.md,.project-docs/20-architecture/system-overview.md, and.project-docs/40-domain/business-rules.md. - Proposal: replace the invitation/audience policy with one scanning owner per independently connected WeChat account; retain multi-account routing, creator billing, account-isolated sessions, activity/delivery, and existing self-history endpoint naming.
- Evidence: this task's focused unit/Electron tests, typecheck, lint, and production build; live WeChat remains explicitly unverified.
- Future impact: future client work must not restore invitation, audience-policy, or caller-revocation product surfaces without a new decision.
- Semantic conflicts: this intentionally amends the accepted Personal WeChat Publication invitation behavior while preserving User-Owned WeChat Accounts routing and isolation.
- Human confirmation required: already confirmed for product behavior; canonical promotion still requires Integration Gate ownership.