From ff375071c0fe54ee314a379e3b668de5b11c7900 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 23:03:46 +0000 Subject: [PATCH] Fix seed widget displaying actual seed instead of -1 The issue was that serializeValue() was updating the widget's display value to the actual generated seed, causing the UI to show the seed number instead of -1. Now the widget value only updates when the user manually sets a specific seed, keeping -1 visible in the UI for random seeds. Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com> --- js/seedcontrol.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/js/seedcontrol.js b/js/seedcontrol.js index 350d4e6..314173e 100644 --- a/js/seedcontrol.js +++ b/js/seedcontrol.js @@ -117,7 +117,10 @@ class SeedControl { this.updateButtonLabel(); } - this.seedWidget.value = this.serializedCtx.seedUsed; + // Don't update the widget value to maintain -1 in the UI when seed was special + if (!this.serializedCtx.wasSpecial) { + this.seedWidget.value = this.serializedCtx.seedUsed; + } if (this.serializedCtx.wasSpecial) { this.lastSeed = this.serializedCtx.seedUsed; @@ -133,12 +136,8 @@ class SeedControl { return; // Exit the function immediately } - if (this.serializedCtx.wasSpecial) { - this.seedWidget.value = -1; - } - - // Check if seed has changed to a non -1 value, and if so, update lastSeed - if (this.seedWidget.value !== -1) { + // Update lastSeed if user manually changed the seed to a specific value + if (!this.serializedCtx.wasSpecial && this.seedWidget.value !== -1) { this.lastSeed = this.seedWidget.value; }