Commit Graph
78 Commits
Author SHA1 Message Date
Francis Cao 264466191e deterministic order for getReports. Closes #4323 2026-06-05 09:53:45 -07:00
Mike Cao 306ca4a435 Lint format files. Updated rng function. 2026-06-02 22:35:07 -07:00
Mike Cao c41bf7c93e Enforce cloud website limits by subscription tier 2026-05-26 20:45:07 -07:00
Francis Cao a7a0d73dd7 fix PieChart rendering issues by giving default height. 2026-05-18 23:06:47 -07:00
Mike Cao 1dda7bddcd Merge pull request #4142 from nielskaspers/fix/issue-3981-case-insensitive-login
fix: make username login case-insensitive
2026-05-14 23:49:04 -04:00
Francis Cao b7084bb90a Merge branch 'dev' into fix/delete-cascade 2026-05-07 13:58:29 -07:00
Francis Cao 5ccfb6d0a5 implement datatable sorting on non-analytics tables. (website/board/link/pixel/team/admin) 2026-05-07 10:46:03 -07:00
Stanislaw 71ee000f21 fix: avoid restamping deletedAt + skip Redis DEL for already-soft-deleted slugs
Address Greptile review feedback on #4243.

- Cloud-mode link.updateMany / pixel.updateMany now filter where: { ..., deletedAt: null } so a previously soft-deleted row keeps its original deletion timestamp instead of being restamped with the current time.
- Pre-transaction findMany now selects deletedAt; the Redis invalidation list filters to only live slugs, avoiding harmless but wasted DEL calls for already-soft-deleted entries.

Note: the share.deleteMany cleanup still uses the broad entityId list (not filtered by deletedAt) so that orphan share rows of already-soft-deleted links/pixels are still cleaned up. Filtering the prefetch itself, as Greptile's exact suggestion proposed, would skip those shares while link.deleteMany still hard-deletes the rows, leaving orphan share rows behind. Verified empirically with a 3-scenario reproduction.
2026-05-07 04:14:38 +02:00
Stanislaw a57abbe039 fix: clean up link, pixel, board rows on user/team deletion
deleteUser and deleteTeam left link/pixel/board rows (and their share rows)
in the database after the owner was removed. /q/<slug> and /p/<slug>
also kept serving deleted entries because the routes did not filter
deletedAt and Redis cached lookups for 24h.

- deleteUser: clean up link/pixel/board + shares for the deleted user.
  Cloud mode: soft-delete link/pixel, hard-delete board, only userId-owned.
  Non-cloud: hard-delete everything matching userId or owned teamIds.
- deleteTeam: same cleanup, scoped to teamId.
- /q and /p route handlers: filter deletedAt: null at the call sites
  (not in findLink/findPixel helpers, which would null-deref the
  permission checks at src/permissions/link.ts and pixel.ts).
- Post-transaction Redis invalidation mirrors deleteWebsite.
2026-05-07 03:37:22 +02:00
Francis Cao afa878cd3a include team-manager in includeTeams option 2026-04-27 11:02:00 -07:00
Niels Kaspers 7ca24786e8 fix: make username login case-insensitive (#3981)
Normalize usernames to lowercase on lookup, creation, and update.
Also fix variable shadowing bug and same-user update check in
the user update endpoint.
2026-04-08 09:14:41 +03:00
Francis Cao 54d3c43300 Revert "Merge pull request #4048 from AlejandroGispert/fix/3981-login-email-case"
This reverts commit b6341596bf, reversing
changes made to 07356323c1.
2026-04-07 11:26:58 -07:00
Mike Cao b6341596bf Merge pull request #4048 from AlejandroGispert/fix/3981-login-email-case
fix: make signin email case-insensitive
2026-04-01 23:25:56 -04:00
Francis Cao cd2b303e89 use team redis keys to resolve team gated features 2026-03-21 11:21:07 -07:00
Francis Cao a28ea79228 saved session replays updates and polish 2026-03-09 15:00:36 -07:00
Francis Cao 1bffb3cbf3 saved session replay implementation checkpoint 2026-03-09 13:51:08 -07:00
Mike Cao 25e60758b5 Exclude dashboards from boards list 2026-03-06 23:54:47 -08:00
Francis Cao 0e1d6cef6b refactor session replays to be per visit. sessions persist too long resulting in low-quality recordings 2026-03-03 22:59:25 -08:00
Francis Cao 5e68661c5d session replay updates. add clickhouse implementation, filters, tables 2026-03-03 12:47:27 -08:00
Alejandro Gispert 60c0915aa5 Merge branch 'dev' into fix/3981-login-email-case 2026-02-22 08:01:26 +01:00
Alejandro Gispert 2ab58700b2 fix: make signin email case-insensitive
Closes #3981
2026-02-22 07:18:00 +01:00
Mike CaoandClaude Opus 4.6 0a3cf7a9ff Rename session recording to session replay across the codebase.
Renames all files, components, database schema, API routes, hooks,
messages, and build config from "recording" to "replay" terminology.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 00:38:47 -08:00
Mike CaoandClaude Opus 4.6 72b5c658e2 Add rrweb-based session recording feature.
Implements full session recording with rrweb for DOM capture and rrweb-player
for playback. Includes: Prisma schema for SessionRecording model, chunked
gzip-compressed storage, recorder script built via Rollup, collection API
endpoint, recordings list/playback UI pages, website recording settings,
and cascade delete support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 15:49:59 -08:00
Mike Cao c3e0290e65 Merge branch 'dev' into boards
# Conflicts:
#	.gitignore
#	package.json
#	pnpm-lock.yaml
#	prisma/migrations/16_boards/migration.sql
#	prisma/schema.prisma
#	src/app/(main)/MobileNav.tsx
#	src/app/(main)/websites/[websiteId]/WebsiteHeader.tsx
#	src/app/(main)/websites/[websiteId]/settings/WebsiteShareForm.tsx
#	src/components/common/SideMenu.tsx
#	src/lib/types.ts
2026-02-05 20:05:25 -08:00
Francis Cao 6c7b6bab07 fix pixel/link canViewWebsite 2026-02-04 14:47:07 -08:00
Francis Cao 2489601ae6 website API shareId compatibility updates 2026-02-03 22:28:25 -08:00
Francis Cao 8b2196b97a fix showDeleted reversed logic. Show non-deleted user as default query 2026-01-22 11:18:14 -08:00
Mike CaoandClaude Opus 4.5 0eb598c817 implement website share functionality using share table
- Add support for multiple share URLs per website with server-generated slugs
- Create shares API endpoint for listing and creating website shares
- Add SharesTable, ShareEditButton, ShareDeleteButton components
- Move share management to website settings, remove header share button
- Remove shareId from website update API (now uses separate share table)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 17:23:14 -08:00
Mike Cao e3e2ed0435 Merge branch 'dev' into boards
# Conflicts:
#	prisma/schema.prisma
#	src/permissions/index.ts
2026-01-16 16:25:21 -08:00
Francis Cao 29f2c7b7d4 share api, queries, permissions, migration, entity lib 2026-01-15 16:25:56 -08:00
Mike Cao aefc36b476 Merge branch 'dev' into boards
# Conflicts:
#	pnpm-lock.yaml
2026-01-07 01:01:39 -08:00
Francis Cao b0ed4bddb6 change reset/delete website to interactive transaction with timeout
Closes #3905
2025-12-22 10:59:33 -08:00
Mike Cao 5ce1b40330 Merge branch 'dev' into boards
# Conflicts:
#	pnpm-lock.yaml
2025-12-04 00:53:54 -08:00
Francis Cao 935517ce3a add cascading deletes to revenue/segment table
Closes #3798
2025-12-02 09:41:46 -08:00
Mike Cao a39ebffd8b Boards components. 2025-11-29 15:59:01 -08:00
Mike Cao fa8d8055df Reformatted files with biome. 2025-11-22 22:42:42 -08:00
Mike Cao b9d52af215 Updated prisma. 2025-11-21 21:35:11 -08:00
Francis Cao cc8254985b Increase resetWebsite timeout. fix retention bug returning decimal day_number in CH.
Closes #3698
2025-11-14 09:11:26 -08:00
Mike Cao dbac6192db Merge remote-tracking branch 'origin/dev' into dev 2025-10-05 23:16:01 -07:00
Mike Cao f733690d38 Added lookup for cloud account. Added SessionModal component. 2025-10-05 23:15:36 -07:00
Francis Cao e64a01d8f1 fix redis set for resetWebsite cloudMode 2025-10-05 22:37:06 -07:00
Mike Cao 03adb6b7e1 Added website check for cloud. 2025-10-04 00:38:10 -07:00
Mike Cao f70f98fed0 Updated replica handling. Fixed types. 2025-10-03 01:20:48 -07:00
Mike Cao b9fbbc6453 Split queries into prisma and sql. 2025-09-29 16:55:07 -07:00
Mike Cao dfc6161a53 Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
#	src/app/share/[...shareId]/Header.tsx
2025-09-25 11:23:36 -07:00
Mike Cao 1b400da7b2 Fixed share page. Updated device detect. Updated teams fetch. 2025-09-25 11:21:44 -07:00
Francis Cao f11773ad3f fix user delete and Logo import 2025-09-24 16:44:58 -07:00
Mike Cao 433ce98719 Allow getting team websites. 2025-09-12 08:21:29 -07:00
Mike Cao f40e1b44f3 Updates for cloud mode. 2025-09-04 20:27:42 -07:00
Mike Cao 56af91950a Updated components build. 2025-09-01 15:59:06 -07:00