SurfSense/surfsense_web/app
google-labs-jules[bot] d1f11d4fbb feat: Enhance Slack Connector Functionality
I've implemented several improvements and new features for the Slack connector,
addressing your requirements for more granular control over indexing
and data synchronization.

Key changes include:

Backend (`surfsense_backend`):
- I've updated the `SearchSourceConnector` schema for Slack to include new
  configuration options:
    - `slack_periodic_indexing_enabled` (boolean)
    - `slack_periodic_indexing_frequency` (string: "daily", "weekly", "monthly")
    - `slack_max_messages_per_channel_periodic` (integer)
- I've modified the `index_slack_messages` task:
    - It now supports on-demand re-indexing of specific `target_channel_ids`.
    - It allows `force_reindex_all_messages` to override `last_indexed_at`
      for specified channels, using initial indexing settings or custom
      date ranges (`reindex_start_date_str`, `reindex_latest_date_str`).
    - It uses `slack_max_messages_per_channel_periodic` for regular
      periodic updates.
- I've updated the Slack Connector Routes:
    - The `/slack/{connector_id}/reindex-channels` endpoint now accepts
      `channel_ids`, `force_reindex_all_messages`, `reindex_start_date`,
      and `reindex_latest_date` to trigger targeted re-indexing.
    - The main `/connector/{id}/index` endpoint for Slack can now accept
      `force_full_reindex` to re-index all configured channels from scratch.

Frontend (`surfsense_web`):
- I've created `EditSlackConnectorConfigForm.tsx` to provide a dedicated UI
  for Slack connector settings, including the new periodic indexing fields.
- I've integrated this form into the main connector editing page
  (`.../connectors/[connector_id]/edit/page.tsx`).
- I've enhanced the Slack connector edit page with a "Channel Management" tab:
    - UI for discovering Slack channels via `/api/v1/slack/{id}/discover-channels`.
    - Allows selection of channels to be saved into
      `config.slack_selected_channel_ids` when membership filter is "selected".
    - UI for triggering on-demand re-indexing of selected channels via
      `/api/v1/slack/{id}/reindex-channels`, with options for forcing
      full re-index and specifying date ranges.
- I've updated the `useSearchSourceConnectors.ts` hook:
    - I've added the `discoverSlackChannels` function.
    - I've added the `reindexSlackChannels` function with parameters for
      channel IDs, force flag, and date ranges.

These changes fulfill your requirements for:
1. Configurable Membership/Join Behavior (via existing `slack_membership_filter_type` and new channel selection UI).
2. Configurable Periodic Indexing (new backend schema and UI fields).
3. Granular Channel Selection (new UI for discovering and selecting channels).
4. On-Demand Re-index (new backend and UI capabilities for specific channels).
5. Initial Indexing Timestamp Range (I've verified existing backend logic and UI).
2025-05-28 09:36:25 +00:00
..
api/search feat: Added FumaDocs 2025-04-22 02:24:13 -07:00
auth/callback feat: monorepo 2025-04-07 23:47:06 -07:00
dashboard feat: Enhance Slack Connector Functionality 2025-05-28 09:36:25 +00:00
docs feat: Added FumaDocs 2025-04-22 02:24:13 -07:00
login fix: Added Suspense boundary in Login Page 2025-05-21 21:13:56 -07:00
privacy web: Added privacy and terms pages. 2025-04-09 19:10:00 -07:00
register feat: Removed Hard Dependecy on Google Auth 2025-05-21 20:56:23 -07:00
terms web: Added privacy and terms pages. 2025-04-09 19:10:00 -07:00
favicon.ico feat: monorepo 2025-04-07 23:47:06 -07:00
globals.css feat: Code Block Syntax Highlighting & Copy Func 2025-05-19 23:19:20 -07:00
layout.config.tsx feat: Added FumaDocs 2025-04-22 02:24:13 -07:00
layout.tsx updated seo 2025-05-14 01:22:25 +05:30
page.tsx feat: monorepo 2025-04-07 23:47:06 -07:00
sitemap.ts Fix #66: Created sitemap 2025-05-07 16:19:04 +05:30