Files
hyperframes/packages
Vance IngallsandClaude Opus 5 3685b76a07 fix(studio): a stale project id in the URL no longer blocks editing for the tab (#4188)
The project id in the location hash is user-supplied and outlives the project
it names: rename the folder, or open a bookmark from a project that is gone,
and it points at nothing. useServerConnection trusted it unconditionally, so
every later /api/projects/<id>/... request 404'd for the life of the tab —
including the composition read that opens the SDK session. Studio then fell
back to the server path for every edit, and the resolver shadow never ran
either, so nothing recorded why.

Telemetry, 24h after the read-reason split shipped in v0.8.51: 120
`stage: read` / `http_error` 404 reads across 5 users, about 24 each, none
recovering. On this route a 404 has exactly one origin — resolveProject
returned null — since the other failure modes answer 403 and the GET does not
set mustExist.

Validates through /api/projects/:id, which calls the same
adapter.resolveProject the file routes use. Matching against the
/api/projects list instead would be wrong twice over: that list omits session
ids, which resolve fine, and skips project dirs without an index.html.

The check is tri-state on purpose. Only a definite 404 counts as missing; a
rejected request or a 5xx keeps the hash, so one network blip cannot rewrite
a valid deep link out from under the user.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-19 14:33:54 -07:00
..
2026-09-19 08:51:27 -07:00
2026-09-19 08:51:27 -07:00
2026-09-19 08:51:27 -07:00
2026-09-19 08:51:27 -07:00
2026-09-19 08:51:27 -07:00
2026-09-19 08:51:27 -07:00
2026-09-19 08:51:27 -07:00