Skip to content

feat: behaviour signals and onboarding experiment for Loops - #4856

Merged
richiemcilroy merged 7 commits into
mainfrom
building/behaviour-emails-4e09ca1b
Dec 4, 2026
Merged

richiemcilroy merged 7 commits into
mainfrom
building/behaviour-emails-4e09ca1b

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Free onboarding can now react to what people actually do after recording, instead of only to days since signup.

  • The Loops profile sync adds two signals for signups after a configurable start date: no view by anyone else 48 hours after the first recording (with the latest Cap's id for the email link), and a work-email account with nobody else in its workspace 24 hours after the first recording. Both stop 30 days after signup.
  • A new deterministic 50/50 experiment (behaviour-v1-2026-12, arms holdout and behaviour) assigns new independent free signups. The behaviour arm gets lifecycle stage free-behaviour; the holdout keeps free. Signups after the start date are never assigned to free-pro-v2-2026-09, even if the new switch is later turned off; contacts already enrolled there keep their stage.
  • Opening /s/<id>?share=1 as the owner opens the existing share dialog (copy link and invite by email). Everyone else sees no change.

Both switches default off: LOOPS_BEHAVIOUR_EXPERIMENT_AFTER (start boundary) and LOOPS_BEHAVIOUR_EXPERIMENT_ENABLED. With neither set, payloads and sync fingerprints are unchanged for every contact.

Queries: the extra activation columns reuse the existing per-owner video read. The workspace check runs only for in-window work-email recorders, once per batch, through owner_id_tombstone_idx and organization_id_idx.

Demo (synthetic users and data): https://cap.so/s/77k7j8x6zvpn2qt

Testing: unit tests for signals, assignment, the previous experiment staying closed, and config parsing; SQL tests for the new activation columns and the batched workspace read. Recorded on Linux in Chromium.

Confidence Score: 5/5RetriggerView in Greptile

The PR appears safe to merge.

Summary

Adds behaviour-based Loops signals, a stable onboarding experiment, and an owner-only link that opens the share dialog.

  • Free onboarding follows recording activity and uses a separate experiment split.
  • Owners can open the share dialog from a shared-video link.

Reviews (4) · Last reviewed commit: "fix: stop workspace reads after the beha..." · Reviewed by Greptile

@vercel

vercel Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

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

1 Skipped Deployment
Project Deployment Actions Updated
cap-status Ignored Ignored Preview Dec 4, 2026 2:16pm UTC

@blacksmith-sh

This comment has been minimized.

@vercel
vercel Bot temporarily deployed to Preview – cap-status December 4, 2026 14:11 Inactive
@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

Comment thread packages/database/loops/lifecycle.ts Resolved
Comment thread packages/database/loops/sources.ts Resolved
@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@richiemcilroy
richiemcilroy marked this pull request as ready for review December 4, 2026 14:37
@richiemcilroy
richiemcilroy merged commit c98aa66 into main Dec 4, 2026
45 checks passed
@sandchest-com

sandchest-com Bot commented Dec 4, 2026

Copy link
Copy Markdown

Sandchest

Sandchest reviewed 7d144b8: nothing exploitable found in this change.

Sandchest reviews every change for vulnerabilities an attacker could use · 1 credit · Review details

This branch was successfully deployed

1 active and 1 inactive (outdated) deployments
Preview – cap-web — 7d144b8e Deployed Dec 4, 2026 by vercel[bot]
Preview – cap-status — a5898ef2 Deployed Dec 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant