Skip to content

Instantly share code, notes, and snippets.

View azogheb's full-sized avatar

Alexander Zogheb azogheb

View GitHub Profile
@azogheb
azogheb / README.md
Created October 21, 2026 00:07
Next.js 16.4: useTransition stays pending after pushState during a discarded Server Action's refresh

Minimal repro: a useTransition stays pending forever when history.pushState lands while a discarded Server Action's refresh is still streaming (Next 16.4.0, React 19.3.0).

Files named app__x.js go in app/x.js. Then npm i && npx next build --webpack && npx next start.

  1. Press run. Within 2 s, press tab b.
  2. After the action answers (~2 s) and before the follow-up GET ?tab=b&_rsc= finishes streaming (~1.5 s later), press tab a.
  3. run stays disabled until a reload.

Measured on next 16.4.0 / react 19.3.0, next build --webpack && next start, Chromium via Playwright: 3/3 stuck with both presses, 0/3 with the first press alone.

// Request access to the tags for this resource request
[resourceRequest beginAccessingResourcesWithCompletionHandler:
^(NSError * __nullable error)
{
// Check if there is an error
if (error) {
// There is a problem so update the app state
//self.resourcesLoaded = NO;
// Should also inform the user of the error
<dom-module id="x-safaribug">
<template>
<content></content>
<template is="dom-repeat">
Foo
</template>
</template>
<script>
Polymer({
is: 'x-safaribug'
@azogheb
azogheb / gist:4562376
Created January 18, 2013 04:40
Timing details template for use with cURL as per http://josephscott.org/archives/2011/10/timing-details-with-curl/
\n
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
----------\n
time_total: %{time_total}\n
\n