stack/apps/e2e/tests/js
Konsti Wohlwend 7a35751f8e
Sign up rules (#1138)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **High Risk**
> Touches core sign-up/auth flows and user restriction semantics
(including new DB constraints) and introduces dynamic rule
evaluation/logging; misconfiguration or CEL/parser bugs could block
sign-ups or incorrectly restrict users.
> 
> **Overview**
> Introduces **CEL-based sign-up rules** (config-driven) that are
evaluated during password/OTP/OAuth sign-ups and anonymous upgrades;
matching rules can reject sign-ups or mark users as admin-restricted,
and triggers are logged for analytics.
> 
> Extends `ProjectUser` with `restrictedByAdmin` plus public/private
restriction details, updates restriction computation/filtering, and
exposes these fields via user CRUD (including validation + DB constraint
enforcing consistency when unrestricted).
> 
> Adds a new dashboard **Sign-up Rules** page with a visual condition
builder (CEL <-> visual tree), drag-reorder by priority, per-rule 48h
sparkline analytics via a new hidden internal endpoint, and adds
user-page UI to view/edit manual restrictions. Also refactors ClickHouse
client initialization to require env vars (removing
`isClickhouseConfigured` checks) and adjusts CI container startup wait
time.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
2141e689e8c1b72303b805e9234f996010d0880. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Sign-up Rules: visual rule builder, in-project CRUD with drag-reorder,
per-rule analytics, backend evaluation, and admin UI.
* Admin user restrictions: dashboard controls, banners/status,
public/private admin details surfaced in user views.

* **APIs & Schema**
* Config and user schemas extended; new SignUpRejected error and sign-up
rule types added.

* **Tests**
* Extensive unit and E2E coverage for rules, parser, evaluator,
analytics, and restricted-user flows.

* **Docs**
  * Editorial guidance added to AGENTS.md.

* **Chores**
* DB statement timeout, updated clean script, minor dependency
additions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-03 11:08:24 -08:00
..
access-token-refresh.test.ts Onboarding app & restricted users (#1069) 2026-01-11 17:22:14 -08:00
api-keys.test.ts fix tests (#922) 2025-10-03 11:10:35 -07:00
app.test.ts Cookie subdomain sharing (#971) 2025-11-05 18:12:31 -08:00
auth-like.test.ts currentSession.useTokens hook 2025-12-09 15:53:41 -08:00
config.test.ts Sign up rules (#1138) 2026-02-03 11:08:24 -08:00
convex.test.ts Onboarding app & restricted users (#1069) 2026-01-11 17:22:14 -08:00
cookies.test.ts fix host cookie deleting (#1011) 2025-11-12 14:37:05 -08:00
data-vault.test.ts Data vaults (#871) 2025-08-30 23:42:56 -07:00
email.test.ts Email outbox backend (#1030) 2025-12-12 10:26:38 -08:00
inheritance.test.ts StackXyzApp now takes an inheritFrom argument 2025-10-15 16:40:03 -07:00
js-helpers.ts Onboarding app & restricted users (#1069) 2026-01-11 17:22:14 -08:00
list-users.test.ts Onboarding app & restricted users (#1069) 2026-01-11 17:22:14 -08:00
oauth-providers.test.ts OAuth provider client and dashboard (#792) 2025-09-10 10:48:19 +02:00
oauth.test.ts oauth sign in scope and test (#887) 2025-09-09 19:21:28 -07:00
payments.test.ts fix product route access (#1134) 2026-01-27 18:30:14 +00:00
restricted-users.test.ts Onboarding app & restricted users (#1069) 2026-01-11 17:22:14 -08:00