Semih 565ad5af59 fix(insights): propagate rrweb counters & resolve click targets
Three coupled fixes that together stop frustrated sessions from being
mislabelled as `power_user_path` and make click timelines actually
diagnosable.

1) Counter propagation (compress.ts, compress-sessions.ts):
   compress now returns rageClickCount / network5xxCount / network4xxCount
   and writes them back to SessionMeta. Previously these stayed at 0
   forever because PostHog recording metadata doesn't expose them and
   nothing updated the row after compress ran.

2) Tag rule hardening (tagger.ts, compress-sessions.ts):
   - power_user_path v1 fallback now requires rageClickCount===0; without
     this guard any auth user with 20+ clicks (rage clusters included)
     was labelled a power user.
   - New frustrated_session tag (rageClickCount>=3, P2) for sustained
     friction beyond a single cluster.
   - compress-sessions re-runs tagSession+scoreSession after writing the
     fresh counters, so the corrected tags land on the row.

3) Click target enrichment (compress.ts):
   describeTarget used to read tagName/attributes off MouseInteraction
   events — fields that don't exist on rrweb type=3 source=2 — so every
   click rendered as `[el]`. Now compress builds a node map from
   FullSnapshot (type=2) and keeps it in sync with mutations
   (type=3 source=0), then resolves clicks via `d.id`. Clicks now show
   real tag + visible text / aria-label / name / data-testid.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 21:49:06 +03:00
2026-05-13 09:30:27 +00:00

Süper Panel

Internal admin panel — sp.semih.ai — Tailscale-only access.

Phase 0 skeleton: Next.js 16 + Better Auth (email/password + TOTP) + Prisma + Postgres + Redis. Deployed on Coolify, fronted by Traefik with Let's Encrypt (Cloudflare DNS-01).

See super-panel-prd.md for the full PRD.

Local dev

pnpm install
cp .env.example .env
# fill DATABASE_URL_PANEL, BETTER_AUTH_SECRET (32+ chars)
pnpm --filter @panel/web prisma:generate
pnpm dev

Production deploy

Pushes to main trigger Coolify deploy via webhook.

Deploy status

First production deploy: 2026-05-13. Live at https://sp.semih.ai (Tailscale only).

Description
Süper Panel - internal admin panel (sp.semih.ai)
Readme 4.1 MiB
Languages
TypeScript 99.2%
CSS 0.4%
Shell 0.2%
Dockerfile 0.2%