Fix code-review correctness and lifecycle issues - #3
Merged
Conversation
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.
Summary
Why
The review found several ways malformed or delayed inputs could cross internal namespace boundaries, diverge between main and worker execution, mutate queued engine commits, leak asynchronous sources, create lossy artifacts, or leave UI state stale and inaccessible. The fixes validate at admission boundaries, preserve primary failures during cleanup, and make asynchronous/UI ownership explicit.
Impact
Invalid input is now rejected consistently before it can corrupt scene state or serialized artifacts. Deferred engine work owns its buffers, async sources close reliably, generated types match runtime identity rules, and keyboard/pointer interactions follow the same host callback contracts as their primary paths.
Validation
pnpm checkpnpm run buildpnpm run demo:buildincluding workspace worker-asset smokepnpm run smokeincluding published-package import/type/tree-shaking and self-contained worker checkspnpm --filter orbit-demo e2e: 45 passed, 1 intentionally skippedgit diff --checkGreptile Summary
The PR applies broad correctness and lifecycle fixes across graph admission, worker packaging, deferred engine commits, data preparation, Omnigraph parsing, and React interactions.
Confidence Score: 5/5
The PR appears safe to merge, with no concrete changed-code-triggered defect remaining after review.
The changed validation, ownership, cleanup, worker packaging, parser, and interaction paths preserve their documented contracts under the reachable callers and states examined.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR A[External graph and tabular inputs] --> B[Admission and structural validation] B --> C[Prepared or accepted graph] C --> D[Main or worker execution] D --> E[Engine commit queue] E --> F[Rendered graph] G[Async mode and source lifecycle] --> B H[React pointer and keyboard interactions] --> F I[View state and Omnigraph schema] --> CReviews (1): Last reviewed commit: "fix reviewed correctness and lifecycle i..." | Re-trigger Greptile