Skip to content

fix: Live updates when running in Docker - #162

Merged
dkorecko merged 19 commits into
mainfrom
fix/live-updates-in-docker
Nov 19, 2025
Merged

dkorecko merged 19 commits into
mainfrom
fix/live-updates-in-docker

Conversation

@dkorecko

@dkorecko dkorecko commented Nov 19, 2025 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores
    • Improved real-time connection setup to make live updates more reliable across environments.
    • Standardized cookie propagation to ensure session/authorization cookies are consistently applied during connections.
    • Adjusted server binding behavior so the app supports both development and production host configurations.

@dkorecko
dkorecko requested a review from Copilot November 19, 2025 16:45
@coderabbitai

coderabbitai Bot commented Nov 19, 2025 •

Copy link
Copy Markdown

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Replaces dynamic Hub URL resolution in Ticky.Web/Components/Pages/BoardView.razor with a prebuilt Uri variable (default http://localhost:8080, overridden to https://localhost:7225 in DEBUG) that is passed to HubConnectionBuilder.WithUrl. Cookie Domain assignment is changed to use uri.Host and System.IO is added to imports. The same Uri/cookie logic is applied in both the initial hub setup and the OnAfterRenderAsync path. In Ticky.Web/Program.cs, a conditional compilation block (#if !DEBUG) enables UseUrls("http://0.0.0.0:8080") for non-DEBUG builds.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review BoardView.razor: Hub connection creation in two places, cookie domain changes, and added using.
  • Verify consistency between DEBUG and non-DEBUG URL choices and cookie behavior.
  • Review Program.cs: conditional UseUrls and impact on hosting/bind addresses.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: Live updates when running in Docker' accurately describes the main objective of the changeset, which addresses connection issues with live updates in Docker environments by fixing URL resolution and cookie domain handling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/live-updates-in-docker

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between cca4746 and 76de270.

📒 Files selected for processing (2)
  • Ticky.Web/Components/Pages/BoardView.razor (2 hunks)
  • Ticky.Web/Program.cs (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Pull Request Overview

This PR fixes live updates functionality when the application runs in Docker by configuring proper URLs for both the web host and SignalR hub connections based on the build configuration.

Key Changes:

  • Configures the web host to listen on http://0.0.0.0:8080 in non-DEBUG (production/Docker) builds
  • Updates SignalR hub connection to use hardcoded URLs instead of navigation manager's base URI, with conditional logic for DEBUG vs production environments

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
Ticky.Web/Program.cs Adds conditional URL configuration for Docker deployment (port 8080 for non-DEBUG builds)
Ticky.Web/Components/Pages/BoardView.razor Replaces dynamic hub URL resolution with hardcoded URLs based on build configuration and updates cookie domain accordingly

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Ticky.Web/Components/Pages/BoardView.razor
Comment thread Ticky.Web/Components/Pages/BoardView.razor Outdated
Comment thread Ticky.Web/Program.cs
Comment thread Ticky.Web/Components/Pages/BoardView.razor

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 5

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 61a21c9 and cca4746.

📒 Files selected for processing (2)
  • Ticky.Web/Components/Pages/BoardView.razor (2 hunks)
  • Ticky.Web/Program.cs (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (csharp)

Comment thread Ticky.Web/Components/Pages/BoardView.razor Outdated
Comment thread Ticky.Web/Components/Pages/BoardView.razor
Comment thread Ticky.Web/Components/Pages/BoardView.razor
Comment thread Ticky.Web/Components/Pages/BoardView.razor
Comment thread Ticky.Web/Program.cs
dkorecko and others added 3 commits November 19, 2025 18:18
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Nov 19, 2025
@dkorecko
dkorecko merged commit d3df5a2 into main Nov 19, 2025
4 checks passed
@dkorecko
dkorecko deleted the fix/live-updates-in-docker branch November 19, 2025 17:27
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