Repository navigation
fix(igpsport): refresh changed planned workouts - #1
KirillSugonyakin wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f2e6cc60a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| on_igpsport | ||
| and old_record | ||
| and old_record.get("export_fingerprint") == fingerprint | ||
| and not event_rebound | ||
| and not config.force_resync |
There was a problem hiding this comment.
Persist the new workout records in the GUI
When uploads are launched from the GUI, src/intervalssync/gui/sync_view.py:280-295 still passes only uploaded_workouts and saves only uploaded_map through the legacy helper, while AppConfig has no workout_records. Every mapped live workout is therefore reconstructed with a null fingerprint, so this equality never holds on subsequent GUI runs and each click rewrites all planned workouts. For a deleted remote workout, the replacement is returned only through synced_map/recreated, so the GUI retains the obsolete ID and creates another copy on every run; the GUI needs to persist and apply the authoritative record state.
Useful? React with 👍 / 👎.
Changed Intervals workouts were previously skipped whenever a mapped iGPSPORT ID still existed, so Restortrain edits and replacement event IDs never reached the device. This change persists a hashed logical identity and normalized export fingerprint, updates changed plans in place, and recreates a manually deleted workout only while it remains in the active calendar window.
It also makes [skip-igp] the sole suppression marker, prefers the event description, follows explicit step classifications, validates complete remote discovery before writes, and reports updated, recreated, conflicted, and truncation counters.
Validation: uv run pytest -q -p no:cacheprovider (274 passed).
This PR is stacked on the activity-idempotency branch so it stays separate from upstream PR jorge-huxley#58. It can be rebased onto master after jorge-huxley#58 lands.