feat(aiturk): add the connect-to-computer screen (QR scan, code, deep link)
Merge Conflict Detector / detect-and-label (push) Successful in 3s
Android CI/CD / Detect Changes (push) Successful in 6s
CodeQL Analysis / Analyze (java-kotlin) (push) Failing after 2m31s
Android CI/CD / Android Lint — Static Analysis (push) Failing after 3m57s
Android CI/CD / Build Debug APK (push) Failing after 1m56s
Android CI/CD / Instrumented Tests (push) Failing after 1m15s
Android CI/CD / ktlint — Code Style (push) Failing after 5m16s
Android CI/CD / Unit & Integration Tests (push) Failing after 4m8s
Android CI/CD / Release Compile Check (push) Failing after 14m1s
Android CI/CD / CI Summary (push) Failing after 1s

Landing now leads with QR / 8-character code pairing; manual login stays as the secondary action. aiturk://pair links open the same screen and ask for confirmation first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8ppceaR5s6cvMnm7uGRnf
This commit is contained in:
2026-10-04 06:06:31 +03:00
co-authored by Claude Opus 5.5
parent c2b08ff73e
commit 6f4309c746
11 changed files with 721 additions and 0 deletions
@@ -52,6 +52,7 @@ import com.m57.hermescontrol.data.local.AuthManager
import com.m57.hermescontrol.data.ws.ConnectionStatus
import com.m57.hermescontrol.data.ws.HermesWsClient
import com.m57.hermescontrol.theme.LocalHermesStatusColors
import com.m57.hermescontrol.ui.aiturkpair.AiturkPairDeepLinkEffect
import com.m57.hermescontrol.ui.common.DisableDrawerGestures
import com.m57.hermescontrol.ui.common.DrawerGestureController
import com.m57.hermescontrol.ui.common.LocalDrawerGestureController
@@ -66,6 +67,7 @@ import com.m57.hermescontrol.ui.settings.SettingsVaultPage
import com.m57.hermescontrol.ui.settings.SettingsViewModel
import com.m57.hermescontrol.ui.toolsets.ToolsetDetailScreen
import kotlinx.coroutines.launch
import com.m57.hermescontrol.ui.aiturkpair.AiturkPairScreen as AiturkPairScreenContent
import com.m57.hermescontrol.ui.authlogin.AuthLoginScreen as AuthLoginScreenContent
import com.m57.hermescontrol.ui.landing.LandingScreen as LandingScreenContent
@@ -79,6 +81,9 @@ private fun appEntryProvider(
onAuthLogin = {
NavigationController.navigateTo(AuthLoginScreen)
},
onAiturkPair = {
NavigationController.navigateTo(AiturkPairScreen)
},
)
// Landing doesn't use HermesScaffold — opt out of drawer gestures explicitly (issue #619).
DisableDrawerGestures()
@@ -96,6 +101,18 @@ private fun appEntryProvider(
DisableDrawerGestures()
}
entry<AiturkPairScreen> {
AiturkPairScreenContent(
onConnected = {
NavigationController.resetTo(ChatScreen)
},
onBack = {
NavigationController.goBack()
},
)
DisableDrawerGestures()
}
ScreenRegistry.ALL_SCREENS.forEach { screen ->
addEntryProvider(clazz = screen.key::class) {
screen.content(sessionId, openDrawer)
@@ -193,6 +210,7 @@ fun MainNavigation(sessionId: String? = null) {
val backStack = remember(startScreen) { NavBackStack(startScreen) }
NavigationController.backStack = backStack
AiturkPairDeepLinkEffect()
val currentScreen = backStack.lastOrNull() ?: startScreen
val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed)