feat(youtrack): add YouTrack provider support and issue/sync improvements - #16
Merged
Conversation
…cements - Added new functions for listing, saving, and validating provider connections, supporting both GitLab and YouTrack. - Introduced the YouTrackAuthPanel component for managing YouTrack connections, enhancing the setup and settings pages. - Updated existing components to utilize provider-neutral logic, improving maintainability and user experience. - Enhanced the IssueHubPage and related components to display provider-specific information, including badges for origin visibility. - Refactored tests to cover new functionalities and ensure compatibility with the updated provider management features.
…nctionalities - Implemented new methods for loading issue details, creating, updating, and deleting comments, and logging time in YouTrack. - Added support for fetching issue activity pages and managing issue metadata updates. - Refactored the Tauri service to integrate YouTrack functionalities, allowing seamless interaction with YouTrack issues. - Updated existing components to utilize the new YouTrack client, improving overall issue management capabilities. - Enhanced error handling for YouTrack API interactions to provide clearer feedback on failures.
…sues fetching - Added methods to fetch recent closed assigned issues and all closed assigned issues, improving issue management capabilities. - Updated the sync function to incorporate fetching and syncing of recent and all closed issues, enhancing data handling. - Refactored existing code to streamline the process of managing open and closed issues, ensuring better integration with the YouTrack API. - Improved error handling for API interactions related to fetching closed issues, providing clearer feedback on failures.
- Introduced a new `YouTrackWorkItem` struct to represent work items fetched from YouTrack. - Implemented `fetch_issue_work_items` method in `YouTrackClient` to retrieve work items associated with specific issues. - Enhanced the `sync_youtrack` function to sync work items for both open and recently closed issues, improving data consistency. - Added utility functions for date formatting to streamline work item data processing. - Updated synchronization logic to track the number of entries and issues synced, providing better feedback on the sync process.
- Introduced tests for `resolve_state` to ensure it correctly uses the state custom field. - Added tests for `build_status_options` to verify inclusion of current state in options. - Implemented a test for `to_iso_date` to confirm proper date formatting. - Added a test for `YouTrackClient` to ensure the base URL is normalized with the scheme.
… deduplication - Introduced tests for `bucket_for_closed_issue` to verify correct categorization of closed issues based on cutoff dates. - Added a test for `dedupe_strings` to ensure proper trimming, sorting, and removal of empty values. - Implemented a helper function `make_record` to facilitate test data creation for assigned issues.
…ndling - Introduced a new `merge_youtrack_assigned_records` function to consolidate open, recent closed, and all closed issue records into a single structure, improving synchronization efficiency. - Updated the `sync_youtrack` function to utilize the merged records, reducing code duplication and enhancing clarity. - Added unit tests to verify the prioritization logic in the merging process, ensuring correct categorization of issues based on their status.
…lity function - Updated the `sync_youtrack` function to utilize a new helper function `calc_youtrack_issues_synced`, enhancing clarity and maintainability of the issue synchronization logic. - Added unit tests for `calc_youtrack_issues_synced` to verify correct addition of assigned and work item rows, including saturation handling for overflow cases.
- Added `compose_youtrack_sync_result` function to encapsulate the creation of `SyncResult`, improving code clarity and maintainability. - Updated `sync_youtrack` to utilize the new function, streamlining the synchronization logic. - Added unit tests for `compose_youtrack_sync_result` to ensure consistent field mapping and saturation handling.
…aging - Replaced direct checks for GitLab and YouTrack tokens with a utility function `has_active_provider_token`, improving code readability and maintainability. - Introduced a new function `no_active_provider_error_message` to centralize error message generation for inactive provider connections. - Added unit tests to verify the functionality of the new utility functions, ensuring consistent behavior across provider checks.
… functions - Replaced hardcoded sync start messages for GitLab and YouTrack with a new utility function `sync_start_message`, improving code maintainability. - Added a new function `youtrack_issue_counts_message` to format YouTrack issue count messages, enhancing clarity in progress reporting. - Included unit tests for both utility functions to ensure consistent output and stability.
…anagement UI - Introduced `ProviderConnectionRow` component to manage connections for GitLab and YouTrack, enhancing user experience for connecting and disconnecting providers. - Updated `YouTrackAuthPanel` and `GitLabAuthPanel` to integrate with the new connection management UI, allowing for better handling of authentication and connection states. - Enhanced localization support for connection messages and button labels, improving accessibility for users in different languages. - Added unit tests for the new components to ensure functionality and reliability in connection management.
- Introduced provider filtering functionality in the Assigned Issues Board, allowing users to filter issues by selected provider (e.g., GitLab, YouTrack). - Updated UI components to include provider selection options, enhancing user experience and accessibility. - Implemented necessary state management and query adjustments to support provider-specific issue retrieval. - Added unit tests to ensure the correct behavior of the new filtering feature and its integration with existing functionalities.
- Eliminated debug logging and related functions from the `load_assigned_issues_page` method to streamline code and improve maintainability. - Removed unused functions for provider account and assigned work items debug summaries, reducing clutter in the codebase. - Simplified the logic for loading assigned issues by focusing on essential functionality.
… coverage - Refactored the logic for matching assigned issue statuses by introducing dedicated functions for open and closed status checks, improving code clarity and maintainability. - Added unit tests to validate the new status matching logic, ensuring accurate filtering based on assigned bucket and state. - Removed unused debug logging and functions across various services, reducing code clutter and enhancing overall readability.
- Added new localization strings for slow sync warnings and additional issue statuses (Blocked) in English, Spanish, and Portuguese. - Updated the `buildOptimisticIssueDetails` function to include new fields such as start date, due date, and project details for better issue tracking. - Enhanced the `IssueDetailsSidebarSection` to display additional metadata fields, improving the user interface for issue details. - Refactored the workflow status handling to include new statuses and updated the UI components accordingly. - Improved test coverage for the `AssignedIssuesBoard` and related components to ensure accurate rendering and functionality with the new features.
…erience - Implemented a slow sync warning toast that triggers after 20 seconds if the sync process is still ongoing, enhancing user awareness during prolonged operations. - Updated localization strings for slow sync warnings in English, Spanish, and Portuguese to ensure consistent messaging across different languages. - Refactored the YouTrack client structure to introduce a new `YouTrackUser` type, improving user data handling.
- Improved slow sync notifications by implementing a dynamic toast system that provides user feedback based on the current sync provider (GitLab or YouTrack) and the duration of the sync process. - Updated localization strings for slow sync warnings in English, Spanish, and Portuguese to ensure consistent messaging across different languages. - Introduced a retry mechanism for GitLab requests with exponential backoff to handle transient errors, enhancing the robustness of the sync process. - Refactored the GitLab client to utilize the new request execution function, improving error handling and code maintainability.
…itLab - Introduced a comprehensive set of localized toast messages for slow sync notifications in English, Spanish, and Portuguese, enhancing user feedback during prolonged sync operations. - Expanded the messaging system to include humorous and engaging notifications, improving user experience while waiting for sync completion. - Updated the existing toast notification system to accommodate the new messages, ensuring consistent and dynamic user feedback across different sync providers.
- Eliminated extensive debug logging from the `execute_youtrack_request` function to streamline the code and enhance readability. - Simplified the request handling logic by removing unnecessary log statements while maintaining error handling functionality. - This change improves maintainability and reduces clutter in the codebase.
…handling - Updated SQL query in `load_issue_breakdown` to group by `te.work_item_id`, ensuring accurate aggregation of time entries for the same issue on a given day. - Introduced `YouTrackUserWorkItem` struct to encapsulate user work item details, improving data management and clarity in the sync process. - Refactored `persist_youtrack_user_work_items` function to streamline the insertion of user work items into the database, enhancing maintainability and readability. - Improved error handling and logging in the YouTrack request execution process, ensuring robust performance during API interactions.
…ages - Introduced a new `internal/app-store-sync-actions.ts` file to manage sync progress and notifications for YouTrack and GitLab. - Added localized toast messages for slow sync notifications in English, Spanish, and Portuguese, enhancing user feedback during prolonged sync operations. - Created a `sync-progress-messages.json` file to store and manage sync-related messages, improving maintainability and localization support. - Refactored existing sync logic to utilize the new message system, ensuring consistent user experience across different sync providers. - Enhanced error handling and logging during sync operations to improve robustness and user awareness.
- Deleted the `frontend-skill` entry from `skills-lock.json`, streamlining the skills list. - Removed the `LICENSE.txt`, `SKILL.md`, and `openai.yaml` files associated with the `frontend-skill`, cleaning up unused resources and documentation. - This change helps maintain a more focused and relevant skill set within the project.
- Switch from single-row grid to two-row flex layout - Move search input to its own row - Wrap filter controls in a flex-wrap row - Remove grid-specific justify-self utilities - Move 'all' to first position in status options
…pping, expand hash fallback to 7 tones
…hot, wire into list row
… to reflect new default value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
npm run test— all 655 tests pass