Add "Every Change" confirmation option, leave "Always" unchanged

This commit is contained in:
warsam 2026-02-13 16:00:32 -08:00
parent b25edeb04d
commit 9b195a64a0
5 changed files with 40 additions and 33 deletions

View file

@ -32,7 +32,7 @@ Making a new release? Simply add the new header with the version and date undern
## Unreleased ## Unreleased
* `inf` and `nan` values in properties are now synced ([#1176]) * `inf` and `nan` values in properties are now synced ([#1176])
* Fixed the "Always" confirmation behavior setting to prompt for confirmation on every sync patch, not just the initial sync (which is handled by "Initial", the default confirmation behavior setting). Changes that arrive during confirmation are merged into the pending patch and the UI updates in real-time. ([#1216]) * Added an "Every Change" confirmation behavior option that prompts for confirmation on every sync patch (not just the initial sync). Changes that arrive during confirmation are merged into the pending patch and the UI updates in real-time. ([#1216])
* Fixed a bug caused by having reference properties (such as `ObjectValue.Value`) that point to an Instance not included in syncback. ([#1179]) * Fixed a bug caused by having reference properties (such as `ObjectValue.Value`) that point to an Instance not included in syncback. ([#1179])
* Fixed instance replacement fallback failing when too many instances needed to be replaced. ([#1192]) * Fixed instance replacement fallback failing when too many instances needed to be replaced. ([#1192])
* Added actors and bindable/remote event/function variants to be synced back as JSON files. ([#1199]) * Added actors and bindable/remote event/function variants to be synced back as JSON files. ([#1199])

View file

@ -26,7 +26,7 @@ local function invertTbl(tbl)
end end
local invertedLevels = invertTbl(Log.Level) local invertedLevels = invertTbl(Log.Level)
local confirmationBehaviors = { "Initial", "Always", "Large Changes", "Unlisted PlaceId", "Never" } local confirmationBehaviors = { "Initial", "Always", "Every Change", "Large Changes", "Unlisted PlaceId", "Never" }
local syncReminderModes = { "None", "Notify", "Fullscreen" } local syncReminderModes = { "None", "Notify", "Fullscreen" }
local function Navbar(props) local function Navbar(props)

View file

@ -751,7 +751,6 @@ function App:startSession()
end end
local confirmationBehavior = Settings:get("confirmationBehavior") local confirmationBehavior = Settings:get("confirmationBehavior")
if confirmationBehavior ~= "Always" then
if confirmationBehavior == "Initial" then if confirmationBehavior == "Initial" then
-- Only confirm if we haven't synced this project yet this session -- Only confirm if we haven't synced this project yet this session
if self.knownProjects[serverInfo.projectName] then if self.knownProjects[serverInfo.projectName] then
@ -783,7 +782,6 @@ function App:startSession()
Log.trace("Accepting patch without confirmation because behavior is set to Never") Log.trace("Accepting patch without confirmation because behavior is set to Never")
return "Accept" return "Accept"
end end
end
-- The datamodel name gets overwritten by Studio, making confirmation of it intrusive -- The datamodel name gets overwritten by Studio, making confirmation of it intrusive
-- and unnecessary. This special case allows it to be accepted without confirmation. -- and unnecessary. This special case allows it to be accepted without confirmation.

View file

@ -203,6 +203,15 @@ function ServeSession:__onWebSocketMessage(messagesPacket)
Log.debug("Received {} messages from Rojo server", #messagesPacket.messages) Log.debug("Received {} messages from Rojo server", #messagesPacket.messages)
-- If not "Every Change", apply patches directly without confirmation
if Settings:get("confirmationBehavior") ~= "Every Change" then
for _, message in messagesPacket.messages do
self:__applyPatch(message)
end
self.__apiContext:setMessageCursor(messagesPacket.messageCursor)
return
end
-- Combine all messages into a single patch -- Combine all messages into a single patch
local combinedPatch = PatchSet.newEmpty() local combinedPatch = PatchSet.newEmpty()
for _, message in messagesPacket.messages do for _, message in messagesPacket.messages do

View file

@ -20,7 +20,7 @@ local defaultSettings = {
checkForUpdates = true, checkForUpdates = true,
checkForPrereleases = false, checkForPrereleases = false,
autoConnectPlaytestServer = false, autoConnectPlaytestServer = false,
confirmationBehavior = "Initial" :: "Never" | "Initial" | "Always" | "Large Changes" | "Unlisted PlaceId", confirmationBehavior = "Initial" :: "Never" | "Initial" | "Always" | "Every Change" | "Large Changes" | "Unlisted PlaceId",
largeChangesConfirmationThreshold = 5, largeChangesConfirmationThreshold = 5,
playSounds = true, playSounds = true,
typecheckingEnabled = false, typecheckingEnabled = false,