Skip to content

feat(surveys): opt-in back button for multi-question surveys#3634

Open
lucasheriques wants to merge 2 commits into
mainfrom
posthog-code/surveys-back-button
Open

feat(surveys): opt-in back button for multi-question surveys#3634
lucasheriques wants to merge 2 commits into
mainfrom
posthog-code/surveys-back-button

Conversation

@lucasheriques
Copy link
Copy Markdown
Contributor

Summary

Adds a built-in, opt-in Back button to web surveys so respondents can return to a previously visited question and edit their answer. Today the surveys SDK is strictly forward-only — this fills a real UX gap, especially on multi-question and branched surveys.

  • New appearance flags: allowGoBack (default false) and backButtonText (defaults to "Back"). Added to @posthog/core's SurveyAppearance so the field is discoverable for future RN parity.
  • History stack, not currentIndex - 1: InProgressSurveyState gains an optional visitedIndices: number[] so Back respects the path the user actually took through branching surveys (response_based, specific_question). Existing in-progress state without visitedIndices resumes safely with the button hidden until the next forward step.
  • Prior answers are pre-filled on the question you return to via the existing initialValue path — no retyping.
  • Back button hidden in preview mode, on the first visited question, and whenever allowGoBack is not set (preserves existing behavior for every current survey).

Out of scope

  • React Native (packages/react-native/src/surveys/) — separate parity PR, the new appearance fields live on the shared core type so it can land next.
  • No public programmatic navigation API on PostHogSurveys yet — deferred until a concrete external ask.

Test plan

  • Unit tests (packages/browser/src/__tests__/extensions/surveys/back-button.test.tsx, 7 cases): visibility on first question, hidden when flag unset, advance+back round-trip with pre-fill, history survives re-render from persisted state, branching respected (Q1 → Q3 → back lands on Q1, not Q2), legacy state without visitedIndices doesn't crash, custom backButtonText honored.
  • Playwright (packages/browser/playwright/mocked/surveys/back-button.spec.ts, 2 cases): full bundle smoke for the positive and negative path.
  • Lint, surveys typecheck, all 420 surveys unit tests pass.
  • Manual smoke in playground — linear + branching survey, confirm pre-fill and CSS rendering.

Created with PostHog Code

Adds an appearance-gated `allowGoBack` flag that renders a "Back"
button on web surveys after the first question. Uses a visited-index
history stack persisted in localStorage so navigation respects
branching paths (response_based, specific_question) — going back
returns you to the question you actually came from, not currentIndex-1.
Prior answers are pre-filled on the question you return to.

Generated-By: PostHog Code
Task-Id: d229cf67-cbe1-43d1-9b8f-fa32ae50eca6
@lucasheriques lucasheriques requested a review from a team as a code owner May 19, 2026 18:15
@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
posthog-example-next-app-router Ready Ready Preview May 19, 2026 8:12pm
posthog-js Ready Ready Preview May 19, 2026 8:12pm
posthog-nextjs-config Ready Ready Preview May 19, 2026 8:12pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

⚠️ `posthog-react-native` is modified but not declared in any changeset

This is informational — the PR is not blocked. Click the triangle above to collapse, or push a fix and this comment will auto-delete.

Modified in this PR but not in any changeset:

  • posthog-react-native

If this package should ship the change, add it to the changeset frontmatter:

---
"posthog-react-native": patch
---

Changesets in this PR:

  • @posthog/core — minor
  • posthog-js — minor

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 19, 2026

Comments Outside Diff (1)

  1. packages/browser/src/extensions/surveys.tsx, line 1337-1365 (link)

    P2 Stale responses from abandoned branch paths included in final submission

    onBackButtonClick persists questionsResponses unchanged, keeping answers for every question ever answered — including ones on branches the user has now abandoned. If a respondent answers Q1 → branches to Q2 → answers Q2 → backs up to Q1 → changes their answer, now branching to Q4, the final submission will still contain the stale Q2 response. For linear surveys this is harmless (the user will overwrite Q2 when they pass through again), but for branching surveys where the new path never revisits Q2 the ghost answer is submitted alongside real data, silently corrupting the result set.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: packages/browser/src/extensions/surveys.tsx
    Line: 1337-1365
    
    Comment:
    **Stale responses from abandoned branch paths included in final submission**
    
    `onBackButtonClick` persists `questionsResponses` unchanged, keeping answers for every question ever answered — including ones on branches the user has now abandoned. If a respondent answers Q1 → branches to Q2 → answers Q2 → backs up to Q1 → changes their answer, now branching to Q4, the final submission will still contain the stale Q2 response. For linear surveys this is harmless (the user will overwrite Q2 when they pass through again), but for branching surveys where the new path never revisits Q2 the ghost answer is submitted alongside real data, silently corrupting the result set.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 4 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 4
packages/browser/src/extensions/surveys/components/BottomSection.tsx:34-66
**Submit button always wrapped in new `form-buttons` div**

Even when `allowGoBack` is false (and `showBackButton` is therefore `false`), the condition `(showBackButton || !skipSubmitButton)` is `true` whenever the submit button is visible — so the submit button is now wrapped in `<div class="form-buttons">` for every ordinary survey. This changes the DOM structure for all existing surveys, not just those opting into back navigation. Any host-page CSS that targets `.bottom-section > button` or `.bottom-section > .form-submit` would silently break because there is now an intermediate `div` between them. Consider restoring the original single-button layout when `showBackButton` is false.

### Issue 2 of 4
packages/browser/src/extensions/surveys.tsx:1337-1365
**Stale responses from abandoned branch paths included in final submission**

`onBackButtonClick` persists `questionsResponses` unchanged, keeping answers for every question ever answered — including ones on branches the user has now abandoned. If a respondent answers Q1 → branches to Q2 → answers Q2 → backs up to Q1 → changes their answer, now branching to Q4, the final submission will still contain the stale Q2 response. For linear surveys this is harmless (the user will overwrite Q2 when they pass through again), but for branching surveys where the new path never revisits Q2 the ghost answer is submitted alongside real data, silently corrupting the result set.

### Issue 3 of 4
packages/browser/src/__tests__/extensions/surveys/back-button.test.tsx:101-120
**Missing `waitFor` / `async` in test that checks async state**

The test `'back button is hidden when allowGoBack is not set'` is a synchronous test that asserts `screen.getByText('Question 2')` directly after `fireEvent.click`. Every other test in this file that checks post-click state uses `await waitFor(...)` and is `async`. If the Preact state update ever becomes deferred, this test will fail with an unhelpful "element not found" error instead of a meaningful assertion failure. The test should be `async` and use `await waitFor(() => expect(screen.getByText('Question 2')).toBeVisible())`.

### Issue 4 of 4
packages/browser/src/__tests__/extensions/surveys/back-button.test.tsx:56-198
**Tests are not parameterised (project preference)**

The seven test cases share the same render setup and differ mainly in the combination of `allowGoBack`, `backButtonText`, and whether `visitedIndices` is present. The project's style guide prefers parameterised tests. Grouping the visibility/hidden-state cases into a `test.each` table would reduce duplication and make it easier to add future combinations (e.g., `allowGoBack: undefined`).

Reviews (1): Last reviewed commit: "feat(surveys): add opt-in back button fo..." | Re-trigger Greptile

Comment on lines +34 to +66
{(showBackButton || !skipSubmitButton) && (
<div className={`form-buttons${showBackButton ? ' form-buttons-with-back' : ''}`}>
{showBackButton && (
<button
className="form-back"
type="button"
aria-label="Go to previous question"
onClick={onBack}
>
{appearance.backButtonText || 'Back'}
</button>
)}
{!skipSubmitButton && (
<button
className="form-submit"
disabled={submitDisabled}
aria-label="Submit survey"
type="button"
onClick={() => {
if (link) {
window?.open(link)
}
if (isPreviewMode) {
onPreviewSubmit?.()
} else {
onSubmit()
}
}}
>
{text}
</button>
)}
</div>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Submit button always wrapped in new form-buttons div

Even when allowGoBack is false (and showBackButton is therefore false), the condition (showBackButton || !skipSubmitButton) is true whenever the submit button is visible — so the submit button is now wrapped in <div class="form-buttons"> for every ordinary survey. This changes the DOM structure for all existing surveys, not just those opting into back navigation. Any host-page CSS that targets .bottom-section > button or .bottom-section > .form-submit would silently break because there is now an intermediate div between them. Consider restoring the original single-button layout when showBackButton is false.

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/browser/src/extensions/surveys/components/BottomSection.tsx
Line: 34-66

Comment:
**Submit button always wrapped in new `form-buttons` div**

Even when `allowGoBack` is false (and `showBackButton` is therefore `false`), the condition `(showBackButton || !skipSubmitButton)` is `true` whenever the submit button is visible — so the submit button is now wrapped in `<div class="form-buttons">` for every ordinary survey. This changes the DOM structure for all existing surveys, not just those opting into back navigation. Any host-page CSS that targets `.bottom-section > button` or `.bottom-section > .form-submit` would silently break because there is now an intermediate `div` between them. Consider restoring the original single-button layout when `showBackButton` is false.

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +101 to +120
fireEvent.click(backButton)

await waitFor(() => expect(screen.getByText('Question 1')).toBeVisible())
expect(screen.getByRole('textbox')).toHaveValue('first answer')
expect(screen.queryByRole('button', { name: /go to previous question/i })).not.toBeInTheDocument()
})

test('navigation history survives a re-render (resume from persisted state)', async () => {
// First mount: advance Q1 -> Q2, capture whatever state the SDK persisted.
const { unmount } = render(
<SurveyPopup survey={baseSurvey} removeSurveyFromFocus={jest.fn()} isPopup posthog={mockPosthog as any} />
)

fireEvent.input(screen.getByRole('textbox'), { target: { value: 'first answer' } })
fireEvent.click(screen.getByRole('button', { name: /submit survey/i }))
await waitFor(() => expect(screen.getByText('Question 2')).toBeVisible())

const persistedState = mockedSetInProgressSurveyState.mock.calls.at(-1)![1]
unmount()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing waitFor / async in test that checks async state

The test 'back button is hidden when allowGoBack is not set' is a synchronous test that asserts screen.getByText('Question 2') directly after fireEvent.click. Every other test in this file that checks post-click state uses await waitFor(...) and is async. If the Preact state update ever becomes deferred, this test will fail with an unhelpful "element not found" error instead of a meaningful assertion failure. The test should be async and use await waitFor(() => expect(screen.getByText('Question 2')).toBeVisible()).

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/browser/src/__tests__/extensions/surveys/back-button.test.tsx
Line: 101-120

Comment:
**Missing `waitFor` / `async` in test that checks async state**

The test `'back button is hidden when allowGoBack is not set'` is a synchronous test that asserts `screen.getByText('Question 2')` directly after `fireEvent.click`. Every other test in this file that checks post-click state uses `await waitFor(...)` and is `async`. If the Preact state update ever becomes deferred, this test will fail with an unhelpful "element not found" error instead of a meaningful assertion failure. The test should be `async` and use `await waitFor(() => expect(screen.getByText('Question 2')).toBeVisible())`.

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +56 to +198
describe('Surveys: back button', () => {
beforeEach(() => {
cleanup()
jest.clearAllMocks()
mockedUuidv7.mockReturnValue('generated-uuid')
mockedGetInProgressSurveyState.mockReturnValue(null)
HTMLFormElement.prototype.submit = jest.fn()
})

afterEach(() => {
delete (HTMLFormElement.prototype as any).submit
})

test('back button is hidden on the first question', () => {
render(
<SurveyPopup survey={baseSurvey} removeSurveyFromFocus={jest.fn()} isPopup posthog={mockPosthog as any} />
)

expect(screen.getByText('Question 1')).toBeVisible()
expect(screen.queryByRole('button', { name: /go to previous question/i })).not.toBeInTheDocument()
})

test('back button is hidden when allowGoBack is not set', () => {
const survey = { ...baseSurvey, appearance: { ...baseSurvey.appearance, allowGoBack: false } }
render(<SurveyPopup survey={survey} removeSurveyFromFocus={jest.fn()} isPopup posthog={mockPosthog as any} />)

fireEvent.input(screen.getByRole('textbox'), { target: { value: 'a' } })
fireEvent.click(screen.getByRole('button', { name: /submit survey/i }))

expect(screen.getByText('Question 2')).toBeVisible()
expect(screen.queryByRole('button', { name: /go to previous question/i })).not.toBeInTheDocument()
})

test('back button appears after advancing and returns to the previous question with prior answer prefilled', async () => {
render(
<SurveyPopup survey={baseSurvey} removeSurveyFromFocus={jest.fn()} isPopup posthog={mockPosthog as any} />
)

fireEvent.input(screen.getByRole('textbox'), { target: { value: 'first answer' } })
fireEvent.click(screen.getByRole('button', { name: /submit survey/i }))

await waitFor(() => expect(screen.getByText('Question 2')).toBeVisible())
const backButton = screen.getByRole('button', { name: /go to previous question/i })
expect(backButton).toBeVisible()

fireEvent.click(backButton)

await waitFor(() => expect(screen.getByText('Question 1')).toBeVisible())
expect(screen.getByRole('textbox')).toHaveValue('first answer')
expect(screen.queryByRole('button', { name: /go to previous question/i })).not.toBeInTheDocument()
})

test('navigation history survives a re-render (resume from persisted state)', async () => {
// First mount: advance Q1 -> Q2, capture whatever state the SDK persisted.
const { unmount } = render(
<SurveyPopup survey={baseSurvey} removeSurveyFromFocus={jest.fn()} isPopup posthog={mockPosthog as any} />
)

fireEvent.input(screen.getByRole('textbox'), { target: { value: 'first answer' } })
fireEvent.click(screen.getByRole('button', { name: /submit survey/i }))
await waitFor(() => expect(screen.getByText('Question 2')).toBeVisible())

const persistedState = mockedSetInProgressSurveyState.mock.calls.at(-1)![1]
unmount()

// Second mount: feed the captured state back in (simulating a reload).
mockedGetInProgressSurveyState.mockReturnValue(persistedState)
render(
<SurveyPopup survey={baseSurvey} removeSurveyFromFocus={jest.fn()} isPopup posthog={mockPosthog as any} />
)

// Behavior: we resume on Q2 AND the back button is available because Q1 is in history.
expect(screen.getByText('Question 2')).toBeVisible()
const backButton = screen.getByRole('button', { name: /go to previous question/i })
fireEvent.click(backButton)

await waitFor(() => expect(screen.getByText('Question 1')).toBeVisible())
expect(screen.getByRole('textbox')).toHaveValue('first answer')
})

test('respects branching: back lands on the actual previous question, not currentIndex - 1', async () => {
const branchedSurvey: Survey = {
...baseSurvey,
questions: [
{
type: SurveyQuestionType.Open,
question: 'Question 1',
id: 'q1',
branching: { type: SurveyQuestionBranchingType.SpecificQuestion, index: 2 },
},
{ type: SurveyQuestionType.Open, question: 'Question 2', id: 'q2' },
{ type: SurveyQuestionType.Open, question: 'Question 3', id: 'q3' },
],
}

render(
<SurveyPopup
survey={branchedSurvey}
removeSurveyFromFocus={jest.fn()}
isPopup
posthog={mockPosthog as any}
/>
)

fireEvent.input(screen.getByRole('textbox'), { target: { value: 'skip to q3' } })
fireEvent.click(screen.getByRole('button', { name: /submit survey/i }))

await waitFor(() => expect(screen.getByText('Question 3')).toBeVisible())
fireEvent.click(screen.getByRole('button', { name: /go to previous question/i }))

await waitFor(() => expect(screen.getByText('Question 1')).toBeVisible())
expect(screen.queryByText('Question 2')).not.toBeInTheDocument()
})

test('resuming an in-progress survey without visitedIndices does not crash and hides back', () => {
mockedGetInProgressSurveyState.mockReturnValue({
surveySubmissionId: 'legacy-id',
lastQuestionIndex: 1,
responses: { $survey_response_q1: 'previous answer' },
})

render(
<SurveyPopup survey={baseSurvey} removeSurveyFromFocus={jest.fn()} isPopup posthog={mockPosthog as any} />
)

expect(screen.getByText('Question 2')).toBeVisible()
expect(screen.queryByRole('button', { name: /go to previous question/i })).not.toBeInTheDocument()
})

test('uses custom backButtonText from appearance', async () => {
const survey = {
...baseSurvey,
appearance: { ...baseSurvey.appearance, backButtonText: 'Previous' },
}
render(<SurveyPopup survey={survey} removeSurveyFromFocus={jest.fn()} isPopup posthog={mockPosthog as any} />)

fireEvent.input(screen.getByRole('textbox'), { target: { value: 'a' } })
fireEvent.click(screen.getByRole('button', { name: /submit survey/i }))

await waitFor(() => expect(screen.getByText('Question 2')).toBeVisible())
expect(screen.getByRole('button', { name: /go to previous question/i })).toHaveTextContent('Previous')
})
})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Tests are not parameterised (project preference)

The seven test cases share the same render setup and differ mainly in the combination of allowGoBack, backButtonText, and whether visitedIndices is present. The project's style guide prefers parameterised tests. Grouping the visibility/hidden-state cases into a test.each table would reduce duplication and make it easier to add future combinations (e.g., allowGoBack: undefined).

Context Used: Do not attempt to comment on incorrect alphabetica... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/browser/src/__tests__/extensions/surveys/back-button.test.tsx
Line: 56-198

Comment:
**Tests are not parameterised (project preference)**

The seven test cases share the same render setup and differ mainly in the combination of `allowGoBack`, `backButtonText`, and whether `visitedIndices` is present. The project's style guide prefers parameterised tests. Grouping the visibility/hidden-state cases into a `test.each` table would reduce duplication and make it easier to add future combinations (e.g., `allowGoBack: undefined`).

**Context Used:** Do not attempt to comment on incorrect alphabetica... ([source](https://app.greptile.com/review/custom-context?memory=instruction-0))

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented May 19, 2026

Graphite Automations

"sdk release label" took an action on this PR • (05/19/26)

1 label was added to this PR based on Adam Bowker's automation.

"Add graphite merge queue [copy]" took an action on this PR • (05/19/26)

2 labels were added to this PR based on Lucas Faria's automation.

- RN: add allowGoBack/backButtonText defaults so the new core fields
  satisfy SurveyAppearanceTheme (root cause for cascading CI failures).
- BottomSection: only wrap submit in form-buttons div when the Back
  button is actually shown — preserves DOM structure for existing
  surveys.
- Prune responses for abandoned branches before sending: if the user
  backs up and changes an earlier answer that takes a different path,
  the old branch's answers no longer leak into the submitted payload.
- Use waitFor in the negative back-button visibility test.
- Add changeset.

Generated-By: PostHog Code
Task-Id: d229cf67-cbe1-43d1-9b8f-fa32ae50eca6
@lucasheriques lucasheriques requested a review from a team as a code owner May 19, 2026 20:02
@lucasheriques
Copy link
Copy Markdown
Contributor Author

Pushed d6adead addressing the review:

Greptile #1 — DOM structure regression: fixed. form-buttons div only wraps submit when the Back button is actually shown. Existing surveys keep their original DOM (submit as a direct child of .bottom-section).

Greptile #2 — stale responses on branch change: fixed. On submission (partial and final), we now prune newResponses to only include question IDs corresponding to the indices in visitedIndices ++ [currentIndex]. So if a respondent answers Q1 → Q2 → backs up to Q1 → changes their answer, now routing to Q4, the emitted payload contains only Q1 and Q4 — Q2's answer is dropped. Added a unit test covering exactly that path ('prunes responses from abandoned branches when path changes after backing up'). questionsResponses state is intentionally kept intact so re-walking the same path still pre-fills.

Greptile #3 — missing waitFor: fixed.

Greptile #4 — parameterise tests: respectfully pushing back. The 7 cases assert distinct behaviors (visibility, branching, persistence resume, pre-fill, custom label), each with different setup or assertions. A test.each table would couple them together and hurt readability. I'd rather keep one named test per behavior — easier to reason about a failure, and adding "future combinations" hasn't been a problem here.

CI failures: all cascaded from one root cause — adding allowGoBack/backButtonText to core's SurveyAppearance broke posthog-react-native's SurveyAppearanceTheme = Required<SurveyAppearance> (the new fields became required and defaultSurveyAppearance didn't supply them). Fixed by adding allowGoBack: false and backButtonText: 'Back' to RN's defaultSurveyAppearance. This is a no-op for RN at runtime (RN doesn't render the back button yet) and pre-wires the defaults for the eventual RN parity PR.

Added a changeset (minor bump for both posthog-js and @posthog/core).

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

Size Change: +12 kB (+0.07%)

Total Size: 16.1 MB

Filename Size Change
packages/browser/dist/all-external-dependencies.js 261 kB +1.48 kB (+0.57%)
packages/browser/dist/array.full.es5.js 349 kB +1.57 kB (+0.45%)
packages/browser/dist/array.full.js 429 kB +1.48 kB (+0.35%)
packages/browser/dist/array.full.no-********.js 498 kB +1.48 kB (+0.3%)
packages/browser/dist/module.full.js 432 kB +1.48 kB (+0.34%)
packages/browser/dist/module.full.no-********.js 500 kB +1.48 kB (+0.3%)
packages/browser/dist/surveys-preview.js 77.8 kB +1.48 kB (+1.94%)
packages/browser/dist/surveys.js 96.2 kB +1.48 kB (+1.56%)
packages/react-native/dist/surveys/surveys-utils.js 14.2 kB +40 B (+0.28%)
ℹ️ View Unchanged
Filename Size Change
packages/ai/dist/anthropic/index.cjs 24.7 kB 0 B
packages/ai/dist/anthropic/index.mjs 24.4 kB 0 B
packages/ai/dist/gemini/index.cjs 33.1 kB 0 B
packages/ai/dist/gemini/index.mjs 33 kB 0 B
packages/ai/dist/index.cjs 169 kB 0 B
packages/ai/dist/index.mjs 168 kB 0 B
packages/ai/dist/langchain/index.cjs 46 kB 0 B
packages/ai/dist/langchain/index.mjs 45.5 kB 0 B
packages/ai/dist/openai-agents/index.cjs 25.5 kB 0 B
packages/ai/dist/openai-agents/index.mjs 25.4 kB 0 B
packages/ai/dist/openai/index.cjs 49.4 kB 0 B
packages/ai/dist/openai/index.mjs 49.1 kB 0 B
packages/ai/dist/otel/index.cjs 4.97 kB 0 B
packages/ai/dist/otel/index.mjs 4.86 kB 0 B
packages/ai/dist/vercel/index.cjs 43.3 kB 0 B
packages/ai/dist/vercel/index.mjs 43.2 kB 0 B
packages/browser/dist/array.js 191 kB 0 B
packages/browser/dist/array.no-********.js 209 kB 0 B
packages/browser/dist/conversations.js 67.3 kB 0 B
packages/browser/dist/crisp-chat-integration.js 1.97 kB 0 B
packages/browser/dist/customizations.full.js 18 kB 0 B
packages/browser/dist/dead-clicks-autocapture.js 14.3 kB 0 B
packages/browser/dist/default-extensions.js 190 kB 0 B
packages/browser/dist/element-inference.js 5.69 kB 0 B
packages/browser/dist/exception-autocapture.js 11.8 kB 0 B
packages/browser/dist/extension-bundles.js 106 kB 0 B
packages/browser/dist/external-scripts-loader.js 3.13 kB 0 B
packages/browser/dist/intercom-integration.js 2.03 kB 0 B
packages/browser/dist/lazy-********.js 146 kB 0 B
packages/browser/dist/logs.js 38.9 kB 0 B
packages/browser/dist/main.js 196 kB 0 B
packages/browser/dist/module.js 195 kB 0 B
packages/browser/dist/module.no-********.js 213 kB 0 B
packages/browser/dist/module.slim.js 102 kB 0 B
packages/browser/dist/module.slim.no-********.js 107 kB 0 B
packages/browser/dist/posthog-********.js 146 kB 0 B
packages/browser/dist/product-tours-preview.js 76.4 kB 0 B
packages/browser/dist/product-tours.js 115 kB 0 B
packages/browser/dist/recorder-v2.js 98.6 kB 0 B
packages/browser/dist/recorder.js 98.6 kB 0 B
packages/browser/dist/tracing-headers.js 1.74 kB 0 B
packages/browser/dist/web-vitals-with-attribution.js 11.8 kB 0 B
packages/browser/dist/web-vitals.js 6.39 kB 0 B
packages/browser/react/dist/esm/index.js 21.2 kB 0 B
packages/browser/react/dist/esm/slim/index.js 17.6 kB 0 B
packages/browser/react/dist/esm/surveys/index.js 4.68 kB 0 B
packages/browser/react/dist/umd/index.js 24.4 kB 0 B
packages/browser/react/dist/umd/slim/index.js 20.4 kB 0 B
packages/browser/react/dist/umd/surveys/index.js 5.45 kB 0 B
packages/convex/dist/client/feature-flags/crypto.js 461 B 0 B
packages/convex/dist/client/feature-flags/evaluator.js 16.5 kB 0 B
packages/convex/dist/client/feature-flags/index.js 196 B 0 B
packages/convex/dist/client/feature-flags/match-********.js 14.8 kB 0 B
packages/convex/dist/client/feature-flags/types.js 44 B 0 B
packages/convex/dist/client/index.js 14.7 kB 0 B
packages/convex/dist/component/_generated/api.js 712 B 0 B
packages/convex/dist/component/_generated/component.js 212 B 0 B
packages/convex/dist/component/_generated/dataModel.js 230 B 0 B
packages/convex/dist/component/_generated/server.js 3.71 kB 0 B
packages/convex/dist/component/convex.config.js 133 B 0 B
packages/convex/dist/component/lib.js 19.9 kB 0 B
packages/convex/dist/component/schema.js 694 B 0 B
packages/convex/dist/component/version.js 67 B 0 B
packages/core/dist/cookie.js 5.34 kB 0 B
packages/core/dist/cookie.mjs 3.12 kB 0 B
packages/core/dist/error-tracking/chunk-ids.js 2.54 kB 0 B
packages/core/dist/error-tracking/chunk-ids.mjs 1.31 kB 0 B
packages/core/dist/error-tracking/coercers/dom-exception-coercer.js 2.3 kB 0 B
packages/core/dist/error-tracking/coercers/dom-exception-coercer.mjs 993 B 0 B
packages/core/dist/error-tracking/coercers/error-coercer.js 2.02 kB 0 B
packages/core/dist/error-tracking/coercers/error-coercer.mjs 794 B 0 B
packages/core/dist/error-tracking/coercers/error-event-coercer.js 1.76 kB 0 B
packages/core/dist/error-tracking/coercers/error-event-coercer.mjs 513 B 0 B
packages/core/dist/error-tracking/coercers/event-coercer.js 1.82 kB 0 B
packages/core/dist/error-tracking/coercers/event-coercer.mjs 548 B 0 B
packages/core/dist/error-tracking/coercers/index.js 6.79 kB 0 B
packages/core/dist/error-tracking/coercers/index.mjs 326 B 0 B
packages/core/dist/error-tracking/coercers/object-coercer.js 3.46 kB 0 B
packages/core/dist/error-tracking/coercers/object-coercer.mjs 2.07 kB 0 B
packages/core/dist/error-tracking/coercers/primitive-coercer.js 1.67 kB 0 B
packages/core/dist/error-tracking/coercers/primitive-coercer.mjs 419 B 0 B
packages/core/dist/error-tracking/coercers/promise-rejection-event.js 2.59 kB 0 B
packages/core/dist/error-tracking/coercers/promise-rejection-event.mjs 1.25 kB 0 B
packages/core/dist/error-tracking/coercers/string-coercer.js 2.01 kB 0 B
packages/core/dist/error-tracking/coercers/string-coercer.mjs 820 B 0 B
packages/core/dist/error-tracking/coercers/utils.js 2.06 kB 0 B
packages/core/dist/error-tracking/coercers/utils.mjs 716 B 0 B
packages/core/dist/error-tracking/error-properties-builder.js 5.56 kB 0 B
packages/core/dist/error-tracking/error-properties-builder.mjs 4.23 kB 0 B
packages/core/dist/error-tracking/exception-steps.js 6.87 kB 0 B
packages/core/dist/error-tracking/exception-steps.mjs 4.71 kB 0 B
packages/core/dist/error-tracking/index.js 4.74 kB 0 B
packages/core/dist/error-tracking/index.mjs 191 B 0 B
packages/core/dist/error-tracking/parsers/base.js 1.83 kB 0 B
packages/core/dist/error-tracking/parsers/base.mjs 464 B 0 B
packages/core/dist/error-tracking/parsers/chrome.js 2.73 kB 0 B
packages/core/dist/error-tracking/parsers/chrome.mjs 1.32 kB 0 B
packages/core/dist/error-tracking/parsers/gecko.js 2.47 kB 0 B
packages/core/dist/error-tracking/parsers/gecko.mjs 1.13 kB 0 B
packages/core/dist/error-tracking/parsers/index.js 4.75 kB 0 B
packages/core/dist/error-tracking/parsers/index.mjs 2.1 kB 0 B
packages/core/dist/error-tracking/parsers/node.js 3.94 kB 0 B
packages/core/dist/error-tracking/parsers/node.mjs 2.68 kB 0 B
packages/core/dist/error-tracking/parsers/opera.js 2.26 kB 0 B
packages/core/dist/error-tracking/parsers/opera.mjs 746 B 0 B
packages/core/dist/error-tracking/parsers/safari.js 1.88 kB 0 B
packages/core/dist/error-tracking/parsers/safari.mjs 574 B 0 B
packages/core/dist/error-tracking/parsers/winjs.js 1.72 kB 0 B
packages/core/dist/error-tracking/parsers/winjs.mjs 426 B 0 B
packages/core/dist/error-tracking/types.js 1.33 kB 0 B
packages/core/dist/error-tracking/types.mjs 131 B 0 B
packages/core/dist/error-tracking/utils.js 1.8 kB 0 B
packages/core/dist/error-tracking/utils.mjs 604 B 0 B
packages/core/dist/eventemitter.js 1.78 kB 0 B
packages/core/dist/eventemitter.mjs 571 B 0 B
packages/core/dist/featureFlagUtils.js 6.8 kB 0 B
packages/core/dist/featureFlagUtils.mjs 4.32 kB 0 B
packages/core/dist/gzip.js 5.72 kB 0 B
packages/core/dist/gzip.mjs 3.84 kB 0 B
packages/core/dist/index.js 13.3 kB 0 B
packages/core/dist/index.mjs 1.28 kB 0 B
packages/core/dist/logs/index.js 9.47 kB 0 B
packages/core/dist/logs/index.mjs 7.87 kB 0 B
packages/core/dist/logs/logs-utils.js 5.96 kB 0 B
packages/core/dist/logs/logs-utils.mjs 3.99 kB 0 B
packages/core/dist/logs/types.js 603 B 0 B
packages/core/dist/logs/types.mjs 0 B 0 B 🆕
packages/core/dist/posthog-core-stateless.js 33.5 kB 0 B
packages/core/dist/posthog-core-stateless.mjs 30.9 kB 0 B
packages/core/dist/posthog-core.js 42 kB 0 B
packages/core/dist/posthog-core.mjs 37 kB 0 B
packages/core/dist/surveys/events.js 4.21 kB 0 B
packages/core/dist/surveys/events.mjs 1.99 kB 0 B
packages/core/dist/surveys/index.js 4.57 kB 0 B
packages/core/dist/surveys/index.mjs 894 B 0 B
packages/core/dist/surveys/translations.js 9.4 kB 0 B
packages/core/dist/surveys/translations.mjs 7.03 kB 0 B
packages/core/dist/surveys/validation.js 3.06 kB 0 B
packages/core/dist/surveys/validation.mjs 1.51 kB 0 B
packages/core/dist/testing/index.js 2.93 kB 0 B
packages/core/dist/testing/index.mjs 79 B 0 B
packages/core/dist/testing/PostHogCoreTestClient.js 3.15 kB 0 B
packages/core/dist/testing/PostHogCoreTestClient.mjs 1.74 kB 0 B
packages/core/dist/testing/test-utils.js 2.83 kB 0 B
packages/core/dist/testing/test-utils.mjs 1.15 kB 0 B
packages/core/dist/tracing-headers.js 3.38 kB 0 B
packages/core/dist/tracing-headers.mjs 2.08 kB 0 B
packages/core/dist/types.js 9.62 kB 0 B
packages/core/dist/types.mjs 7.07 kB 0 B
packages/core/dist/utils/bot-detection.js 3.28 kB 0 B
packages/core/dist/utils/bot-detection.mjs 1.95 kB 0 B
packages/core/dist/utils/bucketed-rate-limiter.js 3 kB 0 B
packages/core/dist/utils/bucketed-rate-limiter.mjs 1.62 kB 0 B
packages/core/dist/utils/index.js 11.9 kB 0 B
packages/core/dist/utils/index.mjs 1.98 kB 0 B
packages/core/dist/utils/logger.js 2.58 kB 0 B
packages/core/dist/utils/logger.mjs 1.29 kB 0 B
packages/core/dist/utils/number-utils.js 3.32 kB 0 B
packages/core/dist/utils/number-utils.mjs 1.68 kB 0 B
packages/core/dist/utils/promise-queue.js 2 kB 0 B
packages/core/dist/utils/promise-queue.mjs 768 B 0 B
packages/core/dist/utils/string-utils.js 2.73 kB 0 B
packages/core/dist/utils/string-utils.mjs 1.09 kB 0 B
packages/core/dist/utils/type-utils.js 7.04 kB 0 B
packages/core/dist/utils/type-utils.mjs 3.11 kB 0 B
packages/core/dist/utils/user-agent-utils.js 15.2 kB 0 B
packages/core/dist/utils/user-agent-utils.mjs 12.2 kB 0 B
packages/core/dist/vendor/uuidv7.js 8.29 kB 0 B
packages/core/dist/vendor/uuidv7.mjs 6.72 kB 0 B
packages/next/dist/app/PostHogProvider.js 3.23 kB 0 B
packages/next/dist/client/ClientPostHogProvider.js 1.76 kB 0 B
packages/next/dist/client/hooks.js 172 B 0 B
packages/next/dist/client/PostHogPageView.js 1.76 kB 0 B
packages/next/dist/index.client.js 401 B 0 B
packages/next/dist/index.edge.js 447 B 0 B
packages/next/dist/index.js 444 B 0 B
packages/next/dist/index.react-server.js 420 B 0 B
packages/next/dist/middleware/postHogMiddleware.js 3.64 kB 0 B
packages/next/dist/pages.client.js 502 B 0 B
packages/next/dist/pages.edge.js 570 B 0 B
packages/next/dist/pages.js 414 B 0 B
packages/next/dist/pages/getServerSidePostHog.js 1.93 kB 0 B
packages/next/dist/pages/PostHogPageView.js 1.32 kB 0 B
packages/next/dist/pages/PostHogProvider.js 1.51 kB 0 B
packages/next/dist/server/getPostHog.js 2.73 kB 0 B
packages/next/dist/server/nodeClientCache.js 1.31 kB 0 B
packages/next/dist/shared/browser.js 195 B 0 B
packages/next/dist/shared/config.js 2.06 kB 0 B
packages/next/dist/shared/constants.js 201 B 0 B
packages/next/dist/shared/cookie.js 540 B 0 B
packages/next/dist/shared/identity.js 264 B 0 B
packages/next/dist/shared/tracing-headers.js 2.18 kB 0 B
packages/nextjs-config/dist/config.js 5.82 kB 0 B
packages/nextjs-config/dist/config.mjs 4.34 kB 0 B
packages/nextjs-config/dist/index.js 2.24 kB 0 B
packages/nextjs-config/dist/index.mjs 30 B 0 B
packages/nextjs-config/dist/utils.js 2.94 kB 0 B
packages/nextjs-config/dist/utils.mjs 826 B 0 B
packages/node/dist/client.js 45.3 kB 0 B
packages/node/dist/client.mjs 43 kB 0 B
packages/node/dist/entrypoints/index.edge.js 4.25 kB 0 B
packages/node/dist/entrypoints/index.edge.mjs 723 B 0 B
packages/node/dist/entrypoints/index.node.js 6.04 kB 0 B
packages/node/dist/entrypoints/index.node.mjs 1.22 kB 0 B
packages/node/dist/entrypoints/nestjs.js 2.31 kB 0 B
packages/node/dist/entrypoints/nestjs.mjs 42 B 0 B
packages/node/dist/experimental.js 603 B 0 B
packages/node/dist/experimental.mjs 0 B 0 B 🆕
packages/node/dist/exports.js 6.75 kB 0 B
packages/node/dist/exports.mjs 582 B 0 B
packages/node/dist/extensions/context/context.js 2.13 kB 0 B
packages/node/dist/extensions/context/context.mjs 863 B 0 B
packages/node/dist/extensions/context/types.js 603 B 0 B
packages/node/dist/extensions/context/types.mjs 0 B 0 B 🆕
packages/node/dist/extensions/error-tracking/autocapture.js 2.66 kB 0 B
packages/node/dist/extensions/error-tracking/autocapture.mjs 1.24 kB 0 B
packages/node/dist/extensions/error-tracking/index.js 4.14 kB 0 B
packages/node/dist/extensions/error-tracking/index.mjs 2.87 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/context-lines.node.js 8.81 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs 7.15 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/module.node.js 2.78 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/module.node.mjs 1.45 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/relative-path.node.js 1.97 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/relative-path.node.mjs 624 B 0 B
packages/node/dist/extensions/express.js 4.56 kB 0 B
packages/node/dist/extensions/express.mjs 2.45 kB 0 B
packages/node/dist/extensions/feature-flags/cache.js 603 B 0 B
packages/node/dist/extensions/feature-flags/cache.mjs 0 B 0 B 🆕
packages/node/dist/extensions/feature-flags/crypto.js 1.57 kB 0 B
packages/node/dist/extensions/feature-flags/crypto.mjs 395 B 0 B
packages/node/dist/extensions/feature-flags/feature-flags.js 40.3 kB 0 B
packages/node/dist/extensions/feature-flags/feature-flags.mjs 38.3 kB 0 B
packages/node/dist/extensions/nestjs.js 5 kB 0 B
packages/node/dist/extensions/nestjs.mjs 2.9 kB 0 B
packages/node/dist/extensions/sentry-integration.js 4.66 kB 0 B
packages/node/dist/extensions/sentry-integration.mjs 3.17 kB 0 B
packages/node/dist/extensions/tracing-headers.js 3.31 kB 0 B
packages/node/dist/extensions/tracing-headers.mjs 1.53 kB 0 B
packages/node/dist/feature-flag-evaluations.js 5.97 kB 0 B
packages/node/dist/feature-flag-evaluations.mjs 4.63 kB 0 B
packages/node/dist/storage-memory.js 1.52 kB 0 B
packages/node/dist/storage-memory.mjs 297 B 0 B
packages/node/dist/types.js 1.43 kB 0 B
packages/node/dist/types.mjs 224 B 0 B
packages/node/dist/version.js 1.21 kB 0 B
packages/node/dist/version.mjs 46 B 0 B
packages/nuxt/dist/module.mjs 5.29 kB 0 B
packages/nuxt/dist/runtime/composables/useFeatureFlagEnabled.js 566 B 0 B
packages/nuxt/dist/runtime/composables/useFeatureFlagPayload.js 690 B 0 B
packages/nuxt/dist/runtime/composables/useFeatureFlagVariantKey.js 591 B 0 B
packages/nuxt/dist/runtime/composables/usePostHog.js 128 B 0 B
packages/nuxt/dist/runtime/nitro-plugin.js 1.08 kB 0 B
packages/nuxt/dist/runtime/vue-plugin.js 1.14 kB 0 B
packages/plugin-utils/dist/cli.js 3.14 kB 0 B
packages/plugin-utils/dist/cli.mjs 1.64 kB 0 B
packages/plugin-utils/dist/config.js 3.07 kB 0 B
packages/plugin-utils/dist/config.mjs 1.83 kB 0 B
packages/plugin-utils/dist/index.js 4.3 kB 0 B
packages/plugin-utils/dist/index.mjs 217 B 0 B
packages/plugin-utils/dist/spawn-local.js 2.17 kB 0 B
packages/plugin-utils/dist/spawn-local.mjs 918 B 0 B
packages/plugin-utils/dist/utils.js 3.27 kB 0 B
packages/plugin-utils/dist/utils.mjs 1.3 kB 0 B
packages/react-native/dist/autocapture.js 5.05 kB 0 B
packages/react-native/dist/error-tracking/index.js 7.24 kB 0 B
packages/react-native/dist/error-tracking/utils.js 2.58 kB 0 B
packages/react-native/dist/frameworks/wix-navigation.js 1.3 kB 0 B
packages/react-native/dist/hooks/useFeatureFlag.js 1.7 kB 0 B
packages/react-native/dist/hooks/useFeatureFlagResult.js 963 B 0 B
packages/react-native/dist/hooks/useFeatureFlags.js 921 B 0 B
packages/react-native/dist/hooks/useNavigationTracker.js 2.45 kB 0 B
packages/react-native/dist/hooks/usePostHog.js 544 B 0 B
packages/react-native/dist/hooks/utils.js 988 B 0 B
packages/react-native/dist/index.js 4.33 kB 0 B
packages/react-native/dist/logs-********.js 3.32 kB 0 B
packages/react-native/dist/native-deps.js 8.77 kB 0 B
packages/react-native/dist/optional/OptionalAsyncStorage.js 299 B 0 B
packages/react-native/dist/optional/OptionalExpoApplication.js 377 B 0 B
packages/react-native/dist/optional/OptionalExpoDevice.js 347 B 0 B
packages/react-native/dist/optional/OptionalExpoFileSystem.js 386 B 0 B
packages/react-native/dist/optional/OptionalExpoFileSystemLegacy.js 423 B 0 B
packages/react-native/dist/optional/OptionalExpoLocalization.js 383 B 0 B
packages/react-native/dist/optional/OptionalReactNativeDeviceInfo.js 415 B 0 B
packages/react-native/dist/optional/OptionalReactNativeLocalize.js 303 B 0 B
packages/react-native/dist/optional/OptionalReactNativeNavigation.js 415 B 0 B
packages/react-native/dist/optional/OptionalReactNativeNavigationWix.js 443 B 0 B
packages/react-native/dist/optional/OptionalReactNativeSafeArea.js 644 B 0 B
packages/react-native/dist/optional/OptionalReactNativeSvg.js 872 B 0 B
packages/react-native/dist/optional/OptionalSessionReplay.js 455 B 0 B
packages/react-native/dist/posthog-rn.js 46 kB 0 B
packages/react-native/dist/PostHogContext.js 329 B 0 B
packages/react-native/dist/PostHogErrorBoundary.js 3.19 kB 0 B
packages/react-native/dist/PostHogMaskView.js 1.68 kB 0 B
packages/react-native/dist/PostHogProvider.js 4.55 kB 0 B
packages/react-native/dist/storage.js 5.2 kB 0 B
packages/react-native/dist/surveys/components/BottomSection.js 1.46 kB 0 B
packages/react-native/dist/surveys/components/Cancel.js 909 B 0 B
packages/react-native/dist/surveys/components/ConfirmationMessage.js 1.65 kB 0 B
packages/react-native/dist/surveys/components/QuestionHeader.js 1.37 kB 0 B
packages/react-native/dist/surveys/components/QuestionTypes.js 13.3 kB 0 B
packages/react-native/dist/surveys/components/SurveyModal.js 6.27 kB 0 B
packages/react-native/dist/surveys/components/Surveys.js 6.58 kB 0 B
packages/react-native/dist/surveys/getActiveMatchingSurveys.js 2.64 kB 0 B
packages/react-native/dist/surveys/icons.js 9.97 kB 0 B
packages/react-native/dist/surveys/index.js 600 B 0 B
packages/react-native/dist/surveys/PostHogSurveyProvider.js 6.28 kB 0 B
packages/react-native/dist/surveys/survey-translations.js 1.11 kB 0 B
packages/react-native/dist/surveys/useActivatedSurveys.js 3.67 kB 0 B
packages/react-native/dist/surveys/useSurveyStorage.js 2.16 kB 0 B
packages/react-native/dist/tooling/expoconfig.js 4.02 kB 0 B
packages/react-native/dist/tooling/metroconfig.js 2.32 kB 0 B
packages/react-native/dist/tooling/posthogMetroSerializer.js 4.86 kB 0 B
packages/react-native/dist/tooling/utils.js 4.05 kB 0 B
packages/react-native/dist/tooling/vendor/expo/expoconfig.js 70 B 0 B
packages/react-native/dist/tooling/vendor/metro/countLines.js 237 B 0 B
packages/react-native/dist/tooling/vendor/metro/utils.js 3.35 kB 0 B
packages/react-native/dist/types.js 70 B 0 B
packages/react-native/dist/utils.js 1.14 kB 0 B
packages/react-native/dist/version.js 131 B 0 B
packages/react/dist/esm/index.js 21.2 kB 0 B
packages/react/dist/esm/slim/index.js 17.6 kB 0 B
packages/react/dist/esm/surveys/index.js 4.68 kB 0 B
packages/react/dist/umd/index.js 24.4 kB 0 B
packages/react/dist/umd/slim/index.js 20.4 kB 0 B
packages/react/dist/umd/surveys/index.js 5.45 kB 0 B
packages/rollup-plugin/dist/index.js 2.44 kB 0 B
packages/rrweb/all/dist/rrweb-all.cjs 611 kB 0 B
packages/rrweb/all/dist/rrweb-all.js 610 kB 0 B
packages/rrweb/all/dist/rrweb-all.umd.cjs 614 kB 0 B
packages/rrweb/all/dist/rrweb-all.umd.min.cjs 290 kB 0 B
packages/rrweb/packer/dist/base-********.js 18.2 kB 0 B
packages/rrweb/packer/dist/base-********.cjs 18.3 kB 0 B
packages/rrweb/packer/dist/base-********.umd.cjs 18.7 kB 0 B
packages/rrweb/packer/dist/base-********.umd.min.cjs 9.5 kB 0 B
packages/rrweb/packer/dist/pack.cjs 347 B 0 B
packages/rrweb/packer/dist/pack.js 285 B 0 B
packages/rrweb/packer/dist/pack.umd.cjs 1.63 kB 0 B
packages/rrweb/packer/dist/pack.umd.min.cjs 1.11 kB 0 B
packages/rrweb/packer/dist/packer.cjs 257 B 0 B
packages/rrweb/packer/dist/packer.js 136 B 0 B
packages/rrweb/packer/dist/packer.umd.cjs 662 B 0 B
packages/rrweb/packer/dist/packer.umd.min.cjs 626 B 0 B
packages/rrweb/packer/dist/unpack.cjs 769 B 0 B
packages/rrweb/packer/dist/unpack.js 702 B 0 B
packages/rrweb/packer/dist/unpack.umd.cjs 1.17 kB 0 B
packages/rrweb/packer/dist/unpack.umd.min.cjs 955 B 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.cjs 37.6 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.js 37.5 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.umd.cjs 38 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.umd.min.cjs 22.2 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.cjs 34.3 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.js 34.2 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.umd.cjs 34.7 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.umd.min.cjs 20.5 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.cjs 14.9 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.js 14.8 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.umd.cjs 15.4 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.umd.min.cjs 7.33 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.cjs 5.01 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.js 4.9 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.umd.cjs 5.44 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.umd.min.cjs 2.64 kB 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.cjs 681 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.js 548 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.umd.cjs 1.12 kB 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.umd.min.cjs 829 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.cjs 933 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.js 820 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.umd.cjs 1.37 kB 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.umd.min.cjs 968 B 0 B
packages/rrweb/record/dist/rrweb-record.cjs 173 kB 0 B
packages/rrweb/record/dist/rrweb-record.js 173 kB 0 B
packages/rrweb/record/dist/rrweb-record.umd.cjs 173 kB 0 B
packages/rrweb/record/dist/rrweb-record.umd.min.cjs 83.1 kB 0 B
packages/rrweb/replay/dist/rrweb-replay.cjs 440 kB 0 B
packages/rrweb/replay/dist/rrweb-replay.js 439 kB 0 B
packages/rrweb/replay/dist/rrweb-replay.umd.cjs 442 kB 0 B
packages/rrweb/replay/dist/rrweb-replay.umd.min.cjs 209 kB 0 B
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.cjs 150 kB 0 B
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.js 149 kB 0 B
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.umd.cjs 152 kB 0 B
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.umd.min.cjs 70.8 kB 0 B
packages/rrweb/rrdom/dist/rrdom.cjs 174 kB 0 B
packages/rrweb/rrdom/dist/rrdom.js 173 kB 0 B
packages/rrweb/rrdom/dist/rrdom.umd.cjs 175 kB 0 B
packages/rrweb/rrdom/dist/rrdom.umd.min.cjs 80.8 kB 0 B
packages/rrweb/rrweb-snapshot/dist/record.cjs 31.6 kB 0 B
packages/rrweb/rrweb-snapshot/dist/record.js 30.6 kB 0 B
packages/rrweb/rrweb-snapshot/dist/record.umd.cjs 52.9 kB 0 B
packages/rrweb/rrweb-snapshot/dist/record.umd.min.cjs 25.4 kB 0 B
packages/rrweb/rrweb-snapshot/dist/replay.cjs 137 kB 0 B
packages/rrweb/rrweb-snapshot/dist/replay.js 137 kB 0 B
packages/rrweb/rrweb-snapshot/dist/replay.umd.cjs 160 kB 0 B
packages/rrweb/rrweb-snapshot/dist/replay.umd.min.cjs 73.8 kB 0 B
packages/rrweb/rrweb-snapshot/dist/rrweb-********.cjs 2.19 kB 0 B
packages/rrweb/rrweb-snapshot/dist/rrweb-********.js 1.36 kB 0 B
packages/rrweb/rrweb-snapshot/dist/rrweb-********.umd.cjs 216 kB 0 B
packages/rrweb/rrweb-snapshot/dist/rrweb-********.umd.min.cjs 91.2 kB 0 B
packages/rrweb/rrweb-snapshot/dist/types-********.cjs 18.3 kB 0 B
packages/rrweb/rrweb-snapshot/dist/types-********.umd.cjs 18.8 kB 0 B
packages/rrweb/rrweb-snapshot/dist/types-********.umd.min.cjs 9.31 kB 0 B
packages/rrweb/rrweb-snapshot/dist/types-********.js 17.8 kB 0 B
packages/rrweb/rrweb/dist/rrweb.cjs 594 kB 0 B
packages/rrweb/rrweb/dist/rrweb.js 593 kB 0 B
packages/rrweb/rrweb/dist/rrweb.umd.cjs 594 kB 0 B
packages/rrweb/rrweb/dist/rrweb.umd.min.cjs 280 kB 0 B
packages/rrweb/types/dist/rrweb-types.cjs 5.64 kB 0 B
packages/rrweb/types/dist/rrweb-types.js 5.38 kB 0 B
packages/rrweb/types/dist/rrweb-types.umd.cjs 6.04 kB 0 B
packages/rrweb/types/dist/rrweb-types.umd.min.cjs 2.8 kB 0 B
packages/rrweb/utils/dist/rrweb-utils.cjs 6.41 kB 0 B
packages/rrweb/utils/dist/rrweb-utils.js 5.95 kB 0 B
packages/rrweb/utils/dist/rrweb-utils.umd.cjs 6.82 kB 0 B
packages/rrweb/utils/dist/rrweb-utils.umd.min.cjs 3.51 kB 0 B
packages/types/dist/capture-log.js 603 B 0 B
packages/types/dist/capture-log.mjs 0 B 0 B 🆕
packages/types/dist/capture.js 603 B 0 B
packages/types/dist/capture.mjs 0 B 0 B 🆕
packages/types/dist/common.js 603 B 0 B
packages/types/dist/common.mjs 0 B 0 B 🆕
packages/types/dist/feature-flags.js 603 B 0 B
packages/types/dist/feature-flags.mjs 0 B 0 B 🆕
packages/types/dist/index.js 603 B 0 B
packages/types/dist/index.mjs 0 B 0 B 🆕
packages/types/dist/posthog-config.js 603 B 0 B
packages/types/dist/posthog-config.mjs 0 B 0 B 🆕
packages/types/dist/posthog.js 603 B 0 B
packages/types/dist/posthog.mjs 0 B 0 B 🆕
packages/types/dist/request.js 603 B 0 B
packages/types/dist/request.mjs 0 B 0 B 🆕
packages/types/dist/segment.js 603 B 0 B
packages/types/dist/segment.mjs 0 B 0 B 🆕
packages/types/dist/session-recording.js 603 B 0 B
packages/types/dist/session-recording.mjs 0 B 0 B 🆕
packages/types/dist/survey.js 603 B 0 B
packages/types/dist/survey.mjs 0 B 0 B 🆕
packages/types/dist/toolbar.js 603 B 0 B
packages/types/dist/toolbar.mjs 0 B 0 B 🆕
packages/types/dist/tree-shakeable.js 603 B 0 B
packages/types/dist/tree-shakeable.mjs 0 B 0 B 🆕
packages/web/dist/index.cjs 13.8 kB 0 B
packages/web/dist/index.mjs 13.7 kB 0 B
packages/webpack-plugin/dist/config.js 1.53 kB 0 B
packages/webpack-plugin/dist/config.mjs 543 B 0 B
packages/webpack-plugin/dist/index.js 5.38 kB 0 B
packages/webpack-plugin/dist/index.mjs 2.04 kB 0 B
tooling/changelog/dist/index.js 3.31 kB 0 B
tooling/rollup-utils/dist/index.js 1.17 kB 0 B

compressed-size-action

@marandaneto
Copy link
Copy Markdown
Member

Pushed d6adead addressing the review:

Greptile #1 — DOM structure regression: fixed. form-buttons div only wraps submit when the Back button is actually shown. Existing surveys keep their original DOM (submit as a direct child of .bottom-section).

Greptile #2 — stale responses on branch change: fixed. On submission (partial and final), we now prune newResponses to only include question IDs corresponding to the indices in visitedIndices ++ [currentIndex]. So if a respondent answers Q1 → Q2 → backs up to Q1 → changes their answer, now routing to Q4, the emitted payload contains only Q1 and Q4 — Q2's answer is dropped. Added a unit test covering exactly that path ('prunes responses from abandoned branches when path changes after backing up'). questionsResponses state is intentionally kept intact so re-walking the same path still pre-fills.

Greptile #3 — missing waitFor: fixed.

Greptile #4 — parameterise tests: respectfully pushing back. The 7 cases assert distinct behaviors (visibility, branching, persistence resume, pre-fill, custom label), each with different setup or assertions. A test.each table would couple them together and hurt readability. I'd rather keep one named test per behavior — easier to reason about a failure, and adding "future combinations" hasn't been a problem here.

CI failures: all cascaded from one root cause — adding allowGoBack/backButtonText to core's SurveyAppearance broke posthog-react-native's SurveyAppearanceTheme = Required<SurveyAppearance> (the new fields became required and defaultSurveyAppearance didn't supply them). Fixed by adding allowGoBack: false and backButtonText: 'Back' to RN's defaultSurveyAppearance. This is a no-op for RN at runtime (RN doesn't render the back button yet) and pre-wires the defaults for the eventual RN parity PR.

Added a changeset (minor bump for both posthog-js and @posthog/core).

make your review pr workflow to reply directly to the comment thread, this way you have to jump context and the # id is easily out of sequence/outdated

@github-actions
Copy link
Copy Markdown
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

@github-actions github-actions Bot added the stale label May 29, 2026
@marandaneto
Copy link
Copy Markdown
Member

@PostHog/team-surveys ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants