solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

[Bug?]: Single-flight mutations don't include cookies

Open AlexErrant opened this issue 1 year ago • 0 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] I have tested the latest version

Current behavior 😯

Consider a scenario where the username is stored in a cookie and rendered on the page if it's present. Currently, the username is not shown after a single flight mutation.

Expected behavior 🤔

No response

Steps to reproduce 🕹

Steps:

  1. Clone/apply this commit to examples/todomvc
  2. Observe that the code adds middleware which adds a cookie to be displayed on todomvc.
  3. Here's a video showing how adding something to the todo list (thus triggering a SFM) doesn't have the page show the cookie.

https://github.com/user-attachments/assets/0d938186-1c71-458a-9cb4-b642946f4b52

Context 🔦

Note that this commit fixes the issue, but I'm not nearly confident enough in it to PR it. It also doubles up the cookies for some reason. Guidance/feedback welcome 😊

Your environment 🌎

No response

AlexErrant avatar Sep 26 '24 21:09 AlexErrant