Skip to content

Add Feishu advanced policy UI and manager support for DM/Group permissions#10

Open
Yidada wants to merge 1 commit intomainfrom
codex/design-advanced-settings-for-channel-configuration
Open

Add Feishu advanced policy UI and manager support for DM/Group permissions#10
Yidada wants to merge 1 commit intomainfrom
codex/design-advanced-settings-for-channel-configuration

Conversation

@Yidada
Copy link
Copy Markdown
Owner

@Yidada Yidada commented Apr 8, 2026

Motivation

  • Provide a user-facing "高级设置" panel to inspect and edit Feishu Channel DM and Group permission policies without using the CLI.
  • Enable reading and writing the underlying openclaw configuration keys (channels.feishu.*) to support "仅自己 / 指定 UID / 全开放" modes.
  • Keep existing onboarding, install and binding flows unchanged while exposing a safe, folded advanced editor.

Description

  • Added FeishuPermissionMode, FeishuAdvancedPolicySnapshot, and FeishuAdvancedPolicyDraft models to represent UI modes and drafts.
  • Implemented loadAdvancedPolicy() and saveAdvancedPolicy(_:) on OpenClawFeishuChannelManager to read/write configs via the openclaw CLI and update advancedPolicySnapshot, advancedPolicyBusy, and advancedPolicyError.
  • Added normalization and resolution helpers (normalizeAdvancedPolicyDraft, normalizeUIDs, resolveAdvancedPolicySnapshot, and mergeUniqueString usage) and included advancedPolicyBusy in isBusy.
  • Extended ChannelsManagementView with state bindings, an expandable DisclosureGroup UI (feishuAdvancedPolicyPanel) for Owner Open ID, DM and Group policy pickers, UID inputs, and actions to read/save; added onChange/onReceive hooks to sync manager snapshot to the UI.
  • Added splitUIDText helper, updated UI layout to place the panel below the binding button and above logs, and appended a design doc docs/2026-04-08-feishu-advanced-policy-settings-design.md.
  • Added unit tests in OpenClawFeishuChannelManagerTests covering loadAdvancedPolicy resolution and saveAdvancedPolicy write behavior.

Testing

  • Ran the updated unit tests in Tests/ClawbarTests/OpenClawFeishuChannelManagerTests, including testLoadAdvancedPolicyResolvesSelectedAndOnlyMeModes and testSaveAdvancedPolicyWritesOnlyMeAndOpenConfigs, and they passed.
  • Verified existing manager command mocks and recording-based tests continue to exercise the openclaw config get/set sequences using the RecordingCommandRunner mocks.
  • No UI snapshot tests were added; manual UI integration is guarded by the panel being collapsed by default.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant