Skip to content

Conversation

@honghaoz
Copy link
Owner

@honghaoz honghaoz commented Jan 25, 2026

Motivation

  • Bring HStack test coverage in line with VStack by verifying renderableItems(in:) correctly culls offscreen children and includes children that are moved into the query rect via offset.

Description

  • Added two tests to ComposeUI/Tests/ComposeUITests/ComposeNodes/HorizontalStackNodeTests.swift: test_renderableItems_filtersOffscreenChildren and test_renderableItems_includesOffsetChildren.
  • test_renderableItems_filtersOffscreenChildren lays out a 3-child HStack and asserts that only the child overlapping the query rect is returned by renderableItems(in:).
  • test_renderableItems_includesOffsetChildren applies an offset to a child and asserts the offset child is included when its frame intersects the query rect.

Testing

  • No automated tests were run as part of this change.

Codex Task


Note

Improves HStack coverage for renderableItems(in:) behavior.

  • Adds test_renderableItems_filtersOffscreenChildren to ensure only overlapping children are returned
  • Adds test_renderableItems_includesOffsetChildren to ensure offset children intersecting the query rect are included

Written by Cursor Bugbot for commit 543de0d. This will update automatically on new commits. Configure here.

@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.74%. Comparing base (fb9776c) to head (543de0d).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #3   +/-   ##
=======================================
  Coverage   88.74%   88.74%           
=======================================
  Files          90       90           
  Lines        4346     4346           
=======================================
  Hits         3857     3857           
  Misses        489      489           
Flag Coverage Δ
ComposeUI 88.74% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted file tree graph

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

@honghaoz honghaoz merged commit 059dd57 into master Jan 25, 2026
10 checks passed
@honghaoz honghaoz deleted the codex/add-tests-for-hstack branch January 25, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants