Add self-hosted profile synchronization via Git/WebDAV #177

Open
opened 2026-04-05 16:18:48 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @loss-and-quick on 3/24/2026

Description

This PR implements self-hosted synchronization and backup capabilities for OrcaSlicer profiles and projects, addressing the lack of centralized configuration management.

Key Features Added:

  • Self-hosted Git synchronization using libgit2 for version-controlled profile storage
  • WebDAV synchronization as an alternative storage backend
  • Automatic conflict detection with manual resolution dialogs
  • Configurable sync settings including optional Git token authentication
  • UI integration in Preferences menu for enabling/disabling sync features
  • Field-level merge optimization to reduce unnecessary conflicts

What Issue This Addresses:
OrcaSlicer previously lacked a built-in mechanism for synchronizing user profiles, printer settings, and project configurations across multiple devices. Users had to manually copy configuration files or rely on third-party sync solutions, risking data loss and inconsistency.

New Dependencies:

  • Added libgit2 as a vendored dependency (in deps/LIBGIT2/)
  • Updated CMake configurations to detect and link against libgit2
  • No breaking changes to existing functionality; feature is opt-in

Breaking Changes & Considerations:

  • None - the feature is completely optional and disabled by default
  • Existing local-only usage remains unchanged
  • Settings migration is handled automatically for existing users upgrading from previous versions

Screenshots/Recordings/Graphs

image image image

Tests

Unit Tests:

  • Added tests/slic3rutils/test_webdav_sync.cpp for WebDAV synchronization verification
  • Tests cover connection handling, upload/download operations, and error scenarios

Integration Testing (Recommended for Manual Verification):

  1. Git repository workflow:

    • Automatic repository creation when sync is enabled
    • Profile upload/download cycles between devices
    • Branch creation and remote tracking
    • Authentication token handling (when configured)
  2. Conflict resolution scenarios:

    • Simultaneous edits to same profile on different devices
    • Field-level merge dialog appearance and functionality
    • Manual conflict resolution preserving user intent
  3. WebDAV backend:

    • Connection establishment and credential handling
    • File upload/download with various profile sizes
    • Error handling for network issues and auth failures
  4. UI integration:

    • Preferences panel accessibility and setting persistence
    • Sync status indicators in main window
    • Notification system for sync events and conflicts

Note: As this is a draft PR, comprehensive automated test coverage is still in progress. Community testing of the sync functionality is encouraged before final release.

*Originally created by @loss-and-quick on 3/24/2026* # Description This PR implements self-hosted synchronization and backup capabilities for OrcaSlicer profiles and projects, addressing the lack of centralized configuration management. **Key Features Added:** - Self-hosted Git synchronization using libgit2 for version-controlled profile storage - WebDAV synchronization as an alternative storage backend - Automatic conflict detection with manual resolution dialogs - Configurable sync settings including optional Git token authentication - UI integration in Preferences menu for enabling/disabling sync features - Field-level merge optimization to reduce unnecessary conflicts **What Issue This Addresses:** OrcaSlicer previously lacked a built-in mechanism for synchronizing user profiles, printer settings, and project configurations across multiple devices. Users had to manually copy configuration files or rely on third-party sync solutions, risking data loss and inconsistency. **New Dependencies:** - Added libgit2 as a vendored dependency (in deps/LIBGIT2/) - Updated CMake configurations to detect and link against libgit2 - No breaking changes to existing functionality; feature is opt-in **Breaking Changes & Considerations:** - None - the feature is completely optional and disabled by default - Existing local-only usage remains unchanged - Settings migration is handled automatically for existing users upgrading from previous versions # Screenshots/Recordings/Graphs <img width="531" height="357" alt="image" src="https://github.com/user-attachments/assets/5a408f1b-d96e-4075-b8af-145c37507591" /> <img width="484" height="52" alt="image" src="https://github.com/user-attachments/assets/870d8f57-2b85-41f5-9596-c2416d267278" /> <img width="1077" height="648" alt="image" src="https://github.com/user-attachments/assets/e3db05c1-946a-45e5-83c3-065c031fe739" /> ## Tests <!-- > Please describe the tests that you have conducted to verify the changes made in this PR. --> **Unit Tests:** - Added `tests/slic3rutils/test_webdav_sync.cpp` for WebDAV synchronization verification - Tests cover connection handling, upload/download operations, and error scenarios **Integration Testing (Recommended for Manual Verification):** 1. Git repository workflow: - Automatic repository creation when sync is enabled - Profile upload/download cycles between devices - Branch creation and remote tracking - Authentication token handling (when configured) 2. Conflict resolution scenarios: - Simultaneous edits to same profile on different devices - Field-level merge dialog appearance and functionality - Manual conflict resolution preserving user intent 3. WebDAV backend: - Connection establishment and credential handling - File upload/download with various profile sizes - Error handling for network issues and auth failures 4. UI integration: - Preferences panel accessibility and setting persistence - Sync status indicators in main window - Notification system for sync events and conflicts **Note:** As this is a draft PR, comprehensive automated test coverage is still in progress. Community testing of the sync functionality is encouraged before final release.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#177