Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/builder/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# vite-shadcn-builder-libra

## 1.0.12

### Patch Changes

- docs bug fix & deps update

## 1.0.11

### Patch Changes
Expand Down
10 changes: 5 additions & 5 deletions apps/builder/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vite-shadcn-builder-libra",
"private": true,
"version": "1.0.11",
"version": "1.0.12",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down Expand Up @@ -47,13 +47,13 @@
"zod": "^4.1.11",
"@hookform/resolvers": "^5.2.2",
"hono": "^4.9.8",
"@tanstack/react-query": "^5.89.0",
"@tanstack/react-query": "^5.90.2",
"recharts": "^2.15.4",
"vaul": "^1.1.2",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"embla-carousel-react": "^8.6.0",
"motion": "^12.23.16"
"motion": "^12.23.19"
},
"devDependencies": {
"@types/node": "^22.18.6",
Expand All @@ -69,8 +69,8 @@
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.9.2",
"vite": "^6.3.6",
"@cloudflare/vite-plugin": "^1.13.3",
"@cloudflare/vite-plugin": "^1.13.4",
"wrangler": "4.27.0",
"@cloudflare/workers-types": "^4.20250921.0"
"@cloudflare/workers-types": "^4.20250924.0"
}
Comment on lines +72 to 75
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

🧩 Analysis chain

Cloudflare deps bumped: ensure Wrangler and compatibility_date alignment.
Confirm wrangler 4.27.0 is compatible with @cloudflare/vite-plugin ^1.13.4 and workers-types ^4.20250924.0, and that compatibility_date is updated in wrangler config(s).

Use this to audit compatibility_date values:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "compatibility_date occurrences:"
rg -n --type=json --type=jsonc -C1 '"compatibility_date"\s*:\s*"' || true

Length of output: 61


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Finding wrangler config files (json, jsonc, toml):"
if command -v fd >/dev/null 2>&1; then
  fd -HI -e json -e jsonc -e toml -g 'wrangler*' || true
else
  find . -type f -iregex '.*wrangler\.\(json\|jsonc\|toml\)$' -print || true
fi

echo
echo "Occurrences of 'compatibility_date' (showing 1 line context):"
rg -n -S -C1 --hidden --no-ignore 'compatibility_date' --glob '!**/node_modules/**' || true

Length of output: 444


🏁 Script executed:

#!/bin/bash
set -euo pipefail
IFS=$'\n'

if command -v fd >/dev/null 2>&1; then
  mapfile -t files < <(fd -HI -e json -e jsonc -e toml -g 'wrangler*' || true)
else
  mapfile -t files < <(find . -type f -iregex '.*wrangler\.\(json\|jsonc\|toml\)$' -print || true)
fi

if [ ${#files[@]} -eq 0 ]; then
  echo "No wrangler config files found"
  exit 0
fi

for f in "${files[@]}"; do
  echo "---- $f ----"
  if grep -n -E 'compatibility_date' "$f" >/dev/null 2>&1; then
    grep -n -E 'compatibility_date' "$f" || true
  else
    echo "no compatibility_date found"
  fi
done

Length of output: 56


🏁 Script executed:

#!/bin/bash
set -euo pipefail

files=(
  "apps/builder/wrangler.jsonc"
  "apps/docs/wrangler.jsonc"
  "apps/opennext-cache/wrangler.jsonc"
  "apps/vite-shadcn-template/wrangler.jsonc"
  "apps/web/wrangler.jsonc"
  "packages/auth/wrangler.jsonc"
)

for f in "${files[@]}"; do
  echo "---- $f ----"
  if [ -f "$f" ]; then
    grep -n 'compatibility_date' "$f" || echo "no compatibility_date found"
  else
    echo "file not found"
  fi
done

Length of output: 469


Update compatibility_date to match @cloudflare/workers-types (2025-09-24) and verify wrangler/plugin compatibility

compatibility_date is "2025-09-03" in:

  • apps/builder/wrangler.jsonc
  • apps/docs/wrangler.jsonc
  • apps/opennext-cache/wrangler.jsonc
  • apps/vite-shadcn-template/wrangler.jsonc
  • apps/web/wrangler.jsonc

packages/auth/wrangler.jsonc — no compatibility_date present.

Action: set compatibility_date to "2025-09-24" (or appropriate deployment date) in the files above, add compatibility_date to packages/auth/wrangler.jsonc if needed, and confirm wrangler 4.27.0 is compatible with @cloudflare/vite-plugin ^1.13.4 and @cloudflare/workers-types ^4.20250924.0.

🤖 Prompt for AI Agents
In apps/builder/package.json around lines 72 to 75 and in the listed
wrangler.jsonc files (apps/builder, apps/docs, apps/opennext-cache,
apps/vite-shadcn-template, apps/web) update compatibility_date to "2025-09-24"
(and add compatibility_date:"2025-09-24" to packages/auth/wrangler.jsonc if it
needs one); after updating, verify wrangler 4.27.0 compatibility with
@cloudflare/vite-plugin ^1.13.4 and @cloudflare/workers-types ^4.20250924.0 by
consulting plugin/changelog docs and running a local wrangler build/dev
(wrangler build/dev) to ensure no runtime or build errors, and if any
incompatibility appears, pin or upgrade the plugin or wrangler accordingly.

}
2 changes: 1 addition & 1 deletion apps/builder/wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "../../node_modules/wrangler/config-schema.json",
"main": "src/worker.ts",
"compatibility_date": "2025-08-03",
"compatibility_date": "2025-09-03",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": "./dist/",
Expand Down
8 changes: 8 additions & 0 deletions apps/deploy/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @libra/deploy

## 1.0.10

### Patch Changes

- docs bug fix & deps update
- Updated dependencies
- @libra/auth@1.0.6

## 1.0.9

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/deploy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libra/deploy",
"version": "1.0.9",
"version": "1.0.10",
"description": "Queue-based deployment service for Libra platform",
"scripts": {
"dev": "wrangler dev --port 3008 --persist-to=../web/.wrangler/state",
Expand Down
2 changes: 1 addition & 1 deletion apps/deploy/wrangler.jsonc.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "../../node_modules/wrangler/config-schema.json",
"name": "libra-deploy",
"main": "src/index.ts",
"compatibility_date": "2025-08-03",
"compatibility_date": "2025-09-03",
"compatibility_flags": [
"nodejs_compat",
"global_fetch_strictly_public"
Expand Down
6 changes: 6 additions & 0 deletions apps/dispatcher/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @libra/dispatcher

## 1.0.12

### Patch Changes

- docs bug fix & deps update

## 1.0.11

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions apps/dispatcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libra/dispatcher",
"version": "1.0.11",
"version": "1.0.12",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

🧩 Analysis chain

Align Cloudflare workers-types with wrangler compatibility_date.

You bumped @cloudflare/workers-types; ensure each app’s wrangler.jsonc compatibility_date matches the new types to avoid subtle type/runtime drift.

Run to review configured compatibility_date values:

Also applies to: 26-26


🏁 Script executed:

#!/bin/bash
# List Cloudflare compatibility_date across repo
rg -n '"compatibility_date"\s*:\s*"[0-9-]+"' -g '!**/node_modules/**' -C1 || true

Length of output: 148


🏁 Script executed:

#!/bin/bash
set -euo pipefail
printf "PWD: %s\n\n" "$(pwd)"

printf "-- Finding wrangler.json / wrangler.jsonc files --\n"
fd -HI -e json -e jsonc '^wrangler' || true

printf "\n-- Showing contents of found wrangler files (first 200 lines) --\n"
fd -HI -e json -e jsonc '^wrangler' -0 | while IFS= read -r -d '' file; do
  printf "\n==== %s ====\n" "$file"
  sed -n '1,200p' "$file"
done || true

printf "\n-- Searching for compatibility_date occurrences --\n"
rg -n --hidden --no-ignore '"compatibility_date"\s*:\s*"[0-9-]+"' -C1 || true

printf "\n-- Searching for @cloudflare/workers-types in repo --\n"
rg -n --hidden --no-ignore '@cloudflare/workers-types' -S || true

Length of output: 120


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "PWD: $(pwd)"
echo

echo "-- git ls-files: wrangler.json / wrangler.jsonc --"
git ls-files -- '*/wrangler.json' '*/wrangler.jsonc' || true

echo
echo "-- fallback: find wrangler files (exclude node_modules) --"
find . -type f \( -iname 'wrangler.json' -o -iname 'wrangler.jsonc' \) -not -path './node_modules/*' -print || true

# Collect list of wrangler files (git first, then find)
wranglers=$(git ls-files -- '*/wrangler.json' '*/wrangler.jsonc' 2>/dev/null || true)
if [ -z "$wranglers" ]; then
  wranglers=$(find . -type f \( -iname 'wrangler.json' -o -iname 'wrangler.jsonc' \) -not -path './node_modules/*' -print 2>/dev/null || true)
fi

if [ -n "$wranglers" ]; then
  echo
  echo "-- Showing first 200 lines of each wrangler file found --"
  # Handle filenames safely
  while IFS= read -r file; do
    [ -z "$file" ] && continue
    echo
    echo "==== $file ===="
    sed -n '1,200p' "$file" || true
  done <<< "$wranglers"
else
  echo
  echo "No wrangler.json / wrangler.jsonc files found."
fi

echo
echo "-- Searching for compatibility_date occurrences across repo --"
# Use grep to find occurrences; exclude node_modules
grep -nR --line-number --exclude-dir=node_modules '"compatibility_date"' . || true

echo
echo "-- Searching for @cloudflare/workers-types references in package.json files --"
grep -nR --line-number --exclude-dir=node_modules '@cloudflare/workers-types' . || true

echo
echo "-- finished --"

Length of output: 236373


Align wrangler compatibility_date with bumped @cloudflare/workers-types

@cloudflare/workers-types was bumped to ^4.20250924.0 — update each Cloudflare Worker config's compatibility_date to 2025-09-24 (or later) so types and runtime match.

  • wrangler files currently set to "2025-09-03": apps/builder/wrangler.jsonc, apps/docs/wrangler.jsonc, apps/opennext-cache/wrangler.jsonc, apps/vite-shadcn-template/wrangler.jsonc, apps/web/wrangler.jsonc — update them to 2025-09-24.
  • apps/dispatcher/package.json uses ^4.20250924.0 but only apps/dispatcher/wrangler.jsonc.example exists — add/update apps/dispatcher/wrangler.jsonc with the matched compatibility_date.
  • Confirm any other app/wrangler.jsonc (or example files) are >= 2025-09-24 after changes.
🤖 Prompt for AI Agents
In apps/dispatcher/package.json around line 3, package.json already uses
@cloudflare/workers-types ^4.20250924.0 but there is no matching wrangler
config; add or update apps/dispatcher/wrangler.jsonc (or wrangler.jsonc.example
if preferred) to include "compatibility_date": "2025-09-24" (or later) so the
worker runtime date matches the bumped types, and then scan all other app
wrangler.jsonc / wrangler.jsonc.example files to ensure their compatibility_date
is >= "2025-09-24" and update any that are still "2025-09-03".

"type": "module",
"scripts": {
"dev": "wrangler dev --port 3007 --persist-to=../web/.wrangler/state",
Expand All @@ -23,7 +23,7 @@
},
"devDependencies": {
"wrangler": "4.27.0",
"@cloudflare/workers-types": "^4.20250921.0",
"@cloudflare/workers-types": "^4.20250924.0",
"typescript": "^5.9.2",
"dotenv": "^17.2.2",
"dotenv-cli": "^10.0.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/dispatcher/wrangler.jsonc.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "../../node_modules/wrangler/config-schema.json",
"name": "libra-dispatcher",
"main": "src/index.ts",
"compatibility_date": "2025-08-03",
"compatibility_date": "2025-09-03",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"binding": "ASSETS",
Expand Down
54 changes: 27 additions & 27 deletions apps/docs/.source/index.ts

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions apps/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @libra/docs

## 1.0.9

### Patch Changes

- docs bug fix & deps update

## 1.0.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
*/

import { createI18nMiddleware } from 'fumadocs-core/i18n';
import { createI18nMiddleware } from 'fumadocs-core/i18n/middleware';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[P1] Import path no longer matches installed fumadocs-core version

The middleware now imports createI18nMiddleware from fumadocs-core/i18n/middleware, but apps/docs/package.json still pins fumadocs-core to ^15.7.13. That version only exports createI18nMiddleware from fumadocs-core/i18n, so builds will fail with Module not found: Can't resolve 'fumadocs-core/i18n/middleware' unless the dependency is bumped to a release that exposes the new submodule. Either upgrade fumadocs-core or revert to the original import path.

Useful? React with 👍 / 👎.

import { i18n } from '@/lib/i18n';

export default createI18nMiddleware(i18n);
Expand Down
1 change: 1 addition & 0 deletions apps/docs/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
4 changes: 2 additions & 2 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libra/docs",
"version": "1.0.8",
"version": "1.0.9",
"private": true,
"scripts": {
"build": "next build",
Expand All @@ -12,7 +12,7 @@
"fumadocs-core": "^15.7.13",
"fumadocs-mdx": "^11.10.1",
"fumadocs-ui": "^15.7.13",
"motion": "^12.23.16",
"motion": "^12.23.19",
"octokit": "^5.0.3",
"@orama/tokenizers": "^3.1.14",
"@orama/orama": "^3.1.14",
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// "account_id": "",
"name": "libra-docs",
"main": ".open-next/worker.js",
"compatibility_date": "2025-08-03",
"compatibility_date": "2025-09-03",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"minify": true,
"assets": {
Expand Down
6 changes: 6 additions & 0 deletions apps/opennext-cache/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# opennext-cache

## 1.0.1

### Patch Changes

- docs bug fix & deps update

## 1.0.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/opennext-cache/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opennext-cache",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion apps/opennext-cache/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "../../node_modules/wrangler/config-schema.json",
"main": "src/index.ts",
"name": "opennext-cache",
"compatibility_date": "2025-08-03",
"compatibility_date": "2025-09-03",
"compatibility_flags": [
"nodejs_compat"
],
Expand Down
8 changes: 8 additions & 0 deletions apps/screenshot/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @libra/screenshot

## 1.0.9

### Patch Changes

- docs bug fix & deps update
- Updated dependencies
- @libra/auth@1.0.6

## 1.0.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/screenshot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libra/screenshot",
"version": "1.0.8",
"version": "1.0.9",
"description": "Queue-based screenshot service for Libra platform",
"scripts": {
"dev": "wrangler dev --port 3009 --persist-to=../web/.wrangler/state",
Expand Down
2 changes: 1 addition & 1 deletion apps/screenshot/wrangler.jsonc.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "../../node_modules/wrangler/config-schema.json",
"name": "libra-screenshot",
"main": "src/index.ts",
"compatibility_date": "2025-08-03",
"compatibility_date": "2025-09-03",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"binding": "ASSETS",
Expand Down
6 changes: 6 additions & 0 deletions apps/vite-shadcn-template/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# vite-shadcn-template-libra

## 1.0.1

### Patch Changes

- docs bug fix & deps update

## 1.0.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/vite-shadcn-template/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vite-shadcn-template-libra",
"private": true,
"version": "1.0.0",
"version": "1.0.1",
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot Sep 24, 2025

Choose a reason for hiding this comment

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

Project version bumped to 1.0.1 while Docker/Daytona script tags remain 1.0.0, leading to inconsistent versioning across build/push workflows. Update script tags to match the new version.

Prompt for AI agents
Address the following comment on apps/vite-shadcn-template/package.json at line 4:

<comment>Project version bumped to 1.0.1 while Docker/Daytona script tags remain 1.0.0, leading to inconsistent versioning across build/push workflows. Update script tags to match the new version.</comment>

<file context>
@@ -1,7 +1,7 @@
   &quot;name&quot;: &quot;vite-shadcn-template-libra&quot;,
   &quot;private&quot;: true,
-  &quot;version&quot;: &quot;1.0.0&quot;,
+  &quot;version&quot;: &quot;1.0.1&quot;,
   &quot;type&quot;: &quot;module&quot;,
   &quot;scripts&quot;: {
</file context>
Fix with Cubic

"type": "module",
"scripts": {
"dev": "vite",
Expand Down
4 changes: 2 additions & 2 deletions apps/vite-shadcn-template/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "../../node_modules/wrangler/config-schema.json",
"name": "vite-shadcn-template",
"main": "src/worker.ts",
"compatibility_date": "2025-08-03",
"compatibility_date": "2025-09-03",
"compatibility_flags": [
"nodejs_compat",
"global_fetch_strictly_public"
Expand All @@ -13,7 +13,7 @@
"binding": "ASSETS"
},
"minify": true,
"placement": { "mode": "smart" },
"placement": { "mode": "smart" }
// "observability": {
// "enabled": true
// }
Expand Down
10 changes: 10 additions & 0 deletions apps/web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# libra-core

## 1.0.17

### Patch Changes

- docs bug fix & deps update
- Updated dependencies
- @libra/better-auth-cloudflare@1.0.10
- @libra/better-auth-stripe@1.0.5
- @libra/auth@1.0.6

## 1.0.16

### Patch Changes
Expand Down
22 changes: 11 additions & 11 deletions apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "libra-core",
"version": "1.0.16",
"version": "1.0.17",
"private": true,
"type": "module",
"scripts": {
Expand All @@ -25,9 +25,9 @@
"analyze": "ANALYZE=true bun run build"
},
"dependencies": {
"@ai-sdk/anthropic": "^2.0.17",
"@ai-sdk/azure": "^2.0.32",
"@ai-sdk/xai": "^2.0.20",
"@ai-sdk/anthropic": "^2.0.18",
"@ai-sdk/azure": "^2.0.34",
"@ai-sdk/xai": "^2.0.22",
"@git-diff-view/file": "^0.0.30",
"@git-diff-view/react": "^0.0.30",
"@hookform/resolvers": "^5.2.2",
Expand All @@ -46,22 +46,22 @@
"@marsidev/react-turnstile": "^1.3.1",
"@openrouter/ai-sdk-provider": "^1.2.0",
"@shikijs/transformers": "^3.13.0",
"@tanstack/react-query": "^5.89.0",
"@tanstack/react-query": "^5.90.2",
"@tanstack/react-table": "^8.21.3",
"@tsparticles/engine": "^3.9.1",
"@tsparticles/react": "^3.0.0",
"@tsparticles/slim": "^3.9.1",
"ai": "^5.0.48",
"ai": "^5.0.51",
"date-fns": "^4.1.0",
"diff": "^8.0.2",
"fast-xml-parser": "^5.2.5",
"file-saver": "^2.0.5",
"jszip": "^3.10.1",
"motion": "^12.23.16",
"next": "^15.5.3",
"motion": "^12.23.19",
"next": "^15.5.4",
"nextjs-toploader": "^3.9.17",
"posthog-js": "^1.266.3",
"posthog-node": "^5.8.6",
"posthog-js": "^1.268.1",
"posthog-node": "^5.8.8",
Comment on lines +63 to +64
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

🧩 Analysis chain

PostHog bumps: revalidate client-side usage for secrets/consent.
Ensure only the public key is exposed on the client, server key stays server-side, and events are gated by consent where required.

Quick scan for PostHog init usage:


🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -n -C2 'posthog|PostHog' apps/web | sed -n '1,200p'

Length of output: 12130


PostHog bumps: remove server secrets from client and gate tracking by consent.

  • Verified: client uses NEXT_PUBLIC_POSTHOG_KEY in apps/web/components/client-providers.tsx and apps/web/wrangler.jsonc contains NEXT_PUBLIC_POSTHOG_KEY; tracking calls occur without consent checks in apps/web/components/general-analytics-collector.tsx and exception captures in apps/web/components/ui/error.tsx, apps/web/app/(frontend)/error.tsx, apps/web/app/(frontend)/global-error.tsx.
  • Action: ensure only a public/project key (no server API key) is exposed client-side; move any server key to server-only envs and use posthog-node server-side. Gate initialization/capture — either defer posthog.init until user consents or start opted-out and call posthog.opt_in_capturing() only after explicit consent; require explicit opt-in for session recording/PII collection.
🤖 Prompt for AI Agents
In apps/web/package.json around lines 63-64 (and affecting client code in
apps/web/components/client-providers.tsx,
apps/web/components/general-analytics-collector.tsx,
apps/web/components/ui/error.tsx, apps/web/app/(frontend)/error.tsx,
apps/web/app/(frontend)/global-error.tsx and wrangler.jsonc): the PR
exposes/uses PostHog server secrets client-side and performs tracking/capture
without consent; remove any server API key from client envs (ensure only
NEXT_PUBLIC_POSTHOG_KEY/project key remains in client configs), move any server
API key to server-only environment variables and use posthog-node for
server-side event ingestion, and update client init logic to either defer
posthog.init until the user explicitly consents or initialize in an opted-out
state and call posthog.opt_in_capturing() only after explicit consent; also
ensure session recording/PII collection remains disabled until opt-in and gate
all capture/exception calls behind the consent check or server-side forwarding.

"react": "^19.1.1",
"react-error-boundary": "^5.0.0",
"react-hook-form": "^7.63.0",
Expand All @@ -75,7 +75,7 @@
},
"devDependencies": {
"@types/diff": "^8.0.0",
"@tanstack/react-query-devtools": "^5.89.0",
"@tanstack/react-query-devtools": "^5.90.2",
"@inlang/paraglide-js": "^2.3.2",
"@inlang/cli": "^3.0.12",
"@types/file-saver": "^2.0.7",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "../../node_modules/wrangler/config-schema.json",
"name": "libra",
"main": ".open-next/worker.js",
"compatibility_date": "2025-08-03",
"compatibility_date": "2025-09-03",
"compatibility_flags": [
"nodejs_compat",
"global_fetch_strictly_public"
Expand Down
Loading
Loading