Skip to content

Self-hosted editor: scan upload button is a silent no-op (onUploadAsset never wired locally) #645

Description

@xentzu

Environment

  • @pascal-app/cli 0.1.5, self-hosted via npx @pascal-app/cli start (Linux, systemd), browser on http://pascal.localhost:<port>
  • No cloud account involved — purely the local editor + local SQLite storage

What happens

In the References panel (Reference settings → Scans → "Upload scan or guide image"), picking a scan file (.glb) is a silent no-op in the self-hosted editor:

  • the file chooser opens and accepts the file,
  • then nothing: no network request is issued, no console error, no upload progress, no scan node added ("1 scan on this level" stays unchanged).

Verified with devtools/network open: zero requests after file selection.

Why (from source)

packages/editor/src/components/ui/sidebar/panels/site-panel/index.tsxhandleUpload ends with:

clearUpload(levelId)
onUploadAsset?.(projectId, levelId, file, type)

onUploadAsset is an optional prop and nothing in the local runtime provides it, so the optional call vanishes. (Guide images are fine — they have a local in-tree path with real error handling right above; it's specifically the scan branch that depends on the host-app callback.)

So the button is effectively cloud-only today, but it still renders and opens a chooser in the self-host build — which reads as "broken" rather than "unavailable".

Expected

Either of:

  1. A local default implementation for the self-host runtime (store the file in local asset storage, create the scan node pointing at it) — clearly the nicer fix, since MCP-created scan nodes with a URL already render fine locally, or
  2. At minimum: hide/disable the scan upload button (with a hint) when no onUploadAsset is wired, instead of silently dropping the file.

Workaround we use

Serve the GLB from a local static file server and create the scan node via the MCP apply_patch tool with that URL — works, but is invisible to normal users of the UI.

Happy to attempt a PR for option 1 if you can hint at the intended local asset-storage path for uploads.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions