detached a47c61c

Merge pull request #85 from kitpdr/fix/convex-env-guards

fix(deploy): guard missing Convex URL
commit
a47c61cf791e434f9938a030e49abe9e42dcb834
author
KiT · · 2026-01-24 08:12 UTC
committer
GitHub · · 2026-01-24 08:12 UTC
merge of
bdcdb6b + 110b0e4 · diff against the first parent
signature
GPG UnverifiedB5690EEEBB952194 The key is unknown
2 files · +10 -2
M src/lib/db/convex.server.ts +5 -1
@@ -3,7 +3,11 @@ import { env as publicEnv } from '$env/dynamic/public';
33
44 // Convert .cloud URL to .site URL for HTTP actions
55 function getHttpUrl(): string {
6- return publicEnv.PUBLIC_CONVEX_URL.replace('.convex.cloud', '.convex.site');
6+ const baseUrl = publicEnv.PUBLIC_CONVEX_URL ?? privateEnv.PUBLIC_CONVEX_URL;
7+ if (!baseUrl) {
8+ throw new Error('PUBLIC_CONVEX_URL is not set');
9+ }
10+ return baseUrl.replace('.convex.cloud', '.convex.site');
711 }
812
913 // Generic fetch helper for Convex HTTP endpoints (server-side only)
@@ -3,7 +3,11 @@ import { env as publicEnv } from '$env/dynamic/public';
3 3
4 // Convert .cloud URL to .site URL for HTTP actions4 // Convert .cloud URL to .site URL for HTTP actions
5 function getHttpUrl(): string {5 function getHttpUrl(): string {
6- return publicEnv.PUBLIC_CONVEX_URL.replace('.convex.cloud', '.convex.site');6+ const baseUrl = publicEnv.PUBLIC_CONVEX_URL ?? privateEnv.PUBLIC_CONVEX_URL;
7+ if (!baseUrl) {
8+ throw new Error('PUBLIC_CONVEX_URL is not set');
9+ }
10+ return baseUrl.replace('.convex.cloud', '.convex.site');
7 }11 }
8 12
9 // Generic fetch helper for Convex HTTP endpoints (server-side only)13 // Generic fetch helper for Convex HTTP endpoints (server-side only)
M src/routes/+layout.svelte +5 -1
@@ -7,7 +7,11 @@
77 import { browser } from '$app/environment';
88
99 // Initialize Convex client for real-time subscriptions
10- setupConvex(env.PUBLIC_CONVEX_URL);
10+ if (browser && env.PUBLIC_CONVEX_URL) {
11+ setupConvex(env.PUBLIC_CONVEX_URL);
12+ } else if (browser && !env.PUBLIC_CONVEX_URL) {
13+ console.error('Missing PUBLIC_CONVEX_URL for Convex client setup');
14+ }
1115
1216 let { children, data } = $props();
1317 let isVisible = $state(true);
@@ -7,7 +7,11 @@
7 import { browser } from '$app/environment';7 import { browser } from '$app/environment';
8 8
9 // Initialize Convex client for real-time subscriptions9 // Initialize Convex client for real-time subscriptions
10- setupConvex(env.PUBLIC_CONVEX_URL);10+ if (browser && env.PUBLIC_CONVEX_URL) {
11+ setupConvex(env.PUBLIC_CONVEX_URL);
12+ } else if (browser && !env.PUBLIC_CONVEX_URL) {
13+ console.error('Missing PUBLIC_CONVEX_URL for Convex client setup');
14+ }
11 15
12 let { children, data } = $props();16 let { children, data } = $props();
13 let isVisible = $state(true);17 let isVisible = $state(true);

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 3

Tags 8

↑↓ moveenter openesc close