Skip to content

docs(session-replay): document isSessionReplayActive and pausing replay on sensitive Flutter screens - #20099

Open
lukas-roqqu wants to merge 2 commits into
PostHog:masterfrom
lukas-roqqu:docs/flutter-replay-sensitive-screens
Open

lukas-roqqu wants to merge 2 commits into
PostHog:masterfrom
lukas-roqqu:docs/flutter-replay-sensitive-screens

Conversation

@lukas-roqqu

Copy link
Copy Markdown

Changes

Documents what is still missing from the Flutter session replay docs after #20094.

The issue overstated the gap: startSessionRecording({resumeCurrent}) and stopSessionRecording() were already documented in the Flutter tab of programmatic start and stop controls, and the installation page links there. What was missing is isSessionReplayActive() (in posthog-flutter since 4.7.0, PostHog/posthog-flutter#123), and any guidance that masking alone is not enough on keypad-style screens.

  • session-replay/_snippets/flutter-manual-replay-control.mdx – adds isSessionReplayActive() to the methods list, plus a "Pause recording on a sensitive screen" subsection with a minimal StatefulWidget that calls stopSessionRecording() in initState and startSessionRecording() in dispose. Masking hides the pixels of a PIN, passcode, or card keypad, but the native SDKs still record tap coordinates, so with a known keypad layout the entered value can be reconstructed (feat(replay): allow disabling touches without stopping screenshots posthog-flutter#575 describes this). The existing NavigatorObserver example stays as the route-based alternative.
  • session-replay/_snippets/flutter-privacy.mdx – new "Pausing recording on sensitive screens" section in the Flutter tab of /docs/session-replay/privacy, after "Masking in Flutter": masking hides pixels, not touch positions, so stop recording while a keypad screen is shown and resume afterwards. Links to the programmatic controls rather than repeating the example.
  • session-replay/_snippets/flutter-installation.mdx – the "Manually control session recordings" paragraph now also mentions isSessionReplayActive().

captureTouches from PostHog/posthog-flutter#575 is unreleased, so it is intentionally not documented here; stop/start is the mitigation available today.

Closes #20094

Checklist

  • I've read the docs and/or content style guides.
  • Words are spelled using American English
  • Use relative URLs for internal links
  • I've checked the pages added or changed in the Vercel preview build (reviewer: please check the Flutter tabs on /docs/session-replay/how-to-control-which-sessions-you-record, /docs/session-replay/privacy, and /docs/session-replay/installation/flutter in the preview)
  • If I moved a page, I added a redirect in vercel.json (no pages moved)

@github-actions github-actions Bot added docs Improvements or additions to product documentation, "Docs" content PR only touches files under contents/ labels Sep 11, 2026
@lukas-roqqu

Copy link
Copy Markdown
Author

@ioannisj would you mind reviewing this one? Small Flutter session replay docs change: documents isSessionReplayActive() and adds guidance on pausing recording on keypad screens. Closes #20094.

@marandaneto
marandaneto requested a review from a team September 15, 2026 13:24

@ioannisj ioannisj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! Checked it against posthog-flutter main and the stop/start part is right: both native SDKs skip touch capture while replay isn't active, so pausing does keep the taps out of the recording.

One thing though, captureTouches from PostHog/posthog-flutter#575 is actually out now (5.41.0), so I think the docs should mention it. Left a couple of comments inline.

Comment thread contents/docs/session-replay/_snippets/flutter-privacy.mdx Outdated
Comment thread contents/docs/session-replay/_snippets/flutter-manual-replay-control.mdx Outdated
@lukas-roqqu

Copy link
Copy Markdown
Author

Thanks for the review 🤝 Both points addressed in 5e38641: captureTouches documented as the app-wide fix (with the version floors) next to stop/start as the per-screen one, and the pause example now checks isSessionReplayActive() itself.

@ioannisj
ioannisj enabled auto-merge (squash) September 17, 2026 09:30
@ioannisj

Copy link
Copy Markdown
Contributor

@lukas-roqqu please sign your commits before this can be merged?

auto-merge was automatically disabled September 17, 2026 09:52

Head branch was pushed to by a user without write access

@lukas-roqqu
lukas-roqqu force-pushed the docs/flutter-replay-sensitive-screens branch from 5e38641 to 1cc19f2 Compare September 17, 2026 09:52
@lukas-roqqu

Copy link
Copy Markdown
Author

Done — commits are signed now, should show verified. Ready for another look whenever you get a chance 🤝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content PR only touches files under contents/ docs Improvements or additions to product documentation, "Docs"

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Flutter session replay docs omit startSessionRecording / stopSessionRecording / isSessionReplayActive

2 participants