@@ -19,10 +19,12 @@ import { Providers } from "@components/Providers";
1919import { DevToolbarHost } from "@features/dev-toolbar/DevToolbarHost" ;
2020import { preloadHighlighter } from "@pierre/diffs" ;
2121import { boot } from "@posthog/di/contribution" ;
22+ import { assertHostCapabilities } from "@posthog/di/hostCapabilities" ;
2223import { ServiceProvider } from "@posthog/di/react" ;
2324import App from "@posthog/ui/shell/App" ;
2425import { logger } from "@posthog/ui/shell/logger" ;
2526import { initializePostHog } from "@posthog/ui/shell/posthogAnalyticsImpl" ;
27+ import { REQUIRED_HOST_CAPABILITIES } from "@posthog/ui/shell/requiredHostCapabilities" ;
2628import { registerDesktopContributions } from "@renderer/desktop-contributions" ;
2729import { container } from "@renderer/di/container" ;
2830import "@renderer/desktop-services" ;
@@ -95,6 +97,11 @@ const root = ReactDOM.createRoot(rootElement);
9597
9698try {
9799 registerDesktopContributions ( ) ;
100+ // Fail loudly (into BootErrorScreen) if a capability the shared app resolves
101+ // via service location is unbound, rather than deferring to the first
102+ // navigation that needs it. The renderer container backs every useService, so
103+ // all required tokens must resolve here. Shared with the web host.
104+ assertHostCapabilities ( container , REQUIRED_HOST_CAPABILITIES ) ;
98105 boot ( container ) . catch ( ( error : unknown ) => {
99106 bootLog . error ( "Renderer boot sequence failed" , error ) ;
100107 // Replaces the mounted tree without running effect cleanup; acceptable
0 commit comments