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
13 changes: 7 additions & 6 deletions .superset/lib/setup/steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -478,18 +478,18 @@ step_write_env() {
echo ""
echo "# Electric URLs (overrides from root .env)"
write_env_var "ELECTRIC_URL" "http://localhost:$ELECTRIC_PORT/v1/shape"
echo "# Caddy HTTPS proxy for HTTP/2 (avoids browser 6-connection limit with 10+ SSE streams)"
write_env_var "NEXT_PUBLIC_ELECTRIC_URL" "https://localhost:$CADDY_ELECTRIC_PORT/api/electric"
write_env_var "NEXT_PUBLIC_ELECTRIC_PROXY_URL" "https://localhost:$CADDY_ELECTRIC_PORT/api/electric"
echo "# Caddy HTTPS proxy for HTTP/2 (avoids browser 6-connection limit with Electric SSE streams)"
write_env_var "NEXT_PUBLIC_ELECTRIC_URL" "https://localhost:$CADDY_ELECTRIC_PORT"
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Mar 24, 2026

Choose a reason for hiding this comment

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

P2: Client Electric URLs now require Caddy unconditionally, but Caddy is still optional in dependency checks, which can produce a working setup script with broken Electric connectivity.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .superset/lib/setup/steps.sh, line 482:

<comment>Client Electric URLs now require Caddy unconditionally, but Caddy is still optional in dependency checks, which can produce a working setup script with broken Electric connectivity.</comment>

<file context>
@@ -478,18 +478,18 @@ step_write_env() {
-    write_env_var "NEXT_PUBLIC_ELECTRIC_URL" "http://localhost:$WRANGLER_PORT"
-    write_env_var "NEXT_PUBLIC_ELECTRIC_PROXY_URL" "http://localhost:$WRANGLER_PORT"
+    echo "# Caddy HTTPS proxy for HTTP/2 (avoids browser 6-connection limit with Electric SSE streams)"
+    write_env_var "NEXT_PUBLIC_ELECTRIC_URL" "https://localhost:$CADDY_ELECTRIC_PORT"
+    write_env_var "NEXT_PUBLIC_ELECTRIC_PROXY_URL" "https://localhost:$CADDY_ELECTRIC_PORT"
   } >> .env
</file context>
Fix with Cubic

write_env_var "NEXT_PUBLIC_ELECTRIC_PROXY_URL" "https://localhost:$CADDY_ELECTRIC_PORT"
} >> .env

success "Workspace .env written"

# Generate Caddyfile for HTTP/2 reverse proxy (avoids browser 6-connection limit with Electric SSE streams)
# Caddy proxies to the API server which handles auth and forwards to Electric Docker
# Caddy proxies to the local Wrangler worker, which handles auth and forwards upstream appropriately.
cat > Caddyfile <<-CADDYEOF
https://localhost:{\$CADDY_ELECTRIC_PORT} {
reverse_proxy localhost:{\$API_PORT} {
reverse_proxy localhost:{\$WRANGLER_PORT} {
flush_interval -1
}
}
Expand Down Expand Up @@ -522,7 +522,8 @@ PORTSJSON

cat > apps/electric-proxy/.dev.vars <<DEVVARS
AUTH_URL=http://localhost:$API_PORT
ELECTRIC_CLOUD_URL=${ELECTRIC_CLOUD_URL:-https://api.electric-sql.cloud}
ELECTRIC_SHAPE_URL=http://localhost:$ELECTRIC_PORT/v1/shape
ELECTRIC_SECRET=${ELECTRIC_SECRET:-local_electric_dev_secret}
ELECTRIC_SOURCE_ID=${ELECTRIC_SOURCE_ID:-}
ELECTRIC_SOURCE_SECRET=${ELECTRIC_SOURCE_SECRET:-}
DEVVARS
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"@superset/host-service": "workspace:*",
"@superset/local-db": "workspace:*",
"@superset/macos-process-metrics": "workspace:*",
"@superset/pane-layout": "workspace:*",
"@superset/shared": "workspace:*",
"@superset/trpc": "workspace:*",
"@superset/ui": "workspace:*",
Expand Down
Loading
Loading