A small panel shows the number of active sessions for the selected project and can enable auto-refresh. After a recent PR, the behavior became unstable: in some cases the counter keeps changing on its own; in others, after switching the project, the wrong data is refreshed.
LiveMetricsPanel component accepts projectId and displays the activeSessions value.autoRefresh is enabled, the panel must poll the source once per second.autoRefresh is disabled, no new polling should start.projectId changes, the next poll and all subsequent polls must use the new identifier.LiveMetricsPanel with projectId="alpha".projectId to beta.Example expected scenario in the app:
<LiveMetricsPanel projectId={projectId} />
alpha to beta, the panel should request data only for beta.19.0.05.8.xStrictMode in development mode and without StrictMode in a production-like modefetchProjectMetrics(projectId) function is usedUse line comments to explain the problem, its impact, the fix and how to test it.