Skip to content

handle sse close with no event data - #3923

Open
MichaelWest22 wants to merge 1 commit into
bigskysoftware:four-devfrom
MichaelWest22:sse-close
Open

handle sse close with no event data#3923
MichaelWest22 wants to merge 1 commit into
bigskysoftware:four-devfrom
MichaelWest22:sse-close

Conversation

@MichaelWest22

@MichaelWest22 MichaelWest22 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Description

sse extension does not handle close events well with no data. reworked the logic so that events even with no data still flow though as you would expect. Also last id update logic can be improved a little to always count the last sent id properly and only set last id when there is an id.

Corresponding issue:
#3920

Testing

Added a test for no data close event and removed a test that showed canceling a id update would not increment the last id which could cause invalid resending of data.

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

@MichaelWest22 MichaelWest22 added the htmx 4 Issues specific to htmx version 4 label Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

htmx 4 Issues specific to htmx version 4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant