mirror of
https://github.com/open-webui/computer.git
synced 2026-11-05 01:17:24 +00:00
[GH-ISSUE #80] ReferenceError 'wsPath is not defined' breaks navigation when loading at / (no workspace param) — PWAs broken on launch #37
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/computer#37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chhotu-claw on GitHub (Jun 25, 2026).
Original GitHub issue: https://github.com/open-webui/computer/issues/80
Summary
Loading the app at
/with no?workspace=query param throws an uncaughtReferenceError, which breaks the client-side routing effect — navigation stops working (e.g. clicking a chat in the sidebar does nothing). This hits installed PWAs on every launch, because the manifest'sstart_urlis/. Regular browser tabs usually escape it because they reopen at a saved?workspace=…URL.Root cause
In
src/routes/+page.svelte, the workspace-loading$effecthas a final branch that references an undefined variablewsPath(it should beworkspacePath):When
workspacePathis falsy (URL/with no workspace), the first threeelse ifs are skipped and the engine evaluates!wsPath.wsPathis never declared anywhere in the file, so this throwsReferenceError, aborting the effect and leaving the app on the landing screen with broken navigation.Why it especially hurts PWAs
manifest.jsonsetsstart_url: "/", so an installed PWA always cold-launches at/(no workspace param) → the effect throws on every launch. The app shows the landing page and clicking a chat does nothing. In a normal tab you typically land on/?workspace=…(restored), so the throwing branch is never reached — which is why it looks "browser works, PWA broken."Fix
One-character class of fix (
wsPath→workspacePath). After this, cold-launching at/correctly clears workspace state and processes intents, and PWA navigation works.Repro
https://<host>/, no?workspace=), e.g. in a fresh/incognito window or an installed PWA.ReferenceError: wsPath is not defined.@tjbck commented on GitHub (Jun 25, 2026):
Should be addressed!