Skip to content

fix(mobile): correct the stale skeleton assertion in the home-screen test - #6732

Closed
iscekic wants to merge 2 commits into
mainfrom
kwf/fix-home-screen-stale-skeleton-assertion
Closed

iscekic wants to merge 2 commits into
mainfrom
kwf/fix-home-screen-stale-skeleton-assertion

Conversation

@iscekic

@iscekic iscekic commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Main is red. This PR unblocks the failing test (kilo-app) check.

What broke

Workflow run 36167796688, job test (kilo-app), fails in apps/mobile/src/components/home/home-screen.mounted.test.tsx at line 668, in the test Home live presentation > withholds the platform pull indicator while the live section shows its own loading card:

AssertionError: expected 'absolute left-0 top-0 bottom-0 w-[3px]…' to contain 'min-h-[72px]'
 ❯ src/components/home/home-screen.mounted.test.tsx:668:51

Which commit broke it

Commit f1faf00 (PR #6705) moved the live-session placeholder geometry. The class min-h-[72px] is now on the wrapping View of the placeholder card, not on a Skeleton:

<View className="min-h-[72px] overflow-hidden rounded-2xl border border-border bg-card">
  <View className="relative flex-row items-start gap-3 py-[13px] pl-[18px] pr-3">
    <Skeleton className="absolute left-0 top-0 bottom-0 w-[3px] rounded-[2px]" />
    ...

Why the assertion can never pass

The assertion nodes('Skeleton')[0]?.props.className contains min-h-[72px] is now false by construction. No Skeleton carries that class. The first Skeleton is the 3px leading strip, so the assertion reads absolute left-0 top-0 bottom-0 w-[3px] rounded-[2px] and fails on every run.

PR #6705 updated this assertion pattern in the other sites of the same file to nodes('View').some(...). Line 668 stayed on the old pattern.

The fix

One assertion, corrected to the style already used by the other assertions in the same file. No production code change. No test refactor.

-    expect(nodes('Skeleton')[0]?.props.className).toContain('min-h-[72px]');
+    expect(
+      nodes('View').some(view => {
+        const className = String(view.props.className ?? '');
+        return className.includes('min-h-[72px]') && className.includes('rounded-2xl');
+      })
+    ).toBe(true);

The assertion keeps its meaning: in the pending state liveSessionContent returns pending, so the only min-h-[72px] card on the surface is the section's own loading placeholder.

Verification

Remote CI is the proof. The test (kilo-app) check must pass on this PR. oxfmt --check and oxlint are clean on the changed file.

@kilo-code-bot

kilo-code-bot Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

This test-only change corrects the stale Skeleton assertion to the View-based pattern already used elsewhere in the same file, and it matches the production placeholder in agent-sessions-section.tsx:313.

Files Reviewed (1 file)
  • apps/mobile/src/components/home/home-screen.mounted.test.tsx

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@iscekic iscekic added the human-ready The PR is ready for human review. label Sep 25, 2026
@iscekic iscekic closed this Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-ready The PR is ready for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant