Skip to content

feat(feishu): add workspace_thread_isolation for topic-level workspace binding - #1648

Open
n-wen wants to merge 1 commit into
chenhg5:mainfrom
n-wen:feat/feishu-workspace-thread-isolation
Open

feat(feishu): add workspace_thread_isolation for topic-level workspace binding#1648
n-wen wants to merge 1 commit into
chenhg5:mainfrom
n-wen:feat/feishu-workspace-thread-isolation

Conversation

@n-wen

@n-wen n-wen commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Add workspace_thread_isolation config for Feishu platform, enabling topic-level workspace binding in multi-workspace mode without auto-creating reply topics. This allows users to keep bot replies in the main chat (no auto-topic) while still isolating workspaces per topic when users reply inside existing topics.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing behavior to change)
  • Documentation only
  • Internal refactor / chore (no user-visible change)

Testing

Automated tests added in this PR

  • TestPopulateWorkspaceChannelKeys_WorkspaceThreadIsolation in platform/feishu/platform_test.go — 7 sub-cases covering all config combinations (thread_isolation only, workspace_thread_isolation only, both, neither, rootID priority, fallback to session key, p2p chat)

For bug fixes only — regression test

N/A — this is a new feature, not a bug fix.

Critical User Journeys (CUJ) impact

  • No CUJ touched (small refactor, doc change, etc.)

  • A — basic conversation

  • B — session lifecycle (/new /switch /list /history etc.)

  • C — agent execution control (/mode /cancel /stop permissions)

  • D — security & permissions (allow_from admin_from banned_words rate limits)

  • E — scheduled tasks (/cron /timer)

  • F — config switching (/lang /provider /model reload)

  • G — error handling & robustness (LLM failure, ws reconnect, agent crash)

  • H — multi-platform / multi-project isolation

  • I — UI rendering correctness (cards, streaming, display modes)

  • go test ./core/ -run TestCUJ passes locally (TestCUJ_H4_FeishuTopicsKeepWorkspaceBindingsIsolated passes).

  • N/A — the new workspace_thread_isolation config is additive and does not alter the existing thread_isolation flow tested by CUJ_H4.

Manual / user-visible behavior change

thread_isolation workspace_thread_isolation auto-topic on reply session isolation workspace isolation
true any yes per-topic per-topic
false true no per-user/chat per-topic (new)
false false no per-user/chat per-chat

Users who previously couldn't use thread_isolation (because auto-creating topics was undesirable) can now enable workspace_thread_isolation alone to get per-topic workspace binding when users reply inside existing topics.

Checklist

  • go build ./... passes (web dist missing is pre-existing)
  • go test ./... passes (pre-existing Windows path failures unrelated)
  • AGENTS.md Pre-Commit Checklist items satisfied
  • No new hardcoded platform/agent names in core/
  • i18n strings — no new user-facing text added (config key only)
  • No secrets / credentials in source

FIX: #1644

…e binding

Add a new workspace_thread_isolation config that enables topic-scoped workspace bindings in Feishu group chats without auto-creating topics.

Unlike thread_isolation (which both creates topics on bot reply and isolates sessions), this new option only affects workspace routing: messages inside an existing topic get a topic-scoped ChannelKey so each topic can bind an independent workspace via /workspace bind.

This allows users who prefer replies in the main chat (no auto-topic) to still leverage per-topic workspace isolation in multi-workspace mode.
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.

[Bug] 飞书中thread_isolation配置混合了自动开话题和workspace隔离两件事

1 participant