Files
Claw3D/src/lib/studio
b5ac25a3bf fix(gateway): coerce profile url/token to strings to prevent office crash (#126)
* fix(gateway): coerce profile url/token to strings to prevent office crash

The security hardening that stripped upstream tokens from the public
settings API left a typing lie behind: StudioGatewayProfile.token is
declared `string`, but at runtime the resolver propagated `undefined`
from the sanitized response into selectedProfile.token. That made
useState's `token` undefined and crashed the office on
`token.trim()` inside useGatewayConnection.

Coerce url/token to "" at the resolver boundary so the type contract
holds at runtime, and add ?? "" guards on the consumer .trim() calls
so a malformed profile can never crash the office again.

Also resync package-lock.json (was still pinned at 0.1.0 with the
removed @vercel/otel entry) so the lockfile matches package.json at
0.1.4.

Made-with: Cursor

* Make building directory collapsible

---------

Co-authored-by: iamlukethedev <lucas.guilherme@smartwayslfl.com>
Co-authored-by: iamlukethedev <iamlukethedev@users.noreply.github.com>
2026-04-23 18:47:21 -05:00
..