Skip to content

Fix infinite recomposition in flexible containers#390

Open
dfabulich wants to merge 1 commit intoskiptools:mainfrom
dfabulich:infinite-recomposition-flexible-container
Open

Fix infinite recomposition in flexible containers#390
dfabulich wants to merge 1 commit intoskiptools:mainfrom
dfabulich:infinite-recomposition-flexible-container

Conversation

@dfabulich
Copy link
Copy Markdown
Contributor

@dfabulich dfabulich commented Apr 5, 2026

Flexible fill could cause contentFlexibleWidthMax/contentFlexibleHeightMax to increase due to a side effect, causing a decrease in the next side effect, causing an increase in the next side effect, and so on.

Now, we only allow monotonically increasing values.

Fixes #389

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device
  • REQUIRED: I have checked whether this change requires a corresponding update in the Skip Fuse UI repository (link related PR if applicable)
    Not needed
  • OPTIONAL: I have added an example of any UI changes in the Showcase sample app

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

Cursor generated the merge function. (I'm not entirely sure what the right expansion rank ought to be; it doesn't match the ordering in StackLayouts.kt.)

I visually inspected the Stacks playground, verified that infinite recomposition halted in automated tests. skiptools/skipapp-showcase#83

Flexible fill could cause `contentFlexibleWidthMax`/`contentFlexibleHeightMax` to increase due to a side effect, causing a decrease in the next side effect, causing an increase in the next side effect, and so on.

Now, we only allow monotonically increasing values.

Fixes skiptools#389
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recomposition Loop - VStack Layout

1 participant