Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

949 B
Raw Blame
import { useActions, useValues } from 'kea'

import { IconSearch } from '@posthog/icons'
import { Button } from '@posthog/quill'

import { sessionRecordingPlayerLogic } from 'scenes/session-recordings/player/sessionRecordingPlayerLogic'

export function QuillInspectDOM(): JSX.Element {
    const { sessionPlayerMetaData } = useValues(sessionRecordingPlayerLogic)
    const { openExplorer } = useActions(sessionRecordingPlayerLogic)

    return (
        <Button
            size="sm"
            onClick={openExplorer}
            tooltip="Inspect the DOM as it was at this moment in the session. Analyze the structure and elements captured during the recording."
            disabledReason={
                sessionPlayerMetaData?.snapshot_source === 'mobile' ? 'Only available for web recordings' : undefined
            }
            data-attr="explore-dom"
        >
            <IconSearch />
            Inspect DOM
        </Button>
    )
}