Enhance scripts-only mode handling and improve temp ID resolution

- Introduced a new mechanism in ServeSession to manage scripts-only mode, ensuring proper handling of temporary IDs during script additions.
- Updated the applyPatch function to remap only scripts-only temp IDs, preventing false positives with legitimate additions.
- Modified the API to resolve intermediate container temp IDs to real tree references, enhancing the integrity of parent-child relationships for new scripts.
- Added tests to verify the functionality of scripts-only mode and the resolution of temp IDs.

These changes aim to optimize script management and improve the overall functionality of the session handling.
This commit is contained in:
Joe 2026-02-28 07:23:49 -06:00
parent dcd48642be
commit 57433a0158
26 changed files with 274 additions and 63 deletions

View file

@ -355,3 +355,6 @@ there is some process that is making disconnecting after a one-shot sync complet
[init scripts]
scripts actually named init or probably even Init cause the sync engine to completely break. it will syncback, but then i cannot even serve the project.
this needs to be slugified when the name exactly matches init, ignoring case [for anything, not just scripts!]
[one shot mode change]
new changes that come in / out during the review menu on the plugin is really disorienting.