Skip to content

feat(channel): add Slack channel configuration UI - #3935

Draft
tcp404 wants to merge 1 commit into
mainfrom
boii/feat/channel-slack
Draft

feat(channel): add Slack channel configuration UI#3935
tcp404 wants to merge 1 commit into
mainfrom
boii/feat/channel-slack

Conversation

@tcp404

@tcp404 tcp404 commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Description

Add a Slack channel configuration UI to the Settings → Channels panel, moving Slack from the coming_soon placeholder to an active channel with a full config form.

  • SlackConfigForm.tsx (new, modeled on TelegramConfigForm): two-token input — Bot Token (xoxb-) and App-Level Token (xapp-), both Input.Password with visibility toggle and soft prefix validation. "Test" validates only the Bot Token via auth.test; on success it auto-enables the plugin submitting both tokens. Includes the pairing-request flow, authorized-users list, and a Next-Steps guide.
  • ChannelModalContent.tsx (wiring): adds 'slack' to the platform type; introduces slackPluginStatus / useChannelModelSelection('slack') / slackTokenRef / slackEnableLoading / handleToggleSlackPlugin; removes Slack from comingSoonChannels and inserts an active slackChannel card (right after Telegram); hooks up toggle dispatch, pluginStatusChanged, and loadPluginStatus. Discord stays coming_soon.
  • i18n: adds settings.assistant.slack* keys (18) plus settings.assistant.unknownUser across all 13 locales (real translations, not placeholders); regenerates i18n-keys.d.ts.
  • PRD: docs/prds/remote/channels/channels.md — Slack moved coming_soonactive, new F-WEBUI-13b section.

Wire contract (agreed with backend)

  • Plugin id is the bare slack.
  • testPlugin sends { plugin_id: 'slack', token: <xoxb> } (validates Bot Token only).
  • enablePlugin sends { plugin_id: 'slack', config: { credentials: { token: <xoxb>, app_token: <xapp> } } } — key name is exactly app_token (underscore).
  • All wiring reuses the generic channel.* IPC; no new IPC entry points. Pairing / authorized users are filtered by platformType === 'slack'.

Related Issues

  • Closes #

Type of Change

  • feat — New feature (non-breaking change which adds functionality)

Atomic PR Checklist (Rule 1)

  • This PR contains exactly one feature or bug fix that cannot be further decomposed
  • The PR title follows Conventional Commit format: <type>(<scope>): <subject> (English)

Local Checks (Rule 3)

  • bun run format — formatting passes
  • bun run lint — no lint errors (pre-existing repo warnings only; just push lint-strict gate passed)
  • bunx tsc --noEmit — no type errors (0 errors)
  • bunx vitest run — tests pass (3964 passed / 5 skipped via just push)
  • i18n validated (bun run i18n:types + node scripts/check-i18n.js)
  • New/changed user-facing text uses i18n keys (no hardcoded strings)

Runtime Verification

  • Verified on macOS
  • Verified on Windows
  • Verified on Linux
  • I have performed a self-review of my own code

Additional Context

  • The companion backend PR lives in the aioncore repo on branch boii/feat/channel-slack.
  • This change lands in aionui (open-source edition); it will be synced to aionpro afterwards.
  • No live end-to-end verification yet — validated via static gates (format / lint / tsc --noEmit / vitest / i18n check) + code review + front/back contract cross-check. Runtime verification is deferred to a shared integration instance.
  • The repo-wide hardcoded 'Unknown User' in other channel forms (Telegram/Lark/DingTalk/WeChat/WeCom) is pre-existing debt and intentionally out of scope here; this PR only introduces i18n for its own new file (ratchet, no regression).

- Add SlackConfigForm with Bot Token and App-Level Token inputs for Socket Mode
- Promote Slack from coming-soon placeholder to an active channel card and wire status/model/pairing
- Add settings.assistant.slack* i18n keys across all 13 locales
- Update channels PRD to reflect Slack active status
@tcp404
tcp404 requested review from IceyLiu and piorpua as code owners August 8, 2026 11:08
@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 223 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ettingsModal/contents/channels/SlackConfigForm.tsx 0.00% 194 Missing ⚠️
...ngsModal/contents/channels/ChannelModalContent.tsx 0.00% 29 Missing ⚠️

📢 Thoughts on this report? Let us know!

@tcp404
tcp404 marked this pull request as draft August 9, 2026 04:59
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.

1 participant