Skip to content

Add Debug.Assert for missing OverlayDialogHost with setup guidance#863

Merged
zdpcdt merged 3 commits intomainfrom
copilot/assert-overlay-dialog-host-found
Jan 26, 2026
Merged

Add Debug.Assert for missing OverlayDialogHost with setup guidance#863
zdpcdt merged 3 commits intomainfrom
copilot/assert-overlay-dialog-host-found

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 19, 2026

When developers call OverlayDialog.Show() or Drawer.Show() without properly setting up an OverlayDialogHost, the operations silently fail. This adds a debug-mode assertion to surface the issue immediately with actionable guidance.

Changes

Example

// Without proper setup, this now asserts in debug builds:
OverlayDialog.Show<MyView, MyViewModel>(viewModel);

// Debug output:
// OverlayDialogHost not found. Please ensure the host is properly set up:
// 1. Use UrsaWindow or UrsaView which includes OverlayDialogHost in their control templates, or
// 2. Add an OverlayDialogHost control with a HostId property to your view.

Debug-only, no impact on release builds.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • av-build-tel-api-v1.avaloniaui.net
    • Triggering command: /usr/share/dotnet/dotnet dotnet exec --runtimeconfig /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.1/tools/netstandard2.0/runtimeconfig.json /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.1/tools/netstandard2.0/Avalonia.BuildServices.Collector.dll (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Assert overlay dialog host is found in debug mode</issue_title>
<issue_description>When retrieving OverlayDialogHost from host manager, if the host is not found, it's likely developer is not setting up the host correctly. We should call Debug.Assert, explain that host should be setup correctly with UrsaWindow/UrsaView or a self-setup OverlayDialogHost with property HostId, and redirect developer to documentation https://docs.irihi.tech/ursa/docs/advanced/dialog-and-drawer/overlay-dialoghost. </issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…up instructions

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>
Copilot AI changed the title [WIP] Assert overlay dialog host is found in debug mode Add Debug.Assert for missing OverlayDialogHost with setup guidance Jan 19, 2026
Copilot AI requested a review from rabbitism January 19, 2026 13:08
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 19, 2026

Test Results

715 tests  ±0   715 ✅ ±0   15s ⏱️ -1s
  2 suites ±0     0 💤 ±0 
  2 files   ±0     0 ❌ ±0 

Results for commit 3621313. ± Comparison against base commit 975757d.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
Ursa 48% 34% 8150
Ursa.Themes.Semi 61% 68% 1018
Summary 53% (10682 / 20129) 37% (2638 / 7056) 9168

@rabbitism rabbitism requested a review from zdpcdt January 19, 2026 13:50
@rabbitism rabbitism marked this pull request as ready for review January 19, 2026 13:51
@zdpcdt zdpcdt merged commit 7afb501 into main Jan 26, 2026
4 checks passed
@rabbitism rabbitism deleted the copilot/assert-overlay-dialog-host-found branch March 22, 2026 08:40
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.

Assert overlay dialog host is found in debug mode

3 participants