From bbbb4d1cf685808d4fb78bdf6f9d6a259f7cb219 Mon Sep 17 00:00:00 2001
From: firestar5683 <168790843+firestar5683@users.noreply.github.com>
Date: Mon, 17 Aug 2026 22:34:58 -0500
Subject: [PATCH] teeny slider
---
.../assets/components/tools/sentry.css | 21 +++++++++++++---
.../assets/components/tools/sentry.js | 25 ++++++++++++++++---
starpilot/system/the_galaxy/the_galaxy.py | 7 +++---
3 files changed, 42 insertions(+), 11 deletions(-)
diff --git a/starpilot/system/the_galaxy/assets/components/tools/sentry.css b/starpilot/system/the_galaxy/assets/components/tools/sentry.css
index f7d2144e2..d56519dfe 100644
--- a/starpilot/system/the_galaxy/assets/components/tools/sentry.css
+++ b/starpilot/system/the_galaxy/assets/components/tools/sentry.css
@@ -104,11 +104,24 @@
cursor: not-allowed;
}
-.sentry-range-value {
+.sentry-number-input {
+ background: var(--sidebar-bg);
+ border: var(--border-style-main);
+ border-radius: var(--border-radius-sm);
+ box-sizing: border-box;
color: var(--text-color);
- font-variant-numeric: tabular-nums;
- min-width: 3.5rem;
- text-align: right;
+ padding: 0.55rem 0.45rem;
+ width: 5.5rem;
+}
+
+.sentry-number-input:focus {
+ border-color: var(--main-fg);
+ outline: none;
+}
+
+.sentry-range-unit {
+ color: var(--text-muted);
+ white-space: nowrap;
}
.sentry-toggle {
diff --git a/starpilot/system/the_galaxy/assets/components/tools/sentry.js b/starpilot/system/the_galaxy/assets/components/tools/sentry.js
index 8bc5a18f4..ce203df36 100644
--- a/starpilot/system/the_galaxy/assets/components/tools/sentry.js
+++ b/starpilot/system/the_galaxy/assets/components/tools/sentry.js
@@ -282,12 +282,21 @@ export function SentryMode() {
type="range"
min="0.005"
max="1"
- step="0.005"
+ step="0.001"
value="${() => numericParam("SentryModeSensitivity", 0.04)}"
disabled="${() => state.savingKey === "SentryModeSensitivity"}"
aria-label="Motion sensitivity"
@change="${(event) => saveParam("SentryModeSensitivity", Number(event.currentTarget.value))}" />
-
+ saveParam("SentryModeSensitivity", Number(event.currentTarget.value))}" />
@@ -304,7 +313,17 @@ export function SentryMode() {
disabled="${() => state.savingKey === "SentryModeWarningTime"}"
aria-label="Warning persistence"
@change="${(event) => saveParam("SentryModeWarningTime", Number(event.currentTarget.value))}" />
-
+ saveParam("SentryModeWarningTime", Number(event.currentTarget.value))}" />
+ seconds
diff --git a/starpilot/system/the_galaxy/the_galaxy.py b/starpilot/system/the_galaxy/the_galaxy.py
index 12c1bba3e..b1b5619b0 100644
--- a/starpilot/system/the_galaxy/the_galaxy.py
+++ b/starpilot/system/the_galaxy/the_galaxy.py
@@ -117,8 +117,8 @@ PULSE_GLIDE_BUTTON_KEYS = {
"StarButtonControl", "LongStarButtonControl", "VeryLongStarButtonControl",
}
SENTRY_NUMERIC_PARAM_BOUNDS = {
- "SentryModeSensitivity": (0.005, 1.0, 0.005),
- "SentryModeWarningTime": (0.1, 10.0, 0.1),
+ "SentryModeSensitivity": (0.005, 1.0),
+ "SentryModeWarningTime": (0.1, 10.0),
}
GALAXY_DEPS_PATH = "/data/galaxy_deps"
@@ -4913,14 +4913,13 @@ def setup(app):
return jsonify({"error": "Pulse and Glide is available only with Galaxy Developer Mode enabled."}), 403
if key in SENTRY_NUMERIC_PARAM_BOUNDS:
- minimum, maximum, step = SENTRY_NUMERIC_PARAM_BOUNDS[key]
+ minimum, maximum = SENTRY_NUMERIC_PARAM_BOUNDS[key]
try:
numeric = float(data["value"])
except (TypeError, ValueError):
return jsonify({"error": f"{key} must be numeric."}), 400
if not math.isfinite(numeric) or numeric < minimum or numeric > maximum:
return jsonify({"error": f"{key} must be between {minimum} and {maximum}."}), 400
- numeric = round(round(numeric / step) * step, 3)
str_val = str(numeric)
if key == "AlphaLongitudinalEnabled":