Skip to content

Refactor channel account management: move binding/editing to Channels, align Agents display, and simplify UX#523

Merged
vcfgv merged 5 commits intomainfrom
feature/subagent-channel-connection
Mar 16, 2026
Merged

Refactor channel account management: move binding/editing to Channels, align Agents display, and simplify UX#523
vcfgv merged 5 commits intomainfrom
feature/subagent-channel-connection

Conversation

@vcfgv
Copy link
Contributor

@vcfgv vcfgv commented Mar 16, 2026

Summary

This PR reorganizes channel-account management around the Channels page and reduces confusing/duplicated UI in both Channels and Agents.

It introduces account-scoped channel APIs, enforces clearer agent binding rules, and aligns the Agents page display with actual channel-account ownership.

What changed

Backend / API

  • Added account-centric channel endpoints:
    • GET /api/channels/accounts
    • PUT /api/channels/binding
    • DELETE /api/channels/binding
    • PUT /api/channels/default-account
  • Added account-scoped delete support:
    • DELETE /api/channels/config/:channelType?accountId=...
  • Added aggregated channel-account view builder (config + runtime + bindings).
  • Updated auto-binding compatibility behavior:
    • avoid binding random account IDs to non-existent agents (Agent not found fix)
    • keep legacy compatibility for default/main and accountId==agentId cases.
  • Enforced binding constraints in agent config flow:
    • one agent cannot be bound across multiple channel types
    • within same channel type, rebinding replaces previous account binding for that agent.

Channels page UX

  • Reworked configured channels into channel groups with multiple accounts.
  • Support adding new accounts under the same channel type.
  • Account binding is managed directly in-channel via agent selector.
  • “Add account” now uses a single-step modal:
    • account ID is editable in the same config form (no multi-stage dialog).
  • Removed noisy/redundant labels and status text per product feedback:
    • removed prominent binding/connection text blocks
    • removed “set as default account” button from UI
    • removed duplicated “handled by …” copy (agent selector is the source of truth).
  • Fixed flicker/regression behaviors:
    • add flow no longer flashes loading before full form
    • edit flow prefetches config to reduce modal flash
    • delete uses optimistic UI removal + delayed refresh to avoid “deleted but still visible until manual refresh”.

Agents page UX

  • Agents list now shows channel and account context (e.g. Feishu / Lark · Main account) instead of only channel type.
  • Agent settings channel section now reflects account-level assignments from Channels.
  • Removed overly noisy status emphasis in agent channel list.
  • Fixed i18n fallback for default account label (default -> localized Main account).

i18n / copy cleanup

  • Added and refined locale keys for zh/en/ja across channels and agents.
  • Reworded several strings to better match the new ownership model and reduce ambiguity.

Docs

  • Updated README.md, README.zh-CN.md, README.ja-JP.md to reflect the new channel-account/binding management flow.

Validation

  • Targeted ESLint checks passed for modified backend/frontend files.
  • Note: full typecheck is currently blocked by an existing unrelated workspace issue:
    • missing module use-stick-to-bottom in src/hooks/use-stick-to-bottom-instant.ts.

Related Issues

closes #445

@vcfgv vcfgv force-pushed the feature/subagent-channel-connection branch from bc25e3e to 2f31ad0 Compare March 16, 2026 09:02
@vcfgv vcfgv marked this pull request as ready for review March 16, 2026 09:17
@vcfgv vcfgv force-pushed the feature/subagent-channel-connection branch from f0012a5 to 87653aa Compare March 16, 2026 10:14
@vcfgv vcfgv merged commit 4be679a into main Mar 16, 2026
2 checks passed
@vcfgv vcfgv deleted the feature/subagent-channel-connection branch March 16, 2026 10:20
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.

探讨:channel与agent的绑定交互

1 participant