From f07d58853407955bb356b2c1614a6ec2caf8f509 Mon Sep 17 00:00:00 2001 From: dirwin31 <83434411+dirwin31@users.noreply.github.com> Date: Thu, 27 Aug 2026 17:44:39 -0700 Subject: [PATCH] Searching is hard --- .../components/recordings/dashcam_routes.js | 10 +++- .../recordings/dashcam_routes_helpers.js | 46 ++++++++++++++----- .../tests/test_dashcam_routes_helpers.py | 24 +++++++++- 3 files changed, 66 insertions(+), 14 deletions(-) diff --git a/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.js b/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.js index b89ae66c7..142dd616a 100644 --- a/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.js +++ b/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.js @@ -110,6 +110,14 @@ function refresh() { return fetchRoutes() } +function changeSortOrder(event) { + const sortOrder = String(event.target.value || "") + if (!["newest", "oldest", "longest", "shortest"].includes(sortOrder)) return + state.sortOrder = sortOrder + // Replacing the array forces the keyed route templates to move immediately. + state.routes = [...state.routes] +} + if (!isGalaxyTunnel()) refresh() function openDialog(htmlString) { @@ -825,7 +833,7 @@ export function RouteRecordings() {