Remove manual lifecycle and billing SDK events#160
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
WalkthroughThe SDKs remove manual lifecycle and billing APIs, builders, payload types, and public namespaces. Activation is documented and exemplified through ordinary ChangesLifecycle and billing API removal
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
examples/pi-agents/tests/activation-pretriage.test.ts (1)
93-94: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRetain positive assertions for the remaining activity contract.
These checks prove only that removed identifiers are absent. They would still pass if the query accidentally stopped selecting
recentEventCountorrecentActiveDays. Keep the negative assertions, but also assert the retained SQL aliases or the normalized baseline values.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@examples/pi-agents/tests/activation-pretriage.test.ts` around lines 93 - 94, Add positive assertions to the activation-pretriage test alongside the existing negative checks, verifying that the query still selects the retained activity contract, such as recentEventCount and recentActiveDays aliases or their normalized baseline values. Preserve the current absence assertions for stage:activated and activationEventCount.packages/browser/src/vue/composables.ts (1)
137-139: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win
user.identifysilently no-ops when uninitialized, unlike sibling methods.
track,identify,setUser, andclearUserallconsole.warnand return early whenoutlit.valueis falsy.user.identifyinstead uses optional chaining and silently swallows the call, which can hide misuse (calling before init) from consumers.♻️ Suggested fix
user: { - identify: (options: BrowserIdentifyOptions) => outlit.value?.user.identify(options), + identify: (options: BrowserIdentifyOptions) => { + if (!outlit.value) { + console.warn("[Outlit] Not initialized.") + return + } + outlit.value.user.identify(options) + }, },🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/browser/src/vue/composables.ts` around lines 137 - 139, Update user.identify in the composable to match the initialization guard used by track, identify, setUser, and clearUser: warn and return early when outlit.value is falsy, otherwise invoke outlit.value.user.identify(options) without optional chaining.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/tracking/browser/react.mdx`:
- Around line 451-452: Move the track('onboarding_completed', { flow:
'onboarding' }) call out of the React render example and into the successful
milestone handler, following the pattern shown around Lines 559-567. Ensure it
emits only when the onboarding milestone succeeds, not on rerenders.
In `@packages/browser/__tests__/e2e/browser-sdk.spec.ts`:
- Line 585: Strengthen the assertion in the browser SDK test by inspecting the
identify event payload and matching the unique email or user ID provided by the
queued fixture, rather than only checking event.type. Keep the assertion focused
on confirming replay of the queued user.identify call.
---
Nitpick comments:
In `@examples/pi-agents/tests/activation-pretriage.test.ts`:
- Around line 93-94: Add positive assertions to the activation-pretriage test
alongside the existing negative checks, verifying that the query still selects
the retained activity contract, such as recentEventCount and recentActiveDays
aliases or their normalized baseline values. Preserve the current absence
assertions for stage:activated and activationEventCount.
In `@packages/browser/src/vue/composables.ts`:
- Around line 137-139: Update user.identify in the composable to match the
initialization guard used by track, identify, setUser, and clearUser: warn and
return early when outlit.value is falsy, otherwise invoke
outlit.value.user.identify(options) without optional chaining.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 488b7375-02cc-4c4d-a887-f1c3b6974b5a
📒 Files selected for processing (79)
.changeset/remove-authoritative-lifecycle-billing.mdREADME.mdcrates/outlit/CHANGELOG.mdcrates/outlit/README.mdcrates/outlit/src/builders.rscrates/outlit/src/client.rscrates/outlit/src/lib.rscrates/outlit/src/types.rscrates/outlit/tests/integration.rscrates/outlit/tests/payload_compatibility.rsdocs/api-reference/ingest.mdxdocs/api-reference/introduction.mdxdocs/concepts/customer-context-graph.mdxdocs/concepts/customer-journey.mdxdocs/openapi.jsondocs/tracking/browser/angular.mdxdocs/tracking/browser/astro.mdxdocs/tracking/browser/npm.mdxdocs/tracking/browser/nuxt.mdxdocs/tracking/browser/react.mdxdocs/tracking/browser/script.mdxdocs/tracking/browser/sveltekit.mdxdocs/tracking/browser/vue.mdxdocs/tracking/how-it-works.mdxdocs/tracking/server/nodejs.mdxdocs/tracking/server/rust.mdxexamples/pi-agents/README.mdexamples/pi-agents/lib/activation-pretriage-data.tsexamples/pi-agents/lib/activation-pretriage.tsexamples/pi-agents/skills/outlit-growth-agents/SKILL.mdexamples/pi-agents/tests/activation-pretriage.test.tsexamples/pi-agents/tests/pretriage-utils.test.tspackages/browser/README.mdpackages/browser/__tests__/e2e/api-surface.spec.tspackages/browser/__tests__/e2e/browser-sdk.spec.tspackages/browser/__tests__/e2e/fixtures/form-all-sensitive.htmlpackages/browser/__tests__/e2e/fixtures/form-auto-identify-disabled.htmlpackages/browser/__tests__/e2e/fixtures/form-credit-card.htmlpackages/browser/__tests__/e2e/fixtures/form-email-first-last.htmlpackages/browser/__tests__/e2e/fixtures/form-email-name.htmlpackages/browser/__tests__/e2e/fixtures/form-email-no-name.htmlpackages/browser/__tests__/e2e/fixtures/form-email-only.htmlpackages/browser/__tests__/e2e/fixtures/form-file-inputs.htmlpackages/browser/__tests__/e2e/fixtures/form-multiple.htmlpackages/browser/__tests__/e2e/fixtures/form-no-email.htmlpackages/browser/__tests__/e2e/fixtures/form-no-id.htmlpackages/browser/__tests__/e2e/fixtures/form-password-variations.htmlpackages/browser/__tests__/e2e/fixtures/form-ssn.htmlpackages/browser/__tests__/e2e/fixtures/test-page-consent-persistence.htmlpackages/browser/__tests__/e2e/fixtures/test-page-consent.htmlpackages/browser/__tests__/e2e/fixtures/test-page-custom-denylist.htmlpackages/browser/__tests__/e2e/fixtures/test-page-links.htmlpackages/browser/__tests__/e2e/fixtures/test-page-no-forms.htmlpackages/browser/__tests__/e2e/fixtures/test-page-no-pageviews.htmlpackages/browser/__tests__/e2e/fixtures/test-page-queued.htmlpackages/browser/__tests__/e2e/fixtures/test-page-session.htmlpackages/browser/__tests__/e2e/fixtures/test-page-timer.htmlpackages/browser/__tests__/e2e/fixtures/test-page.htmlpackages/browser/__tests__/e2e/global.d.tspackages/browser/__tests__/e2e/stage-methods.spec.tspackages/browser/__tests__/unit/react-hooks.test.tsxpackages/browser/__tests__/unit/tracker.test.tspackages/browser/__tests__/unit/vue-composables.test.tspackages/browser/src/index.tspackages/browser/src/react/hooks.tspackages/browser/src/react/index.tspackages/browser/src/script.tspackages/browser/src/tracker.tspackages/browser/src/vue/composables.tspackages/core/src/__tests__/customer-identity.test.tspackages/core/src/__tests__/types.test.tspackages/core/src/index.tspackages/core/src/payload.tspackages/core/src/types.tspackages/core/src/utils.tspackages/node/README.mdpackages/node/src/__tests__/client.test.tspackages/node/src/client.tspackages/node/src/index.ts
💤 Files with no reviewable changes (9)
- packages/browser/tests/e2e/stage-methods.spec.ts
- packages/browser/tests/unit/tracker.test.ts
- packages/core/src/utils.ts
- packages/browser/tests/e2e/global.d.ts
- docs/openapi.json
- packages/core/src/index.ts
- crates/outlit/tests/integration.rs
- crates/outlit/src/types.rs
- packages/core/src/payload.ts
Summary
Verification
Note
A local full browser run passed 132 tests and timed out only in the live external Cal.com booking test. GitHub CI remains the authoritative full-browser gate and includes retries.
Summary by CodeRabbit
identifyfor user identity andtrack()for product activity.