Skip to content

Conversation

@Jengkuen
Copy link
Contributor

No description provided.

Jengkuen added 29 commits May 28, 2025 16:05
- Introduced `logout_slack` action in Slack UI actions.
- Implemented logout endpoint to clear user tokens and redirect.
- Updated UI components to handle Slack authentication status and logout actions.
- Adjusted base and antispace URLs for local development.
- Enhanced user experience with detailed messages on authentication status and available commands.
- Introduced `handlePageActions` and `handleWidgetActions` to manage specific actions related to page UI and widget functionalities.
- Implemented various functions for retrieving conversations, messages, and performing advanced searches with enhanced metadata.
- Updated `handleSlackActions` to route actions to the new page and widget handlers.
- Added utility functions for managing unread counts and recent messages in the widget context.
- Enhanced error handling and logging for better debugging and user feedback.
- Updated `package.json` to include new Slack-related dependencies.
- Refactored Slack action handlers for improved organization and separation of concerns.
- Consolidated messaging, conversation, and user management functionalities into dedicated modules.
- Enhanced parameter parsing and validation utilities for better request handling.
- Removed deprecated page and widget handlers, streamlining the codebase.
- Added comprehensive logging and error handling for improved debugging and user feedback.
- Renamed Slack action types and parameters to camelCase for consistency.
- Updated all references in the codebase to reflect the new naming conventions.
- Removed deprecated constants related to Slack functions to streamline the code.
- Enhanced error messages and user feedback for authentication actions.
- Introduced new actions for executing Slack functions and natural language commands with rate limiting bypassed.
- Enhanced the Slack UI to support direct function execution and natural language command parsing.
- Updated type definitions to include new actions and parameters.
- Implemented utility functions for parsing natural language commands and executing functions directly.
- Improved result display in the widget for better user feedback.
…n Slack

- Added dependency for @google/generative-ai to enhance command parsing capabilities.
- Updated parseNaturalLanguageCommand function to utilize AI for understanding user commands, replacing hardcoded patterns.
- Improved error handling and fallback mechanisms for command parsing.
- Adjusted related functions to support new AI-driven parsing logic.
- Updated `joinConversation` and `leaveConversation` functions to accept both channel IDs and names.
- Improved error handling for non-existent channels, providing user-friendly messages.
- Adjusted related documentation and descriptions to reflect the new functionality.
- Updated `getMessages`, `sendMessage`, `updateMessage`, `deleteMessage`, and `getMessagePermalink` functions to accept both channel names and IDs.
- Introduced a new utility function `resolveChannelNameToId` for resolving channel names to IDs.
- Improved error handling for non-existent channels, providing user-friendly messages.
- Updated related documentation and descriptions to reflect the new functionality.
- Introduced new interaction functions: addReaction, removeReaction, getMessageReactions, pinMessage, unpinMessage, and listPinnedMessages.
- Updated existing functions to use a consistent parameter naming convention, replacing 'channel' with 'channelIdentifier'.
- Improved error handling and logging for better user feedback and debugging.
- Added utility functions for resolving conversation and user identifiers.
- Updated documentation to reflect new functionalities and parameter changes.
…ndler

- Added checks for empty request body and invalid JSON parsing, with appropriate logging.
- Enhanced acknowledgment response to Slack and implemented asynchronous event processing.
- Improved logging for event processing failures to aid debugging.
- Introduced new event processing files: `message.ts`, `user.ts`, and `router.ts` for handling Slack events.
- Implemented a basic message event handler with logging and placeholder for future storage integration.
- Created an event router to manage routing of various Slack events to their respective handlers.
- Updated event types in `events.ts` to support additional properties for message and channel events.
- Enhanced the Slack events handler to route events to the new processing structure.
- Updated Slack event processing to integrate with a PostgreSQL storage layer, replacing the previous JSON file-based database.
- Added new storage initialization and message handling capabilities, allowing for better event management and data persistence.
- Refactored user management functions to utilize the new storage system, including user retrieval and token management.
- Improved message event handling with additional logging and error handling for better debugging and reliability.
- Removed outdated file-based database implementation to streamline the codebase.
- Introduced a new storage module with PostgreSQL integration, including interfaces for user and conversation management.
- Implemented the PostgreSQL connection class to handle database interactions and connection pooling.
- Created a data store class for managing Slack data operations, including user and conversation CRUD functionalities.
- Added a schema definition for the PostgreSQL database to support the new storage structure.
- Enhanced the event queue interface for reliable processing of Slack events with retry logic.
- Established a clear separation of concerns with well-defined interfaces for data operations.
- Made `slackUserId` optional in message interfaces to accommodate bot and system messages.
- Enhanced message event processing to handle various message types, including bot messages and deletions.
- Updated logging for better traceability of message events.
- Moved storage interfaces and database types to a new cache module for improved organization.
- Adjusted SQL schema to allow nullable `slack_user_id` for bot and system messages.
…interfaces

- Introduced a new test script for optimized message processing to validate reduced database queries.
- Deleted outdated cache module files and moved relevant interfaces and types to a new storage module for better organization.
- Updated message handling to utilize the new storage structure, ensuring lightweight caching and improved performance.
- Enhanced event processing with a focus on minimal database interactions for efficiency.
- Implemented handling for `reaction_added` and `reaction_removed` events in the event router.
- Updated user retrieval to include user ID alongside anti ID for better data management.
- Enhanced PostgreSQL data store with methods to add and remove message reactions, ensuring proper database interactions.
- Updated Slack OAuth scopes to include necessary permissions for handling reactions.
- Improved logging for reaction event processing to facilitate better debugging and traceability.
- Introduced new cache management endpoints for user cache status, refresh, and cleanup operations.
- Implemented user activity tracking to extend cache sessions, enhancing session management.
- Added automatic cleanup scheduler for inactive users, running every hour to maintain data integrity.
- Enhanced PostgreSQL data store with methods for cache status retrieval and user activity management.
- Improved error handling and logging for cache operations to facilitate better debugging and traceability.
- Introduced a new data synchronization module, including a pull engine and sync orchestrator for efficient data retrieval from Slack.
- Enhanced cache management by integrating real-time data pulls during user cache refresh and widget data access.
- Added support for background synchronization to ensure up-to-date data availability without blocking user interactions.
- Updated PostgreSQL data store with methods for batch storing messages and conversations, improving sync efficiency.
- Implemented a sync state tracking system to monitor synchronization progress and handle errors effectively.
- Enhanced logging for synchronization processes to facilitate better debugging and traceability.
…mponents

- Introduced a new `readState.ts` processor to handle read state events, updating unread counts when users mark conversations as read.
- Updated the event router to integrate the new read state handling with database updates.
- Added live widget UI components for real-time conversation updates, including loading, error, and empty states.
- Implemented a live widget service for optimized data fetching and sync status checking, enhancing user experience with automatic refresh capabilities.
- Refactored existing widget UI to support live data and improved user interactions.
- Updated all data store methods to consistently use `userUuid` instead of `userId` for improved performance and clarity.
- Modified widget data retrieval to reflect recent conversations instead of unread ones.
- Enhanced error logging and handling across various data operations to ensure better traceability.
- Adjusted SQL queries to align with the new user ID standard, optimizing database interactions.
- Integrated SlackDataPullEngine into SlackSyncOrchestrator for improved data retrieval during user cache refresh and widget data access.
- Updated refreshUserCache and getWidgetData functions to support incremental sync options.
- Enhanced conversation handling in the UI to display direct messages and channels separately, improving user experience.
- Implemented accurate unread count calculations and read state updates based on enhanced Slack API data.
- Refactored LiveConversationList and liveWidgetService for better organization and functionality, including new quick action capabilities.
- Introduced a new SQL query to display unread messages, providing insights into unread counts and states for users and conversations.
- Implemented a reconciliation process for unread counts during server startup to address data inconsistencies.
- Enhanced the cleanup scheduler to trigger unread count reconciliation, ensuring accurate data upon server initialization.
- Added UI components for users to manually trigger unread count reconciliation, improving user experience and data accuracy.
- Updated PostgreSQL data store methods to handle unread counts more effectively, including cases with NULL last_read_ts.
- Added routing for authentication actions in the natural language command execution, allowing for specific handling of authentication-related functions.
- Introduced a helper function to identify authentication actions, improving code organization and clarity.
- Updated the command parsing documentation to include new authentication status checks, enhancing user guidance for Slack commands.
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.

2 participants