From fd12e921fd3a0e8d3689be2d5ed528e12aea87cc Mon Sep 17 00:00:00 2001 From: Developer Date: Wed, 24 Jun 2026 14:51:28 +0000 Subject: [PATCH] refactor(settings): remove dead machine path fields from frontend Slice 2 of jellyfin-service-registry. Removes the machine-level media_root/path_prefix fields from the frontend now that the backend no longer stores them. - types/index.ts: dropped media_root/path_prefix from MonitoringMachine and MonitoringMachineInput. - pages/Settings.tsx: removed the media_root form input, the read-only "Media root" detail (replaced with a local-hint field mirroring the editor), and media_root/path_prefix from emptyMachine() and both edit-handler reset mappings; updated the section description. - tests: removed media_root/path_prefix from Settings/Media/FileBrowser test fixtures. npm run build (tsc -b + vite) clean; 0 lint errors; 72 tests pass. --- frontend/src/pages/Settings.tsx | 28 ++----------------- .../src/pages/__tests__/FileBrowser.test.tsx | 2 -- frontend/src/pages/__tests__/Media.test.tsx | 2 -- .../src/pages/__tests__/Settings.test.tsx | 2 -- frontend/src/types/index.ts | 4 --- 5 files changed, 3 insertions(+), 35 deletions(-) diff --git a/frontend/src/pages/Settings.tsx b/frontend/src/pages/Settings.tsx index bd3aa93..7102764 100644 --- a/frontend/src/pages/Settings.tsx +++ b/frontend/src/pages/Settings.tsx @@ -122,8 +122,6 @@ function emptyMachine( ssh_private_key: "", ssh_private_key_passphrase: "", password: "", - media_root: "", - path_prefix: "", notes: "", }; } @@ -373,22 +371,9 @@ function MachineEditor({
-
- - - setDraft((current) => ({ - ...current, - media_root: e.target.value, - })) - } - /> - -
{isLocal && (
@@ -1031,12 +1016,10 @@ export function Settings() { username: machine.username, key_directory: "", key_name: "", - path_prefix: "", ssh_key_id: machine.ssh_key_id, ssh_private_key: "", ssh_private_key_passphrase: "", password: "", - media_root: machine.media_root, notes: machine.notes, }, machine, @@ -1093,11 +1076,8 @@ export function Settings() { ) : ( - - + + )}
@@ -1117,12 +1097,10 @@ export function Settings() { username: selectedMachine.username, key_directory: "", key_name: "", - path_prefix: "", ssh_key_id: selectedMachine.ssh_key_id, ssh_private_key: "", ssh_private_key_passphrase: "", password: "", - media_root: selectedMachine.media_root, notes: selectedMachine.notes, }, selectedMachine, diff --git a/frontend/src/pages/__tests__/FileBrowser.test.tsx b/frontend/src/pages/__tests__/FileBrowser.test.tsx index 98ee6f2..64c66dd 100644 --- a/frontend/src/pages/__tests__/FileBrowser.test.tsx +++ b/frontend/src/pages/__tests__/FileBrowser.test.tsx @@ -28,8 +28,6 @@ function machineFixture( ssh_private_key_set: false, ssh_private_key_passphrase_set: false, password_set: false, - media_root: "", - path_prefix: "", notes: "", ...overrides, }; diff --git a/frontend/src/pages/__tests__/Media.test.tsx b/frontend/src/pages/__tests__/Media.test.tsx index af0889a..47ff5e1 100644 --- a/frontend/src/pages/__tests__/Media.test.tsx +++ b/frontend/src/pages/__tests__/Media.test.tsx @@ -32,8 +32,6 @@ function machineFixture( ssh_private_key_set: false, ssh_private_key_passphrase_set: false, password_set: false, - media_root: "", - path_prefix: "", notes: "", ...overrides, }; diff --git a/frontend/src/pages/__tests__/Settings.test.tsx b/frontend/src/pages/__tests__/Settings.test.tsx index 6fb4e23..debb550 100644 --- a/frontend/src/pages/__tests__/Settings.test.tsx +++ b/frontend/src/pages/__tests__/Settings.test.tsx @@ -51,8 +51,6 @@ function localMachine( ssh_private_key_set: false, ssh_private_key_passphrase_set: false, password_set: false, - media_root: "/mnt/media", - path_prefix: "", notes: "Primary node", ...overrides, } as MonitoringMachine; diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts index 781f1d6..c8cce83 100644 --- a/frontend/src/types/index.ts +++ b/frontend/src/types/index.ts @@ -170,8 +170,6 @@ export interface MonitoringMachine { ssh_private_key_set: boolean; ssh_private_key_passphrase_set: boolean; password_set: boolean; - media_root: string; - path_prefix: string; notes: string; } @@ -190,8 +188,6 @@ export interface MonitoringMachineInput { ssh_private_key: string; ssh_private_key_passphrase: string; password: string; - media_root: string; - path_prefix: string; notes: string; }