Repository navigation
Daemon 1.7.0 & Plugin v45 - #55
Conversation
fix: remove instances moved to excluded parents
fix: rename GUID-suffixed scripts when name conflicts are resolved
(e.g. WeldConstraint Part0/Part1)
the type checker can't figure out that isScript is narrowing down the instance's type, so we need to cast it manually
📝 WalkthroughWalkthroughThe release updates terrain protection, serializer property handling, centralized logging, SyncSession batching and lifecycle control, UI configuration refresh, plugin sourcemap metadata, and deleted-script sibling recovery. ChangesSynchronization and recovery
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant RobloxEvents
participant SyncSession
participant WebSocket
participant HandshakeSignal
participant RobloxListeners
RobloxEvents->>SyncSession: report instance or script change
SyncSession->>SyncSession: validate inclusion and queue update
SyncSession->>WebSocket: flush batched update
WebSocket->>SyncSession: acknowledge handshake
SyncSession->>HandshakeSignal: fire handshake event
SyncSession->>RobloxListeners: attach listeners after connection
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Serializer.luau (1)
870-890: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winDebug-only computations run unconditionally on a hot path.
instance:GetFullName()(line 870) andHttpService:JSONEncode(properties)(line 889) are evaluated via string interpolation beforedebugPrinteven checksSILENT_MODE/DEBUG_MODE— Luau evaluates call arguments eagerly. SincecollectSerializedPropertiesruns once per instance during full snapshots withincludeProperties(e.g.azul pack), this adds aJSONEncodecall and a full-name walk per instance even when debug logging is disabled.⚡ Suggested fix: gate the expensive formatting behind the debug flag
function Serializer.collectSerializedProperties(...) - debugPrint(`Collecting serialized properties for instance: {instance:GetFullName()} of class: {instance.ClassName}`) + if not (Config.SILENT_MODE or not Config.DEBUG_MODE) then + debugPrint(`Collecting serialized properties for instance: {instance:GetFullName()} of class: {instance.ClassName}`) + end ... - debugPrint(`Collected serialized properties for instance: {instance}: {HttpService:JSONEncode(properties)}`) + if not (Config.SILENT_MODE or not Config.DEBUG_MODE) then + debugPrint(`Collected serialized properties for instance: {instance}: {HttpService:JSONEncode(properties)}`) + end🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Serializer.luau` around lines 870 - 890, Gate the debug-only formatting in collectSerializedProperties behind the existing debug flag before constructing either message: avoid calling instance:GetFullName() for the collection-start log and HttpService:JSONEncode(properties) for the completion log unless debug output is enabled. Preserve both debug messages and serialization behavior when debugging is active.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Serializer.luau`:
- Around line 763-774: Update the `hasScriptPermits` check in the property
filtering logic to require writable script access via `reflected.Permits.Write`
or `reflected.Permits.WriteParallel`, rather than treating any non-empty
`Permits` table as sufficient. Preserve the existing global/fallback
serialization checks and continue allowing writable properties such as
`WeldConstraint.Part0` and `Part1`.
In `@plugin/sync/ReplicatedFirst/AzulCompanionPlugin/SyncSession.luau`:
- Around line 420-458: Make attachListeners idempotent by tracking instances
whose listeners have already been attached and returning early for tracked
instances; mark each instance before creating connections. Ensure all callers,
including setupListeners, onInstanceAdded, and snapshot apply loops, reuse this
guard so each instance receives only one set of Name, Parent, and Source
connections.
In `@src/index.ts`:
- Around line 318-341: Update the sameNameScriptNodes handling to iterate over
every remaining sibling instead of selecting only sameNameScriptNodes.at(-1).
For each script, retain the existing write and watcher-suppression flow, rename
oldFilePaths to reflect that scriptToRename.path contains virtual path segments,
and pass undefined as the oldPath argument to sourcemapGenerator.upsertSubtree,
matching handleScriptChanged.
---
Nitpick comments:
In `@plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Serializer.luau`:
- Around line 870-890: Gate the debug-only formatting in
collectSerializedProperties behind the existing debug flag before constructing
either message: avoid calling instance:GetFullName() for the collection-start
log and HttpService:JSONEncode(properties) for the completion log unless debug
output is enabled. Preserve both debug messages and serialization behavior when
debugging is active.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 36dd18fa-032d-40d3-90d7-2446e669262c
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
package.jsonplugin/sync/ReplicatedFirst/AzulCompanionPlugin/AzulService.luauplugin/sync/ReplicatedFirst/AzulCompanionPlugin/Serializer.luauplugin/sync/ReplicatedFirst/AzulCompanionPlugin/SyncSession.luausrc/index.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Logger.luau`:
- Around line 6-20: Update Logger.info’s vararg processing to use select("#",
...) for the argument count instead of `#args`, ensuring every positional argument
after nil is converted and included in the finalString output.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 0776f683-8a82-4d1b-b9cf-a200aa16d6e4
📒 Files selected for processing (7)
plugin/sourcemap.jsonplugin/sync/ReplicatedFirst/AzulCompanionPlugin/App/UI.luauplugin/sync/ReplicatedFirst/AzulCompanionPlugin/AzulService.luauplugin/sync/ReplicatedFirst/AzulCompanionPlugin/Logger.luauplugin/sync/ReplicatedFirst/AzulCompanionPlugin/Serializer.luauplugin/sync/ReplicatedFirst/AzulCompanionPlugin/SyncSession.luauplugin/sync/ReplicatedFirst/AzulCompanionPlugin/UI.luau
💤 Files with no reviewable changes (1)
- plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Serializer.luau
🚧 Files skipped from review as they are similar to previous changes (2)
- plugin/sync/ReplicatedFirst/AzulCompanionPlugin/AzulService.luau
- plugin/sync/ReplicatedFirst/AzulCompanionPlugin/SyncSession.luau
Daemon
Plugin
Serialized = false(fixes pack does not save WeldConstraint Part0 and Part1 #54)SerializationServicemarks thePart0&Part1ofWeldConstraints asSerialized = false, preventingazul packfrom serializing it properly. This fix takes a preventive approach and opts to serialize every property that is script-accessible.--destructivebuilds: SkipTerraininstance instead of attempting toDestroy. (closesazul build --destructiveresult in[Azul]: Cannot destroy 'Terrain': Cannot Destroy() Terrain#53)prints withLogService:Info(blue output)