Skip to content

Fix type-checker timeout in AppShellViewModelTests - #78

Merged
scosman merged 2 commits into
scosman:mainfrom
noxan:fix/appshell-test-typecheck-timeout
Sep 2, 2026
Merged

scosman merged 2 commits into
scosman:mainfrom
noxan:fix/appshell-test-typecheck-timeout

Conversation

@noxan

@noxan noxan commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

swift test fails to build AppShellUITests: the EKEventDTO literal in upcomingEventsCappedAt6 has 22 arguments plus inline Double(idx + 1) * 600 + 3600 arithmetic and string interpolation, and the compiler gives up — "unable to type-check this expression in reasonable time" at AppShellViewModelTests.swift:728.

Fix: hoist start / end into explicitly typed locals before the call.

swift test --package-path Packages/BiscottiKit passes (78 + 35 + 19 tests). Verified on top of #77, which is needed for Transcription to compile at all.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DVhag6dKjqZqzP44XDujq5

Summary by CodeRabbit

  • Tests
    • Improved test readability by assigning event time intervals to local variables before creating test events.
    • Existing generated event data and assertions remain unchanged.

Hoist the start/end offsets out of the 22-argument EKEventDTO literal in
upcomingEventsCappedAt6; inline they exceed the type checker's budget and
`swift test` fails to build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DVhag6dKjqZqzP44XDujq5
@coderabbitai

coderabbitai Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: b9d5550d-bb54-409c-8486-5d115b5bc0a4

📥 Commits

Reviewing files that changed from the base of the PR and between 098f7bd and 7bc5016.

📒 Files selected for processing (1)
  • Packages/BiscottiKit/Tests/HomeUITests/HomeViewModelTests.swift

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

Two UI tests now compute local start and end intervals before constructing EKEventDTO values. The generated event data and assertions remain unchanged.

Changes

Event Interval Refactor

Layer / File(s) Summary
Reuse event time intervals
Packages/BiscottiKit/Tests/AppShellUITests/AppShellViewModelTests.swift, Packages/BiscottiKit/Tests/HomeUITests/HomeViewModelTests.swift
The tests use local start and end intervals when constructing event date fields. Existing event values and assertions remain unchanged.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 7bc50

This localized test-only refactor preserves fixture behavior while resolving a compiler type-checking timeout; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: scosman

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: fixing a Swift type-checker timeout in AppShellViewModelTests. It is concise and specific, although the related HomeViewModelTests change is not mentioned…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title clearly identifies the main change: fixing a Swift type-checker timeout in AppShellViewModelTests. It is concise and specific, although the related HomeViewModelTests change is not mentioned.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…eral

Same fix as AppShellViewModelTests (PR 78): hoist the start/end offsets
out of the 22-argument EKEventDTO literal in homeShowsUpcomingPreview
into typed locals so the type checker stays within budget.
@scosman
scosman merged commit d80e69c into scosman:main Sep 2, 2026
4 checks passed
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