Files
zeekay 1b367e2b62 chore: rebase the tree onto upstream master
The tree was a debranded snapshot of upstream taken around 2026-02-20, and
upstream has moved about five months since. This replaces it with upstream
master, mechanically re-derived: bin/debrand does the rename, and the
pipeline and squashed migrations are restored from the shipped tree.

Not a merge. The previous import replaced the tree wholesale in a single
commit, so there is no shared content history to merge against. Reproducing
the rename on the new tree is what actually converges.

What survives: .hanzo/workflows, the Dockerfiles and bin/docker* entrypoints,
compose files, LLM.md, and insights/migrations. The squashed initial
migration is load-bearing — the live database records it by name, so
upstream's ~918 individual migrations cannot come back.

Nine products are dropped as unreferenced. Twenty-one more that we do not run
are kept anyway because the core app still imports them; unpicking those is a
refactor and does not belong in a rebase.

This base does not build yet, and the reasons are not in the rename:
upstream now wants Python 3.13.13 against our 3.12.12 and Django 5.2 against
our 4.2, and the dependency manifests still name upstream packages that we
republish under our own names. Those are decisions, not renames.
2026-08-01 15:44:40 -07:00

173 lines
9.5 KiB
TypeScript

import { OnboardingComponentsContext, createInstallation } from 'scenes/onboarding/shared/OnboardingDocsContentWrapper'
import { StepDefinition } from '../steps'
export const getReactNativeSteps = (ctx: OnboardingComponentsContext): StepDefinition[] => {
const { CodeBlock, Markdown, CalloutBox, dedent, snippets } = ctx
const SessionReplayFinalSteps = snippets?.SessionReplayFinalSteps
return [
{
title: 'Install the packages',
badge: 'required',
content: (
<>
<Markdown>
Install the Insights React Native library, its dependencies, and the session replay plugin:
</Markdown>
<CodeBlock
blocks={[
{
language: 'bash',
file: 'Expo',
code: dedent`
npx expo install insights-react-native expo-file-system expo-application expo-device expo-localization @hanzo/react-native-plugin
`,
},
{
language: 'bash',
file: 'yarn',
code: dedent`
yarn add insights-react-native @react-native-async-storage/async-storage react-native-device-info react-native-localize @hanzo/react-native-plugin
# for iOS
cd ios && pod install
`,
},
{
language: 'bash',
file: 'npm',
code: dedent`
npm i -s insights-react-native @react-native-async-storage/async-storage react-native-device-info react-native-localize @hanzo/react-native-plugin
# for iOS
cd ios && pod install
`,
},
]}
/>
<CalloutBox type="fyi" title="Plugin renamed in 4.47.0+">
<Markdown>
{dedent`
\`@hanzo/react-native-plugin\` (\`>= 2.0.1\`) is the renamed \`insights-react-native-session-replay\` plugin — it was renamed in \`insights-react-native\` 4.47.0+ and now also powers [native error tracking](https://hanzo.ai/docs/error-tracking/installation/react-native). If you're on a \`insights-react-native\` version earlier than 4.47.0, install \`insights-react-native-session-replay\` instead.
`}
</Markdown>
</CalloutBox>
<CalloutBox type="fyi" title="SDK version">
<Markdown>
Session replay requires Insights React Native SDK version 3.2.0 or higher. We recommend
always using the latest version.
</Markdown>
</CalloutBox>
</>
),
},
{
title: 'Enable session recordings in project settings',
badge: 'required',
content: (
<>
<Markdown>
Go to your Insights [Project Settings](https://us.hanzo.ai/settings/project-replay) and enable
**Record user sessions**. Session recordings will not work without this setting enabled.
</Markdown>
</>
),
},
{
title: 'Configure Insights with session replay',
badge: 'required',
content: (
<>
<Markdown>
Add `enableSessionReplay: true` to your Insights configuration. Here are all the available
options:
</Markdown>
<CodeBlock
blocks={[
{
language: 'tsx',
file: 'App.tsx',
code: dedent`
import { InsightsProvider } from 'insights-react-native'
export function MyApp() {
return (
<InsightsProvider
apiKey="<ph_project_token>"
options={{
host: "<ph_client_api_host>",
// Enable session recording. Requires enabling in your project settings as well.
// Default is false.
enableSessionReplay: true,
sessionReplayConfig: {
// Whether text inputs are masked. Default is true.
// Password inputs are always masked regardless
maskAllTextInputs: true,
// Whether images are masked. Default is true.
maskAllImages: true,
// Capture logs automatically. Default is true.
// Android only (Native Logcat only)
//
// Support for remote configuration
// in the [session replay settings](https://app.hanzo.ai/settings/project-replay#replay-log-capture)
// requires SDK version 4.35.0 or higher.
captureLog: true,
// Whether network requests are captured in recordings. Default is true
// Only metric-like data like speed, size, and response code are captured.
// No data is captured from the request or response body.
// iOS only
//
// Support for remote configuration
// in the [session replay settings](https://app.hanzo.ai/settings/project-replay#replay-network)
// requires SDK version 4.35.0 or higher.
captureNetworkTelemetry: true,
// Sample rate for session recordings. A value between 0.0 and 1.0.
// 1.0 means 100% of sessions will be recorded. 0.5 means 50%, and so on.
// Local config has precedence over remote config when both are set.
// Default is undefined (all sessions are recorded).
sampleRate: undefined,
// Throttling delay used to reduce the number of snapshots captured
// and reduce performance impact. Default is 1000ms
throttleDelayMs: 1000,
},
}}
>
<RestOfApp />
</InsightsProvider>
)
}
`,
},
]}
/>
<Markdown>
For more configuration options, see the [React Native session replay
docs](https://hanzo.ai/docs/session-replay/installation?tab=React+Native).
</Markdown>
<CalloutBox type="fyi" title="Requirements">
<Markdown>
Requires Android API 26+ and iOS 13+. Expo Go is not supported - use a development build.
Session replay is only supported on Android and iOS platforms.
</Markdown>
</CalloutBox>
</>
),
},
{
title: 'Watch session recordings',
badge: 'recommended',
content: <>{SessionReplayFinalSteps && <SessionReplayFinalSteps />}</>,
},
]
}
export const ReactNativeInstallation = createInstallation(getReactNativeSteps)