Repository navigation
obs-websocket: Save the scene collection after changes - #812
Conversation
|
@vpacher @rdoupe: how the pieces fit. #812 (save the scene collection, issue #811) and #813 (Parallel batch results out of order) are two separate bugs in obs-websocket, not duplicates. They touch different code (#812 the request handlers that change state, #813 RequestBatchHandler.cpp), so neither supersedes the other and they should stay separate PRs. #812 is waiting on its fork half, obs-rust/obs-websocket#12, which is still open and has not merged. Next step for #812: get #12 reviewed and merged, then move the plugins/obs-websocket pointer here to that merge commit (forward only, onto a commit that is on obs-websocket master) and mark this PR ready for the GREEN run. Note that obs-websocket master has moved: #13 merged just now (2542c6a), so please rebase #12 and check the pointer is based on current master before bumping. For rdoupe's #813: obs-rust/obs-websocket#13 is merged as 2542c6a. The obs-studio PR with the RED test and the submodule bump to 2542c6a can go up now. If both land, the second one to merge will need to take the pointer from current master and keep the other's commit in its history. No change to this PR's content is needed from the #13 merge. |
|
@zackees thanks for sorting out #812 vs #813. Done: obs-rust/obs-websocket#12 is rebased onto current master (2542c6a, #13). No conflicts, and the commit itself is unchanged ( The Code Quality run on #12 is still waiting for workflow approval (first contribution to obs-websocket). Once #12 has merged, I'll move the |
|
@vpacher obs-rust/obs-websocket#12 is reviewed and squash-merged. obs-websocket master is now What to do on this PR:
The RED part is in place (a8dcfd4, test_ws_save_changes). Merging waits for the GREEN commit and a full green CI Gate. I am not merging it while it is a draft. |
test_ws_save_changes compiles the plugin request handlers from the submodule against real libobs and the frontend API library. It sends requests through RequestHandler::ProcessRequest and counts the tasks queued for the UI thread, where the save runs. RED for obs-rust#811: a successful SetInputVolume queues 0 tasks; 1 (the save) is expected. GetInputVolume and a failed SetInputVolume queue none and pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move plugins/obs-websocket to f06b040 (obs-rust/obs-websocket#12): after a successful request that changes the scene collection (SetInputVolume, SetInputSettings, SetSceneItemTransform, ...), the request handler queues obs_frontend_save() for the UI thread without waiting. Before, these changes stayed in memory until a clean exit, and a crash or a hard stop lost them. Scene switches are not saved, as in the UI. GREEN for obs-rust#811 (RED f8974ca: a successful SetInputVolume queued 0 UI tasks). With the same fix commit (82cf737, identical to the merged change) test_ws_save_changes passed 3 of 3 locally on Debian 13; the PR CI runs it on this commit. Fixes obs-rust#811. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
a8dcfd4 to
c9663a7
Compare
|
@zackees done, following your steps:
Verified locally on this exact branch (Debian 13, Qt 6.8.2,
Marking it ready now. I can't add labels, so could you please add |
Fixes #811
What and why
obs-websocket requests that change the scene collection (
SetInputVolume,SetInputSettings,SetSceneItemTransform, ...) did not save it. A crash or a hard stop lost every websocket change since the last save. A change in the OBS UI saves at once.The fix is in the fork: obs-rust/obs-websocket#12. This PR adds the test and, once #12 has merged, moves the submodule pointer. Draft until then.
RED → GREEN
test_ws_save_changescompiles the plugin's request handlers (RequestHandler.cpp, RequestHandler_*.cpp, rpc, utils) from the submodule against real libobs and the frontend API library. It registers a dummy input, sets a counting UI task handler and sends requests throughRequestHandler::ProcessRequest(runs under xvfb-run; skips without a display). 1 of 3 fails: a successfulSetInputVolumequeues 0 UI tasks, 1 (the save) expected. Guards pass:GetInputVolumeand a failedSetInputVolumequeue none.Seam: the plugin's globals from obs-websocket.cpp (config, event handler, server, vendor API) and
obs_current_module()are stubbed in the test; the requests it sends do not call them. Without a frontend,obs_frontend_save()does nothing, so the test counts the queued UI task instead.Checklist
master(or the description starts with a Stacked: note)-W..., ratchets): noneNotes:
./lintand the local gate were not run.🤖 Generated with Claude Code