fix(studio): surface write/reload errors, restore debounce, avoid mutex poisoning#30
Merged
Merged
Conversation
…der panics - perform_write returns Result; failures set StudioModel::write_error and the topbar shows 'Changes not saved: <reason>' (annotations too) - watcher reload errors now surface through the existing error banner instead of silently keeping stale frames - inspector property and content writes debounced (250ms, last value wins) restoring the behavior lost in the studio rework - asset handler wraps render_frame in catch_unwind (render_frame is immutable over the model, so AssertUnwindSafe is sound) and returns HTTP 500 on panic; all studio lock() sites recover from poisoning via unwrap_or_else(into_inner)
This was referenced Jul 18, 2026
LeadcodeDev
added a commit
that referenced
this pull request
Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #13.
Goal: the studio never lies — failed writes and failed reloads are visible, and a render panic cannot kill the session.
perform_writereturnsResult; on failureStudioModel::write_error(new field) is set, generation bumped, and the topbar renders "Changes not saved: " in--rm-error. Annotation submit/delete follow the same path. (save_recentsstays best-effort by design — MRU cache, not a document.)load_input; parse errors surface through the pre-existing error banner instead of leaving stale frames.WriteDebounceslot; each edit cancels the pending task and schedules a 250ms-delayed write — last value wins, content and property edits both covered.render_frameincatch_unwind(sound:render_frametakes the model immutably) and answers HTTP 500 on panic; every.lock().unwrap()in the crate replaced with poison-recoveringunwrap_or_else(|e| e.into_inner()).Verify:
cargo check -p rustmotion-studio✓ ·cargo test --workspace→ 138 passed ✓ ·cargo fmt --check✓ · clippy 0 warnings ✓