Skip to content

chore: prepare 1.1.2 with the archive fixes, complete translations, and accessibility polish - #3

Merged
weskcode merged 26 commits into
mainfrom
chore/1.1.1-release-polish
Nov 2, 2026
Merged

weskcode merged 26 commits into
mainfrom
chore/1.1.1-release-polish

Conversation

@weskcode

@weskcode weskcode commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

The public repo was missing the 1.1.1 fixes that only existed in the private archive. A pass over the app also turned up English text in every translated language, a Home screen with no selected preset on first launch, and a few accessibility gaps. This branch brings the public repo up to a releasable 1.1.2.

What changed

  • Archive fixes ported (17 commits): timer start and cancel races, Focus Lock cooldown overlap, the daily-use day surviving time zone changes, notification cancellation when Timer Alerts are turned off, localized duration units, and the roll timer app and widget icon. The MIT license, .gitignore, and the 26.0 deployment floor stay as they are on main.
  • Home: the preset that Start Timer will use is now shown as selected, including on first launch.
  • Accessibility:
    • VoiceOver announces the selected preset and sound.
    • The completion sheet uses a checkmark, opens full height at accessibility text sizes, and wraps long titles. "VORZEITIG GESTOPPT" was cut off in German.
    • Three animations now respect Reduce Motion.
    • Two custom labels that read badly were removed.
  • Localization:
    • 20 strings were English in all 12 languages: achievements, History stats, the onboarding Continue button, the notification button, and the widget setup steps. They're now translated.
    • 8 keys never matched the code because of %@/%lld mismatches. Those are fixed, with plural forms where the language needs them.
    • Punctuation broken by an earlier bulk edit is repaired, including "3 to 5" that stayed in English in 8 languages.
    • 26 unused entries are removed.
    • Two new tests guard the punctuation and the achievement titles.
  • Copy:
    • The 30-second warnings no longer say "wrap up".
    • Onboarding says scrolling is "linked to" a 46% higher risk, which matches the study.
    • The About, tip jar, and unlock-notification text is plainer.
    • "End Only" is now "Once".
  • Cleanup:
    • Removed dead files: Haptics.swift, WidgetRing.swift, and EmptyStateView.swift.
    • Removed unused members.
    • Split comment lines that had been joined together.
    • Fixed stale doc references.
    • Added AGENTS.md with the build, test, and simulator rules.

Testing

  • iOS: 764 of 764 tests pass on the iPhone 17e simulator (iOS 27.2) at 89f04ba. The baseline before these changes was 762.
  • A Release build for a generic iOS device, unsigned, succeeds at 896de22. Later commits changed only strings, tests, docs, and one file rename.
  • Walked through the app in German on the simulator: onboarding, timer start and stop, the completion sheet, History, achievements, and Settings. Checked the completion sheet in English at the largest accessibility text size.
  • Not run locally: the watchOS tests (no watchOS runtime on this Mac; this PR's Xcode Cloud check covers them), the iOS 26.0 floor check (runtime not installed), and the physical-device checks for AlarmKit, the Live Activity, Focus Lock shields, and Watch handoff.

Still open

  • The privacy contact email differs between the hosted policy, PRIVACY.md, and the archive.
  • The medical wording ("Clinically recommended", "Move quality checks to Xcode Cloud #1 preventable cause", "Doctors say") is unchanged.
  • The "+1 min" snooze label and the beep-time units are still English in every language.

Since opening

  • App Store Connect closed the 1.1.1 train, because a 1.1.1 build was already approved. The version is now 1.1.2 (5), and that build is uploaded to TestFlight.
  • Xcode Cloud's first run passed the watchOS tests. The iOS tests failed with 19 projectRootNotFound errors: three suites read repository files from disk, and Xcode Cloud runs tests on a host without the repository. The test bundle now carries copies of those nine files, and 764 of 764 iOS tests pass locally.

weskcode and others added 26 commits November 2, 2026 03:21
TimerService.start()'s reentrancy guard treated "a newer run replaced
this one" and "this run is still active but its Task was cancelled"
identically, returning early in both cases without resetting state.
The first case is correct to leave alone (the newer run owns the
state now); the second left isPreparingTimer/activeRunID permanently
stuck, since no countdown or side-effects task was ever created for
the abandoned run to later clean up.

Reachable via a cancelled App Intent / Siri Shortcut request
(StartTimerIntent.perform() runs on the intent's own cancellable
Task) mid-await inside the Live Activity setup call. Once stuck,
adoptSharedStateIfNeeded() silently no-ops forever, so no
Watch/widget/Siri-started timer can ever be adopted again until the
app is force-quit and relaunched.

Found by an adversarial multi-agent code review of the 1.1.1 delta.
endExtendedSession() only scheduled cleanup (a Task hopping to
MainActor and back) without waiting for it, and neither it nor
invalidateExtendedSession() were runID-aware. A fast stop-then-start
on the Watch could let a new run's setExtendedSession() land before
the old run's deferred cleanup finally ran; that stale cleanup would
then invalidate whatever session was CURRENTLY stored - the new run's
live one - silently disabling background countdown reliability for
the still-running timer with no session ever recreated.

Threads the owning runID through endExtendedSession()/
invalidateExtendedSession() so the deferred cleanup only clears the
session if it still belongs to the run that requested the cleanup.

Found by an adversarial multi-agent code review of the 1.1.1 delta.
Not covered by a test: WKExtendedRuntimeSession requires the real
watchOS runtime and has no injectable seam in this codebase, matching
the existing lack of test coverage for this file's session handling.
DailyUseTracker stored the last-use day as a raw Date and
re-derived "which calendar day that was" on every later call via
calendar.startOfDay(for:), using self.calendar - which defaults to
.autoupdatingCurrent, a live sentinel that reflects whatever time
zone is current WHEN READ, not when it was written. A device time
zone change between two registerUse calls (e.g. a flight landing;
this fires on every foreground) could silently reinterpret the same
stored instant as a different calendar day, fabricating or
swallowing a full day of streak credit despite only a few real hours
elapsing.

Replaces the stored Date with a frozen (year, month, day) triple
computed at write time, and does the "is this the next calendar day"
arithmetic with a fixed UTC calendar so it can never be re-skewed by
a later, different live time zone.

Found by an adversarial multi-agent code review of the 1.1.1 delta.
…sessions

Nothing in the UI blocks starting a second Limited Scrolling timer
while an earlier session's shield/cooldown is still active. Both
FocusLockMonitor (extension process) and ScreenTimeService
(in-app process) treated "shields already active with a future
deadline" as always meaning a duplicate delivery of the same event,
and silently dropped the second session's shield application
entirely - apps unblocked at the FIRST session's original,
already-shorter deadline instead of the one the user just chose for
their second timer, while the scheduled cooldown-complete
notification still promised the longer duration that never actually
applied.

Now extends the existing deadline to a fresh cooldown from now
whenever that would run later, and preserves the existing deadline
otherwise (so a genuinely shorter new session cannot cut a longer
active cooldown short). The decision logic is factored into a pure,
static `ScreenTimeService.extendedDeadline` so it's unit-testable
without touching real Screen Time APIs; the mirrored extension-side
fix in FocusLockMonitor has no equivalent test seam (it lives in a
separate extension target with no test coverage for this file at
all - a pre-existing gap, not one introduced here).

Found by an adversarial multi-agent code review of the 1.1.1 delta,
flagged high-severity given this project's safety-critical bar for
Focus Lock/shield code.
The onChange(of: notificationsEnabled) handler used to unconditionally
cancel every pending notification, AlarmKit alarm, and playing sound
when the user turned Timer Alerts off. A recent refactor routed the
disable path through rescheduleForFocusLockChange() instead, which is
a complete no-op once a timer has already completed (its guard
requires activeRunID != nil) - so disabling notifications during a
post-completion Focus Lock cooldown window no longer canceled the
already-scheduled cooldown-complete notification, which still fired
despite the user having just turned notifications off.

Splits the handler back into two explicit branches: enabling still
reschedules alerts for whatever is currently running, while disabling
unconditionally cancels everything, independent of whether a timer
happens to be active.

Found by an adversarial multi-agent code review of the 1.1.1 delta.
Not independently unit tested: this is SwiftUI view-level onChange
wiring with no test harness in this codebase for that layer, but the
underlying notificationService.cancelAll() behavior it now correctly
calls is already covered by NotificationSchedulingTests.
scheduleDailyReminder()/cancelDailyReminder() had no staleness
protection, unlike the .timer/.beep generation-token guard that
schedule() already relies on "so rapid restarts don't queue stale
alerts." Rapidly toggling the Daily Reminder switch (a double-tap, or
deliberate fast toggling) could let an earlier, superseded enable's
slow add() call (a real XPC round-trip to notificationd) complete
after a later disable's near-instant removal, leaving a reminder
scheduled despite the toggle showing off - or the reverse, leaving
the toggle on with nothing actually scheduled.

Adds the same generation-token pattern used elsewhere in this actor:
each call bumps a dedicated generation counter and checks it's still
current before letting its result stand, undoing its own stale write
instead of clobbering whatever a fresher call already did.

Found by an adversarial multi-agent code review of the 1.1.1 delta.
CI caught what the local environment's contention prevented me from
building/testing before pushing: this test uses try #require but
wasn't marked throws.
FocusLockConsistencyTests already guarded nine cross-process constants
but not the two that govern when a shield comes down. The Device
Activity extension cannot import the app target, so it hardcodes these
key strings; nothing but a test catches a rename.

Both failure modes are silent and leave the user worse off than no
Focus Lock at all. Renaming the deadline key would leave the extension
writing one key while every recovery path reads another, so no code
would ever observe an expired cooldown and the shield would stay up
with no automatic way out. Renaming the duration key would fall back to
the 300 second default, unblocking a user who chose thirty minutes
after five.
DurationFormatter interpolated bare English, so "3 min" and "45 sec"
rendered as Latin text in all twelve non-English locales. The string is
not incidental: it labels the duration the user is choosing on the main
screen, appears in History, and is read aloud by VoiceOver, so the app
was shipping untranslated copy on its primary surface.

Adds the two keys with all twelve translations. The compiled catalog was
checked rather than assumed, since a key-extraction mismatch fails
silently: Swift extracts the Int interpolation as %lld, and the built
bundles contain the expected entries, for example ar "%lld دقيقة",
ja "%lld分", de "%lld Min.".

Removes the dead %@ min key, which had no translations and no
references. The mixed minutes-and-seconds branch stays a bare numeric
format, deliberately, so the running countdown keeps one compact shape
everywhere.

The catalog edit is written back in Xcode's own key order and spacing.
An earlier pass reserialized the file with different collation, which
produced an eighteen thousand line diff around a three key change and
would have made review impossible.
invalidateExtendedSession(runID:) treated a nil runID as an automatic pass,
unconditionally tearing down whatever extended session was currently
stored. stop() and resetRunningState() both capture runID = activeRunID
before clearing it, so an idempotent double stop() or a reset invoked while
nothing was tracked schedules a deferred invalidate with runID = nil. If a
legitimate new start() lands in the two-hop async gap before that deferred
call runs, the nil-runID guard would still pass and tear down the newer
run's already-live session - reopening the exact bug the runID-threading in
8abe7bf was written to close, just via the nil entry point instead of a
mismatched UUID.

Dropping the runID == nil disjunct keeps the harmless nil/nil no-op case
working (extendedSessionRunID == nil is already true then) while closing
the bypass.
…dering guarantee

SettingsView's onChange(of: notificationsEnabled) disable branch called
alarmKitService.cancelActive() directly, outside TimerService's actor and
without awaiting sideEffectsTask. TimerService documents that every
cancellation entry point must cancel-and-await sideEffectsTask first,
because AlarmKitService.scheduleTimer(...) can still be mid-flight when a
cancel arrives - AlarmKitService has no staleness guard of its own (unlike
NotificationService, which self-heals via a generation token). A toggle-off
racing an in-flight schedule could cancel before the alarm ID existed, then
have the resumed schedule call write a fresh alarm ID afterward, leaving it
armed after the user disabled notifications.

Adds TimerService.cancelAlertsForNotificationsDisabled(), which awaits
sideEffectsTask before standing down alerts, and points SettingsView at it
instead of calling the services directly. It deliberately leaves any
running timer's countdown untouched - disabling notifications shouldn't
cancel the timer itself.

The accompanying regression test proves cancellation completes cleanly once
things settle, but not the ordering guarantee itself: NotificationService's
own generation-token self-heal cleans up a stale add() regardless of how an
external cancel was ordered against it, so the same assertion would pass
against the pre-fix code too. The actual bug this closes is on the
AlarmKitService side, which has no such self-heal and isn't protocol-based,
so it remains verifiable only on a physical device. Said plainly in the
test's own comment rather than left implied.
…rage

extendCooldownIfNeeded(pastDeadline:) decides whether a duplicate
DeviceActivityMonitor callback should extend the stored cooldown, no-op, or
restore the prior deadline and re-arm a fallback schedule on
startMonitoring failure. The only existing test pinned UserDefaults
key-name constants; the decision logic itself had no coverage, and
RHOIDSDeviceActivityMonitor is a separate module RHOIDSTests can't import
directly.

Adds FocusLockCooldownExtension to Sources/Shared, mirroring the existing
ScreenTimeService.extendedDeadline pattern, with the pure extend/no-op
decision and the failure-path restore math. FocusLockMonitor now calls into
it instead of duplicating the arithmetic inline; behavior is unchanged. The
type lives in the file already wired into both the RHOIDS app target and
the RHOIDSDeviceActivityMonitor extension target, so no project.yml change
was needed, and it's reachable from RHOIDSTests via @testable import
RHOIDS.

Covers all three branches: extend, no-op, and fallback-restore.
extendCooldownIfNeeded(pastDeadline:)'s failure-fallback branch - restoring
the original deadline and re-arming a fallback schedule when startCooldown
throws - had no coverage, because DeviceActivityCenter was instantiated
directly at every call site with no way to force it to fail on command.

Adds a DeviceActivityScheduling protocol capturing the two calls this file
makes, conforms the real DeviceActivityCenter to it, and injects it through
ScreenTimeService's initializer defaulting to the real type, so no other
call site needs to change. The conformance needs an explicit forwarding
overload for startMonitoring, since a defaulted third events: parameter
doesn't satisfy a two-parameter protocol requirement for witness matching.

The new test forces the failure path and asserts cooldownEndDate is
restored to the original deadline rather than left at the attempted one.
The ed1e991 localization fix wrapped output in String(localized:comment:)
with no Bundle/Locale parameter, so it always resolves against the
process's ambient locale. The existing tests only assert exact-string
output in that default locale, which would pass identically whether
localization is correctly wired to the catalog or silently falling back to
the untranslated interpolated key - nothing proved the fix actually works.

Adds bundle and locale parameters to formatted(_:), defaulting to .main and
.current so every existing call site keeps compiling and behaving exactly
as before, and switches both localized branches to
String(localized:bundle:locale:comment:) so the passed-in values actually
take effect.

The new tests open specific .lproj bundles from the host app and assert
against the literal translations in Localizable.xcstrings (German 'Min.'/
'Sek.', Arabic digits and units) - not just that output differs from
English, but that it matches the catalog exactly.
Replace the iPhone and Watch foreground layers with a toilet roll seen
end-on inside the green timer arc, plus four ticks in the elapsed quarter.
The roll's center is cut out so the background layer shows through.
The Watch layer is the same art scaled 1.15x for the circular mask.

Also update the flat AppIcon.png fallback and foreground.svg, which
documents the geometry. Background layers and icon.json are unchanged.
WidgetAppIcon now draws the roll, arc and ticks from foreground.svg
instead of the old ring and letter R. The public API is unchanged.
The mark is hidden from VoiceOver because every call site already
labels it with the visible RHOIDS text.
DurationFormatterLocalizationTests was added in 3a8f7f0 but never made it
into the generated project, so its six tests never ran. It also did not
compile: #require's comment was built with +, which Comment does not
accept. Join it into one literal and regenerate the project.

Remove WidgetIconArcGeometryTests. It only checked constants declared in
the test itself and never exercised the widget view.

Full iOS suite on an iOS 27.0 simulator: 762 passed, 0 failed.
… target

Add AGENTS.md with the commit, build, and simulator runtime rules, plus a CLAUDE.md pointer. Update README and QA docs that still listed iOS 26.4 and watchOS 11.5 after the deployment target moved to 26.0.
Home highlighted no preset on first launch even though Start Timer used the default one; rows now reflect the preset that will start. Preset and sound rows expose the VoiceOver selected trait, the timer style row no longer announces its state twice, and the watch Done button keeps its visible name for Voice Control.

The completion sheet uses a checkmark for Dismiss and grows to a full sheet at accessibility text sizes so its content isn't clipped. Onboarding steps and the watch duration picker respect Reduce Motion. FORCE_ONBOARDING now only works in debug builds.
Delete the unused Haptics, WidgetRing, and EmptyStateView types and the unused notification-status protocol, Live Activity flag, widget reload helper, and two watch haptics. Regenerate the project for the removed files.

A past dash cleanup joined eight comment pairs onto one line; split them back. Point the listing docs at the screenshot masters that ship in this repository instead of scripts that live outside it, and record the hosted privacy URL.
…punctuation

Twenty strings the app displays had no catalog entry, so every locale showed English: streak achievements, the History stat labels, onboarding Continue and its hints, the notification permission button, and the widget setup steps. The setup steps and the permission button title also passed plain Strings, which SwiftUI renders verbatim. Eight translated keys still used %@ after their call sites switched to integers, so lookups missed; rename them to %lld. Add plural forms for Russian and Arabic counts and for English minutes.

A past bulk edit replaced commas and dashes with mid-sentence periods and swapped full-width punctuation for ASCII in Chinese and Japanese. Repair every affected value that remains and add a test that guards against it. Remove 26 catalog entries no code uses.

Copy: the two 30-second warnings no longer tell people to wrap up, onboarding says scrolling is linked to a 46% higher risk rather than causing it, the watch onboarding row no longer claims the app is already installed, the warning option End Only becomes Once, and the About, tip jar, and cooldown-complete text is shorter and plainer.
The German stopped-early title truncated on narrower iPhones; the completion title now wraps and stays centered. Eight translations of the 3 to 5 minute guideline still contained the English word "to" in place of a range; translate it and extend the punctuation test to catch it. Onboarding rows let VoiceOver combine their title and description instead of joining them with a period, which read as "?." after a question.
…vidence

Add singular forms for minute counts in German, French, Spanish, Italian, and Portuguese, and for the selected-apps count in French, Spanish, Italian, and Portuguese. Keep the new Turkish strings in the formal register the rest of the app uses outside quips. Teach the catalog tests to read plural variations and drop a stale exemption. Rename the notification permission protocol file to match its only remaining type. Replace the stale automated evidence in the release checklist with this branch's results, including the checks that could not run.
App Store Connect closed the 1.1.1 train after a 1.1.1 build was approved, so the next TestFlight upload needs a higher marketing version. Record the Xcode Cloud PR Check results in the release checklist.
…un them

Three suites found project.yml, the Info.plists, entitlements, the string catalog, the StoreKit configuration, and the Live Activity source by walking up from #filePath. Xcode Cloud runs tests on a host without the repository, so all 19 of those checks failed with projectRootNotFound. Copy the nine files into the RHOIDSTests bundle under RepoFiles/ and resolve them through RepoFile. Pin an empty INFOPLIST_FILE so the copied app Info.plist does not become the test bundle plist.
The archive post-action moved the build number to 6 after uploading build 5. Note the upload and the Xcode Cloud fix in the release checklist.
@weskcode weskcode changed the title chore: prepare 1.1.1 with the archive fixes, complete translations, and accessibility polish chore: prepare 1.1.2 with the archive fixes, complete translations, and accessibility polish Nov 2, 2026
@weskcode
weskcode merged commit 9b01237 into main Nov 2, 2026
5 checks passed
@weskcode
weskcode deleted the chore/1.1.1-release-polish branch November 2, 2026 18:43
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