Files
makelore/.project-docs/30-worklog/tasks/20261013-channel-empty-hint-4e8a2b6c.md
T

5.6 KiB
Raw Blame History

Task: Explain unavailable WeChat channel binding without an Agent

Identity

  • Task ID: 20261013-channel-empty-hint-4e8a2b6c
  • Mode: Feature
  • Branch: codex/20261013-channel-empty-hint-4e8a2b6c-channel-empty-hint
  • Worktree: /Users/chillishark/Makelore 麦洛/.codex-worktrees/makelore/20261013-channel-empty-hint-4e8a2b6c
  • Base commit: 13336cfe12
  • Owner: codex
  • Status: Ready for Integration

Scope

  • Show a visible explanation on the Agent channel page when there is no available published/enabled Agent, with a route to the existing My Agents list.
  • Clarify the same prerequisite in the Add/Manage WeChat dialog. Preserve existing channel cards, management and eligibility rules.
  • Synchronize README and focused unit/Electron UI coverage.

Project Context Loaded

  • Concurrent Task Gate: Passed. task_context.py status --json matches this task ID, worktree, branch, feature mode and base commit; primary checkout belongs to a separate integration task and remains untouched.
  • Planning Gate: Passed. Read the entry instructions and active record; retained already-loaded memory-index, project-positioning, current-state, decision-index, system-overview, business-rules and success-criteria from the same canonical snapshot at 23ddce11. Base 13336cf adds only this chat's already-verified homepage feature and its own task record.
  • Accepted authority: ADR-2026-09-11-personal-cloud-agents; user-level channel accounts require an available published Agent, and enabling/connecting remains explicit through the Main-owned API.
  • Peers: knowledge workspace changes concern knowledge/files; create diagnosis has no declared source dependency; Canvas diagnosis is separate. This task edits ChannelAccounts and its tests only, plus README and this record. No cross-task dependency or canonical documentation change.
  • Source evidence: sidebar Channel button already navigates normally; the disabled Next step requires targetAgent. Successful Agent reads filter out unpublished and disabled Agents; the current modal has a vague prerequisite but the channel page does not explain it.
  • Existing create flow uses name/avatar then configuration and “开始使用”; its former “使用与接入” navigation is absent, so do not refer users to that stale screen.

Intent And Constraints

  • User asks for a helpful explanation when no Agent is available to connect. Use “还没有可连接的智能体” and explain creating/configuring and clicking “开始使用”, with “去我的智能体”.
  • Show the explanation only after successful loading, and never replace existing WeChat management cards.
  • Do not change any Agent/channel API, publish/enable automatically, send a message, invoke paid services, update/restart the current temporary application, merge primary, or push.
  • The earlier Robot homepage feature is already present in this base; preserve it for later combined integration.

Plan

  1. Add the shared explanatory panel to the successful empty-target state and existing dialog.
  2. Add behavior coverage for absence, draft-only eligibility, navigation without mutation, load failure and existing account access.
  3. Run focused tests, typecheck, scoped lint, build and fixture-only Electron UI validation; record and commit a clean handoff.

Outcome

  • ChannelAccounts shows “还没有可连接的智能体” after a successful read with no available target, followed by “先创建一个智能体,配置完成后点击‘开始使用’,就能连接到微信。” (UI uses double curly quotes).
  • “去我的智能体” navigates to /cloud-agents?view=mine. The same panel explains the disabled Next step in the Add/Manage dialog.
  • With no accounts or targets, the explanatory panel replaces the premature “添加第一个微信” empty state; existing accounts retain their cards and management actions.
  • No backend, eligibility, publication, enablement, paid service or current temporary-application changes. README synchronized.
  • Read-only independent review found no blocking issue.

Verification

  • Focused channel-accounts-page.test.tsx: 34/34 passed. Covers no Agents/draft-only/disabled-only, CTA navigation with no binding writes, modal hint, successful-load gating, failed initial read and preserved existing-account management.
  • Exact pinned pnpm 10.33.4: typecheck passed; scoped lint of component and both test files passed; build:vite passed.
  • Electron cloud-agent-channels.spec.ts: 2/2 passed with fixture-only API responses. New empty-channel test enters from the sidebar, checks both explanations, checks disabled Next, then returns to My Agents without writes. Existing connect/switch behavior remains passing.
  • Visually checked captured screenshots at 1366×900 and 980×680; text/button fit and main content has no horizontal overflow. Local evidence: test-results/cloud-agent-channels-guide-e93c9-e-sidebar-back-to-My-Agents/wechat-no-agents-desktop.png and wechat-no-agents-compact.png.
  • git diff --check passed; project-doc ownership drift check passed.

Follow-ups

  • Integrate this branch when combining changes for the user's new temporary application. Its base includes prior homepage Robot-hiding commit 13336cf; do not update the existing temporary application.
  • Published-but-disabled Agents remain excluded by the existing contract; this task does not restore the removed use/access controls or change Agent lifecycle behavior.

Promotion Candidates

  • Current state / success criteria: channel page explains the available-Agent prerequisite before the user enters a blocked binding step, and links to My Agents. Promote only at integration.
  • No new architectural decision or backend contract.