Skip to content
Closed
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
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,7 @@ SUPERMEMORY_API_KEY=sm_...
SUPERMEMORY_ENABLED=true
# Optional: MISTRAL_OCR_ENDPOINT=https://api.mistral.ai/v1/ocr
# Optional: MISTRAL_OCR_MODEL=mistral-ocr-latest
# Zero Sync
NEXT_PUBLIC_ZERO_SERVER=http://localhost:4848
NEXT_PUBLIC_APP_URL=http://localhost:3000

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 | 🟡 Minor

Remove duplicated NEXT_PUBLIC_APP_URL declaration

Line 68 redefines NEXT_PUBLIC_APP_URL, which is already set at Line 2. Even with the same value, duplicated keys create ambiguity and can hide future misconfiguration due to last-value-wins parsing.

Proposed fix
 # Zero Sync
 NEXT_PUBLIC_ZERO_SERVER=http://localhost:4848
-NEXT_PUBLIC_APP_URL=http://localhost:3000
 ZERO_COOKIE_DOMAIN=.thinkex.app
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Zero Sync
NEXT_PUBLIC_ZERO_SERVER=http://localhost:4848
ZERO_COOKIE_DOMAIN=.thinkex.app
🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 68-68: [DuplicatedKey] The NEXT_PUBLIC_APP_URL key is duplicated

(DuplicatedKey)


[warning] 68-68: [UnorderedKey] The NEXT_PUBLIC_APP_URL key should go before the NEXT_PUBLIC_ZERO_SERVER key

(UnorderedKey)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.env.example at line 68, Remove the duplicated NEXT_PUBLIC_APP_URL
environment variable declaration: locate the second occurrence of
NEXT_PUBLIC_APP_URL in the .env.example (the redefinition after the initial
declaration) and delete that redundant line so the variable is defined only
once; ensure only the first/desired NEXT_PUBLIC_APP_URL remains to avoid
last-value-wins ambiguity.

@cubic-dev-ai cubic-dev-ai Bot Apr 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P3: NEXT_PUBLIC_APP_URL is duplicated in .env.example; keep a single definition to avoid ambiguous configuration.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .env.example, line 68:

<comment>`NEXT_PUBLIC_APP_URL` is duplicated in `.env.example`; keep a single definition to avoid ambiguous configuration.</comment>

<file context>
@@ -65,4 +65,5 @@ SUPERMEMORY_ENABLED=true
 # Optional: MISTRAL_OCR_MODEL=mistral-ocr-latest
 # Zero Sync
 NEXT_PUBLIC_ZERO_SERVER=http://localhost:4848
+NEXT_PUBLIC_APP_URL=http://localhost:3000
 ZERO_COOKIE_DOMAIN=.thinkex.app
</file context>
Fix with Cubic

ZERO_COOKIE_DOMAIN=.thinkex.app
Comment on lines +66 to +69

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 | 🟡 Minor

Fix dotenv key ordering to satisfy linter

dotenv-linter flags this block (Line 67) as unordered, which can fail or noise CI depending on lint enforcement.

Proposed diff
 # Supermemory (memory layer for chat — https://console.supermemory.ai)
 # Optional: when unset, the memory toggle is a no-op server-side.
 SUPERMEMORY_API_KEY=sm_...
 
+# Zero Sync
+NEXT_PUBLIC_ZERO_SERVER=http://localhost:4848
+ZERO_COOKIE_DOMAIN=.thinkex.app
+
 # Kill switch for the Supermemory wrapper. Must be exactly "true" to enable.
 # `@supermemory/tools@1.4.3+` contains the Proxy-based fix for AI SDK v6
 # (https://github.com/supermemoryai/supermemory/pull/854). If you downgrade
 # the dep or upstream regresses, set this to "false" to neutralize the
 # wrapper without ripping out any UI/transport plumbing.
 SUPERMEMORY_ENABLED=true
 # Optional: MISTRAL_OCR_ENDPOINT=https://api.mistral.ai/v1/ocr
 # Optional: MISTRAL_OCR_MODEL=mistral-ocr-latest
-# Zero Sync
-NEXT_PUBLIC_ZERO_SERVER=http://localhost:4848
-ZERO_COOKIE_DOMAIN=.thinkex.app
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Zero Sync
NEXT_PUBLIC_ZERO_SERVER=http://localhost:4848
ZERO_COOKIE_DOMAIN=.thinkex.app
# Supermemory (memory layer for chat — https://console.supermemory.ai)
# Optional: when unset, the memory toggle is a no-op server-side.
SUPERMEMORY_API_KEY=sm_...
# Zero Sync
NEXT_PUBLIC_ZERO_SERVER=http://localhost:4848
ZERO_COOKIE_DOMAIN=.thinkex.app
# Kill switch for the Supermemory wrapper. Must be exactly "true" to enable.
# `@supermemory/tools@1.4.3+` contains the Proxy-based fix for AI SDK v6
# (https://github.com/supermemoryai/supermemory/pull/854). If you downgrade
# the dep or upstream regresses, set this to "false" to neutralize the
# wrapper without ripping out any UI/transport plumbing.
SUPERMEMORY_ENABLED=true
# Optional: MISTRAL_OCR_ENDPOINT=https://api.mistral.ai/v1/ocr
# Optional: MISTRAL_OCR_MODEL=mistral-ocr-latest
🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 67-67: [UnorderedKey] The NEXT_PUBLIC_ZERO_SERVER key should go before the SUPERMEMORY_ENABLED key

(UnorderedKey)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.env.example around lines 66 - 68, The .env.example block has keys out of
alphabetical order per dotenv-linter; reorder the environment variables so keys
are sorted (e.g., place NEXT_PUBLIC_ZERO_SERVER and ZERO_COOKIE_DOMAIN in
lexicographic order) to satisfy the linter. Update the block containing
NEXT_PUBLIC_ZERO_SERVER and ZERO_COOKIE_DOMAIN so the names are alphabetically
ordered while preserving their values and comments.

3 changes: 3 additions & 0 deletions drizzle/0002_zero_publication.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CREATE PUBLICATION zero_pub FOR TABLE
workspace_items,
workspace_item_content;
9 changes: 8 additions & 1 deletion drizzle/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
"when": 1775704317855,
"tag": "0001_stormy_rawhide_kid",
"breakpoints": true
},
{
"idx": 2,
"version": "7",
"when": 1775793600000,
"tag": "0002_zero_publication",
"breakpoints": true
}
]
}
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"@radix-ui/react-tabs": "1.1.13",
"@react-email/components": "^1.0.8",
"@react-email/render": "^2.0.4",
"@rocicorp/zero": "^1.1.1",
"@shikijs/types": "^4.0.2",
"@streamdown/code": "^1.1.0",
"@streamdown/math": "^1.0.2",
Expand Down Expand Up @@ -180,6 +181,7 @@
"babel-plugin-react-compiler": "^1.0.0",
"concurrently": "^9.2.1",
"cross-env": "^10.1.0",
"drizzle-zero": "^0.18.0",
"knip": "^6.0.6",
"oxlint": "^1.59.0",
"prettier": "^3.8.1",
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/share/[id]/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NextRequest, NextResponse } from "next/server";
import { db, workspaces } from "@/lib/db/client";
import { eq } from "drizzle-orm";
import { loadWorkspaceState } from "@/lib/workspace/state-loader";
import { loadWorkspaceState } from "@/lib/workspace/workspace-state-read";

/**
* GET /api/share/[id]
Expand Down
271 changes: 0 additions & 271 deletions src/app/api/workspaces/[id]/events/route.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/api/workspaces/[id]/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NextRequest, NextResponse } from "next/server";
import { db, workspaces } from "@/lib/db/client";
import { eq, and, ne } from "drizzle-orm";
import { loadWorkspaceState } from "@/lib/workspace/state-loader";
import { loadWorkspaceState } from "@/lib/workspace/workspace-state-read";
import {
requireAuth,
verifyWorkspaceOwnership,
Expand Down
28 changes: 0 additions & 28 deletions src/app/api/workspaces/[id]/state/route.ts

This file was deleted.

Loading