Skip to content

make subviews lazily initialized; improve animation from LoadingVC#12

Merged
Sajjon merged 3 commits into
mainfrom
tuesday2
Apr 22, 2026
Merged

make subviews lazily initialized; improve animation from LoadingVC#12
Sajjon merged 3 commits into
mainfrom
tuesday2

Conversation

@Sajjon
Copy link
Copy Markdown
Owner

@Sajjon Sajjon commented Apr 22, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 22, 2026 07:36
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

❌ Patch coverage is 84.21053% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.73%. Comparing base (269c505) to head (0862b96).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...Intro/Features/Game/Model/Values/CardSingles.swift 0.00% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
- Coverage   98.74%   98.73%   -0.02%     
==========================================
  Files          68       69       +1     
  Lines        3593     4039     +446     
==========================================
+ Hits         3548     3988     +440     
- Misses         45       51       +6     
Files with missing lines Coverage Δ
SwiftIntro/App/RootVC.swift 100.00% <100.00%> (ø)
...Intro/Dependencies/Wikimedia/WikimediaClient.swift 100.00% <100.00%> (ø)
SwiftIntro/Features/Game/GameVC.swift 100.00% <100.00%> (ø)
SwiftIntro/Features/Game/View/CardCVCell.swift 100.00% <100.00%> (ø)
SwiftIntro/Features/Game/View/GameView.swift 100.00% <100.00%> (ø)
...tIntro/Features/GameSetup/View/GameSetupView.swift 100.00% <100.00%> (ø)
SwiftIntroTests/App/RootVCTests.swift 100.00% <100.00%> (ø)
SwiftIntroTests/Dependencies/ImageCacheTests.swift 100.00% <100.00%> (ø)
...Intro/Features/Game/Model/Values/CardSingles.swift 0.00% <0.00%> (ø)

... and 27 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates UI view construction to use lazy-initialized subviews and tweaks the Loading → Game navigation transition to animate, with associated test adjustments and a small networking log addition.

Changes:

  • Convert several UIKit subview properties to lazy var and apply small formatting/refactor cleanups in game UI code.
  • Animate RootVC.navigateToGame by using setViewControllers(..., animated: true) and update navigation tests to allow UIKit to commit stack changes.
  • Add Hashable conformances to Card/CardSingles and log a parsed-result hash in WikimediaClient.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
SwiftIntroTests/Dependencies/ImageCacheTests.swift Reduces two wait timeouts in cache tests.
SwiftIntroTests/App/RootVCTests.swift Adds short run-loop drains after navigateToGame calls.
SwiftIntro/Features/GameSetup/View/GameSetupView.swift Makes several controls lazy-initialized.
SwiftIntro/Features/Game/View/GameView.swift Makes subviews lazy; minor formatting + moves render into an extension.
SwiftIntro/Features/Game/View/CardCVCell.swift Refactors constraint activation to a loop.
SwiftIntro/Features/Game/Model/Values/CardSingles.swift Adds Hashable conformance.
SwiftIntro/Features/Game/Model/Values/Card.swift Adds Hashable conformance.
SwiftIntro/Features/Game/GameVC.swift Formats collection view registration call across lines.
SwiftIntro/Dependencies/Wikimedia/WikimediaClient.swift Logs parsed.hashValue before delivering results.
SwiftIntro/App/RootVC.swift Animates stack replacement when transitioning Loading → Game.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


// Assert — inverted expectation fails (test fails) if done fires within the timeout
waitForExpectations(timeout: 0.5)
waitForExpectations(timeout: 0.1)
let waiter = expectation(description: "main queue drain")
DispatchQueue.main.async { waiter.fulfill() }
waitForExpectations(timeout: 0.5)
waitForExpectations(timeout: 0.1)
Comment thread SwiftIntro/Features/Game/Model/Values/CardSingles.swift
do {
try done(.success(WikimediaClient.parse(data)))
let parsed = try WikimediaClient.parse(data)
logNet.debug("WikimediaClient parsed: \(parsed.hashValue)")
Sajjon and others added 2 commits April 22, 2026 09:48
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Sajjon Sajjon merged commit a9ffec2 into main Apr 22, 2026
2 checks passed
@Sajjon Sajjon deleted the tuesday2 branch April 22, 2026 16:20
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