making-scenes-tab-aware
Installation
SKILL.md
Making scenes tab aware
PostHog's internal tabs keep scene root logics mounted even when a tab is inactive. That only works correctly when the scene is designed for it.
A fully tab-aware scene has three properties:
- The root
SceneExport.logicis scoped per internal tab. - Scene-owned URL sync only reacts for the active tab and updates inactive tabs without hijacking the browser URL.
- Any child logic that must survive React unmounts is attached to the scene root logic.
sceneLogic already injects tabId into both the scene component props and the scene logic props.
See frontend/src/scenes/sceneLogic.tsx.