refactor(daemon): remove unused picker and palette declarations
- commit
- 1d751fd6538548186a4a33256e26418043b56bb8
- author
- brice · · 2026-09-23 18:08 UTC
- parent
- 324a4a6
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
5 files · +4 -36
M internal/app/spawn_test.go +0 -5
| @@ -14,8 +14,6 @@ import ( | |||
| 14 | 14 | "time" | |
| 15 | 15 | ) | |
| 16 | 16 | ||
| 17 | - | var errDialFailed = errors.New("dial failed") | |
| 18 | - | ||
| 19 | 17 | const ( | |
| 20 | 18 | spawnTestChildFileEnv = "VEV_SPAWN_TEST_CHILD_FILE" | |
| 21 | 19 | spawnTestLauncherFileEnv = "VEV_SPAWN_TEST_LAUNCHER_FILE" | |
| @@ -242,9 +240,6 @@ func terminateProcessFromFile(path string) error { | |||
| 242 | 240 | return waitForProcessExit(pid, 2*time.Second) | |
| 243 | 241 | } | |
| 244 | 242 | ||
| 245 | - | // fastBackoff keeps the retry loop snappy for tests. | |
| 246 | - | var fastBackoff = backoffConfig{initial: time.Millisecond, max: 5 * time.Millisecond, total: 100 * time.Millisecond} | |
| 247 | - | ||
| 248 | 243 | func TestAcquireSpawnLockSingleWinnerUnderRace(t *testing.T) { | |
| 249 | 244 | dir := filepath.Join(t.TempDir(), "vev") | |
| 250 | 245 | const racers = 16 | |
| @@ -14,8 +14,6 @@ import ( | |||||
| 14 | "time" | 14 | "time" | ||
| 15 | ) | 15 | ) | ||
| 16 | 16 | ||||
| 17 | - | var errDialFailed = errors.New("dial failed") | |||
| 18 | - | ||||
| 19 | const ( | 17 | const ( | ||
| 20 | spawnTestChildFileEnv = "VEV_SPAWN_TEST_CHILD_FILE" | 18 | spawnTestChildFileEnv = "VEV_SPAWN_TEST_CHILD_FILE" | ||
| 21 | spawnTestLauncherFileEnv = "VEV_SPAWN_TEST_LAUNCHER_FILE" | 19 | spawnTestLauncherFileEnv = "VEV_SPAWN_TEST_LAUNCHER_FILE" | ||
| @@ -242,9 +240,6 @@ func terminateProcessFromFile(path string) error { | |||||
| 242 | return waitForProcessExit(pid, 2*time.Second) | 240 | return waitForProcessExit(pid, 2*time.Second) | ||
| 243 | } | 241 | } | ||
| 244 | 242 | ||||
| 245 | - | // fastBackoff keeps the retry loop snappy for tests. | |||
| 246 | - | var fastBackoff = backoffConfig{initial: time.Millisecond, max: 5 * time.Millisecond, total: 100 * time.Millisecond} | |||
| 247 | - | ||||
| 248 | func TestAcquireSpawnLockSingleWinnerUnderRace(t *testing.T) { | 243 | func TestAcquireSpawnLockSingleWinnerUnderRace(t *testing.T) { | ||
| 249 | dir := filepath.Join(t.TempDir(), "vev") | 244 | dir := filepath.Join(t.TempDir(), "vev") | ||
| 250 | const racers = 16 | 245 | const racers = 16 | ||
M internal/usecase/client/supervisor_attach_test.go +0 -1
| @@ -380,7 +380,6 @@ type attachTestHarness struct { | |||
| 380 | 380 | clock *supervisorTestClock | |
| 381 | 381 | terminal *attachTestTerminal | |
| 382 | 382 | reader *attachTestReader | |
| 383 | - | picker *attachTestPicker | |
| 384 | 383 | cancel context.CancelFunc | |
| 385 | 384 | runDone chan struct{} | |
| 386 | 385 | ||
| @@ -380,7 +380,6 @@ type attachTestHarness struct { | |||||
| 380 | clock *supervisorTestClock | 380 | clock *supervisorTestClock | ||
| 381 | terminal *attachTestTerminal | 381 | terminal *attachTestTerminal | ||
| 382 | reader *attachTestReader | 382 | reader *attachTestReader | ||
| 383 | - | picker *attachTestPicker | |||
| 384 | cancel context.CancelFunc | 383 | cancel context.CancelFunc | ||
| 385 | runDone chan struct{} | 384 | runDone chan struct{} | ||
| 386 | 385 | ||||
M internal/usecase/daemon/palette.go +0 -6
| @@ -67,12 +67,6 @@ type paletteSessionIdentity struct { | |||
| 67 | 67 | lifecycle domain.SessionLifecycleID | |
| 68 | 68 | } | |
| 69 | 69 | ||
| 70 | - | type remotePalettePresentationIdentity struct { | |
| 71 | - | origin string | |
| 72 | - | name string | |
| 73 | - | lifecycle domain.SessionLifecycleID | |
| 74 | - | } | |
| 75 | - | ||
| 76 | 70 | func localPaletteSessionIdentity(lifecycle domain.SessionLifecycleID) paletteSessionIdentity { | |
| 77 | 71 | return paletteSessionIdentity{kind: protocol.RouteKindLocal, endpoint: "local", lifecycle: lifecycle} | |
| 78 | 72 | } | |
| @@ -67,12 +67,6 @@ type paletteSessionIdentity struct { | |||||
| 67 | lifecycle domain.SessionLifecycleID | 67 | lifecycle domain.SessionLifecycleID | ||
| 68 | } | 68 | } | ||
| 69 | 69 | ||||
| 70 | - | type remotePalettePresentationIdentity struct { | |||
| 71 | - | origin string | |||
| 72 | - | name string | |||
| 73 | - | lifecycle domain.SessionLifecycleID | |||
| 74 | - | } | |||
| 75 | - | ||||
| 76 | func localPaletteSessionIdentity(lifecycle domain.SessionLifecycleID) paletteSessionIdentity { | 70 | func localPaletteSessionIdentity(lifecycle domain.SessionLifecycleID) paletteSessionIdentity { | ||
| 77 | return paletteSessionIdentity{kind: protocol.RouteKindLocal, endpoint: "local", lifecycle: lifecycle} | 71 | return paletteSessionIdentity{kind: protocol.RouteKindLocal, endpoint: "local", lifecycle: lifecycle} | ||
| 78 | } | 72 | } | ||
M internal/usecase/daemon/picker.go +0 -9
| @@ -33,15 +33,6 @@ type pickerLocalViews struct { | |||
| 33 | 33 | groupedStopped []pickerSessionView | |
| 34 | 34 | } | |
| 35 | 35 | ||
| 36 | - | // pickerForeignViews is the projected foreign (remote-directory) portion of | |
| 37 | - | // the hybrid picker projection plus whether it suppresses the LOCAL label on a | |
| 38 | - | // preceding stopped row. | |
| 39 | - | type pickerForeignViews struct { | |
| 40 | - | recent []pickerSessionView | |
| 41 | - | grouped []pickerSessionView | |
| 42 | - | blockLocalStopped bool | |
| 43 | - | } | |
| 44 | - | ||
| 45 | 36 | // localPickerViews is the prepared local-only picker projection. It captures | |
| 46 | 37 | // live and stopped local rows, ordering them as the hybrid projection does | |
| 47 | 38 | // when no foreign source is present. | |
| @@ -33,15 +33,6 @@ type pickerLocalViews struct { | |||||
| 33 | groupedStopped []pickerSessionView | 33 | groupedStopped []pickerSessionView | ||
| 34 | } | 34 | } | ||
| 35 | 35 | ||||
| 36 | - | // pickerForeignViews is the projected foreign (remote-directory) portion of | |||
| 37 | - | // the hybrid picker projection plus whether it suppresses the LOCAL label on a | |||
| 38 | - | // preceding stopped row. | |||
| 39 | - | type pickerForeignViews struct { | |||
| 40 | - | recent []pickerSessionView | |||
| 41 | - | grouped []pickerSessionView | |||
| 42 | - | blockLocalStopped bool | |||
| 43 | - | } | |||
| 44 | - | ||||
| 45 | // localPickerViews is the prepared local-only picker projection. It captures | 36 | // localPickerViews is the prepared local-only picker projection. It captures | ||
| 46 | // live and stopped local rows, ordering them as the hybrid projection does | 37 | // live and stopped local rows, ordering them as the hybrid projection does | ||
| 47 | // when no foreign source is present. | 38 | // when no foreign source is present. | ||
M internal/usecase/daemon/picker_lines.go +4 -15
| @@ -15,16 +15,6 @@ import ( | |||
| 15 | 15 | // remote activation; the presenting client only renders. Keys are opaque and | |
| 16 | 16 | // resolve back to picker.Target values inside the daemon. | |
| 17 | 17 | ||
| 18 | - | type pickerRemoteAvailability uint8 | |
| 19 | - | ||
| 20 | - | const ( | |
| 21 | - | pickerRemoteNone pickerRemoteAvailability = iota | |
| 22 | - | pickerRemoteCached | |
| 23 | - | pickerRemoteFresh | |
| 24 | - | pickerRemoteStale | |
| 25 | - | pickerRemoteVersionMismatch | |
| 26 | - | ) | |
| 27 | - | ||
| 28 | 18 | // pickerRemoteActivation is the picker action authorized by the current remote | |
| 29 | 19 | // catalog snapshot. It is presentation state only; the structured remote | |
| 30 | 20 | // target remains the exact route and is revalidated at commit time. | |
| @@ -54,11 +44,10 @@ type pickerSessionView struct { | |||
| 54 | 44 | // It is never reconstructed from Name or a rendered label. | |
| 55 | 45 | RemoteTarget *domain.RemoteSessionTarget | |
| 56 | 46 | // RemoteHost marks remote host status rows that have no session key. | |
| 57 | - | RemoteHost string | |
| 58 | - | RemoteAvailability pickerRemoteAvailability | |
| 59 | - | RemoteDetail string | |
| 60 | - | RemoteReason string | |
| 61 | - | RemoteActivation pickerRemoteActivation | |
| 47 | + | RemoteHost string | |
| 48 | + | RemoteDetail string | |
| 49 | + | RemoteReason string | |
| 50 | + | RemoteActivation pickerRemoteActivation | |
| 62 | 51 | // CannotAcceptMoves reports whether this session cannot receive a moved tab | |
| 63 | 52 | // or pane. False for ordinary local (and stopped) sessions; true for | |
| 64 | 53 | // restricted remote rows. | |
| @@ -15,16 +15,6 @@ import ( | |||||
| 15 | // remote activation; the presenting client only renders. Keys are opaque and | 15 | // remote activation; the presenting client only renders. Keys are opaque and | ||
| 16 | // resolve back to picker.Target values inside the daemon. | 16 | // resolve back to picker.Target values inside the daemon. | ||
| 17 | 17 | ||||
| 18 | - | type pickerRemoteAvailability uint8 | |||
| 19 | - | ||||
| 20 | - | const ( | |||
| 21 | - | pickerRemoteNone pickerRemoteAvailability = iota | |||
| 22 | - | pickerRemoteCached | |||
| 23 | - | pickerRemoteFresh | |||
| 24 | - | pickerRemoteStale | |||
| 25 | - | pickerRemoteVersionMismatch | |||
| 26 | - | ) | |||
| 27 | - | ||||
| 28 | // pickerRemoteActivation is the picker action authorized by the current remote | 18 | // pickerRemoteActivation is the picker action authorized by the current remote | ||
| 29 | // catalog snapshot. It is presentation state only; the structured remote | 19 | // catalog snapshot. It is presentation state only; the structured remote | ||
| 30 | // target remains the exact route and is revalidated at commit time. | 20 | // target remains the exact route and is revalidated at commit time. | ||
| @@ -54,11 +44,10 @@ type pickerSessionView struct { | |||||
| 54 | // It is never reconstructed from Name or a rendered label. | 44 | // It is never reconstructed from Name or a rendered label. | ||
| 55 | RemoteTarget *domain.RemoteSessionTarget | 45 | RemoteTarget *domain.RemoteSessionTarget | ||
| 56 | // RemoteHost marks remote host status rows that have no session key. | 46 | // RemoteHost marks remote host status rows that have no session key. | ||
| 57 | - | RemoteHost string | 47 | + | RemoteHost string |
| 58 | - | RemoteAvailability pickerRemoteAvailability | 48 | + | RemoteDetail string |
| 59 | - | RemoteDetail string | 49 | + | RemoteReason string |
| 60 | - | RemoteReason string | 50 | + | RemoteActivation pickerRemoteActivation |
| 61 | - | RemoteActivation pickerRemoteActivation | |||
| 62 | // CannotAcceptMoves reports whether this session cannot receive a moved tab | 51 | // CannotAcceptMoves reports whether this session cannot receive a moved tab | ||
| 63 | // or pane. False for ordinary local (and stopped) sessions; true for | 52 | // or pane. False for ordinary local (and stopped) sessions; true for | ||
| 64 | // restricted remote rows. | 53 | // restricted remote rows. | ||