Skip to content

Fix the confirmed bugs from the 3.0.5 check (#66) - #67

Merged
sayed0am merged 24 commits into
developfrom
fix/issue-66
Nov 12, 2026
Merged

sayed0am merged 24 commits into
developfrom
fix/issue-66

Conversation

@sayed0am

Copy link
Copy Markdown
Owner

Fixes the confirmed items from #66. Each one was checked against the 3.0.5 code before it was fixed.

Fixed

Urgent

  • U1 A workout restored after the app was killed takes its last moment from everything stored (heart rate, kept route, sets, rounds, laps, pauses), not heart rate alone. An end the app works out that would still leave under a minute no longer deletes it: it records on, or comes back paused, for the wearer to end. End tapped then ends it where it was recorded to.
  • U2 + I12 Step badges and the most steps best are worked out with no workouts at all, and again after every sync. Deleting the last workout takes its bests and its week with it. Earned badges stay, as before.
  • U4 A workout summary that can't be read is left out and the loop goes on to the next one, as Zepp's does (it only parses after its loop). The STARTs sent are the same. A failed detail still stores nothing, since Zepp's receiver drops what a failed job fetched.

Important

  • I1 Deleting a phone workout takes its exercise session and distance out of Health Connect.
  • I3 Steps walked before GPS finds its first fix stay in the distance.
  • I4 Trim and undo work the fastest 1k, 5k and 10k out again from the kept route.
  • I5 The weekly recap shows the streak line only on a week that met the goal.
  • I6 A history chunk whose size doesn't fit, or whose records can't be read, now fails its type, so the sync no longer says Done. Traffic is unchanged.

Minor and found during the check

  • M3 A rewards error keeps the page it had and tries again, instead of Loading for ever.
  • M4 A rest is ended under the lock and never while paused, so a set started or +10 s tapped at the same moment wins.
  • M7 A calorie goal the strap refuses is sent again on the next connect.
  • M9 Alarms and health settings are read separately, so one failing doesn't hide the other.
  • M10 Migration 31 to 32 clears sleep edits left by the deleted minute nights. It only touches main sleep edits from 20 October to 12 November 2026, when those nights existed.
  • M12 The oldest of the 14 nights reads its readings from the evening it began.
  • M15 An estimate a week old says it updates weekly, not "next in 0 days".
  • M18 Auto backup keeps the day's earlier backup until the new one is in place.
  • A failed alarm write's message no longer disappears when a refresh was queued behind it.

Not in this PR

  • I9 (Activity week view): active minutes only exist for the 14 days ending on the day shown, so it needs a change to RecoveryEngine or a stored daily metric. Left for a decision.
  • U3, I7, I8, I10, M1, M2, M5, M6, M8, M11, M13, M14, M16, M17: intended behaviour, Zepp's own, or too narrow to change now.

Checks

  • :protocol:test :app:testDebugUnitTest :app:lintDebug :app:detektDebug :protocol:detektMain pass locally.
  • On the phone as a 3.0.6 debug build: the database moved to 32 with integrity ok, the sync after install finished with no failed types, most steps went from a stale 2,160 to 4,653, the best of a deleted workout is gone, and the alarms and health alerts pages both load.
  • Not tried on the strap: a workout restore after a kill, rest while paused, GPS distance at the first fix, the recap streak and the Healthspan text. Those are covered by unit tests only.

🤖 Generated with Claude Code

sayed0am and others added 24 commits November 13, 2026 00:11
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t next in 0 days

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n place

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d again on the next connect

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s first fix, not dropping when it does

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…erse; each page shows its own read error

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ind it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…one left by a deleted minute night can't move or hide a real strap night

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…session and distance

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ure, SpO2 and breathing from the evening it began, not from that day's midnight

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gain from its kept route

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e last workout deleted takes its bests

The rewards were only worked out with a workout in the list, so with none recorded the step badges and the most
steps never came, and deleting the only workout left its bests and its week as they were. Now an empty list waits
only while workouts are stored (the list still loading). The refresh also runs after each sync, which writes the
days' steps. The rewards page shows what it had when working it out fails, and tries again, instead of Loading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rlier backup, as before

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er side of it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…made for, and tests follow version 32 and the alarms read error

The cleanup took any edit with no session near, which reached nap edits and old databases' edits that other
migrations keep. Now it only touches main sleep edits from 20 October to 12 November 2026.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st never ends while paused

A restored workout took its last moment from its heart rate only, so one recorded without the strap was ended at
its start and deleted with its route. Its last moment now comes from everything stored: heart rate, kept route,
sets, rounds, laps and pauses. An end the app works out that would still leave under a minute doesn't end it: it
records on (or comes back paused) for the wearer to end or delete, and End tapped then ends it where it was
recorded to. A rest is now ended under the lock on the state as it is, never while paused, so a set started or
+10 s tapped meanwhile wins and the rest over cue only plays for a rest it ended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…at can't be read fails its type

A workout summary the parser couldn't read ended the workout loop with nothing stored, so every later sync
stopped at the same workout and no new one came. Zepp keeps the raw bytes and parses after its loop, so one it
can't read never stops it: now it is left out and the loop goes on, asking the same STARTs as before. A failed
detail still stores nothing, as Zepp's receiver drops what a failed job fetched. A history chunk whose size
doesn't fit, or whose records can't be read, still ends its type but now fails it, so the sync no longer says
Done while that type gets no further.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…finally for the backup, and the rest test on a strength workout

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sayed0am
sayed0am merged commit d1312a7 into develop Nov 12, 2026
5 checks passed
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