From 28c1a69bf671d576303258229d80e412e91a636f Mon Sep 17 00:00:00 2001 From: Holger Benl Date: Wed, 19 Jun 2024 16:38:05 +0200 Subject: [PATCH 1/4] Always use hoverTime for the screenshot when the user is hovering (#10578) --- .../getGraphicsTimeAndExecutionPoint.ts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/ui/components/Video/imperative/getGraphicsTimeAndExecutionPoint.ts b/src/ui/components/Video/imperative/getGraphicsTimeAndExecutionPoint.ts index b2932e94cfb..d45c0d3e7b4 100644 --- a/src/ui/components/Video/imperative/getGraphicsTimeAndExecutionPoint.ts +++ b/src/ui/components/Video/imperative/getGraphicsTimeAndExecutionPoint.ts @@ -21,9 +21,13 @@ export function getGraphicsTimeAndExecutionPoint( const pauseTime = getTime(state); const currentTime = getCurrentTime(state); - const isHovering = preferHoverTime; + const isHovering = hoverTime != null && preferHoverTime; const isPlaying = playbackState != null; + if (isHovering && !isPlaying) { + return { executionPoint: null, time: hoverTime }; + } + let preferCurrentTime = false; if (isPlaying) { preferCurrentTime = true; @@ -51,16 +55,9 @@ export function getGraphicsTimeAndExecutionPoint( preferCurrentTime = true; } - let time: number; - let executionPoint: string | null = null; if (preferCurrentTime) { - time = currentTime; - } else if (isHovering && hoverTime != null) { - time = hoverTime; + return { executionPoint: null, time: currentTime }; } else { - time = pauseTime; - executionPoint = pauseExecutionPoint; + return { executionPoint: pauseExecutionPoint, time: pauseTime }; } - - return { executionPoint, time }; } From 6b6ecb01ca37ca894e201b075d4d2ca55414b3fe Mon Sep 17 00:00:00 2001 From: Holger Benl Date: Wed, 19 Jun 2024 16:46:14 +0200 Subject: [PATCH 2/4] Fix detection of async parent pauses outside of the focus window (#10573) * Revert "Improve message shown when async stack can't be loaded (#10557)" This reverts commit 585e560d741d2db812010bc35fe442af8b25a7df. * Fix detection of async parent pauses outside of the focus window --- packages/e2e-tests/examples.json | 4 ++ .../helpers/pause-information-panel.ts | 15 +++++ packages/e2e-tests/tests/async-stack.test.ts | 34 +++++++++++ public/test/examples/doc_async_stack.html | 13 +++++ .../SecondaryPanes/Frames/NewFrames.tsx | 56 +++++++++++-------- .../client/debugger/src/utils/focus.ts | 10 ---- src/ui/suspense/util.ts | 16 +++--- 7 files changed, 107 insertions(+), 41 deletions(-) create mode 100644 packages/e2e-tests/tests/async-stack.test.ts create mode 100644 public/test/examples/doc_async_stack.html delete mode 100644 src/devtools/client/debugger/src/utils/focus.ts diff --git a/packages/e2e-tests/examples.json b/packages/e2e-tests/examples.json index 09df2d4646d..a79f60422e3 100644 --- a/packages/e2e-tests/examples.json +++ b/packages/e2e-tests/examples.json @@ -35,6 +35,10 @@ "recording": "e1eba430-f744-47b3-a097-e0e26c9992fc", "buildId": "linux-chromium-20240418-4747c93165f9-4699f489a2b6" }, + "doc_async_stack.html": { + "recording": "02747835-34e8-4ea0-9ed5-432a133aa785", + "buildId": "linux-chromium-20240614-d742f2be668d-7ad782ed38d0" + }, "doc_control_flow.html": { "recording": "4762689b-f2c2-4205-8229-377992d54b6b", "buildId": "linux-chromium-20240418-4747c93165f9-4699f489a2b6" diff --git a/packages/e2e-tests/helpers/pause-information-panel.ts b/packages/e2e-tests/helpers/pause-information-panel.ts index b75a7b6cdbb..168d326e569 100644 --- a/packages/e2e-tests/helpers/pause-information-panel.ts +++ b/packages/e2e-tests/helpers/pause-information-panel.ts @@ -243,6 +243,21 @@ export async function stepOver(page: Page): Promise { await clickCommandBarButton(page, "Step Over"); } +export function waitForAllFramesToLoad(page: Page) { + return waitFor(async () => { + expect(await page.locator('[data-test-name="FramesLoading"]').count()).toBe(0); + }); +} + +export function getAsyncParentCount(page: Page) { + return page.locator('[data-test-name="AsyncParentLabel"]').count(); +} + +export async function isAsyncParentUnavailable(page: Page) { + const asyncParentUnavailable = page.locator('[data-test-name="AsyncParentUnavailable"]'); + return (await asyncParentUnavailable.count()) > 0; +} + export async function verifyFramesCount(page: Page, expectedCount: number) { const framesPanel = getFramesPanel(page); return waitFor(async () => { diff --git a/packages/e2e-tests/tests/async-stack.test.ts b/packages/e2e-tests/tests/async-stack.test.ts new file mode 100644 index 00000000000..a8ceef35564 --- /dev/null +++ b/packages/e2e-tests/tests/async-stack.test.ts @@ -0,0 +1,34 @@ +import { openDevToolsTab, startTest } from "../helpers"; +import { warpToMessage } from "../helpers/console-panel"; +import { + getAsyncParentCount, + isAsyncParentUnavailable, + waitForAllFramesToLoad, +} from "../helpers/pause-information-panel"; +import { setFocusRange } from "../helpers/timeline"; +import test, { expect } from "../testFixture"; + +test.use({ exampleKey: "doc_async_stack.html" }); + +test(`async-stack: should detect async stacks outside the focus window`, async ({ + pageWithMeta: { page, recordingId, testScope }, + exampleKey, +}) => { + await startTest(page, recordingId, testScope); + await openDevToolsTab(page); + + await warpToMessage(page, "Starting", 7); + await waitForAllFramesToLoad(page); + expect(await getAsyncParentCount(page)).toBe(0); + expect(await isAsyncParentUnavailable(page)).toBe(false); + + await warpToMessage(page, "ExampleFinished", 9); + await waitForAllFramesToLoad(page); + expect(await getAsyncParentCount(page)).toBe(1); + expect(await isAsyncParentUnavailable(page)).toBe(false); + + await setFocusRange(page, { startTimeString: "00:01" }); + await waitForAllFramesToLoad(page); + expect(await getAsyncParentCount(page)).toBe(1); + expect(await isAsyncParentUnavailable(page)).toBe(true); +}); diff --git a/public/test/examples/doc_async_stack.html b/public/test/examples/doc_async_stack.html new file mode 100644 index 00000000000..6b3092bf7e1 --- /dev/null +++ b/public/test/examples/doc_async_stack.html @@ -0,0 +1,13 @@ + + +
Hello World!
+ + + diff --git a/src/devtools/client/debugger/src/components/SecondaryPanes/Frames/NewFrames.tsx b/src/devtools/client/debugger/src/components/SecondaryPanes/Frames/NewFrames.tsx index 5b23d524af4..6164a42a285 100644 --- a/src/devtools/client/debugger/src/components/SecondaryPanes/Frames/NewFrames.tsx +++ b/src/devtools/client/debugger/src/components/SecondaryPanes/Frames/NewFrames.tsx @@ -10,11 +10,9 @@ import { getSelectedFrameId, getThreadContext, } from "devtools/client/debugger/src/selectors"; -import { isFocusWindowApplied } from "devtools/client/debugger/src/utils/focus"; import { InlineErrorBoundary } from "replay-next/components/errors/InlineErrorBoundary"; import { copyToClipboard } from "replay-next/components/sources/utils/clipboard"; import { FocusContext } from "replay-next/src/contexts/FocusContext"; -import { SessionContext } from "replay-next/src/contexts/SessionContext"; import { useCurrentFocusWindow } from "replay-next/src/hooks/useCurrentFocusWindow"; import { useIsPointWithinFocusWindow } from "replay-next/src/hooks/useIsPointWithinFocusWindow"; import { getPointAndTimeForPauseId, pauseIdCache } from "replay-next/src/suspense/PauseCache"; @@ -46,13 +44,16 @@ function FramesRenderer({ const replayClient = useContext(ReplayClientContext); const sourcesState = useAppSelector(state => state.sources); const { rangeForSuspense: focusWindow } = useContext(FocusContext); - const { endpoint } = useContext(SessionContext); const dispatch = useAppDispatch(); + if (focusWindow === null) { + return null; + } + const asyncSeparator = asyncIndex > 0 ? (
- + async
@@ -64,30 +65,25 @@ function FramesRenderer({ asyncIndex, focusWindow ); - if (asyncParentPauseId === null) { + if (asyncParentPauseId === true) { return ( <> {asyncSeparator} -
- This part of the call stack is unavailable. - {isFocusWindowApplied(focusWindow, endpoint) && ( - <> - {" "} - Perhaps it is outside of{" "} - dispatch(enterFocusMode())}> - your debugging window - - . - - )} +
+ This part of the call stack is unavailable because it is outside{" "} + dispatch(enterFocusMode())}> + your debugging window + + .
); } - let frames = asyncParentPauseId - ? getPauseFramesSuspense(replayClient, asyncParentPauseId, sourcesState) - : undefined; + let frames = + typeof asyncParentPauseId === "string" + ? getPauseFramesSuspense(replayClient, asyncParentPauseId, sourcesState) + : undefined; if (asyncIndex > 0) { frames = frames?.slice(1); } @@ -108,7 +104,13 @@ function FramesRenderer({ name="NewFrames" fallback={
Error loading frames :(
} > - Loading async frames…
}> + + Loading async frames… + + } + > @@ -228,7 +230,13 @@ function Frames({ panel, point, time }: FramesProps) { name="Frames" fallback={
Error loading frames :((
} > - Loading...}> + + Loading... + + } + >
@@ -243,7 +251,9 @@ export default function NewFrames(props: FramesProps) { -
Loading...
+
+ Loading... +
} > diff --git a/src/devtools/client/debugger/src/utils/focus.ts b/src/devtools/client/debugger/src/utils/focus.ts deleted file mode 100644 index bf3d94d12eb..00000000000 --- a/src/devtools/client/debugger/src/utils/focus.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { TimeStampedPointRange } from "@replayio/protocol"; - -export function isFocusWindowApplied( - focusWindow: TimeStampedPointRange | null, - endpoint: string -): focusWindow is TimeStampedPointRange { - return ( - focusWindow !== null && (focusWindow.begin.point !== "0" || focusWindow.end.point !== endpoint) - ); -} diff --git a/src/ui/suspense/util.ts b/src/ui/suspense/util.ts index ebf7c885bc2..48c9d78119a 100644 --- a/src/ui/suspense/util.ts +++ b/src/ui/suspense/util.ts @@ -6,36 +6,36 @@ import { pauseIdCache } from "replay-next/src/suspense/PauseCache"; import { isExecutionPointsWithinRange } from "replay-next/src/utils/time"; import { ReplayClientInterface } from "shared/client/types"; -// returns undefined if the async parent pause doesn't exist -// or null if it is not in a loaded region +// returns false if the async parent pause doesn't exist +// or true if it is not in a loaded region export function getAsyncParentPauseIdSuspense( replayClient: ReplayClientInterface, pauseId: PauseId, asyncIndex: number, focusWindow: TimeStampedPointRange | null -): PauseId | null { +): PauseId | boolean { while (asyncIndex > 0) { const frames = framesCache.read(replayClient, pauseId)!; if (!frames?.length) { - return null; + return false; } const steps = frameStepsCache.read(replayClient, pauseId, frames[frames.length - 1].frameId); if (!steps || steps.length === 0) { - return null; + return false; } const executionPoint = steps[0].point; if ( - focusWindow === null || + focusWindow && !isExecutionPointsWithinRange(executionPoint, focusWindow.begin.point, focusWindow.end.point) ) { - return null; + return true; } const parentPauseId = pauseIdCache.read(replayClient, steps[0].point, steps[0].time); if (parentPauseId === pauseId) { - return null; + return false; } pauseId = parentPauseId; From 59370c808625d1a09154f08c4b9b9eba9d94bdd4 Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Wed, 19 Jun 2024 08:34:58 -0700 Subject: [PATCH 3/4] Remove LogRocket from Devtools (#10577) --- .../replay-preferences-implementations.md | 2 - package.json | 3 - .../replay-next/components/AvatarImage.tsx | 1 - .../SyntaxHighlighter/SyntaxHighlighter.tsx | 2 +- .../components/inspector/Inspector.tsx | 6 +- .../inspector/SourcePreviewInspector.tsx | 3 +- .../search-files/ResultsListRow.tsx | 3 +- .../components/search-files/SearchFiles.tsx | 3 - .../components/sources/PreviewPopup.tsx | 2 +- packages/shared/user-data/GraphQL/config.ts | 5 -- pages/_document.tsx | 10 ++-- src/base.css | 5 -- .../src/components/Editor/EditorPane.tsx | 7 +-- .../debugger/src/components/Editor/Tab.tsx | 7 +-- .../PrimaryPanes/SourcesTreeItem.tsx | 5 +- .../SecondaryPanes/Breakpoints/Breakpoint.tsx | 2 +- .../Breakpoints/BreakpointHeading.tsx | 3 +- .../SecondaryPanes/Frames/Frame.tsx | 5 +- .../components/SecondaryPanes/NewScopes.tsx | 5 +- .../SourceOutline/SourceOutlineFunction.tsx | 5 +- .../src/components/shared/PreviewFunction.js | 8 +-- src/ui/actions/session.ts | 3 - src/ui/components/Avatar.tsx | 1 - src/ui/components/Comments/CommentCard.tsx | 1 - src/ui/components/Events/Event.tsx | 1 - src/ui/components/Events/ReplayInfo.tsx | 5 +- src/ui/components/Redacted.tsx | 40 ------------- src/ui/components/SecondaryToolbox/index.tsx | 5 +- src/ui/components/Video/Video.tsx | 4 +- src/ui/components/shared/APIKeys.tsx | 2 +- .../shared/SharingModal/EmailForm.tsx | 2 +- .../components/BooleanPreference.tsx | 1 - .../UserSettingsModal/panels/Personal.tsx | 2 +- .../UserSettingsModal/panels/Preferences.tsx | 11 ---- src/ui/setup/store.ts | 10 ---- src/ui/utils/logrocket.ts | 60 ------------------- src/ui/utils/mixpanel.ts | 2 +- yarn.lock | 37 ------------ 38 files changed, 37 insertions(+), 242 deletions(-) delete mode 100644 src/ui/components/Redacted.tsx delete mode 100644 src/ui/utils/logrocket.ts diff --git a/docs/codebase-notes/replay-preferences-implementations.md b/docs/codebase-notes/replay-preferences-implementations.md index 08b12c13dc7..4789c523337 100644 --- a/docs/codebase-notes/replay-preferences-implementations.md +++ b/docs/codebase-notes/replay-preferences-implementations.md @@ -134,7 +134,6 @@ export type ExperimentalUserSettings = { apiKeys: ApiKey[]; defaultWorkspaceId: null | string; - disableLogRocket: boolean; enableTeams: boolean; enableLargeText: boolean; }; @@ -164,7 +163,6 @@ export type CombinedExperimentalUserSettings = ExperimentalUserSettings & - `ui/actions/session.ts`: `disableCache`, `listenForMetrics` - `ui/components/DevTools.tsx`: `sidePanelSize` -- `ui/components/Redacted.tsx`: `showRedactions` - `ui/components/SkeletonLoader.tsx`: `sidePanelSize` - `ui/components/Viewer.tsx`: `secondaryPanelHeight`, `sidePanelSize`, `toolboxSize` - `ui/hooks/settings.ts`: all, passed as key to `useStringPref` and `useBoolPref` diff --git a/package.json b/package.json index 506819dbf1b..fa7a3e88b1a 100644 --- a/package.json +++ b/package.json @@ -59,8 +59,6 @@ "launchdarkly-js-client-sdk": "^3.0.0", "lexical": "^0.6.5", "lodash": "^4.17.21", - "logrocket": "^2.2.1", - "logrocket-react": "^5.0.1", "memoize-one": "^6.0.0", "minimatch": "^9.0.3", "mixpanel-browser": "^2.43.0", @@ -130,7 +128,6 @@ "@types/isomorphic-fetch": "^0.0.36", "@types/jest": "^27.4.1", "@types/lodash": "^4.14.181", - "@types/logrocket-react": "^3.0.0", "@types/mixpanel-browser": "^2.35.6", "@types/node": "^18.0.0", "@types/react": "^18.0.12", diff --git a/packages/replay-next/components/AvatarImage.tsx b/packages/replay-next/components/AvatarImage.tsx index c79c02d8076..2fbbb5d64b2 100644 --- a/packages/replay-next/components/AvatarImage.tsx +++ b/packages/replay-next/components/AvatarImage.tsx @@ -47,7 +47,6 @@ export default function AvatarImage({ className, name, src, title, ...rest }: Pr +
{formattedTokens.map((tokens, index) => lineRenderer({ className: lineClassName, diff --git a/packages/replay-next/components/inspector/Inspector.tsx b/packages/replay-next/components/inspector/Inspector.tsx index d600e3ab8cb..7dac0151fd7 100644 --- a/packages/replay-next/components/inspector/Inspector.tsx +++ b/packages/replay-next/components/inspector/Inspector.tsx @@ -37,11 +37,7 @@ export default function Inspector({ return keyValue; } else { return ( -
+
{keyValue}
); diff --git a/packages/replay-next/components/inspector/SourcePreviewInspector.tsx b/packages/replay-next/components/inspector/SourcePreviewInspector.tsx index c3e25281db8..61acd9723d5 100644 --- a/packages/replay-next/components/inspector/SourcePreviewInspector.tsx +++ b/packages/replay-next/components/inspector/SourcePreviewInspector.tsx @@ -33,7 +33,6 @@ export default forwardRef(function SourcePreviewInspector return (
@@ -48,7 +47,7 @@ export default forwardRef(function SourcePreviewInspector data-test-name="SourcePreviewInspector" ref={ref} > -
+
}> -
+
{locationString}
@@ -153,7 +153,6 @@ function MatchRow({
{ diff --git a/packages/replay-next/components/search-files/SearchFiles.tsx b/packages/replay-next/components/search-files/SearchFiles.tsx index 51dc534bbea..aa6cb5a14fe 100644 --- a/packages/replay-next/components/search-files/SearchFiles.tsx +++ b/packages/replay-next/components/search-files/SearchFiles.tsx @@ -131,7 +131,6 @@ export default function SearchFiles({ limit }: { limit?: number }) { -
+
{valueUnavailableMessage}
diff --git a/packages/shared/user-data/GraphQL/config.ts b/packages/shared/user-data/GraphQL/config.ts index 5b513dfcb2f..10ff6d6ab2b 100644 --- a/packages/shared/user-data/GraphQL/config.ts +++ b/packages/shared/user-data/GraphQL/config.ts @@ -138,11 +138,6 @@ export const config = { legacyKey: null, }, - global_disableLogRocket: { - defaultValue: Boolean(false), - label: "Disable LogRocket session replay", - legacyKey: "devtools.disableLogRocket", - }, global_enableLargeText: { defaultValue: Boolean(false), label: "Enable large text for Editor", diff --git a/pages/_document.tsx b/pages/_document.tsx index eb143345c19..6f052a2cfe9 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -26,7 +26,7 @@ const csp = (props: any) => { const authHost = getAuthHost(); return [ `default-src 'self'`, - `connect-src 'self' https://api.replay.io wss://api.replay.io wss://dispatch.replay.io ws://*.replay.prod http://*.replay.prod https://telemetry.replay.io https://${authHost} https://api-js.mixpanel.com https://*.sentry.io https://*.launchdarkly.com https://*.logrocket.io https://*.lr-ingest.io https://*.logrocket.com https://*.lr-in.com https://api.stripe.com https://vitals.vercel-insights.com ${ + `connect-src 'self' https://api.replay.io wss://api.replay.io wss://dispatch.replay.io ws://*.replay.prod http://*.replay.prod https://telemetry.replay.io https://${authHost} https://api-js.mixpanel.com https://*.sentry.io https://*.launchdarkly.com https://*.lr-ingest.io https://*.lr-in.com https://api.stripe.com https://vitals.vercel-insights.com ${ // Required to talk to local backend in development. Enabling // localhost:8000 for prod to support the ?dispatch parameter when running // the local backend @@ -34,22 +34,22 @@ const csp = (props: any) => { }`, `frame-src replay: https://js.stripe.com https://hooks.stripe.com https://${authHost} https://www.loom.com/`, // Required by some of our external services - `script-src 'self' 'unsafe-eval' https://cdn.logrocket.io https://cdn.lr-ingest.io https://cdn.lr-in.com https://js.stripe.com ${hash}`, + `script-src 'self' 'unsafe-eval' https://cdn.lr-ingest.io https://cdn.lr-in.com https://js.stripe.com ${hash}`, `form-action https://${authHost}`, // From vercel's CSP config and Google fonts `font-src 'self' data: https://fonts.gstatic.com`, // Google fonts `style-src-elem 'self' 'unsafe-inline' https://fonts.gstatic.com`, - // Required by LogRocket - `child-src 'self' blob:`, - `worker-src 'self' blob:`, // Required by some of our external services `style-src 'self' 'unsafe-inline'`, // Required to inline images from the database and from external avaters `img-src 'self' data: https:`, + + // Required for our logpoint analysis cache (which uses a Web worker) + `worker-src 'self' blob:`, ] .filter(Boolean) .join("; "); diff --git a/src/base.css b/src/base.css index e3d2d785a9c..b5e3b2b4646 100644 --- a/src/base.css +++ b/src/base.css @@ -16,11 +16,6 @@ body { scrollbar-color: transparent; } -.showRedactions[data-private="true"] { - background: black !important; - border: 2px solid black !important; -} - :root { --dark-blue: #2d7eff; --dark-grey: #696969; diff --git a/src/devtools/client/debugger/src/components/Editor/EditorPane.tsx b/src/devtools/client/debugger/src/components/Editor/EditorPane.tsx index 7d0001b0b1a..eb32f94a102 100644 --- a/src/devtools/client/debugger/src/components/Editor/EditorPane.tsx +++ b/src/devtools/client/debugger/src/components/Editor/EditorPane.tsx @@ -1,9 +1,8 @@ import classNames from "classnames"; -import { useLayoutEffect, useRef } from "react"; +import { useRef } from "react"; import { IndeterminateProgressBar } from "replay-next/components/IndeterminateLoader"; import { userData } from "shared/user-data/GraphQL/UserData"; -import { Redacted } from "ui/components/Redacted"; import { getToolboxLayout } from "ui/reducers/layout"; import { getSelectedSourceId, getSourcesUserActionPending } from "ui/reducers/sources"; import { useAppSelector } from "ui/setup/hooks"; @@ -35,9 +34,9 @@ export const EditorPane = () => { {sourcesUserActionPending ? : null} {selectedSourceId ? ( - +
- +
) : ( )} diff --git a/src/devtools/client/debugger/src/components/Editor/Tab.tsx b/src/devtools/client/debugger/src/components/Editor/Tab.tsx index 30d35f54a66..5ce91e8a592 100644 --- a/src/devtools/client/debugger/src/components/Editor/Tab.tsx +++ b/src/devtools/client/debugger/src/components/Editor/Tab.tsx @@ -8,7 +8,6 @@ import useTabContextMenu from "devtools/client/debugger/src/components/Editor/us import useTooltip from "replay-next/src/hooks/useTooltip"; import { useSourcesById } from "replay-next/src/suspense/SourcesCache"; import { ReplayClientContext } from "shared/client/ReplayClientContext"; -import { Redacted } from "ui/components/Redacted"; import { SourceDetails, getSelectedSourceId } from "ui/reducers/sources"; import { useAppDispatch, useAppSelector } from "ui/setup/hooks"; import { trackEvent } from "ui/utils/telemetry"; @@ -87,7 +86,7 @@ export default function Tab({ return ( <> - e.button === 1 && closeTab(cx, source)} - refToForward={elementRef => setTabRef(sourceId, elementRef as HTMLDivElement | null)} + ref={elementRef => setTabRef(sourceId, elementRef as HTMLDivElement | null)} >
{getTruncatedFileName(source, query)}
-
+
{contextMenu} {tooltip} diff --git a/src/devtools/client/debugger/src/components/PrimaryPanes/SourcesTreeItem.tsx b/src/devtools/client/debugger/src/components/PrimaryPanes/SourcesTreeItem.tsx index 1d1c0e06fd5..7bdf9b6e01f 100644 --- a/src/devtools/client/debugger/src/components/PrimaryPanes/SourcesTreeItem.tsx +++ b/src/devtools/client/debugger/src/components/PrimaryPanes/SourcesTreeItem.tsx @@ -10,7 +10,6 @@ import { ContextMenuItem, useContextMenu } from "use-context-menu"; import Icon from "replay-next/components/Icon"; import { copyToClipboard } from "replay-next/components/sources/utils/clipboard"; -import { Redacted } from "ui/components/Redacted"; import type { SourceDetails } from "ui/reducers/sources"; import { getSourceQueryString } from "../../utils/source"; @@ -196,10 +195,10 @@ function SourceTreeItem2({ {itemArrow} - +
{getItemName(item)} {query} - +
{contextMenu} diff --git a/src/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/Breakpoint.tsx b/src/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/Breakpoint.tsx index 0dc6f11486d..01c8e588daa 100644 --- a/src/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/Breakpoint.tsx +++ b/src/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/Breakpoint.tsx @@ -85,7 +85,7 @@ class Breakpoint extends PureComponent { const location = `${line}${columnVal}`; return ( -
+
{location}
); diff --git a/src/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/BreakpointHeading.tsx b/src/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/BreakpointHeading.tsx index e267ed4cfbe..ffeaa6ae295 100644 --- a/src/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/BreakpointHeading.tsx +++ b/src/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/BreakpointHeading.tsx @@ -4,7 +4,6 @@ import { ConnectedProps, connect } from "react-redux"; import type { Context } from "devtools/client/debugger/src/reducers/pause"; import { Point } from "shared/client/types"; -import { Redacted } from "ui/components/Redacted"; import { MiniSource, getSourceDetails } from "ui/reducers/sources"; import type { UIState } from "ui/state"; @@ -83,7 +82,7 @@ class BreakpointHeading extends PureComponent { onContextMenu={this.onContextMenu} onClick={this.onClick} > - {fileName} +
{fileName}
{allBreakpointsAreShared || ( - } {isSelectable &&
}
- +
{/*Keep the context menu separate to avoid `onMouseDown` bubbling up and causing unwanted frame selection behavior*/} diff --git a/src/devtools/client/debugger/src/components/SecondaryPanes/NewScopes.tsx b/src/devtools/client/debugger/src/components/SecondaryPanes/NewScopes.tsx index 15e1b9b4f38..ad0c5994dc8 100644 --- a/src/devtools/client/debugger/src/components/SecondaryPanes/NewScopes.tsx +++ b/src/devtools/client/debugger/src/components/SecondaryPanes/NewScopes.tsx @@ -12,7 +12,6 @@ import { sourcesByIdCache } from "replay-next/src/suspense/SourcesCache"; import { getPreferredLocation, getPreferredSourceId } from "replay-next/src/utils/sources"; import { ReplayClientContext } from "shared/client/ReplayClientContext"; import { enterFocusMode } from "ui/actions/timeline"; -import { Redacted } from "ui/components/Redacted"; import { getPreferredGeneratedSources } from "ui/reducers/sources"; import { useAppDispatch, useAppSelector } from "ui/setup/hooks"; import { pickScopes } from "ui/suspense/scopeCache"; @@ -150,7 +149,7 @@ export default function NewScopes() { return (
- +
- +
); } diff --git a/src/devtools/client/debugger/src/components/SourceOutline/SourceOutlineFunction.tsx b/src/devtools/client/debugger/src/components/SourceOutline/SourceOutlineFunction.tsx index 6b2af36631d..d462feb6722 100644 --- a/src/devtools/client/debugger/src/components/SourceOutline/SourceOutlineFunction.tsx +++ b/src/devtools/client/debugger/src/components/SourceOutline/SourceOutlineFunction.tsx @@ -2,7 +2,6 @@ import classnames from "classnames"; import React from "react"; import { FunctionOutlineWithHitCount } from "replay-next/src/suspense/OutlineHitCountsCache"; -import { Redacted } from "ui/components/Redacted"; import PreviewFunction from "../shared/PreviewFunction"; @@ -25,9 +24,9 @@ export const SourceOutlineFunction = React.memo(function OutlineFunction({ >
λ - +
- +
{func.hits !== undefined && (
{func.hits}
diff --git a/src/devtools/client/debugger/src/components/shared/PreviewFunction.js b/src/devtools/client/debugger/src/components/shared/PreviewFunction.js index 5f1d54a0ec7..6456327f7c6 100644 --- a/src/devtools/client/debugger/src/components/shared/PreviewFunction.js +++ b/src/devtools/client/debugger/src/components/shared/PreviewFunction.js @@ -5,9 +5,7 @@ import flatten from "lodash/flatten"; import times from "lodash/times"; import zip from "lodash/zip"; -import React, { Component } from "react"; - -import { RedactedSpan } from "ui/components/Redacted"; +import { Component } from "react"; export default class PreviewFunction extends Component { renderFunctionName(func) { @@ -39,12 +37,12 @@ export default class PreviewFunction extends Component { render() { const { func } = this.props; return ( - + {this.renderFunctionName(func)} ( {this.renderParams(func)} ) - + ); } } diff --git a/src/ui/actions/session.ts b/src/ui/actions/session.ts index 546f2811111..a6bfda80317 100644 --- a/src/ui/actions/session.ts +++ b/src/ui/actions/session.ts @@ -34,7 +34,6 @@ import { import { setFocusWindow } from "ui/reducers/timeline"; import { getMutableParamsFromURL } from "ui/setup/dynamic/url"; import type { ExpectedError, UnexpectedError } from "ui/state/app"; -import LogRocket from "ui/utils/logrocket"; import { endMixpanelSession } from "ui/utils/mixpanel"; import { registerRecording, trackEvent } from "ui/utils/telemetry"; import { subscriptionExpired } from "ui/utils/workspace"; @@ -176,8 +175,6 @@ export function createSocket(recordingId: string): UIThunkAction { dispatch(actions.setRecordingWorkspace(recording.workspace)); } - LogRocket.createSession({ recording, userInfo }); - registerRecording({ recording }); if ( diff --git a/src/ui/components/Avatar.tsx b/src/ui/components/Avatar.tsx index 0e40b255e83..389141d3f2a 100644 --- a/src/ui/components/Avatar.tsx +++ b/src/ui/components/Avatar.tsx @@ -16,7 +16,6 @@ type AvatarImageProps = Omit, "src"> & }; export const AvatarImage = (props: AvatarImageProps) => ( (e.currentTarget.src = "/recording/images/clear.png")} diff --git a/src/ui/components/Comments/CommentCard.tsx b/src/ui/components/Comments/CommentCard.tsx index e06629248ed..72ba4b64309 100644 --- a/src/ui/components/Comments/CommentCard.tsx +++ b/src/ui/components/Comments/CommentCard.tsx @@ -110,7 +110,6 @@ function CommentCard({ isFocused || styles.UnfocusedDimmed )} data-highlighted={isHighlighted || undefined} - data-private data-test-comment-id={comment.id} data-test-comment-type={comment.type} data-test-id={`CommentCard-${comment.id}`} diff --git a/src/ui/components/Events/Event.tsx b/src/ui/components/Events/Event.tsx index bd79a7b56f5..cb9c9a15beb 100644 --- a/src/ui/components/Events/Event.tsx +++ b/src/ui/components/Events/Event.tsx @@ -117,7 +117,6 @@ export default memo(function Event({ "text-lightGrey": currentTime < time, "font-semibold text-primaryAccent": isPaused, })} - data-private onClick={onClickSeek} onContextMenu={onContextMenu} onKeyDown={onKeyDown} diff --git a/src/ui/components/Events/ReplayInfo.tsx b/src/ui/components/Events/ReplayInfo.tsx index 387bb0aa098..6263355b2f7 100644 --- a/src/ui/components/Events/ReplayInfo.tsx +++ b/src/ui/components/Events/ReplayInfo.tsx @@ -49,10 +49,7 @@ function ReplayInfo({ setModal }: PropsFromRedux) { const isTest = isTestSuiteReplay(recording); return ( -
+
{recording.user ? ( diff --git a/src/ui/components/Redacted.tsx b/src/ui/components/Redacted.tsx deleted file mode 100644 index 71b637202be..00000000000 --- a/src/ui/components/Redacted.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import classnames from "classnames"; -import { HTMLProps, Ref } from "react"; - -import { useGraphQLUserData } from "shared/user-data/GraphQL/useGraphQLUserData"; - -type RefProp = { - refToForward?: Ref; -}; - -export function Redacted({ - className, - refToForward, - ...rest -}: HTMLProps & RefProp) { - const [showRedactions] = useGraphQLUserData("global_showRedactions"); - return ( -
} - /> - ); -} - -export function RedactedSpan({ - className, - refToForward, - ...rest -}: HTMLProps & RefProp) { - const [showRedactions] = useGraphQLUserData("global_showRedactions"); - return ( - - ); -} diff --git a/src/ui/components/SecondaryToolbox/index.tsx b/src/ui/components/SecondaryToolbox/index.tsx index b361b93eef3..6d6c0d6b8b7 100644 --- a/src/ui/components/SecondaryToolbox/index.tsx +++ b/src/ui/components/SecondaryToolbox/index.tsx @@ -25,7 +25,6 @@ import { trackEvent } from "ui/utils/telemetry"; import { selectors } from "../../reducers"; import NetworkMonitor from "../NetworkMonitor"; import { NodePicker } from "../NodePicker"; -import { Redacted } from "../Redacted"; import ReplayLogo from "../shared/ReplayLogo"; import WaitForReduxSlice from "../WaitForReduxSlice"; import NewConsoleRoot from "./NewConsole"; @@ -243,7 +242,7 @@ export default function SecondaryToolbox() {
- +
}> {shouldShowNetworkTab && ( @@ -264,7 +263,7 @@ export default function SecondaryToolbox() { )} - +
); } diff --git a/src/ui/components/Video/Video.tsx b/src/ui/components/Video/Video.tsx index a739ca447f2..a6caa454e8c 100644 --- a/src/ui/components/Video/Video.tsx +++ b/src/ui/components/Video/Video.tsx @@ -1,9 +1,8 @@ -import { MouseEvent, useContext, useLayoutEffect, useState } from "react"; +import { useContext, useLayoutEffect, useState } from "react"; import Icon from "replay-next/components/Icon"; import { LoadingProgressBar } from "replay-next/components/LoadingProgressBar"; import { ReplayClientContext } from "shared/client/ReplayClientContext"; -import { stopPlayback } from "ui/actions/timeline"; import CommentsOverlay from "ui/components/Comments/VideoComments"; import { NodePickerContext } from "ui/components/NodePickerContext"; import ReplayLogo from "ui/components/shared/ReplayLogo"; @@ -108,7 +107,6 @@ export default function Video() {
- + {apiKey.label} {usage} diff --git a/src/ui/components/shared/SharingModal/EmailForm.tsx b/src/ui/components/shared/SharingModal/EmailForm.tsx index fc62f785e12..ae0f8653032 100644 --- a/src/ui/components/shared/SharingModal/EmailForm.tsx +++ b/src/ui/components/shared/SharingModal/EmailForm.tsx @@ -112,7 +112,7 @@ export default function EmailForm({ recordingId }: { recordingId: RecordingId }) return (
- + {showAutocomplete ? (
{inputValue}
diff --git a/src/ui/components/shared/UserSettingsModal/components/BooleanPreference.tsx b/src/ui/components/shared/UserSettingsModal/components/BooleanPreference.tsx index 9ece3afd5b1..594558c874e 100644 --- a/src/ui/components/shared/UserSettingsModal/components/BooleanPreference.tsx +++ b/src/ui/components/shared/UserSettingsModal/components/BooleanPreference.tsx @@ -37,7 +37,6 @@ export function BooleanPreference({