Bug
The right panel always renders chat-widget regardless of what the recipe declares. Factory recipe specifies factory-stats-widget but the panel shows the default assistant.
Root Cause
ContentTypeRegistry.getRightPanelConfig() line 139 has a hardcoded fallback:
// Default: help panel
return { widget: 'chat-widget', room: 'help', compact: true };
Every code path that fails to resolve the recipe config falls through to this. Suspected race condition: the factory tab opens (via URL restore on page load) before initializeRecipeLayouts() completes, so recipeService.isLoaded() returns false, the recipe lookup is skipped, and the fallback fires.
What's been tried
- Generator fixed to detect new layout format (
layout.widgets with position: 'right') → hasRightPanel: true ✓
- Recipe switched to old format (
main + right.widgets) matching diagnostics pattern ✓
- Both formats produce correct config when tested offline with Node ✓
- Right panel renders (visible in screenshots) but creates
chat-widget not factory-stats-widget
Fix needed
- Trace the actual
RIGHT_PANEL_CONFIGURE event payload in browser console when factory tab opens
- Confirm whether
recipeService.isLoaded() is false at that point
- If race condition: re-emit the right panel config after recipes load, or defer tab rendering until recipes are ready
- Remove the chat-widget hardcoded fallback — if no right panel config exists, show nothing (not a random chat widget)
Blocks
Files
src/widgets/main/shared/ContentTypeRegistry.ts line 139 — the hardcoded fallback
src/system/recipes/browser/RecipeLayoutService.ts — recipe layout resolution
src/widgets/right-panel/RightPanelWidget.ts — event listener that creates widgets
src/widgets/main/MainWidget.ts line 341 — where the event is emitted
src/system/recipes/factory.json — recipe with correct right panel config
Bug
The right panel always renders
chat-widgetregardless of what the recipe declares. Factory recipe specifiesfactory-stats-widgetbut the panel shows the default assistant.Root Cause
ContentTypeRegistry.getRightPanelConfig()line 139 has a hardcoded fallback:Every code path that fails to resolve the recipe config falls through to this. Suspected race condition: the factory tab opens (via URL restore on page load) before
initializeRecipeLayouts()completes, sorecipeService.isLoaded()returns false, the recipe lookup is skipped, and the fallback fires.What's been tried
layout.widgetswithposition: 'right') →hasRightPanel: true✓main+right.widgets) matching diagnostics pattern ✓chat-widgetnotfactory-stats-widgetFix needed
RIGHT_PANEL_CONFIGUREevent payload in browser console when factory tab opensrecipeService.isLoaded()is false at that pointBlocks
FactoryStatsWidget.ts) — just needs the routing to workdocs/architecture/LAYOUT-PHILOSOPHY.mdFiles
src/widgets/main/shared/ContentTypeRegistry.tsline 139 — the hardcoded fallbacksrc/system/recipes/browser/RecipeLayoutService.ts— recipe layout resolutionsrc/widgets/right-panel/RightPanelWidget.ts— event listener that creates widgetssrc/widgets/main/MainWidget.tsline 341 — where the event is emittedsrc/system/recipes/factory.json— recipe with correct right panel config