fix: resolve CGFloat/Double operator ambiguity in WorkTimeCanvas - #212
Merged
Merged
Conversation
The activity-timeline density canvas mixed CGFloat (the GraphicsContext size) with Double in one expression, which the Xcode 26.3 toolchain rejects as an ambiguous use of operator '-' even though newer toolchains accept it. This broke `swift build -c release` — the exact command build-app.sh runs to produce the DMG — on the release toolchain, so no signed build could be cut. Bind the canvas width to Double once and convert size.height explicitly, matching the Double-based geometry already used elsewhere in the file. Numerically identical (CGFloat is Double-backed on arm64).
This was referenced Sep 14, 2026
Merged
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.
Problem
WorkTimeCanvas.swift(new in #190) mixesCGFloat(theGraphicsContextsize inside aCanvasclosure) withDoublein oneCGRectexpression. The Xcode 26.3 toolchain rejects this asambiguous use of operator '-', even though the CI runner's newer Xcode 26.6 accepts it.CI's
macos-appjob builds and tests Swift under Xcode 26.6, so it stayed green — but the release DMG is cut on a macOS 15.7 / Xcode 26.3 machine, whereswift build -c release(the exact commandbuild-app.shruns) fails. Result:main's app currently cannot be built into a signed DMG on the release toolchain, which blocks any rebuild release.Fix
Bind the canvas width to
Doubleonce and convertsize.heightexplicitly, matching theDouble-based geometry already used elsewhere in the same file (e.g.let width = Double(geometry.size.width)). Numerically identical —CGFloatisDouble-backed on arm64.Verification
swift build -c release— compiles clean on Xcode 26.3 (was failing before this change).swift test— 496 executed, 0 failures, 6 skipped.pytest -q— 2881 passed (unaffected; included for completeness).Follow-up
CI cannot currently catch this class of break because its Swift job runs on a newer Xcode than the release machine can. A separate PR will add a
swift build -c releaseleg under the oldest installed Xcode 26.x so "compiles only on the newest toolchain" regressions fail at PR time.