mirror of
https://github.com/stablyai/orca.git
synced 2026-11-03 18:47:40 +00:00
* fix(mobile): load markdown tabs from any desktop split group and center load-error Retry The desktop answered markdown.readTab only for tabs in its focused split group, so a phone opening a markdown tab from another group got tab_not_found and showed "Couldn't load markdown". Resolve the tab across all of the worktree's groups. Load-error states now share one component that centers the message and its Retry button; the markdown reader's button was pinned to the left. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(renderer): mobile markdown read picks the requested tab across groups Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * refactor(renderer): resolve mobile markdown tab to one file id Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
import { Pressable, StyleSheet, Text, View } from 'react-native'
|
|
import { colors, radii, spacing, typography } from '../theme/mobile-theme'
|
|
|
|
/** A failed load: the message with its Retry button centered under it as one group. */
|
|
export function MobileLoadErrorState({
|
|
message,
|
|
onRetry
|
|
}: {
|
|
message: string
|
|
onRetry?: (() => void) | null
|
|
}) {
|
|
return (
|
|
<View style={styles.state}>
|
|
<Text style={styles.errorText}>{message}</Text>
|
|
{onRetry ? (
|
|
<Pressable style={styles.retryButton} onPress={onRetry} accessibilityRole="button">
|
|
<Text style={styles.retryText}>Retry</Text>
|
|
</Pressable>
|
|
) : null}
|
|
</View>
|
|
)
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
state: {
|
|
flex: 1,
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
gap: spacing.md,
|
|
padding: spacing.xl
|
|
},
|
|
errorText: {
|
|
color: colors.statusRed,
|
|
fontSize: typography.bodySize,
|
|
textAlign: 'center'
|
|
},
|
|
retryButton: {
|
|
minHeight: 36,
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
borderRadius: radii.button,
|
|
borderWidth: StyleSheet.hairlineWidth,
|
|
borderColor: colors.borderSubtle,
|
|
paddingHorizontal: spacing.lg
|
|
},
|
|
retryText: {
|
|
color: colors.textPrimary,
|
|
fontSize: typography.bodySize,
|
|
fontWeight: '600'
|
|
}
|
|
})
|