Skip to content

[P2] Activity import completion summary omits positive steps on Swift #91

Closed
ryanbr/noop
#1477

Description

@bhelm

Summary

Activity-file import completion text violates its explicit Swift/Kotlin parity and honest-summary contract when an activity carries positive steps. Kotlin appends the step count; Swift omits it.

This is display/public-contract drift only. Parsed steps, workout persistence, daily aggregation, and the separate per-workout import note remain intact.

Exact reproduction

Use the same normalized activity on both platforms:

  • sport: walking
  • distance: 1000 m
  • GPS points: 0
  • HR samples: 0
  • average HR: null

Exact outputs:

steps Swift Kotlin
null Imported a 1.00 km Walking activity Imported a 1.00 km Walking activity
0 Imported a 1.00 km Walking activity Imported a 1.00 km Walking activity
2350 Imported a 1.00 km Walking activity Imported a 1.00 km Walking activity · 2350 steps

The mismatch is present on exact meta032 032983d and current upstream main b0d8a29.

Cause and provenance

The activity-step work in upstream PR ryanbr#489 / commit eddfd68 added the steps field and updated both per-workout import-note formatters. It also added positive-step rendering to Kotlin ActivityFileImporter.summaryText, but the separate Swift ActivityFileImporter.summaryText formatter remained unchanged.

Swift FIT parsing does produce positive steps for walking, running, and hiking, and DataSourcesView calls the public summaryText after persistence. Android importAndPersist returns Kotlin summaryText and its UI exposes ImportSummary.message. The branch is therefore production reachable on both platforms.

Severity

P2: a user-visible completion line and an explicitly documented public parity contract diverge. The Swift completion message understates what the file carried, but the step data itself is not lost or corrupted.

No direct public summaryText tests currently pin null, zero, or positive steps.

Duplicate search

Fork and upstream issues and pull requests were searched open and closed for summaryText, positive steps, imported activity steps, FIT steps, and activity-file summary terms. No exact duplicate was found.

Related but non-duplicate history:

Acceptance criteria

  • Add mirrored public tests for steps null, 0, and 2350 using the exact activity above.
  • Null and zero remain exactly Imported a 1.00 km Walking activity on both platforms.
  • Positive steps become exactly Imported a 1.00 km Walking activity · 2350 steps on both platforms.
  • Preserve field order, separators, distance formatting, sport normalization, and existing GPS/HR/average-HR output.
  • Keep the change display-only; do not alter parsing, persistence, daily aggregation, or per-workout notes.
  • Route the production fix upstream-only from a fresh origin/main worktree; do not transplant production code into the fork harness.
  • Run Native or broader gates only after explicit GO.

Activity

  1. bhelm commented on Aug 21, 2026

    @bhelm
    OwnerAuthor

    Resolved upstream by ryanbr/noop#1477, merge commit c821c40a, which is contained in current upstream main. The merged fix includes regression coverage and passed upstream CI. Closing as completed.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions