Fix VibeScript publication UI starvation - #168
Merged
Merged
Conversation
Publish large VibeScript results as bounded document-thread slices, coalesce document projections and observers, and guard cooperative mutations from conflicting user actions. Preserve synchronous callers through additive adapters and cover rollback, cancellation, normal edit transactions, and the captured 307-member Assembly workload. Refs #167
10-X-eng
marked this pull request as ready for review
September 4, 2026 18:33
Owner
Author
|
Owner acceptance on the packaged Windows build passed with the captured 307-member Assembly. Observed live behavior:
This validates the real workload in addition to the unit, native GUI, full Python, packaged-runtime, and Rattler build gates documented in the PR body. |
10-X-eng
marked this pull request as draft
September 4, 2026 18:34
10-X-eng
marked this pull request as ready for review
September 4, 2026 18:54
10-X-eng
enabled auto-merge
September 4, 2026 18:54
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.
User-visible outcome
Large VibeScript publication no longer runs as one monolithic FreeCAD/Qt callback. The captured 307-member Assembly is published one member per bounded document-thread dispatch, with progress and cancellation between slices, while Tree/Timeline and VibeCAD observer work are coalesced once for the logical operation.
Closes #167
Why
The old path held the GUI thread through publication and triggered redundant whole-document projection and observer work for per-object notifications. Merely yielding inside the existing transaction was unsafe because Undo, Redo, Recompute, document close, or another command could alter the document between slices.
This change adds an explicit nested cooperative-mutation state to
App::Document, separates bulk-projection blocking from ordinary edit/history guards, and makes the publication transaction both cooperative and atomic.What changed
App::Documentcooperative-mutation state and Python bindings.Red/green development
RED cases were added before implementation for:
Observed RED for the teardown regression:
GREEN verification:
Focused cooperative/publication suite:
Full Windows build through the repository's normal Rattler/Pixi path:
Result: exit 0;
vibecad-26.3.1RC6-h3c70cbc_1.condaproduced; default environment reinstalled.Packaged runtime smoke:
The packaged Windows GUI is currently running in normal (non-safe) mode for owner acceptance testing.
Risk and mitigation
The principal risk is changing document transaction/projection behavior. The implementation uses a new explicit cooperative state only for bulk cooperative mutation; existing normal transactions and edit locks retain incremental Tree behavior. Native tests cover nesting, normal edit compatibility, close refusal, and Undo refusal/recovery. Exact live document/object validation protects every inter-slice continuation.
Deliberate non-goals
cooperative_commitadapter independently.Compatibility checklist