+
Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Oct 8, 2025

Problem

The project had compilation errors preventing builds from succeeding:

  1. Watch App Views: Missing Color.bgDarkBlue and Color.bgDarkerDarkBlue extensions causing "Type 'Color' has no member" errors across 5 Watch App view files
  2. TidepoolService Integration: API compatibility issues with TidepoolKit causing "Extra argument in call" errors in StoredSettings.swift

Solution

Watch App Color Extensions

Added missing Color static members to Trio Watch App Extension/Helper/Helper+Extensions.swift:

extension Color {
    static let loopGreen = Color("LoopGreen")
    static let loopRed = Color("LoopRed")
    static let insulin = Color("Insulin")
    static let bgDarkBlue = Color("Background_DarkBlue")
    static let bgDarkerDarkBlue = Color("Background_DarkerDarkBlue")
    static let tabBar = Color("TabBar")
}

These extensions were already defined in the main iOS app's Color+Extensions.swift but were not available to the Watch App Extension target.

TidepoolService API Compatibility

Updated the TidepoolService submodule to align with the latest TidepoolKit API. The API no longer accepts serialNumber and automatedDelivery as constructor parameters for TCGMSettingsDatum and TPumpSettingsDatum:

Before:

let datum = TCGMSettingsDatum(
    time: datumTime,
    // ... other params ...
    serialNumber: datumCGMSerialNumber,  // ❌ No longer accepted
    softwareVersion: datumCGMSoftwareVersion,
    // ...
)

After:

let datum = TCGMSettingsDatum(
    time: datumTime,
    // ... other params ...
    softwareVersion: datumCGMSoftwareVersion,  // ✅ serialNumber removed
    // ...
)

Similar changes were made to TPumpSettingsDatum to remove both automatedDelivery and serialNumber parameters.

Testing

All compilation errors mentioned in the issue have been resolved:

  • AcknowledgementPendingView.swift:9 - Color.bgDarkBlue
  • BolusConfirmationView.swift:14 - Color.bgDarkBlue/bgDarkerDarkBlue
  • BolusInputView.swift:20 - Color.bgDarkBlue/bgDarkerDarkBlue
  • CarbsInputView.swift:19 - Color.bgDarkBlue/bgDarkerDarkBlue
  • TrioMainWatchView.swift:57 - Color.bgDarkBlue/bgDarkerDarkBlue
  • StoredSettings.swift:71 - Extra serialNumber argument
  • StoredSettings.swift:86 - Extra automatedDelivery and serialNumber arguments
Original prompt

fix /Users/dylan/Documents/Trio-dev-watchfix/Trio/Trio Watch App Extension/Views/AcknowledgementPendingView.swift:9:43 Type 'Color' has no member 'bgDarkBlue'
/Users/dylan/Documents/Trio-dev-watchfix/Trio/Trio Watch App Extension/Views/AcknowledgementPendingView.swift:9:61 Type 'Color' has no member 'bgDarkerDarkBlue'
/Users/dylan/Documents/Trio-dev-watchfix/Trio/Trio Watch App Extension/Views/BolusConfirmationView.swift:14:43 Type 'Color' has no member 'bgDarkBlue'
/Users/dylan/Documents/Trio-dev-watchfix/Trio/Trio Watch App Extension/Views/BolusConfirmationView.swift:14:61 Type 'Color' has no member 'bgDarkerDarkBlue'
/Users/dylan/Documents/Trio-dev-watchfix/Trio/Trio Watch App Extension/Views/BolusInputView.swift:20:43 Type 'Color' has no member 'bgDarkBlue'
/Users/dylan/Documents/Trio-dev-watchfix/Trio/Trio Watch App Extension/Views/BolusInputView.swift:20:61 Type 'Color' has no member 'bgDarkerDarkBlue'
/Users/dylan/Documents/Trio-dev-watchfix/Trio/Trio Watch App Extension/Views/CarbsInputView.swift:19:43 Type 'Color' has no member 'bgDarkBlue'
/Users/dylan/Documents/Trio-dev-watchfix/Trio/Trio Watch App Extension/Views/CarbsInputView.swift:19:61 Type 'Color' has no member 'bgDarkerDarkBlue'
/Users/dylan/Documents/Trio-dev-watchfix/Trio/Trio Watch App Extension/Views/TrioMainWatchView.swift:57:43 Type 'Color' has no member 'bgDarkBlue'
/Users/dylan/Documents/Trio-dev-watchfix/Trio/Trio Watch App Extension/Views/TrioMainWatchView.swift:57:61 Type 'Color' has no member 'bgDarkerDarkBlue'
/Users/dylan/Documents/Trio-dev-watchfix/Trio/TidepoolService/TidepoolServiceKit/Extensions/StoredSettings.swift:71:53 Extra argument 'serialNumber' in call
/Users/dylan/Documents/Trio-dev-watchfix/Trio/TidepoolService/TidepoolServiceKit/Extensions/StoredSettings.swift:86:39 Extra arguments at positions #3, nightscout#23 in call


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits October 8, 2025 23:48
Co-authored-by: code2344 <71059013+code2344@users.noreply.github.com>
Co-authored-by: code2344 <71059013+code2344@users.noreply.github.com>
Co-authored-by: code2344 <71059013+code2344@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Fix Color member errors in watch app extension Fix Watch App Color extensions and TidepoolService API compatibility errors Oct 8, 2025
Copilot finished work on behalf of code2344 October 8, 2025 23:54
@Copilot Copilot AI requested a review from code2344 October 8, 2025 23:54
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.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载