Remove timestamps from GitHub backup files for cleaner diffs

- Remove created_at from backup_metadata.json
- Remove exported_at from K-profile files
 - Remove exported_at from cloud profile files (filament, printer, process)
- Remove exported_at from app settings backup
- Git already tracks file modification history, so these were redundant
- Backups now only show changes in git diff when actual data changes
This commit is contained in:
maziggy
2026-01-29 08:27:20 +01:00
parent e74d5be4b8
commit 18fbd9c156
2 changed files with 5 additions and 8 deletions
+4
View File
@@ -130,6 +130,10 @@ All notable changes to Bambuddy will be documented in this file.
- Both settings persist in localStorage
- Tooltip shows full name on hover
- **K-Profiles Backup Status** - Fixed GitHub backup settings showing incorrect printer connection count (e.g., "1/2 connected" when both printers are connected); now fetches status from API instead of relying on WebSocket cache
- **GitHub Backup Timestamps** - Removed volatile timestamps from GitHub backup files so git diffs only show actual data changes
### Maintenance
- Upgraded vitest from 2.x to 3.x to resolve npm audit security vulnerabilities in dev dependencies
## [0.1.6b11] - 2026-01-22
+1 -8
View File
@@ -309,13 +309,11 @@ class GitHubBackupService:
}
"""
files: dict[str, dict | list] = {}
now = datetime.now(UTC)
# Metadata file
# Metadata file (no timestamps - git tracks file history)
metadata = {
"version": "1.0",
"backup_type": "bambuddy_profiles",
"created_at": now.isoformat(),
"contents": {
"kprofiles": config.backup_kprofiles,
"cloud_profiles": config.backup_cloud_profiles,
@@ -365,7 +363,6 @@ class GitHubBackupService:
"printer_name": printer.name,
"printer_serial": serial,
"nozzle_diameter": nozzle,
"exported_at": datetime.now(UTC).isoformat(),
"profiles": [
{
"slot_id": p.slot_id,
@@ -425,21 +422,18 @@ class GitHubBackupService:
if filament_settings:
files["cloud_profiles/filament.json"] = {
"version": "1.0",
"exported_at": datetime.now(UTC).isoformat(),
"profiles": filament_settings,
}
if printer_settings:
files["cloud_profiles/printer.json"] = {
"version": "1.0",
"exported_at": datetime.now(UTC).isoformat(),
"profiles": printer_settings,
}
if process_settings:
files["cloud_profiles/process.json"] = {
"version": "1.0",
"exported_at": datetime.now(UTC).isoformat(),
"profiles": process_settings,
}
@@ -462,7 +456,6 @@ class GitHubBackupService:
files["settings/app_settings.json"] = {
"version": "1.0",
"exported_at": datetime.now(UTC).isoformat(),
"settings": settings_data,
}