Skip to content

Commit

Permalink
chore: remove old FF code (#27569)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
pauldambra and github-actions[bot] authored Jan 16, 2025
1 parent 9bfb2cb commit 486bdce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 30 deletions.
1 change: 0 additions & 1 deletion frontend/src/lib/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ export const FEATURE_FLAGS = {
SITE_APP_FUNCTIONS: 'site-app-functions', // owner: @mariusandra #team-cdp
HOG_TRANSFORMATIONS: 'hog-transformations', // owner: #team-cdp
REPLAY_HOGQL_FILTERS: 'replay-hogql-filters', // owner: @pauldambra #team-replay
REPLAY_LIST_RECORDINGS_AS_QUERY: 'replay-list-recordings-as-query', // owner: @pauldambra #team-replay
SUPPORT_MESSAGE_OVERRIDE: 'support-message-override', // owner: @abigail
BILLING_SKIP_FORECASTING: 'billing-skip-forecasting', // owner: @zach
EXPERIMENT_STATS_V2: 'experiment-stats-v2', // owner: @danielbachhuber #team-experiments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { actions, connect, events, kea, key, listeners, path, props, propsChange
import { loaders } from 'kea-loaders'
import api from 'lib/api'
import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types'
import { FEATURE_FLAGS } from 'lib/constants'
import { Dayjs, dayjs } from 'lib/dayjs'
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { getCoreFilterDefinition } from 'lib/taxonomy'
Expand Down Expand Up @@ -280,7 +279,7 @@ export const playerInspectorLogic = kea<playerInspectorLogicType>([
},
],
})),
loaders(({ props, values }) => ({
loaders(({ props }) => ({
matchingEventUUIDs: [
[] as MatchedRecordingEvent[] | null,
{
Expand All @@ -302,29 +301,19 @@ export const playerInspectorLogic = kea<playerInspectorLogicType>([
if (!filters) {
throw new Error('Backend matching events type must include its filters')
}
// as_query is a temporary parameter as a flag
// to let the backend know not to convert the query to a legacy filter when processing
const params: RecordingsQuery & { as_query?: boolean } = {

const params: RecordingsQuery = {
...convertUniversalFiltersToRecordingsQuery(filters),
session_ids: [props.sessionRecordingId],
}
if (values.listAPIAsQuery) {
params.as_query = true
}

const response = await api.recordings.getMatchingEvents(toParams(params))
return response.results.map((x) => ({ uuid: x } as MatchedRecordingEvent))
},
},
],
})),
selectors(({ props }) => ({
listAPIAsQuery: [
(s) => [s.featureFlags],
(featureFlags) => {
return !!featureFlags[FEATURE_FLAGS.REPLAY_LIST_RECORDINGS_AS_QUERY]
},
],

allowMatchingEventsFilter: [
(s) => [s.miniFilters],
(miniFilters): boolean => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,7 @@ export const sessionRecordingsPlaylistLogic = kea<sessionRecordingsPlaylistLogic
} as RecordingsQueryResponse & { order: RecordingsQuery['order'] },
{
loadSessionRecordings: async ({ direction, userModifiedFilters }, breakpoint) => {
// as_query is a temporary parameter as a flag
// to let the backend know not to convert the query to a legacy filter when processing
const params: RecordingsQuery & { as_query?: boolean } = {
const params: RecordingsQuery = {
...convertUniversalFiltersToRecordingsQuery(values.filters),
person_uuid: props.personUUID ?? '',
limit: RECORDINGS_LIMIT,
Expand All @@ -351,10 +349,6 @@ export const sessionRecordingsPlaylistLogic = kea<sessionRecordingsPlaylistLogic
params.offset = 0
}

if (values.listAPIAsQuery) {
params.as_query = true
}

await breakpoint(400) // Debounce for lots of quick filter changes

const startTime = performance.now()
Expand Down Expand Up @@ -541,13 +535,6 @@ export const sessionRecordingsPlaylistLogic = kea<sessionRecordingsPlaylistLogic
selectors({
logicProps: [() => [(_, props) => props], (props): SessionRecordingPlaylistLogicProps => props],

listAPIAsQuery: [
(s) => [s.featureFlags],
(featureFlags) => {
return !!featureFlags[FEATURE_FLAGS.REPLAY_LIST_RECORDINGS_AS_QUERY]
},
],

matchingEventsMatchType: [
(s) => [s.filters],
(filters): MatchingEventsMatchType => {
Expand Down

0 comments on commit 486bdce

Please sign in to comment.