You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(server): wire up requestContext/query-string globals in buddy serve
storage/framework/core/actions/src/dev/views.ts sets globalThis.requestContext
(cookie access) and __stxServeSearch (query string) for `<script server>`
blocks in .stx pages, but only dev/views.ts (buddy dev) did this —
buddy serve (this file, the actual production entrypoint) never did.
Found via an end-to-end test in a downstream app: a real login cookie
was sent, but server-rendered pages never saw it and rendered as fully
signed-out for every request.
Uses plain globals rather than AsyncLocalStorage (which dev/views.ts
uses) — confirmed via the same e2e test that bun-plugin-stx's internal
request handling doesn't preserve AsyncLocalStorage context between
onRequest returning and the page actually rendering, so the store was
always empty by read time. __stxServeSearch already relies on a plain
global for the same reason; __stxServeCookies follows that precedent.
0 commit comments