Skip to content

fix(igpsport): refresh changed planned workouts - #1

Open
KirillSugonyakin wants to merge 1 commit into
codex/activity-idempotencyfrom
codex/workout-refresh
Open

KirillSugonyakin wants to merge 1 commit into
codex/activity-idempotencyfrom
codex/workout-refresh

Conversation

@KirillSugonyakin

Copy link
Copy Markdown
Owner

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +684 to +688
on_igpsport
and old_record
and old_record.get("export_fingerprint") == fingerprint
and not event_rebound
and not config.force_resync

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant