Implementation: How should cross-tool synchronization be implemented across ...
Documentation for Sessions
⚙️ Implementation: How should cross-tool synchronization be implemented across ...
📋 Decision Context
Question:
How should cross-tool synchronization be implemented across platform builder tools?
Task: Session 28.1: Implement cross-tool synchronization across platform builder tools
🎯 Decision Made
Chosen:
Use existing CrossToolSyncService with BroadcastChannel API
Options Considered:
- Create new synchronization service from scratch
- Use existing CrossToolSyncService with BroadcastChannel API
- Use WebSocket-based real-time sync only
- Use NGXS store for cross-tool state
💭 Reasoning
The CrossToolSyncService already existed in core-angular but was underutilized. It uses BroadcastChannel API for same-origin real-time sync between browser tabs/windows, which is perfect for platform builder tools. We injected this service into ModularUniverseBuilderComponent, PageBuilderComponent, VibeUniverseGeneratorComponent, FlowComposerComponent, UniverseHubComponent, and ArchitectStateService. Each tool now broadcasts events on module creation/update/delete and listens for events from other tools to refresh their data. This approach leverages existing infrastructure, requires minimal new code, and provides instant cross-tool synchronization.
📁 Files Involved
libs/libs-foundational/core-angular/src/lib/services/cross-tool-sync.service.tslibs/libs-structural/modular-universe/src/lib/components/modular-universe-builder/modular-universe-builder.component.tslibs/libs-structural/page-builder/src/lib/page-builder.component.tslibs/libs-structural/vibe-universe/src/lib/components/vibe-universe-generator/vibe-universe-generator.component.tslibs/libs-structural/singularity-lib/src/lib/components/flow-composer/flow-composer.component.tslibs/libs-space/universe-canvas/src/lib/components/universe-hub/universe-hub.component.tslibs/libs-space/universe-architect/src/lib/services/architect-state.service.ts
🔗 Related
- Decision ID:
dev_1767767234768_xz0etzo - Session: 22
- Workspace: editor2
Auto-generated by MCP Smart Consolidation