Skip to content

Add Live Reload using WebSockets#207

Open
wh1le wants to merge 1 commit intoDannyBen:edgefrom
wh1le:add-live-reload
Open

Add Live Reload using WebSockets#207
wh1le wants to merge 1 commit intoDannyBen:edgefrom
wh1le:add-live-reload

Conversation

@wh1le
Copy link
Copy Markdown

@wh1le wh1le commented Apr 19, 2026

Adds WebSocket-based live reload support (edited, deleted, created)

What's included

  • LiveReload server - uses listen gem to watch and faye-websocket to push changes
  • Rack middleware intercepts WebSocket upgrade requests at/_live_reload
  • Frontend JS - connects via WebSocket, fetches fresh HTML on change, swaps .main content and nav sidebar
  • Config - live_reload: true by default, disable with --no-live-reload or live_reload: false in .madness.yml

* fix nav selector: ".nav" -> "nav" (tag not class)
* sync page title and re-init mermaid after swap
* move middleware registration to prepare (fix load-time crash)
* add LiveReload + Middleware specs (14 examples)
* update approval files for new config/cli option
* document live_reload in README
@wh1le wh1le changed the base branch from master to edge April 19, 2026 13:48
@DannyBen
Copy link
Copy Markdown
Owner

Thanks. There are issues with this PR that need addressing before I can decide if I want to merge it.

  1. It seems to originate from an outdated commit (62 commits behind).
  2. I prefer to avoid negative flags. No --no*.
  3. Live reload, if added, should be off by default.
  4. Live reload should work out of the box for non evented file systems (use polling only or by default).
  5. Tests should at least pass, and at most provide 100% coverage.

Even if all these are fixed, I am still not sure I want to merge - there is more overhead than I am comfortable with, but if the above is fixed, I can at least start to evaluate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants