Repository navigation
feat(hotreload): prototype opt-in browser asset rebuilds - #147
Draft
TheAngryByrd wants to merge 2 commits into
Draft
TheAngryByrd wants to merge 2 commits into
TheAngryByrd wants to merge 2 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Summary
Add optional browser-asset builds through
sagefs.browser-assets.json. Build execution and asset snapshots are replaceable functions, with no WebSharper dependency in the host.flowchart TD Save[Source change] --> Route{Configured source route} Route --> CLR[Existing CLR reload path] Route --> Ignore[Ignore excluded generated sources] Route --> Build[External browser build] Build --> Changed[Changed output: AssetsRebuilt and page refresh] Build --> Same[Unchanged output: no refresh] Build --> Failed[Build failure: show error without refresh]The pipeline serializes builds and adds timeout, cancellation, content hashes, and duplicate-refresh protection. A read-only
/__sagefs__/devreload.jsendpoint supports same-origin proxy integration.A generic WebSharper sample documents the configuration and browser workflow. Projects without this configuration retain the existing source route.
Why
CLR reload alone does not rebuild browser JavaScript. This separate path lets external compilers and bundlers produce browser assets while the server remains running.
This prototype provides page refresh, not JavaScript HMR or faster compilation. Shared browser/server source edits require a coordinated rebuild strategy and remain outside its scope.
How to Verify
Evidence
cb747060has the CLR reload path but no browser-asset configuration, controller, orAssetsRebuiltoutcome.c0dc74aeproduced these results:TrustedThe 114 focused .NET tests report
NarrowedRun, not full-suite acceptance. They cover optional exclusions, route boundaries, script rendering, HTTP access rules, and existing reload behavior.Earlier full Windows runs were not green: net11 reported 51 failures and 122 errors, and net10 reported 50 failures and 124 errors. Those runs predate the final exclusions and script-endpoint changes. Not every failure has a confirmed cause.
This is a draft. Full-suite acceptance and upstream CI remain open. At PR creation, upstream
masterwas nine commits ahead of the branch's base.Merge Danger
Door: two-way
Remove the optional configuration and restart the session to restore the existing source route. No data migration is required.
Blast Radius: Reloading
The changes affect shared worker routing, reload outcomes, and browser event handling. Focused checks passed, but they do not establish release readiness.
Checklist