Repository navigation
Replies: 4 comments
|
The crash is in the form builder, not the RPC layer.
Why the window never appears: the welcome backend calls Fix shape, smallest first:
To confirm on your side: disable the plugin and check the welcome screen comes up, then re-enable it with What I did: read-only source inspection at master |
|
Confirmed on Root cause matches PerryLink's analysis. Reproduced deterministically without the desktop shell: import { volatileForm } from 'packages/settings/settings/src/schema.ts'
const config = {
'~standard': { version: 1, vendor: 'example', validate: (v: unknown) => ({ value: v }) },
toJSON() { return { type: 'object', properties: {} } },
}
volatileForm(config as never) // TypeError: Cannot read properties of undefined (reading 'volatile')
One correction for anyone fixing this: Proposed minimal fix (tested locally on a branch):
Verification: settings package tests 48/48, affected suites 855/855, Patch: branch |
|
The discriminator point is right, and the code is unchanged. I re-checked it at the current master On the fix: agreed that
One thing your repro adds that the report did not: the failure is reproducible without the desktop shell, which makes it a unit test candidate for Read-only source inspection at |
|
Thanks — both points folded in. 1. Form-builder tolerance. 2. Duck type and builder agree. The discriminator stays at the Config boundary ( Rebased onto
Branch: https://github.com/aturzone/deepseek-harness/tree/fix/dsh-bug-triage |
Uh oh!
There was an error while loading. Please reload this page.
Environment
Summary
A plugin whose
Configimplements Standard Schema validation and exposestoJSON(), but is not a Schemastery schema, can makesettings/describefail. In the desktop app this becomes a fataldesktop welcome: Web RPC failed, preventing startup.Minimal shape
Actual result
After the plugin is loaded,
settings/describereturns:{ "ok": false, "error": { "code": "gateway/internal", "message": "Cannot read properties of undefined (reading 'volatile')" } }The desktop welcome then fails with
Web RPC failed.Cause
Settings.schema(entry)accepts anyConfigwithtoJSON().Settings.describe()passes it tovolatileForm(schema), which assumes Schemastery internals (schema.meta.volatile,schema.type,schema.dict). For a valid Standard Schema config,schema.metamay be absent, so enumeration throws before the settings RPC can respond.Expected
A config schema that the host accepts for plugin configuration should not make settings enumeration crash. Please either validate that the object is a supported Schemastery schema before calling
volatileForm, skip unsupported schemas safely, or adapt the supported Standard Schema/JSON Schema representation.I reproduced this with a linked local plugin using a hand-written Standard Schema config (no Schemastery dependency). Adding Schemastery-shaped markers locally avoids the crash, but the host-side settings service should handle unsupported/non-Schemastery schemas defensively.
All reactions