This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

chore(sample): remove experiment mode UI from the sample app

The Experiment Mode menu toggle and the bottom-center Start/Stop
overlay were dev tooling, noise for anyone poking at the sample app.
Drop both.

The underlying ExperimentLogger, ExperimentEvent, the two capture
LaunchedEffects, and the intent-driven auto-mode path all stay — so
orchestrator-driven comparison runs (MainActivity test_mode extras)
continue to work without any UI visible.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

-86
-86
sample/composeApp/src/commonMain/kotlin/com/nate/posedetection/App.kt
··· 792 792 793 793 HorizontalDivider() 794 794 795 - // Experiment Mode toggle — when on, the bottom-of-screen 796 - // Start/Stop overlay is visible and tapping Start begins 797 - // buffering per-detection events for the comparison report. 798 - DropdownMenuItem( 799 - text = { 800 - Row( 801 - horizontalArrangement = Arrangement.SpaceBetween, 802 - verticalAlignment = Alignment.CenterVertically, 803 - modifier = Modifier.fillMaxWidth() 804 - ) { 805 - Text("Experiment Mode") 806 - Spacer(Modifier.width(12.dp)) 807 - Switch(checked = experimentMode, onCheckedChange = null) 808 - } 809 - }, 810 - onClick = { 811 - val next = !experimentMode 812 - experimentMode = next 813 - if (!next && experimentRunning) { 814 - // Toggling off mid-run aborts without saving. 815 - experimentRunning = false 816 - experimentEvents.clear() 817 - experimentCapturedCount = 0 818 - } 819 - } 820 - ) 821 - 822 - HorizontalDivider() 823 - 824 795 // Start/End recording button 825 796 DropdownMenuItem( 826 797 text = { Text(if (recordingId != null) "End recording" else "Start recording") }, ··· 834 805 menuExpanded = false 835 806 } 836 807 ) 837 - } 838 - } 839 - // Experiment Mode overlay — bottom-center Start/Stop button. 840 - // Visible only when Experiment Mode is toggled on in the menu. 841 - if (experimentMode) { 842 - Column( 843 - modifier = Modifier 844 - .align(Alignment.BottomCenter) 845 - .padding(bottom = 24.dp), 846 - horizontalAlignment = Alignment.CenterHorizontally, 847 - ) { 848 - Button(onClick = { 849 - if (!experimentRunning) { 850 - experimentEvents.clear() 851 - experimentCapturedCount = 0 852 - experimentStartedWallMs = Clock.System.now().toEpochMilliseconds() 853 - lastExperimentLogPath = null 854 - experimentRunning = true 855 - } else { 856 - experimentRunning = false 857 - val stoppedMs = Clock.System.now().toEpochMilliseconds() 858 - val safeModelName = (selectedModel?.name ?: "unknown") 859 - .replace(' ', '_') 860 - .replace(Regex("[^A-Za-z0-9._-]"), "") 861 - .ifBlank { "unknown" } 862 - val runId = experimentStartedWallMs 863 - val filename = "${safeModelName}__${runId}.json" 864 - val json = buildExperimentLogJson( 865 - deviceModel = experimentLogger.deviceLabel, 866 - modelName = safeModelName, 867 - runId = runId, 868 - startedWallMs = experimentStartedWallMs, 869 - stoppedWallMs = stoppedMs, 870 - events = experimentEvents.toList(), 871 - ) 872 - lastExperimentLogPath = experimentLogger.write(filename, json) 873 - } 874 - }) { 875 - Text(if (experimentRunning) "Stop Experiment" else "Start Experiment") 876 - } 877 - if (experimentRunning) { 878 - Text( 879 - "Captured: $experimentCapturedCount events", 880 - color = Color.White, 881 - fontSize = 12.sp, 882 - modifier = Modifier.padding(top = 4.dp), 883 - ) 884 - } 885 - lastExperimentLogPath?.let { p -> 886 - Text( 887 - "Saved: $p", 888 - color = Color.White, 889 - fontSize = 11.sp, 890 - textAlign = TextAlign.Center, 891 - modifier = Modifier.padding(top = 4.dp, start = 8.dp, end = 8.dp), 892 - ) 893 - } 894 808 } 895 809 } 896 810 }