@posiwise/shared-components 0.0.159 → 0.0.160

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -584,6 +584,22 @@ class CollapsibleSidebarComponent {
584
584
  this.destroy$ = new Subject();
585
585
  }
586
586
  ngOnInit() {
587
+ // Self-register the PosiWise Brain (MCP) panel so every consumer
588
+ // frontend (main-frontend, cloudolive-frontend, products-frontend,
589
+ // angular-frontend-template) behaves identically just by rendering
590
+ // <pw-collapsible-sidebar> — no per-app dashboard-layout wiring. The
591
+ // shared @posiwise/core-components navbar emits the trigger
592
+ // (pwCollapsibleSidebarTrigger [contentId]="'posiwise-brain'") in all
593
+ // of them; without this registration `loadContent()` silently bails
594
+ // and the widget never opens. `registerContent` is idempotent (Map
595
+ // keyed by id), so remount / multiple hosts are safe. The slot is
596
+ // intentionally NOT unregistered on destroy (ticket #4167: sticky
597
+ // BehaviorSubject state across dashboard remount).
598
+ this.sidebarService.registerContent({
599
+ id: 'posiwise-brain',
600
+ title: 'PosiWise Brain',
601
+ component: PwBrainChatComponent
602
+ });
587
603
  // Subscribe to expanded state
588
604
  this.sidebarService.sidebarExpanded$
589
605
  .pipe(takeUntil(this.destroy$))