* refactor: remove device Pairing feature entirely (issue #645) - Delete Pairing.kt model + pairing API endpoints (get/approve/revoke/clear) - Delete PairingScreen/PairingViewModel + PairingCodeEntryScreen/ViewModel - Remove NavKeys, ScreenRegistry drawer entry, Navigation.kt entry + Landing pairing button - Remove pairing string resources (en + ko); keep connect_* config-parse strings - Keep Telegram onboarding pairing_id flow (separate concept, per issue) - Fix related doc comments + remaining test reference * test: fix racy CONNECTED read in gated-mode WS test (issue #635 test) testGatedMode_attemptsTicketFetchWithoutBareCookie asserted CONNECTED immediately after the server-side onOpen latch fired, racing the client handshake (WsListenerImpl sets CONNECTED on receipt of the 101). Await the real status transition via connectionStatus.first{==CONNECTED} like the other connect tests do. No product behavior changed. --------- Co-authored-by: M57 <Hy4ri@users.noreply.github.com>
This commit is contained in:
1 parent
e44a53366b
commit
a62bc7e16c
19 files changed
+13
-892
No files matched your search
@@ -454,7 +454,7 @@ object AuthManager {
|
||||
}
|
||||
}
|
||||
|
||||
/** Compatibility accessors for legacy pairing payloads. */
|
||||
/** Convenience accessors for the resolved host/port (WebSocket + chat). */
|
||||
fun getHost(): String = serverStore.getLatestState().resolvedHost
|
||||
|
||||
fun getPort(): Int = serverStore.getLatestState().resolvedPort
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
package com.m57.hermescontrol.data.model
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class PairingResponse(
|
||||
val pending: List<PairingItem>,
|
||||
val approved: List<PairingItem>,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class PairingItem(
|
||||
val platform: String,
|
||||
val user_id: String? = null,
|
||||
val username: String? = null,
|
||||
val display_name: String? = null,
|
||||
val code: String? = null,
|
||||
val created_at: String? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class PairingApproveRequest(
|
||||
val platform: String,
|
||||
val code: String,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class PairingRevokeRequest(
|
||||
val platform: String,
|
||||
val user_id: String,
|
||||
)
|
||||
@@ -53,9 +53,6 @@ import com.m57.hermescontrol.data.model.OAuthProvidersResponse
|
||||
import com.m57.hermescontrol.data.model.OAuthStartResponse
|
||||
import com.m57.hermescontrol.data.model.OAuthSubmitRequest
|
||||
import com.m57.hermescontrol.data.model.OAuthSubmitResponse
|
||||
import com.m57.hermescontrol.data.model.PairingApproveRequest
|
||||
import com.m57.hermescontrol.data.model.PairingResponse
|
||||
import com.m57.hermescontrol.data.model.PairingRevokeRequest
|
||||
import com.m57.hermescontrol.data.model.PluginProvidersPutRequest
|
||||
import com.m57.hermescontrol.data.model.PluginsHubResponse
|
||||
import com.m57.hermescontrol.data.model.PortalResponse
|
||||
@@ -353,22 +350,6 @@ interface HermesApiService {
|
||||
@GET("api/plugins/hermes-achievements/recent-unlocks")
|
||||
suspend fun getRecentUnlocks(): Response<List<RecentUnlock>>
|
||||
|
||||
@GET("api/pairing")
|
||||
suspend fun getPairing(): Response<PairingResponse>
|
||||
|
||||
@POST("api/pairing/approve")
|
||||
suspend fun approvePairing(
|
||||
@Body body: PairingApproveRequest,
|
||||
): Response<Unit>
|
||||
|
||||
@POST("api/pairing/revoke")
|
||||
suspend fun revokePairing(
|
||||
@Body body: PairingRevokeRequest,
|
||||
): Response<Unit>
|
||||
|
||||
@POST("api/pairing/clear-pending")
|
||||
suspend fun clearPendingPairing(): Response<Unit>
|
||||
|
||||
@GET("api/config/raw")
|
||||
suspend fun getRawConfig(): Response<RawConfigResponse>
|
||||
|
||||
|
||||
Reference in new issue
Block a user