Require native Git runtime and bundle full manpages

- Remove the app fallback path when native Git is unavailable and show a startup blocker instead
- Fix native level setup for staged file counting and cherry-pick parity
- Improve manpage loading/search and bundle full Git documentation assets
- Integrate Git cross-compilation into AndroidProjectTooling.sh and remove debug AAB support
This commit is contained in:
Joe Tretter
2026-05-08 17:43:46 -05:00
parent 64743ff4a9
commit 4fab442939
219 changed files with 58133 additions and 129 deletions

View File

@@ -64,8 +64,13 @@ fun GitHugApp() {
MaterialTheme(colorScheme = GitHugColorScheme) {
val context = LocalContext.current
val configuration = LocalConfiguration.current
val levels = remember { sampleLevels() }
val runtime = remember(context) { GitRepositoryRuntime(context.applicationContext) }
if (!runtime.isNativeGitAvailable()) {
MissingNativeGitScreen(message = runtime.unavailableMessage())
return@MaterialTheme
}
val levels = remember { sampleLevels() }
val paneLayoutStore = remember(context) { PaneLayoutStore(context.applicationContext) }
val gameProgressStore = remember(context) { GameProgressStore(context.applicationContext) }
val persistedPaneLayout by paneLayoutStore.layoutFlow.collectAsState(initial = defaultPaneLayout())
@@ -718,7 +723,7 @@ private fun HelpCalloutOverlay(
} ?: Modifier
.align(Alignment.BottomStart)
.padding(start = 14.dp, bottom = 96.dp),
text = "Tap the prompt to enter a command.",
text = "Tap the prompt to enter a command or answer.",
showHelpOnStart = showHelpOnStart,
onShowHelpOnStartChange = onShowHelpOnStartChange,
onOk = onOk,
@@ -836,6 +841,36 @@ private fun HelpBubble(
}
}
@Composable
private fun MissingNativeGitScreen(message: String) {
Surface(
modifier = Modifier
.fillMaxSize()
.background(AppBackground)
.padding(24.dp),
color = AppBackground,
) {
Column(
modifier = Modifier.fillMaxSize(),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.Start,
) {
Text(
text = "Native Git unavailable",
color = TextPrimary,
fontWeight = FontWeight.Bold,
fontSize = 22.sp,
)
Text(
text = message,
modifier = Modifier.padding(top = 12.dp),
color = TextSecondary,
fontSize = 15.sp,
)
}
}
}
@Composable
private fun SolvedCelebrationOverlay(title: String) {
val transition = rememberInfiniteTransition(label = "solved-celebration")