Repository navigation
Sync upstream Trio dev (45cd2cacb) into Tai dev - #41
Merged
Merged
Conversation
Apps built with the iOS 27.1 SDK get a vertical tab bar down the side of the iPhone Duo's screen. The + button was still drawn at the bottom centre, over the home screen cards, leaving an empty slot in the rail. Vertical bars add side safe-area insets, and Trio's iPhone layout is otherwise portrait-only, so a side inset means the rail: put the button in its empty slot. Every other layout keeps the bottom-centre position.
Make schedule unit tests DST-safe
Scale compact Dynamic Island text instead of truncating it in a narrow island
Put the treatment button in the side tab bar on iPhone Duo
[Part 1/n] Logging Rework: Durable logs, One-tap Export, Log Messages Cleanup
Merge 52 upstream commits, including the new logging subsystem (TrioLogger, AppLogStore, LogExport, watch log ingest, ReportProblemView). Conflicts were resolved per the architect spec: Tai keeps its fork behaviour (Garmin timer queue, multi-datafield and command router, insulin concentration rounding, glucose smoothing selection, profile scope writes, watch command authorization, device alert acknowledge, carb save rollback), upstream wins on logging shape and new features. The project file is Tai's with upstream's new logging files grafted in and the removed IssueReporter, Signpost and Error+Extensions files dropped. The obsolete ShareLogsTests suite for the old file-based log export is removed along with it.
Migrate the remaining legacy log categories in Tai-owned code to the upstream Logger.Category set, rewrite messages as plain sentences with units, log swallowed errors at warning with error:, and replace print and debugPrint calls. Garmin watch command logging now carries a log level.
- UserNotificationsManager: rename the notification payload binding from `info` to `userInfo` in both schedule-notification handlers so it no longer shadows the global `info(_:_:)` logging function. - TreatmentsStateModel: restore Tai's `minPredBG` source for the simulated determination; the merge brought in upstream's `minPredBGFromReason`, which Tai does not define. - WatchCommandIntegrationTests: pass a level to `LogCapture.record`, which now takes `(LogLevel, String)`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sync upstream Trio dev (45cd2ca) into Tai dev
Tai
dev(fc7090e55, 1.0.2) is merged with upstreamnightscout/Triodevat45cd2cacb— 52 upstream commits, 193 files, +9877 −2913 since the last sync. Branchsync/trio-2026-10-27: merge commitf0b820b42, plusaa0744039aligning Tai's own logging with the new rules on top. Net againstdev: 212 files, +10204 −4582 (32 files added, 6 deleted, 174 modified).This is the logging release. Upstream replaces the file-based
SimpleLogReporter/IssueReporterstack withos.Loggerplus a sink architecture, so the merge is mostly mechanical, and the real work is on Tai's side: every Tai-only subsystem had to be migrated to the new categories.What comes in from upstream
LogRecord/LogSink/LogRetentionPolicycontracts,TrioLoggerand an in-memory sink; every line goes throughos.Loggerand is also accepted by the sinks (Logger.swiftis now free functionsdebug/info/warning/error/fault(_ category:_ message:…)behindenum Logger.Category).loop, algorithm, pump, cgm, bolus, treatments, nightscout, tidepool, remote, healthKit, alerts, watch, liveActivity, storage, settings, telemetry, ui, lifecycle— replacing the olddefault/service/deviceManager/apsManager/watchManager/…set, which is retired.AppLogStore+AppLog.xcdatamodeldkeep the app log persistently; the LoopKit device log is persisted too (DeviceLogStore), and the store re-opens after a missed unlock.LogRetentionPolicy), for the app log and the device log separately. This replaces the old per-launch file cleanup.LogExport/LogFileWriter/LogFileHeaderwrite one file per log kind, device logs are exportable from Settings and from the device screens, andRedactor/SensitiveValuesstrip exact stored sensitive values and Syai IDs. Errors are logged as plain text instead of serialized objects.WatchLogEntry/WatchLogRing/WatchLogIngest: the watch keeps a persistent ring, ships queued files, the phone ingests them as structured entries and only acknowledges them once stored, and exported lines are labelled by source.ReportProblemView) that builds a redacted diagnostic report; "Share Logs" becomes "Share Trio Logs" ("Share CGM Logs", "Share Pump Logs" live on the device screens).Tai-specific logging alignment (
aa0744039, 34 files, +187 −281)Tai's own code now logs through the new categories with plain sentences, and
print/debugPrintare gone from Tai-owned paths:.algorithm, with units (BG 123 mg/dL,IOB 1.25 U).ExportStateModel39 sites,ExportRootView11 prints) →.settings; object dumps, traces and emoji prefixes removed, failures atwarning/errorwitherror:..settings,.storage,.alerts,.loopby subject, with the schedule-firer's dead commented-out legacy calls dropped.GarminManager,GarminCommandRouter) →.watch;WatchCommandProcessor's injectable log closure is now(LogLevel, String)instead of(String) -> Void, so rejections and failures log atinfo/warningrather than everything atdebug, and messages lost theirGarmin:/emoji prefixes.APSManager,PumpHistoryStorage,DeviceDataManager,PumpConfigStateModel) →.pump,IU/hrcorrected toU/h.FetchGlucoseManager,DetermineBasalGenerator,ForecastGenerator,CSFEditorStateModel,UserNotificationsManager, Shortcuts temp presets) →.cgm/.algorithm/.nightscout/.alerts/.treatmentsby subject.GarminCommandRouterTestsandWatchCommandTestDoublesfollow the(LogLevel, String)closure;LogCapture.recordrecords the level.Tai specifics that stay
autoISF/AimiB30/KetoProtect, the insulin-concentration rounding and DIA editor, the UKF/adaptive/exponential glucose smoothing selection (
smoothingAlgorithmSection), Garmin (timer-queue concurrency, multi-datafield loop,sendRetryDelay,GarminCommandRouter), watch-command authorization (AdjustmentManagerauthorizeoverloads), the profile scheduler withSettingsScopewrites (Autotune/BasalProfileEditor keep writing through the scope, neverstorage.save), Bobble/CGM status, the Export module, Trio Chart, glucose peaks, the CSF editor,TrioAlertManager.acknowledgeOnDevice, the Tai UI/icon set (the treatment button keepstaiCircledNoBackground), and Tai's versioning inConfig.xcconfig(APP_DEV_VERSION = 1.0.2.30,APP_VERSION = 1.0.2).Conflicts
28 paths / 46 hunks: 24 content conflicts plus 4 modify/delete. Rule applied throughout: Tai wins on behaviour, upstream wins on logging shape.
GarminManager(4 hunks),AdjustmentManager(authorize overloads),APSManager(concentration rounding),CarbsStorage(rollback + rethrow),AutotuneConfig/BasalProfileEditor(SettingsScopewrites),TrioAlertManager(device acknowledge).Logger.swift(file is now fully upstream-shaped),TrioAppmigration logging,AppleWatchManager(WatchLogIngest+info(.watch)dispatch),SettingsStateModel(logKindsreplaceslogItems/copyLogs/createZipArchive),SettingsRootView("Report a Problem" +ReportLinkRows),TreatmentsStateModel,NightscoutManager,PluginSource,AlgorithmLoggingShim, both DST test files.PumpConfigRootView(Tai's Insulin Curve + Concentration sections plus upstream's "Share Pump Logs"),CGMRootView(upstream's "Share CGM Logs" plus Tai's smoothing picker),HomeRootView(upstream'sGeometryReader/treatmentButtonPositionplus Tai's branding),AlgorithmAdvancedSettings(Tai'suseProfileCSF),FetchGlucoseManager(Tai's UKF store kept, upstream's duplicate store and exponential-only path dropped),BasalProfileEditor(Tai's rounding resets plus upstream'sinitialItemsreset).CONTRIBUTING.mdrestored from upstream (it now carries the binding logging rules),SimpleLogReporter.swiftdeleted with the rest of the IssueReporter framework, bothConfigEditorfiles stay deleted.PumpConfigStateModel, soAlgorithmAdvancedSettingstook our side; upstream'smodernTabSelectionwas dropped becauseRootView.treatmentTabTagdoes not exist in Tai and the rail feature is carried bytreatmentButtonPosition(in:);CGMRootView.smoothGlucoseSectionwas kept instead of upstream's inline toggle because Tai's version documents the UKF option.GroupedIssueReporterDI block andSimpleLogReporter.cleanupAllLogsAsync()inTrioApp.cleanupOldData()are gone (retention inAppLogStorereplaces them), Tai'sSignpost.swiftdoes not survive (no call sites outside the oldLogger.swift), andTrioTests/ShareLogsTestswas removed because it tested the retired zip export.project.pbxprojwith upstream's objects grafted in — 31 new files wired (17 Logger sources,AppLog.xcdatamodeld,ReportProblemView,LogShareRow, 11TrioTests/Loggingfiles),ShareSheet.swiftalready existed in Tai at the same path, and the five deleted Logger files plusShareLogsTestsare removed from the build phases and groups.Localizable.xcstringsis exactly upstream's 2795 keys. The four Tai-only keys (Submit Ticket on GitHub,Trio Discord,Tai Discord,Trio Facebook) are not re-added — the settings buttons that referenced them were replaced by upstream's report links, andgit grepfinds zero references.Upstream commits
Logging core (5):
Message cleanup by subject (7):
Retention (3):
Export, redaction and the new entry point (9):
Watch logs (8):
Store robustness (2):
Tests (3):
UI (2):
Chores (7):
Tai side (1):
Merge:
f0b820b42sync(trio): merge upstream/dev at 45cd2cacb.Testing
PR CI is the gate and runs on this exact head (
aa0744039): Algorithm Package (swift test) and Run Unit Tests (macOS 26 runner, iPhone 17 / iOS 26.2 simulator) from.github/workflows/unit_tests.yml. No local build or test suite was run for this branch.What was actually checked before the PR:
git diff --checkclean; merge commit has the correct parents (fc7090e55,45cd2cacb) and no trailers.git grepoverTrio/Sources: no legacy log category, noSimpleLogReporter/GroupedIssueReporter/CollectionIssueReporter/IssueReporter/Signpost/LoggerTestMode, no liveprint/debugPrint/NSLog(only commented-out lines remain inNightscoutAPI.swiftand a dead block inWatchState.swift).plutil -linton the project file andxcodebuild -listresolving all 6 targets; every referenced object ID defined, all 32 upstream paths present.swiftc -parseclean on the changed files (34 in the logging commit, plusExportStateModel,FetchGlucoseManager,GarminManager,AimiB30re-checked in review).Localizable.xcstringskey count equal to upstream (2795); submodule pointers unchanged in the range.Known residual, cosmetic: 16 commented-out
debugPrint/printlines remain in upstream-ownedNightscoutAPI.swiftand a dead legacy block inWatchState.swift, andGarminManager.swiftembeds an error name in one warning message instead of passingerror:. None of them affect behaviour.Screenshots
Not included — nothing in this branch is Tai's visual work. If you want them for the PR, these are the screens that changed visibly: