Fix site status toggle tests to use the current renderMainView signature - #4379
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Collaborator
📊 Performance Test ResultsComparing ebc2e48 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
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.
Related issues
How AI was used in this PR
AI traced the failure to its origin, wrote the fix, and verified it.
npm run typecheckand the affected suite were run locally and reviewed.Proposed Changes
trunkis currently red on both Unit Tests and Lint. This fixes it.Two PRs landed the same day and conflicted semantically rather than textually, so nothing blocked either one:
renderMainViewtest helper to take an options object ({ siteOverrides, activity }) instead of a bare site-overrides argument, updating the call sites that existed at the time.Git merged both cleanly — the two PRs touched different lines of the same file — but the calls no longer match the helper.
{ running: false }is now swallowed as the options object,siteOverridesfalls back to{}, and the site under test stays running. One test then looks for a stopped-site toggle that was never rendered.The second call site is worth noting: it fails typecheck but still passes, because that test sets
startingand the pending label wins regardless ofrunning. It was quietly asserting against a running site while reading as though it covered a stopped one. Both call sites now pass the override through properly, so that coverage is real again.No production code changes — this is test-only, and the behavior #4374 shipped is unaffected.
Testing Instructions
npm test -- apps/ui/src/components/site-dropdown/main-view.test.tsx— 9 passing.npm run typecheck— clean; ontrunkit reports twoTS2353errors in this file.npm run lintfollowed bynpm run typecheck, which is why one root cause turned two checks red).Pre-merge Checklist