Repository navigation
Closed
Description
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.widgetswithposition: '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-widgetnotfactory-stats-widget
Fix needed
- Trace the actual
RIGHT_PANEL_CONFIGUREevent 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
- Right panel: recipe-scoped tools for all major recipes #662 (right panel for all major recipes)
- Factory stats widget is built and ready (
FactoryStatsWidget.ts) — just needs the routing to work - Layout philosophy documented in
docs/architecture/LAYOUT-PHILOSOPHY.md
Files
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
Metadata
Metadata
Assignees
Labels
No labels
Activity
Fix #663: remove hardcoded chat-widget default from right panel