Skip to content

Keep pending resources during concurrent head merges - #4130

Open
jay23606 wants to merge 2 commits into
bigskysoftware:four-devfrom
jay23606:fix-hx-head-pending-resource-race
Open

jay23606 wants to merge 2 commits into
bigskysoftware:four-devfrom
jay23606:fix-hx-head-pending-resource-race

Conversation

@jay23606

@jay23606 jay23606 commented Oct 9, 2026

Copy link
Copy Markdown

Concurrent hx-head="merge" responses can remove a stylesheet or blocking script while an earlier response is waiting for its load event. If removal prevents that event from firing, the earlier response never reaches its swap.

Track render-critical resources while they load and keep them in the head during concurrent merges. Add a three-second ceiling to the wait so a resource that never settles cannot hold a swap indefinitely. The regression test stalls a stylesheet, performs a second merge, then confirms the stylesheet remains and the first swap completes.

Fixes #4100.

Validation: npm run test:chrome (1,782 passed, 0 failed, 4 skipped).

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.

1 participant