Skip to content

chore: Add devcontainer setup for Uno Chefs project - #1756

Merged
kazo0 merged 2 commits into
mainfrom
dev/sb/devcontainer-aspire
Aug 6, 2026
Merged

kazo0 merged 2 commits into
mainfrom
dev/sb/devcontainer-aspire

Conversation

@kazo0

@kazo0 kazo0 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces a comprehensive Linux-based dev container setup for the Uno Chefs project, focused on supporting WebAssembly, Desktop (Skia), and Android development, as well as Aspire orchestration. It adds a new .devcontainer directory with a feature-rich Dockerfile, a detailed README.md, and a VS Code devcontainer.json configuration. The container is tailored for WSL2 or native Linux hosts and includes tooling, dependencies, and environment configuration for streamlined development and testing.

The most important changes are:

Dev Container Environment and Tooling:

  • Added .devcontainer/Dockerfile to build a development container based on mcr.microsoft.com/dotnet/sdk:9.0, with all necessary dependencies for Uno Chefs development (e.g., .NET 9 workloads, Uno/Skia/GTK/WebKit2GTK/LibVLC, Android SDK, Chromium, Claude Code, Copilot CLI, Node.js, git-delta, zsh with powerlevel10k, and helper scripts).
  • Created .devcontainer/devcontainer.json to define the VS Code dev container, including build args, mounts for configuration and X11, port forwarding, terminal profiles (including a WSL host SSH profile), and recommended extensions (Claude Code, Copilot, Uno Platform, .NET tools, GitLens).

Documentation and Usage Instructions:

  • Added .devcontainer/README.md with detailed documentation on container capabilities, host requirements, first-run instructions, port usage, running/testing guidance, and explanations of included/excluded features (e.g., no Android emulator, no Docker-in-Docker, DNS allowlist firewall).

Security and Network Configuration:

  • Integrated a DNS allowlist firewall using dnsmasq and helper scripts (init-firewall.sh), restricting external network access to approved domains for package restoration and agent CLIs.
  • Ensured privileged container capabilities (NET_ADMIN, NET_RAW) for firewall setup, and provided instructions for trimming or customizing the setup if certain features are not needed. [1] [2]

Developer Experience Enhancements:

  • Configured persistent shell history, non-root developer user, and global npm install support; set up default environment variables for improved usability and reproducibility.
  • Provided guidance and automation for host/container integration (e.g., SSH key setup for WSL host terminal, copying Uno Platform credentials, and post-start scripts for environment preparation). [1] [2]

Copilot AI lite review requested due to automatic review settings August 3, 2026 19:36
@mergify

mergify Bot commented Aug 3, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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 adds a Linux/WSL2-focused VS Code devcontainer for the Uno Chefs repo, including a Dockerfile with required dependencies, helper scripts (firewall, host SSH), and documentation. It also introduces an Aspire AppHost project to orchestrate running Chefs.Api plus “explicit-start” Uno client heads, and updates the API to allow development-time CORS for the WASM head.

Changes:

  • Add a full .devcontainer/ setup (image, configuration, scripts, and docs) for WASM/Desktop/Android-build workflows.
  • Introduce Chefs.AppHost (Aspire) to orchestrate Chefs.Api and provide dashboard-driven starts for client heads.
  • Add Development-only CORS policy to Chefs.Api to support cross-origin calls from the WASM dev server.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
global.json SDK pin file updated (currently contains an invalid extra character).
Directory.Packages.props Adds centralized package version for Aspire.Hosting.AppHost.
CLAUDE.md Adds repository-specific development/build/test guidance.
Chefs.sln Adds the new Chefs.AppHost project to the solution.
Chefs.AppHost/Properties/launchSettings.json Defines AppHost launch profile/environment for HTTP-only dashboard/OTLP.
Chefs.AppHost/Program.cs Implements Aspire orchestration: pinned API port + explicit-start client heads.
Chefs.AppHost/Chefs.AppHost.csproj New AppHost project with Aspire SDK + AppHost package reference.
Chefs.Api/Serialization/TimeSpanConverter.cs Formatting-only change (blank line).
Chefs.Api/Program.cs Adds a Development-only CORS policy and applies it in Development.
.gitattributes Normalizes line endings for shell scripts and Dockerfile(s).
.devcontainer/ssh-wsl-host.sh Adds helper to SSH from container back to WSL host via restricted key.
.devcontainer/README.md Documents devcontainer capabilities, usage, ports, and constraints.
.devcontainer/post-start.sh Post-start setup: firewall init, dbus session, MCP registrations, extension install, etc.
.devcontainer/initialize-host.sh Host-side init to provision a restricted devcontainer SSH key.
.devcontainer/init-firewall.sh DNS allowlist via dnsmasq + verification checks.
.devcontainer/Dockerfile Builds the dev image with .NET workloads, Uno deps, agents, Android tooling, etc.
.devcontainer/devcontainer.json VS Code devcontainer configuration (mounts, caps, env, ports, extensions, hooks).

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

Comment thread global.json Resolved
Copilot AI review requested due to automatic review settings August 4, 2026 20:01

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

Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

.gitattributes:12

  • The line-ending rule for Dockerfiles only matches a file literally named Dockerfile at the repo root, but the devcontainer build uses .devcontainer/Dockerfile. On WSL checkouts this means the devcontainer Dockerfile can still end up with CRLF and break docker build line continuations.
# Docker chokes on CRLF line continuations, and the dev container image is
# built from a WSL checkout where `text=auto` would otherwise apply the host's
# native endings.
###############################################################################
Dockerfile text eol=lf

Comment thread .devcontainer/post-start.sh Resolved
Base automatically changed from dev/sb/update2 to main August 4, 2026 20:42
@kazo0
kazo0 force-pushed the dev/sb/devcontainer-aspire branch from 3b5af69 to 894906a Compare August 4, 2026 20:43
@kazo0

kazo0 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@kazo0
kazo0 merged commit b6c840d into main Aug 6, 2026
21 checks passed
@kazo0
kazo0 deleted the dev/sb/devcontainer-aspire branch August 6, 2026 18:39
rajamatt added a commit that referenced this pull request Sep 11, 2026
* chore: fix InvalidOperationException from iOS App startup (#1749)

Context: e838af9

Commit e838af9 broke Chefs startup on iOS.  Tapping the icon would
result in the splash screen being shown, then replaced with a blank
screen (white or black).

If you open **Console.app**, attach to the iOS device, stream messages,
and filter by `Process:Chefs`, you will see the following exception:

	fail: Uno.UI.Dispatching.NativeDispatcher[0]
	      NativeDispatcher unhandled exception
	      System.InvalidOperationException: NoConstructorMatch, Chefs.Presentation.ShellViewModel
	         at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
	         at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
	fail: Uno.UI.Dispatching.NativeDispatcher[0]
	      NativeDispatcher unhandled exception
	      System.InvalidOperationException: NoConstructorMatch, Chefs.Presentation.ShellViewModel
	         at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
	         at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
	         at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
	         at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain)
	         at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain)
	         at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain)
	         at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier)
	         at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
	         at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain)
	         at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain)
	         at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain)
	         at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier)
	         at System.Collections.Concurrent.ConcurrentDictionary`2[[Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceIdentifier, Microsoft.Extensions.DependencyInjection, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[Microsoft.Extensions.DependencyInjection.ServiceProvider.ServiceAccessor, Microsoft.Extensions.DependencyInjection, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].GetOrAdd(ServiceIdentifier , Func`2 )
	         at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
	         at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
	         at Uno.Extensions.Navigation.Navigators.ControlNavigator.<>c__DisplayClass8_0.<<CreateViewModel>b__0>d.MoveNext()
	      --- End of stack trace from previous location ---
	         at Uno.Extensions.Navigation.Navigators.ControlNavigator.CreateViewModel(IServiceProvider services, NavigationRequest request, Route route, RouteInfo mapping)
	         at Uno.Extensions.Navigation.Navigators.ControlNavigator`1.<InitializeCurrentView>d__9[[Microsoft.UI.Xaml.Controls.ContentControl, Uno.UI, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null]].MoveNext()
	         at Uno.Extensions.Navigation.Navigators.ControlNavigator`1.<ExecuteRequestAsync>d__8[[Microsoft.UI.Xaml.Controls.ContentControl, Uno.UI, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null]].MoveNext()
	         at Uno.Extensions.Navigation.Navigators.ControlNavigator.ControlNavigateAsync(NavigationRequest request)
	         at Uno.Extensions.Navigation.Navigators.ControlNavigator.<>c__DisplayClass4_0.<<ControlCoreNavigateAsync>b__0>d.MoveNext()
	      --- End of stack trace from previous location ---
	         at Uno.Extensions.DispatcherExtensions.<>c__DisplayClass2_0`1.<<ExecuteAsync>b__0>d[[Uno.Extensions.Navigation.NavigationResponse, Uno.Extensions.Navigation, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null]].MoveNext()
	      --- End of stack trace from previous location ---
	         at Uno.Extensions.Dispatcher.<ExecuteAsync>d__4`1[[Uno.Extensions.Navigation.NavigationResponse, Uno.Extensions.Navigation, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null]].MoveNext()
	         at System.Collections.Concurrent.ConcurrentDictionary`2[[Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceIdentifier, Microsoft.Extensions.DependencyInjection, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[Microsoft.Extensions.DependencyInjection.ServiceProvider.ServiceAccessor, Microsoft.Extensions.DependencyInjection, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].GetOrAdd(ServiceIdentifier , Func`2 )
	         at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
	         at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
	         at Uno.Extensions.Navigation.Navigators.ControlNavigator.<>c__DisplayClass8_0.<<CreateViewModel>b__0>d.MoveNext()
	      --- End of stack trace from previous location ---
	         at Uno.Extensions.Navigation.Navigators.ControlNavigator.CreateViewModel(IServiceProvider services, NavigationRequest request, Route route, RouteInfo mapping)
	         at Uno.Extensions.Navigation.Navigators.ControlNavigator`1.<InitializeCurrentView>d__9[[Microsoft.UI.Xaml.Controls.ContentControl, Uno.UI, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null]].MoveNext()
	         at Uno.Extensions.Navigation.Navigators.ControlNavigator`1.<ExecuteRequestAsync>d__8[[Microsoft.UI.Xaml.Controls.ContentControl, Uno.UI, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null]].MoveNext()
	         at Uno.Extensions.Navigation.Navigators.ControlNavigator.ControlNavigateAsync(NavigationRequest request)
	         at Uno.Extensions.Navigation.Navigators.ControlNavigator.<>c__DisplayClass4_0.<<ControlCoreNavigateAsync>b__0>d.MoveNext()
	      --- End of stack trace from previous location ---
	         at Uno.Extensions.DispatcherExtensions.<>c__DisplayClass2_0`1.<<ExecuteAsync>b__0>d[[Uno.Extensions.Navigation.NavigationResponse, Uno.Extensions.Navigation, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null]].MoveNext()
	      --- End of stack trace from previous location ---
	         at Uno.Extensions.Dispatcher.<ExecuteAsync>d__4`1[[Uno.Extensions.Navigation.NavigationResponse, Uno.Extensions.Navigation, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null]].MoveNext()
	         at Uno.Extensions.Navigation.Navigators.ControlNavigator.ControlCoreNavigateAsync(NavigationRequest request)
	         at Uno.Extensions.Navigation.Navigators.ControlNavigator.CoreNavigateAsync(NavigationRequest request)
	         at Uno.Extensions.Navigation.Navigator.RegionNavigateAsync(NavigationRequest request)
	         at Uno.Extensions.Navigation.Navigator.NavigateAsync(NavigationRequest request)
	         at Uno.Extensions.Navigation.FrameworkElementExtensions.<>c__DisplayClass1_1.<<HostAsync>b__6>d.MoveNext()
	      --- End of stack trace from previous location ---
	         at Uno.Extensions.Navigation.FrameworkElementExtensions.Startup(IServiceProvider services, Func`1 afterStartup)
	         at Uno.Extensions.Navigation.Navigators.ControlNavigator.ControlCoreNavigateAsync(NavigationRequest request)
	         at Uno.Extensions.Navigation.Navigators.ControlNavigator.CoreNavigateAsync(NavigationRequest request)
	         at Uno.Extensions.Navigation.Navigator.RegionNavigateAsync(NavigationRequest request)
	         at Uno.Extensions.Navigation.Navigator.NavigateAsync(NavigationRequest request)
	         at Uno.Extensions.Navigation.FrameworkElementExtensions.<>c__DisplayClass1_1.<<HostAsync>b__6>d.MoveNext()
	      --- End of stack trace from previous location ---
	         at Uno.Extensions.Navigation.FrameworkElementExtensions.Startup(IServiceProvider services, Func`1 afterStartup)
	         at Uno.Extensions.ServiceProviderExtensions.BuildAndInitializeHostAsync(Window window, FrameworkElement viewHost, Func`1 buildHost, String initialRoute, Type initialView, Type initialViewModel, Func`3 initialNavigate)
	         at Uno.Extensions.ApplicationBuilderExtensions.<NavigateAsync>d__0`1[[Chefs.Views.ShellControl, Chefs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
	         at Chefs.App.OnLaunched(LaunchActivatedEventArgs )
	         at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__124_0(Object state)
	         at Uno.UI.Dispatching.NativeDispatcherSynchronizationContext.<>c__DisplayClass3_0.<Post>b__0()
	         at Uno.UI.Dispatching.NativeDispatcher.RunAction(NativeDispatcher , Action )
	         at Uno.Extensions.ServiceProviderExtensions.BuildAndInitializeHostAsync(Window window, FrameworkElement viewHost, Func`1 buildHost, String initialRoute, Type initialView, Type initialViewModel, Func`3 initialNavigate)
	         at Uno.Extensions.ApplicationBuilderExtensions.<NavigateAsync>d__0`1[[Chefs.Views.ShellControl, Chefs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
	         at Chefs.App.OnLaunched(LaunchActivatedEventArgs )
	         at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__124_0(Object state)
	         at Uno.UI.Dispatching.NativeDispatcherSynchronizationContext.<>c__DisplayClass3_0.<Post>b__0()
	         at Uno.UI.Dispatching.NativeDispatcher.RunAction(NativeDispatcher , Action )

The `ShellViewModel` constructor is missing!

For further verification, try:

	ildasm Chefs/obj/Release/net9.0-ios/ios-arm64/ipa/Payload/Chefs.app/Chefs.dll

which showed:

	.class public auto ansi sealed beforefieldinit Chefs.Presentation.ShellViewModel
	       extends [Uno.Extensions.Reactive]Uno.Extensions.Reactive.Bindings.BindableViewModelBase
	{
	  .custom instance void [Uno.Extensions.Reactive]Uno.Extensions.Reactive.Bindings.BindableAttribute::.ctor(class [System.Private.CoreLib]System.Type) = ( 01 00 1D 43 68 65 66 73 2E 50 72 65 73 65 6E 74   // ...Chefs.Present
	                                                                                                                                                          61 74 69 6F 6E 2E 53 68 65 6C 6C 4D 6F 64 65 6C   // ation.ShellModel
	                                                                                                                                                          00 00 )
	  .method family hidebysig virtual final
	          instance void  __Reactive_UpdateModel(object A_1) cil managed noinlining
	  {
	    // Code size       1 (0x1)
	    .maxstack  8
	    IL_0000:  ret
	  } // end of method ShellViewModel::__Reactive_UpdateModel

	} // end of class Chefs.Presentation.ShellViewModel

Indeed, no `ShellViewModel::.ctor` method!

Fix this by *removing* `$(IsAotCompatible)`=true.

(It was the change to `$(IsAotCompatible)` within e838af9 which broke
startup, *not* the changes to `$(PublishAot)`!)

* chore: update Uno.Sdk version to 6.6.42 in global.json (#1755)

* chore: Add devcontainer setup for Uno Chefs project (#1756)

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Matthew Rajala <[email protected]>

* chore: Update project to target .NET 10.0 (#1758)

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>

---------

Co-authored-by: Jonathan Pryor <[email protected]>
Co-authored-by: Steve Bilogan <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
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.

3 participants