Skip to content

[fix] the events feed said Live over a dead socket - #153

Merged
malickyeu merged 1 commit into
mainfrom
fix/events-reconnect
Aug 7, 2026
Merged

[fix] the events feed said Live over a dead socket#153
malickyeu merged 1 commit into
mainfrom
fix/events-reconnect

Conversation

@malickyeu

Copy link
Copy Markdown
Contributor

Summary

The events feed said Live over a dead connection.

Its WebSocket had no reconnect at all — the stats/logs socket next door (web/src/lib/ws.ts) has had one all along — so a server restart, a reverse-proxy idle timeout or a laptop waking from sleep left the page showing a pulsing green badge above a list that would never move again.

Worse, the badge reflected only the pause toggle, not the connection. So the page actively asserted it was live while the socket was gone. That is the worst shape this bug can take: an empty feed reads as "nothing is happening", so nobody looks closer.

  • Reconnects after 1.5s, the same interval the shared socket uses, so the two behave alike after a restart.
  • Stops reconnecting when the page goes away — leaving a socket reopening forever behind a navigation would be a new bug.
  • The badge now reports the connection: Live, Paused, or Reconnecting….

Also

Two documentation claims that described the backend rather than the app. Both are corrected here and the controls themselves are added in a separate PR:

  • README.md listed a container kill action; no button existed anywhere.
  • docs/images.md promised a build args field the dialog did not have. The No cache checkbox that is there was undocumented.

Tests

New web/src/pages/Events.dom.test.tsx, five cases: it does not claim to be live before the socket opens, says Live once connected, stops claiming it on a drop, reconnects and says Live again, and does not reconnect after unmount.

Mutation-verified: removing the reconnect fails one test; restoring the pause-only badge fails two.

Type of change

  • Bug fix
  • New feature
  • Docs only
  • Refactor / chore

Checklist

  • go test -short ./... and go vet ./... pass (unchanged — no Go)
  • gofmt gate is clean (no Go files touched)
  • Frontend type-checks
  • Rebuilt and committed web/dist
  • Added tests for the change
  • CHANGELOG.md entry

Notes for reviewers

Found by a documentation-vs-code audit, in the direction that only an inventory finds: not "is this claim true?" but "what does the app do that no page mentions?". The events page turned out to have a real defect rather than a documentation gap.

Worth checking whether the same shape exists elsewhere — any new WebSocket( outside lib/ws.ts. I believe this was the only one, but a second pair of eyes on that grep is cheap.

The WebSocket had no reconnect — the stats/logs socket next door has had one all
along — and the badge reflected only the pause toggle, so a dropped connection
left a pulsing green "Live" above a list that would never move again. An empty
feed reads as "nothing is happening", which is why nobody would have noticed.

It reconnects on the same 1.5s the shared socket uses, stops reconnecting when
the page goes away, and the badge now reports the connection.

Also two documentation claims that described the backend rather than the app:
README listed a container "kill" action with no button anywhere, and the images
page promised a build-args field the dialog does not have. Both said plainly,
with the No cache checkbox that IS there documented instead.

Found by an inventory pass over the whole manual.
Copilot AI lite review requested due to automatic review settings August 6, 2026 18:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@malickyeu malickyeu closed this Aug 6, 2026
@malickyeu malickyeu reopened this Aug 6, 2026
@malickyeu malickyeu closed this Aug 7, 2026
@malickyeu malickyeu reopened this Aug 7, 2026
@malickyeu
malickyeu merged commit d6688cb into main Aug 7, 2026
2 of 3 checks passed
@malickyeu
malickyeu deleted the fix/events-reconnect branch August 7, 2026 07:23
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