Enhance script handling and UI consistency

- Added support for encoding the RunContext property in the Script class to determine file suffixes (.server.luau, .client.luau, .plugin.luau, .legacy.luau).
- Updated the Confirming.lua file to improve UI consistency in the confirmation message display.
- Modified snapshot middleware and syncback logic to accommodate new file extensions and ensure proper handling of plugin scripts.
- Refactored tests to align with the new naming conventions for script suffixes and improved path uniqueness checks.
This commit is contained in:
Joe 2026-01-30 10:31:36 -06:00
parent 38cbc582f4
commit 18a74c8e4d
7 changed files with 95 additions and 87 deletions

View file

@ -161,6 +161,18 @@ encodeInstance = function(instance, parentId, _skipPathCheck)
Log.warn("Could not find Source property descriptor for {:?}", instance)
return nil
end
-- For Script class specifically, also encode RunContext property
-- This determines the file suffix (.server.luau, .client.luau, .plugin.luau, .legacy.luau)
if instance.ClassName == "Script" then
local runContextDescriptor = RbxDom.findCanonicalPropertyDescriptor("Script", "RunContext")
if runContextDescriptor then
local encodeSuccess, encodeResult = encodeProperty(instance, "RunContext", runContextDescriptor)
if encodeSuccess and encodeResult ~= nil then
properties.RunContext = encodeResult
end
end
end
elseif not DIRECTORY_CLASSES[instance.ClassName] then
-- For non-directory, non-script classes, encode all relevant properties
local classDescriptor = RbxDom.findClassDescriptor(instance.ClassName)