← all branches

feat/ph-replay

safe
ab8cd04 · incrementalPR #361reviewed 2026-07-31 00:23 UTC0H · 0M · 1L · 9I
The branch
Purpose
Enable PostHog session replay on the authenticated platform app (apps/platform) in production only, fixing a silent kill-switch that had prevented any recordings despite the PostHog console being fully configured.
Goal
Record user sessions on app.batuenergy.com (PostHog project 334265) with a two-half gate (app prop + env var) so previews, staging, and apps/web never record, and all inputs are masked unconditionally.
Sub-goals
  • SG-1: Two-half gate — sessionReplay prop (app) AND NEXT_PUBLIC_POSTHOG_SESSION_REPLAY=true (env) both required
  • SG-2: Apply ph-no-capture to secrets rendered outside input elements (API keys in code, bearer tokens in EnvPanel)
  • SG-3: maskAllInputs: true unconditionally — CFE credential forms must never record input values
  • SG-4: Unit-test all 4 gate combinations and the negation of disable_session_recording
  • SG-5: Translate all comments and README from Spanish to English
The changes (whole branch)
What
This incremental commit translates all inline comments, JSDoc blocks, test descriptions, and the full README from Spanish to English. Zero logic, assertion, or configuration changes.
Why
Code and documentation convention: English throughout for team consistency.
Areas
apps/platform/src/app/[locale]+99packages/analytics/src/providers+9060packages/analytics/README.md+23647
Blast
8 files, +336/−117 lines across apps/platform layout + analytics package. All changes are comment/documentation text — zero runtime behavior change.
ci· Token scope does not permit CI rollup querycoderabbit· No .coderabbit.yaml in repo

Findings · 1

improvement1

low

Inline option comments use inconsistent verb capitalization

packages/analytics/src/providers/PostHogProvider.tsx:90

Three inline comments on posthog init options use capitalized third-person verb form (Captures clicks automatically, Captures page views automatically, Captures when the user leaves the page) while surrounding comments use lowercase imperative or noun-phrase forms (Only create profiles for identified users, Do not mask text). Consistent lowercase or noun-phrase phrasing would align with the rest of the file. Stylistic nit, no behavior impact.

History · 3 commits

  1. ab8cd04safeincremental0H · 0M · 1L2026-07-31 00:23current
  2. 8d1b744needs attentionincremental0H · 5M · 10L2026-07-30 21:44
  3. 069e020needs attentionfull3H · 6M · 7L2026-07-30 21:06