Skip to content

Commit

Permalink
chore: remove flag that has been on for four months
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Mar 23, 2024
1 parent 3a995a5 commit b1dfea2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 34 deletions.
1 change: 0 additions & 1 deletion frontend/src/lib/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ export const FEATURE_FLAGS = {
INSIGHT_HORIZONTAL_CONTROLS: 'insight-horizontal-controls', // owner: @benjackwhite
SURVEYS_WIDGETS: 'surveys-widgets', // owner: @liyiy
SCHEDULED_CHANGES_FEATURE_FLAGS: 'scheduled-changes-feature-flags', // owner: @jurajmajerik #team-feature-success
SESSION_REPLAY_MOBILE: 'session-replay-mobile', // owner: #team-replay
INVITE_TEAM_MEMBER_ONBOARDING: 'invite-team-member-onboarding', // owner: @biancayang
YEAR_IN_HOG: 'year-in-hog', // owner: #team-replay
SESSION_REPLAY_EXPORT_MOBILE_DATA: 'session-replay-export-mobile-data', // owner: #team-replay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { eventWithTime } from '@rrweb/types'
import { BuiltLogic, connect, kea, listeners, path, reducers, selectors } from 'kea'
import { loaders } from 'kea-loaders'
import { beforeUnload } from 'kea-router'
import { FEATURE_FLAGS } from 'lib/constants'
import { dayjs } from 'lib/dayjs'
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { uuid } from 'lib/utils'
Expand Down Expand Up @@ -178,11 +177,7 @@ export const sessionRecordingFilePlaybackLogic = kea<sessionRecordingFilePlaybac
}

const snapshots = deduplicateSnapshots(
await parseEncodedSnapshots(
values.sessionRecording.snapshots,
values.sessionRecording.id,
!!values.featureFlags[FEATURE_FLAGS.SESSION_REPLAY_MOBILE]
)
await parseEncodedSnapshots(values.sessionRecording.snapshots, values.sessionRecording.id)
)

dataLogic.actions.loadRecordingSnapshotsSuccess({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,9 @@ function isRecordingSnapshot(x: unknown): x is RecordingSnapshot {

export const parseEncodedSnapshots = async (
items: (RecordingSnapshot | EncodedRecordingSnapshot | string)[],
sessionId: string,
withMobileTransformer: boolean
sessionId: string
): Promise<RecordingSnapshot[]> => {
if (!postHogEEModule && withMobileTransformer) {
if (!postHogEEModule) {
postHogEEModule = await posthogEE()
}
const lineCount = items.length
Expand All @@ -84,9 +83,7 @@ export const parseEncodedSnapshots = async (
const snapshotData = isRecordingSnapshot(snapshotLine) ? [snapshotLine] : snapshotLine['data']

return snapshotData.map((d: unknown) => {
const snap = withMobileTransformer
? postHogEEModule?.mobileReplay?.transformEventToWeb(d) || (d as eventWithTime)
: (d as eventWithTime)
const snap = postHogEEModule?.mobileReplay?.transformEventToWeb(d) || (d as eventWithTime)
return {
// this handles parsing data that was loaded from blob storage "window_id"
// and data that was exported from the front-end "windowId"
Expand Down Expand Up @@ -239,11 +236,7 @@ async function processEncodedResponse(
let untransformed: RecordingSnapshot[] | null = null

const transformed = deduplicateSnapshots(
await parseEncodedSnapshots(
encodedResponse,
props.sessionRecordingId,
!!featureFlags[FEATURE_FLAGS.SESSION_REPLAY_MOBILE]
),
await parseEncodedSnapshots(encodedResponse, props.sessionRecordingId),
existingData?.snapshots ?? []
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import clsx from 'clsx'
import { range } from 'd3'
import { BindLogic, useActions, useValues } from 'kea'
import { EmptyMessage } from 'lib/components/EmptyMessage/EmptyMessage'
import { FlaggedFeature } from 'lib/components/FlaggedFeature'
import { PropertyKeyInfo } from 'lib/components/PropertyKeyInfo'
import { FEATURE_FLAGS } from 'lib/constants'
import { useResizeBreakpoints } from 'lib/hooks/useResizeObserver'
Expand Down Expand Up @@ -58,12 +57,10 @@ function UnusableEventsWarning(props: { unusableEventsInFilter: string[] }): JSX
<Link to="https://posthog.com/docs/libraries/js" target="_blank">
the Web SDK
</Link>
<FlaggedFeature flag={FEATURE_FLAGS.SESSION_REPLAY_MOBILE} match={true}>
,{' '}
<Link to="https://posthog.com/docs/libraries/android" target="_blank">
the Android SDK
</Link>
</FlaggedFeature>
,{' '}
<Link to="https://posthog.com/docs/libraries/android" target="_blank">
the Android SDK
</Link>
</p>
</LemonBanner>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { LemonDivider, Link } from '@posthog/lemon-ui'
import { useActions, useValues } from 'kea'
import { FlaggedFeature } from 'lib/components/FlaggedFeature'
import { FEATURE_FLAGS } from 'lib/constants'

import { playerSettingsLogic } from '../player/playerSettingsLogic'
import { sessionRecordingsPlaylistLogic } from './sessionRecordingsPlaylistLogic'
Expand All @@ -21,9 +19,7 @@ export const SessionRecordingsPlaylistTroubleshooting = (): JSX.Element => {
</p>

<ul className="space-y-1">
<FlaggedFeature flag={FEATURE_FLAGS.SESSION_REPLAY_MOBILE} match={true}>
<h5>All recording sources:</h5>
</FlaggedFeature>
<h5>All recording sources:</h5>
{otherRecordings.length > 0 && hideViewedRecordings && (
<li>
Viewed recordings hidden.{' '}
Expand All @@ -42,10 +38,8 @@ export const SessionRecordingsPlaylistTroubleshooting = (): JSX.Element => {
They are outside the retention period
</Link>
</li>
<FlaggedFeature flag={FEATURE_FLAGS.SESSION_REPLAY_MOBILE} match={true}>
<LemonDivider dashed={true} />
<h5>Web recordings</h5>
</FlaggedFeature>
<LemonDivider dashed={true} />
<h5>Web recordings</h5>
<li>
<Link
to="https://posthog.com/docs/session-replay/troubleshooting#4-adtracking-blockers"
Expand Down

0 comments on commit b1dfea2

Please sign in to comment.