Skip to content

Settings layout fix#153

Open
digitalerdude wants to merge 11 commits into
ryanbr:mainfrom
digitalerdude:settings-layout-fix
Open

Settings layout fix#153
digitalerdude wants to merge 11 commits into
ryanbr:mainfrom
digitalerdude:settings-layout-fix

Conversation

@digitalerdude

Copy link
Copy Markdown

What this PR does

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation
  • CI / tooling

How it was tested

Checklist

  • Swift package tests pass for any package I touched (swift test in Packages/<name>)
  • Android unit tests pass if I touched android/ (./gradlew testFullDebugUnitTest)
  • No new build warnings introduced
  • UI changes use only StrandDesign tokens — no hardcoded colors, fonts, or spacing
  • No hardcoded hex frame bytes; protocol facts live in the schema / decoders
  • Follows the conventions in docs/CONTRIBUTING.md
  • I did not commit generated output (Strand.xcodeproj/) or any secrets/keystores

Related issues

digitalerdude and others added 4 commits July 9, 2026 07:32


Two stdlib tools in Tools/linux-capture that turn a WHOOP data export into
leverage for the un-decoded deep-record layouts tracked in ryanbr#103:

- hci_extract.py: parse a phone Bluetooth HCI capture (iOS .pklg /
  Android btsnoop) of the official app, reassemble L2CAP/ATT, and emit the
  CRC-valid WHOOP frames as the project's capture.json. Only WHOOP streams
  reach the output.
- correlate_ground_truth.py: known-plaintext field search. Cross-reference
  capture records against the official per-night values in a WHOOP CSV export
  (reusing the Swift importer's localized header aliases) to locate each
  biometric's byte offset + encoding. Distribution-overlap scoring (recall +
  precision) rejects constants and coincidences. Prints offsets only, so the
  output is safe to post on ryanbr#103 while health data stays local.

Docs: new README sections + a ground-truth-correlation note in
WHOOP5_DEEP_DATA.md. 25 new stdlib tests; full suite 129 green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ReadinessChecklistCard.lead expects LocalizedStringKey?, but
fitnessReadyLead() returns an already-resolved String. The mismatch
broke the NOOPiOS build; wrap it explicitly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… pickers

The six segmented pickers in the Units and Appearance cards used
.fixedSize(), pinning them to their ideal width. Inside FormRow's
label+control HStack that pushed the column past the screen width, so
ScreenScaffold's centering shifted the whole Settings column ~37pt left
— clipping the header's first letter and the cards' left/right margins
(the overflow the ryanbr#43 note in this file already warns about).

Remove the .fixedSize() calls so the pickers size to the row. To keep
the two three-option pickers from truncating once they size down,
shorten their long first labels to "Auto": Temperature's "Match" and
the theme's "System" (AppearanceMode.system, shared with the onboarding
pill). Add "Auto" translations to both string catalogs.

Also fixes the profile-photo blurb: interpolating the nested-localized
Platform.deviceNounPhrase broke its wrapping and read "diese iPhone" in
German; use Platform.deviceNoun with "this" in the sentence so it wraps
and reads "diesem iPhone".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts:
#	Strand/Screens/HealthView.swift
@digitalerdude

Copy link
Copy Markdown
Author

Ready to merge — MERGEABLE/CLEAN, verified end-to-end in the Simulator.

Bug: The whole Settings content column was shifted ~37pt left off-screen (header's first letter and card margins clipped).

Root cause: Six segmented Pickers in the Units/Appearance cards used .fixedSize(), pinning them to their ideal width. Inside FormRow's label(∞)+control HStack, that pushed the column past the screen width (~476pt vs 402pt), and ScreenScaffold's centering shifted everything left — the exact overflow the #43 note in SettingsView.swift already warned about, just not caught for these six.

Fix: Removed the .fixedSize() calls. To keep the two three-option pickers from truncating once they size down, shortened their long labels to "Auto" (Temperature's "Match" and the theme's "System" — the latter shared with the onboarding pill, so both are now consistent). Added translations for the new short labels.

Also fixed the profile-photo blurb, which read "Nur auf diese iPhone gespeichert" in German (bad grammar) because interpolating the nested-localized Platform.deviceNounPhrase broke wrapping — switched to Platform.deviceNoun with "this"/"diesem" written directly in the sentence.

Since this branch was cut before 8.5.1/8.5.2: merged upstream/main to resolve the resulting conflicts. HealthView.swift took your cleaner fix (ReadinessChecklistCard.lead: String? instead of my LocalizedStringKey wrap). The #155 HRV-window grouping and the new Trend-charts picker had brought in the same .fixedSize() overflow bug in two more places — removed there too, and shortened "Whole night" → "Night" (German "Über Nacht" still truncated at 10 chars, single-word "Nacht" fits reliably).

Also added missing translations for "HRV window" (→ "HRV-Fenster") and the option labels, which had no German/other localizations at all before this.

@digitalerdude

Copy link
Copy Markdown
Author

Also matches an external report — #161. PR is up: digitalerdude#9

@digitalerdude digitalerdude mentioned this pull request Jul 9, 2026
5 tasks
…e-checker

The single-line nested-optional-coalescing form (gx ?? 0) * (gx ?? 0) + ...
occasionally blew the Swift type-checker's time budget in CI ("unable to
type-check this expression in reasonable time"), failing the WhoopProtocol
test job on unrelated PRs. A compiler perf cliff, not a real ambiguity;
naming the intermediate values fixes it without changing behavior.
app-build.yml's matrix build job ran both legs on macos-15, whose
default Xcode doesn't ship the iOS 26 SDK (RootTabView.swift's
Liquid Glass glassEffect(), landed 2026-07-07) — "value of type
'Self' has no member 'glassEffect'". Currently red on every open PR
and on main itself. fork-testing-build.yml and fork-release.yml
already split their NOOPiOS legs onto macos-26 for the same reason;
this brings app-build.yml's PR gate into line. macos-15 stays correct
for the macOS/Strand leg, which doesn't touch iOS-26-only APIs.
CI: pin the NOOPiOS build leg to macos-26 for the iOS 26 SDK
…e-checker

The single-line nested-optional-coalescing form (gx ?? 0) * (gx ?? 0) + ...
occasionally blew the Swift type-checker's time budget in CI ("unable to
type-check this expression in reasonable time"), failing the WhoopProtocol
test job on unrelated PRs. A compiler perf cliff, not a real ambiguity;
naming the intermediate values fixes it without changing behavior.
WhoopProtocol test: break up gravity-magnitude expression for the type-checker
# Conflicts:
#	Strand/Screens/SettingsView.swift
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