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: keep classifying after a rebuild, and stop claiming an uncommitted swap
The feature turned itself off for every edit after the first in a burst.
doRebuild invalidates the lazy analysis, nothing re-warms it until an
HTTP request arrives, and the relay defers that request by its 2000ms
quiet window while the measured inter-save gap is about a second. So the
second save classified analysis-cold and the strongest-verdict rule
collapsed the whole batch to a full reload. The gate now reads whether
the derived sets are POPULATED rather than whether they are current,
which is what the rest of the code already assumed: classifying against
the previous build's graph is intended, and it is conservative in the
right direction, since a file that graph has never seen falls through to
a reload.
applySwap returns without committing on four paths (a missing frame, and
three degradations to a hard navigation), and all four still reported
applied true, which is the hole the flag exists to close. They return a
sentinel now and fetchAndApply maps it.
Three doc corrections. The gallery copy described a counter that is not
on that page. The skill reference kept the direct CLI invocation the
website copy had already dropped. And both runtime surfaces listed five
watched directories while the supervisor also watches root middleware,
so a middleware edit is a full reload rather than the in-place refresh
they implied.
Copy file name to clipboardExpand all lines: .agents/skills/webjs/references/runtime.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ Three seams pick a runtime-specific implementation, all inside the framework, no
40
40
41
41
**The in-place dev refresh (#1398) needs the server process to SURVIVE the edit,** which is the whole of the Node-versus-Bun difference in that row. A page or layout never hydrates, so a freshly rendered page is the complete truth for it and the client router can swap it in without a reload, keeping scroll and (for a page edit) the hydrated state of components outside the changed region. The server classifies the changed file and puts the verdict on the live-reload event, so this needs a process that is still alive to do the classifying.
42
42
43
-
Bun's `bun --hot` invalidates modules in place without restarting, so it gets the refresh. Node's `bun --hot` equivalent is `node --watch`, which RESTARTS the process on a change under `app`, `components`, `modules`, `lib`, or `actions`, and a fresh process holds no record of what changed, so those edits are always a full reload. Two Node cases still refresh in place: an edit OUTSIDE those five dirs (`db/schema.server.ts`, a `webjs.dev.watch` content dir), and running `webjs dev --no-hot`, which keeps the server in one process on either runtime. A component edit is a full reload everywhere by design, because `customElements.define` is once-per-tag and swapping fresh markup onto the old class would be worse than the reload.
43
+
Bun's `bun --hot` invalidates modules in place without restarting, so it gets the refresh. Node's `bun --hot` equivalent is `node --watch`, which RESTARTS the process on a change under `app`, `components`, `modules`, `lib`, or `actions`, or to a root `middleware.{ts,js,mts,mjs}`, and a fresh process holds no record of what changed, so those edits are always a full reload. Two Node cases still refresh in place: an edit OUTSIDE that watched set (`db/schema.server.ts`, a `webjs.dev.watch` content dir), and running `npm run dev -- --no-hot`, which keeps the server in one process on either runtime. A component edit is a full reload everywhere by design, because `customElements.define` is once-per-tag and swapping fresh markup onto the old class would be worse than the reload.
44
44
45
45
The 103 Early Hints gap costs only a small first-load latency edge where an edge proxy forwards the 103, never correctness. The `modulepreload` hints still ship in the document head on both runtimes.
if(!doc){restoreOptimistic(optimisticState);handleNavigationError(href,null,newError('navigation response did not parse as HTML'));return{ok: false,status: respStatus,aborted: false,applied: false};}
console.warn(`[webjs] frame "${frameId}" was not in the navigation response, leaving it unchanged. Handle "webjs:frame-missing" (preventDefault) to override.`);
3927
3940
}
3928
-
return;
3941
+
return'none';
3929
3942
}
3930
3943
3931
3944
// 1b. Same-URL refresh in `shell` mode (#1398). A boundary morph can only
Copy file name to clipboardExpand all lines: website/app/docs/runtime/page.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ export default function Runtime() {
32
32
</tbody>
33
33
</table>
34
34
<p>The in-place dev refresh needs the server process to <strong>survive</strong> the edit, which is the whole of that last row. A page or layout never hydrates, so a freshly rendered page is the complete truth for it and the client router can swap it in without a reload, keeping your scroll position and the hydrated state of components outside the changed region. The server classifies the changed file and puts the verdict on the live-reload event, so it needs a process that is still alive to do the classifying.</p>
35
-
<p>Bun's <code>bun --hot</code> invalidates modules in place without restarting, so it gets the refresh. On Node, <code>node --watch</code> restarts the process on a change under <code>app</code>, <code>components</code>, <code>modules</code>, <code>lib</code>, or <code>actions</code>, and a fresh process holds no record of what changed, so those edits are a full reload. Two Node cases still refresh in place: an edit outside those five directories (<code>db/schema.server.ts</code>, a <code>webjs.dev.watch</code> content directory), and <code>npm run dev -- --no-hot</code>, which keeps the server in one process on either runtime. A component edit is a full reload everywhere by design, because <code>customElements.define</code> is once-per-tag and swapping fresh markup onto the old class would be worse than the reload.</p>
35
+
<p>Bun's <code>bun --hot</code> invalidates modules in place without restarting, so it gets the refresh. On Node, <code>node --watch</code> restarts the process on a change under <code>app</code>, <code>components</code>, <code>modules</code>, <code>lib</code>, or <code>actions</code>, or to a root <code>middleware</code> file, and a fresh process holds no record of what changed, so those edits are a full reload. Two Node cases still refresh in place: an edit outside that watched set (<code>db/schema.server.ts</code>, a <code>webjs.dev.watch</code> content directory), and <code>npm run dev -- --no-hot</code>, which keeps the server in one process on either runtime. A component edit is a full reload everywhere by design, because <code>customElements.define</code> is once-per-tag and swapping fresh markup onto the old class would be worse than the reload.</p>
36
36
37
37
<p>Either way the <code>.ts</code> stripping is position-preserving with no sourcemap, and the bytes the browser fetches are identical. The 103 Early Hints gap only costs a small first-load latency edge where your edge forwards 103, never correctness (the modulepreload hints still ship in the document head).</p>
0 commit comments