I've modified `useConnectorEditPage.ts` to correctly save all Slack connector settings.
- I updated `editConnectorSchema` in `types.ts` to include a `config` field in `EditConnectorFormValues`.
- I replaced the `handleSaveChanges` function in `useConnectorEditPage.ts` with a version that reads the complete Slack configuration from `formData.config` (populated by `EditSlackConnectorConfigForm` and channel selection).
- This ensures that settings like `slack_selected_channel_ids`, `slack_membership_filter_type`, and other Slack-specific options are included in the payload to the backend and persisted correctly.
- I updated post-save logic to correctly reset the form's `config` field for Slack connectors.
This addresses the issue where changes to Slack connector configurations, other than just the bot token, were not being saved.
Updated the frontend API call to use the correct path `/api/v1/slack/:connectorId/discover-channels` instead of the previous incorrect path.
This change ensures the frontend aligns with the backend routing structure for fetching Slack channels where the bot is a member.
Addresses a 404 error you reported when attempting to discover Slack channels.
Replaced mock data in the Slack connector's channel management UI with a real API call to the backend.
- Implemented `discoverSlackChannelsAPI` in the `useConnectorEditPage` hook to fetch channels from `/api/search-source-connectors/slack/:connectorId/discover-channels`.
- Updated the `handleDiscoverChannels` function in `EditConnectorPage` to use this new API function.
- Ensured consistent `SlackChannelInfo` type usage.
This fixes a bug where incorrect Slack channel names were displayed due to the UI using stale mock data instead of actual data reflecting the bot's true channel memberships.