Skip to content

Conversation

@amer
Copy link

@amer amer commented Dec 10, 2025

This PR adds the ability to automatically import all pipelines from a CCTray XML feed URL and keep them synchronized as the feed changes.

Motivation

When monitoring a CI server with many pipelines, manually adding each one is tedious. Additionally, some CI servers have dynamic pipelines that are created and destroyed automatically (e.g., feature branch builds, ephemeral pipelines, or pipelines generated on-demand). Manually tracking these is impractical.

This feature allows users to point CCMenu at a CCTray feed URL and have all pipelines imported automatically. As projects are added or removed from the feed, CCMenu keeps the pipeline list in sync - adding new pipelines as they appear and optionally removing them when they're gone.

Features

  • Dynamic Feeds settings tab - Manage feed sources with enable/disable toggle
  • "All Projects" import mode - Available in the CCTray add pipeline sheet via segmented picker
  • Automatic sync - Dynamic feeds sync every 5 minutes (or 10x the poll interval, whichever is longer)
  • Manual sync - "Sync Now" button in settings for immediate updates
  • Configurable removal behavior - Choose whether to keep or remove pipelines when they disappear from the feed
  • Safe manual pipelines - Manually added pipelines are never removed by dynamic sync

Tests

  • DynamicFeedSourceTests - Source model serialization and properties
  • DynamicFeedSourceModelTests - Model persistence and CRUD operations
  • DynamicFeedSyncServiceTests - Sync logic including add/remove detection

All existing tests continue to pass.


Disclaimer: I'm not a Swift developer by trade. I used AI assistance to help implement this feature following TDD principles. I've tested it manually and all unit tests pass, but I welcome any feedback on Swift conventions or improvements to the implementation.

- Add DynamicFeedSource model for managing feed URLs
- Add DynamicFeedSourceModel for persistence to UserDefaults
- Add DynamicFeedSyncService for fetching and syncing pipelines
- Integrate dynamic feed sync into ServerMonitor
- Add Settings tab for managing dynamic feeds
- Add 'All Projects' import mode to CCTray sheet
- Add managedBySourceId property to Pipeline for tracking
- Add comprehensive unit tests for all new components
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant