fix(replay): offer Replay only for sessions that were actually recorded

The `session;` summary tag drives the Replay button, but generateSummary
stamps it at ingest — before a recording can exist, and for every SDK that
sets session.id whether it records or not. So every browser span carried a
button that opened an empty player. The Sessions tab has gated on
projects.replay_sessions since cff87aeb7; the logs/spans list and the issue
detail page never did.

selectLogTable now looks the page's session ids up once and drops the tag from
rows with no recording; Anomalies renders the player only for a session that
has one. Non-UUID session keys (backend SDKs without setSession, where the
session is derived from user identity) can never have a recording and are
never asked for.

Regression test verified red first: without the gate the ungated
session;right-badge-neutral tag comes back on a session with no recording. It
also pins the gate's assumption that the projection carries a bare `summary`
column, which is what the lookup keys off.
This commit is contained in:
Anthony Alaribe 2026-09-01 10:13:48 +02:00
commit 7e82cf3334
4 changed files with 253 additions and 18 deletions