Skip to content

Fix SignalR live status detection and add version footer - #593

Merged
LarsLaskowski merged 1 commit into
mainfrom
bugfix/signalr_status
Aug 16, 2026
Merged

Fix SignalR live status detection and add version footer#593
LarsLaskowski merged 1 commit into
mainfrom
bugfix/signalr_status

Conversation

@LarsLaskowski

@LarsLaskowski LarsLaskowski commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Pull Request

📖 Description

Fixes the live-session status indicator, which permanently showed "offline"
because the SignalR hub could never reach a Connected state, and adds a
small footer showing the current app version.

  • Fixes the SignalR hub connection so isLiveSession/hub-status indicators
    reflect the real connection state instead of always showing disconnected.
  • Replaces interval polling for hub connectivity with an event-driven
    hubConnected$ observable on SignalrService, removing the up-to-30s
    delay before the status indicator updated.
  • Adds a tooltip on the nav-menu live-status icon reflecting the actual
    connection/live-session state.
  • Adds a slim footer showing the current app version (from package.json),
    pinned to the bottom of the viewport via a sticky-footer layout.
  • Documents in ARCHITECTURE.md that the lack of authentication is a
    deliberate choice for private-network use, not an oversight.

🎫 Issues

👩‍💻 Reviewer Notes

  • Root cause: @microsoft/signalr defaults to withCredentials: true;
    combined with the server's AllowAnyOrigin() CORS policy (without
    AllowCredentials()), the browser silently blocked every hub negotiate
    request, so the connection state never became Connected. Fixed on the
    client by passing withCredentials: false — no server CORS change
    needed, keeping wildcard-origin CORS and credentials mutually exclusive
    as required by this repo's own convention.
  • The app runs zoneless Angular change detection; NavMenuComponent
    updated its internal connection-state field but never called
    markForCheck(), so the view never re-rendered even when the state
    changed. Added the missing call, matching the existing pattern already
    used in HomeComponent.
  • Worth a quick visual check of the footer at different viewport heights
    (short and long pages) to confirm the sticky-footer behavior.

📑 Test Plan

Verified manually in the browser: hub status now flips to "online" within
about a second of connecting (previously blocked entirely by CORS); the
nav icon tooltip reflects connection/live-session state; the footer shows
the current package.json version and stays pinned to the bottom on short
pages while flowing with content on long pages.

✅ Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the project's code style guidelines.

Frontend-specific (Angular)

  • I have added a new Angular component or service in F1ServerApp.
  • I have modified an existing Angular component or service.
  • I have kept the frontend models/services in sync with the backend Data/ViewData contracts.

⏭ Next Steps

- Update version to 1.18.2 in package.json and package-lock.json
- Add FooterComponent to display app version; integrate into main layout
- Adjust layout and CSS for sticky footer and flexible content
- Refactor SignalrService to expose hubConnected$ observable
- Update HomeComponent and NavMenuComponent to use hubConnected$ for live status and reload on state changes
- Add liveStatusTooltip() to NavMenuComponent for accessibility
- Remove unused timer-based connection checks from NavMenuComponent
- Enable resolveJsonModule in tsconfig.json for version import
- Clarify lack of authentication in ARCHITECTURE.md as intentional for private networks
@sonarqubecloud

Copy link
Copy Markdown

@LarsLaskowski
LarsLaskowski merged commit aeb333e into main Aug 16, 2026
6 checks passed
@LarsLaskowski
LarsLaskowski deleted the bugfix/signalr_status branch August 16, 2026 07:31
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.

1 participant