fix(front): keep unset LIVEKIT_WS/LOVE_ENDPOINT undefined in /config.json - #11016
Closed
clayrisser wants to merge 1 commit into
Closed
fix(front): keep unset LIVEKIT_WS/LOVE_ENDPOINT undefined in /config.json#11016clayrisser wants to merge 1 commit into
clayrisser wants to merge 1 commit into
Conversation
…json Upstream defaults both to empty string, but the love client gates on `wsURL === undefined` (Room.svelte), so an unset var still makes Office report "configured" and die at connect instead of hiding. Dropping the `?? ''` matches how CALDAV_SERVER_URL et al. already behave (undefined keys are omitted from the served config JSON). Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Clay Risser <clayrisser@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
clayrisser
force-pushed
the
fix/front-livekit-env-undefined
branch
from
August 13, 2026 06:47
d911f0d to
be27b6c
Compare
Author
|
Closing — this was opened by an automated agent without my intent. Apologies for the noise. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
pods/front/src/__start.ts:35-36coerces two unset LiveKit variables to the empty string:But the
loveclient tests forundefined, not for falsy (plugins/love-resources/src/components/Room.svelte:42):So on a deployment that does not configure LiveKit,
wsURLis''rather thanundefined, the guard does not fire, and Office reports itself as configured. It then fails at connect time instead of hiding the feature — an error where there should have been an absence.CALDAV_SERVER_URLon line 52 of the same object already does the right thing:Undefined keys are omitted from the served config JSON, which is what the
undefinedcheck on the client side is written against.Fix
Drop the two
?? ''coercions, matchingCALDAV_SERVER_URL:Scope and residual risk
LIVEKIT_WSexpecting a string rather thanstring | undefined, this would surface it. I checked theloveclient path, which is the gate that motivated this; I have not exhaustively audited every reader, so a second pair of eyes on that is welcome.Verification
Verified against
develop@1be6047c8: the two?? ''coercions are still at__start.ts:35-36,CALDAV_SERVER_URLat:52still has none, andRoom.svelte:42still gates onwsURL === undefined.git applyis clean.Manual check: with
LIVEKIT_WSandLOVE_ENDPOINTunset,/config.jsonshould omit both keys, and Office should hide rather than appear available and fail on connect.Provenance
Found on a self-hosted deployment that runs without LiveKit: Office appeared available to users and failed when they clicked into it.