Skip to content

iOS Backup & Sync: mirror Android adjustable keep-count (default 7) - #5

Merged
ryanbr merged 1 commit into
mainfrom
snapshot-v8.2.2
Jul 7, 2026
Merged

ryanbr merged 1 commit into
mainfrom
snapshot-v8.2.2

Conversation

@ryanbr

@ryanbr ryanbr commented Jul 7, 2026

Copy link
Copy Markdown
Owner

What

Mirrors the Android keep-count work onto iOS so the Backup & Sync retention is at parity.

  • FolderBackup.keepCount: static let 10 → user-adjustable (UserDefaults-backed), default 7, options [1,3,5,7,10,14], clamped 1…100 (mirrors Android DEFAULT_KEEP/KEEP_OPTIONS/setKeepCount). prune() already reads it, so it now honours the choice.
  • BackupSyncView: a "Keep last snapshots" menu picker below the auto toggle, wired to keepCount; blurb shows the live count.

Intentionally NOT mirrored (platform difference)

The Android ~1am WorkManager anchor. iOS has no reliable timed background scheduler (BackgroundTasks is throttled), so it stays the existing on-launch catch-up — bounded to ≤1 backup per 24h by its guard, and the screen already says "runs when you next open NOOP". The Settings signpost also already exists on iOS.

Verification

Swift is CI-gated (no local compile on WSL) — the fork iOS + macOS build jobs passed on this branch (run 28836400030), which is the compile check.

Brings the iOS FolderBackup to parity with the Android keep-count work:
- FolderBackup.keepCount: static let 10 → user-adjustable (UserDefaults-backed) with default 7
  and keepOptions [1,3,5,7,10,14], clamped 1...100 (mirrors Android DEFAULT_KEEP + KEEP_OPTIONS +
  setKeepCount). prune() already reads keepCount, so it now honours the user's choice.
- BackupSyncView: a "Keep last snapshots" menu Picker wired to keepCount, below the auto toggle;
  the auto-backup blurb now shows the live count.

NOT mirrored (platform difference, not a gap): the Android ~1am WorkManager anchor. iOS has no
reliable daily background scheduler (BackgroundTasks is throttled), so it stays the existing
on-launch catch-up — the screen already says "runs when you next open NOOP". The Settings
signpost also already exists on iOS (the "Backup & Sync to a folder…" link in Backup & restore).

Swift is CI-gated (can't compile on WSL); the fork iOS build job is the compile check.
@ryanbr
ryanbr merged commit d7b540d into main Jul 7, 2026
4 checks passed
ryanbr pushed a commit that referenced this pull request Jul 9, 2026
fitnessReadyLead() returns an already-localized String (via
String(localized:)), but ReadinessChecklistCard.lead was typed
LocalizedStringKey?, which SwiftUI treats as a lookup key rather than
literal text. Retype to String? — Text(_:) accepts both, and this is
the correct type for pre-resolved copy.

Pre-existing break from commit 75a096a (PR #81), unrelated to this
branch's localization change; fixing here so PR #5's CI build passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
simoncad7 pushed a commit to simoncad7/noop that referenced this pull request Aug 17, 2026
iOS Backup & Sync: mirror Android adjustable keep-count (default 7)
simoncad7 pushed a commit to simoncad7/noop that referenced this pull request Aug 17, 2026
fitnessReadyLead() returns an already-localized String (via
String(localized:)), but ReadinessChecklistCard.lead was typed
LocalizedStringKey?, which SwiftUI treats as a lookup key rather than
literal text. Retype to String? — Text(_:) accepts both, and this is
the correct type for pre-resolved copy.

Pre-existing break from commit 75a096a (PR ryanbr#81), unrelated to this
branch's localization change; fixing here so PR ryanbr#5's CI build passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
bogaczcyprien-svg referenced this pull request in bogaczcyprien-svg/noop Oct 2, 2026
Live light-sleep-window waking (scanning stage in real time and picking the
buzz moment dynamically) needs the app actively monitoring BLE near the
window and a new strap-interaction timing path this fork cannot validate on
real hardware. Landing the safe increment instead, per the project's own
stated discipline for an unvalidated physiological-signal feature
(AGENTS.md): AlarmWakeQuality reports, after the fact, what stage the
ALREADY-FIXED smart-alarm time landed in for last night — informational only,
folded into the existing morning notification, never changes the alarm's
behavior.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019mdPEFgoJhtm2kaxPp7LTK
Rahulvijayan123 added a commit to Rahulvijayan123/noop that referenced this pull request Oct 10, 2026
… HR, HRV and movement curves

Logged events now drive the whole Events tab instead of only the log card: the latest-reaction card, the
timeline (All / Reported / Detected), All events and each event's page, built from the account's log by
ManualEventPresentation. An event's page draws heart rate, canonical HRV and wrist movement before,
during and after it from its server context, with Before / During / After means, recovery against
earlier events of the same type, and a link to the full strap context. Movement reads in milli-g and as
a difference ("+228 mg vs before"), led by its peak; a percentage against a near-zero resting level was
meaningless.

- Server context gains `traces` (HRV buckets as the scoring lane published them, binned dynAccel), and
  the device resolver accepts the server's device UUID as well as the app's own id (PR ryanbr#5 stores that).
- HealthEvent / PhysiologyPoint / same-type matching take PR ryanbr#5's fields and rules verbatim, so that PR
  merges onto this without conflicts there; the DEBUG sample events get stable title-derived type ids so
  their recovery comparisons keep working under type-id matching.
- Chart kit: the hour axis now drops a label that would overlap its neighbour, as the other axis styles
  already did; an event's 90-minute window put "8:00" on top of "8:15 PM".

Validation: 30 manual-event Swift tests and a new Events-tab UI test (EventLogUITests) in the simulator;
StrandDesign axis tests (the new one fails without the fix); full macOS StrandTests 3448 run with only the
3 failures clean main also has; Deno, real-route and both SQL suites on the production image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rahulvijayan123 added a commit to Rahulvijayan123/noop that referenced this pull request Oct 10, 2026
…he detection center as PR ryanbr#5's demo does

Conflict resolutions for PR ryanbr#5 on top of feat/event-logging-integration-20261008 live in the replayed
commits; this keeps EventDetailView's detection input public, as PR ryanbr#5's PersonalEventDetectionDemo needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rahulvijayan123 added a commit to Rahulvijayan123/noop that referenced this pull request Oct 10, 2026
…eal WHOOP data

Replaces PR ryanbr#5's 25x18 model search with a signature engine (Tools/PersonalEventDetection, engine sig-3):
1-minute timeline (HR, R-R HRV, temperature, breathing rate, movement, steps, sleep, activity), context x
time-of-day baselines with shrinkage and parent fallback, event-aligned profiles -30..+30 min, matched
controls, a level and a change-from-before family under one day-clustered max-t sign-flip test, replication
on later events, and plain-language findings with physical units, basis and movement annotation.

Detection stays retrospective: hr_rule_raw / hr_rule_context / template / logistic scored forward in time,
thresholds certified out of fold with an overdispersed Poisson bound, abstention on thin baselines,
champion/challenger promotion on future-held-out events, available_at filtering of all caregiver labels.
Alerts and prediction stay off; the infer lane no longer publishes.

Caregiver feedback: observation periods (manual entry kind `observation`), onset uncertainty
(0/5/15/60 min), signature-report-1 stored in event_detector_runs and served by
GET /scores/event-detection/signature; the Events tab shows status, findings, the event-aligned
profile (emerging/established only), evidence, detectability and dropped events.

Validation (docs/PHENOTYPE_SIGNATURES_VALIDATION.md): random-time null 1 % established; certified
thresholds exceed 1 false alert/day on <= 10 % of held-out runs; movement-accompanied events no longer
suppressed by context normalisation; real wake-ups give an established HR-rise signature. Recall at
<= 1 false alert/day is 4-12 % for 25-30 bpm planted effects, so real-time detection is not ready.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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