This repository has been archived on 2026-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
caelum0x 49b183818c Unify gitgram + aitimemachine into the monorepo (de-submodule) and merge vendored engines
Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as
opaque submodule gitlinks on GitHub) into fully-tracked first-party content.

AITM now merges its 7 vendored repos as first-party engines:
- memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts
- git: vendored C git (bundled binary) + gitnexus (in-process code intelligence)
- agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess)

Includes the full session's product build: Gitgram web/mobile/backend features,
AITM website/CLI/MCP, the unified memory layer, engine build tooling
(scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md),
and extensive test suites.

Build artifacts, node_modules, external/, and gemini-cli are gitignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 14:14:09 +03:00

185 lines
4.3 KiB
TypeScript

import React, { useState, useEffect } from 'react';
import {
View,
Text,
StyleSheet,
ScrollView,
} from 'react-native';
import { useLocalSearchParams } from 'expo-router';
import { Colors } from '../../constants/Colors';
import Header from '../../components/navigation/Header';
import LoadingSpinner from '../../components/common/LoadingSpinner';
import EmptyState from '../../components/common/EmptyState';
import { logger } from '../../utils/logger';
import { feedbackService } from '../../services/feedbackService';
export default function FeedbackDetailScreen() {
const { id } = useLocalSearchParams<{ id: string }>();
const [feedback, setFeedback] = useState<any>(null);
const [loading, setLoading] = useState(true);
useEffect(() => {
if (id) {
loadFeedback(id);
}
}, [id]);
const loadFeedback = async (feedbackId: string) => {
try {
setLoading(true);
const response = await feedbackService.getFeedback(feedbackId);
setFeedback(response.feedback || response);
} catch (error) {
logger.error('Load feedback error:', error);
} finally {
setLoading(false);
}
};
const getStatusColor = (status: string) => {
switch (status) {
case 'open':
return Colors.accent;
case 'in-progress':
return Colors.accent;
case 'resolved':
return '#4caf50';
case 'closed':
return Colors.textSecondary;
default:
return Colors.textSecondary;
}
};
if (loading) {
return (
<View style={styles.container}>
<Header title="Feedback" />
<LoadingSpinner fullScreen />
</View>
);
}
if (!feedback) {
return (
<View style={styles.container}>
<Header title="Feedback" />
<EmptyState title="Feedback not found" message="This feedback could not be found" />
</View>
);
}
return (
<ScrollView style={styles.container}>
<Header title="Feedback" />
<View style={styles.content}>
<View style={styles.header}>
<Text style={styles.subject}>{feedback.subject}</Text>
<View
style={[
styles.statusBadge,
{ backgroundColor: getStatusColor(feedback.status) },
]}
>
<Text style={styles.statusText}>{feedback.status}</Text>
</View>
</View>
<View style={styles.meta}>
<Text style={styles.metaLabel}>Category:</Text>
<Text style={styles.metaValue}>{feedback.category}</Text>
</View>
<View style={styles.meta}>
<Text style={styles.metaLabel}>Submitted:</Text>
<Text style={styles.metaValue}>
{new Date(feedback.createdAt).toLocaleString()}
</Text>
</View>
<View style={styles.section}>
<Text style={styles.sectionTitle}>Message</Text>
<Text style={styles.message}>{feedback.message}</Text>
</View>
{feedback.response && (
<View style={styles.section}>
<Text style={styles.sectionTitle}>Response</Text>
<Text style={styles.response}>{feedback.response}</Text>
</View>
)}
</View>
</ScrollView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: Colors.background,
},
content: {
padding: 16,
},
header: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
marginBottom: 16,
},
subject: {
flex: 1,
fontSize: 20,
fontWeight: '600',
color: Colors.text,
},
statusBadge: {
paddingHorizontal: 12,
paddingVertical: 6,
borderRadius: 4,
},
statusText: {
fontSize: 12,
fontWeight: '600',
color: Colors.text,
textTransform: 'uppercase',
},
meta: {
flexDirection: 'row',
marginBottom: 8,
},
metaLabel: {
fontSize: 14,
color: Colors.textSecondary,
marginRight: 8,
},
metaValue: {
fontSize: 14,
color: Colors.text,
fontWeight: '500',
},
section: {
marginTop: 24,
},
sectionTitle: {
fontSize: 18,
fontWeight: '600',
color: Colors.text,
marginBottom: 12,
},
message: {
fontSize: 16,
color: Colors.text,
lineHeight: 24,
},
response: {
fontSize: 16,
color: Colors.text,
lineHeight: 24,
backgroundColor: Colors.surface,
padding: 16,
borderRadius: 8,
},
});