fix(notes): align mobile note detail state

This commit is contained in:
saravanakumardb1 2026-03-10 16:29:06 -07:00
parent c13925803e
commit 2a93b5ba40

View File

@ -24,6 +24,10 @@ export default function NoteDetailScreen() {
setDraftBody(selectedNote?.body ?? '');
}, [selectedNote]);
const formattedUpdatedAt = selectedNote
? new Date(selectedNote.updatedAt).toLocaleString()
: 'Not available';
return (
<ScrollView contentContainerStyle={styles.container}>
<View style={styles.header}>
@ -77,10 +81,7 @@ export default function NoteDetailScreen() {
</>
) : !isLoading ? (
<>
<Text style={styles.body}>
{selectedNote?.body ??
'The current scaffold uses placeholder note content until the mobile notes/workspaces API wrappers are wired to the product backend.'}
</Text>
<Text style={styles.body}>{selectedNote?.body ?? 'No note body is available yet.'}</Text>
<Pressable style={styles.primaryButton} onPress={() => setIsEditing(true)}>
<Text style={styles.primaryButtonText}>Edit note</Text>
</Pressable>
@ -90,16 +91,15 @@ export default function NoteDetailScreen() {
<View style={styles.card}>
<Text style={styles.sectionTitle}>Metadata</Text>
<Text style={styles.body}>Workspace: {selectedNote?.workspaceName ?? 'Product'}</Text>
<Text style={styles.body}>Status: Draft</Text>
<Text style={styles.body}>Source: Mobile scaffold</Text>
<Text style={styles.body}>Workspace: {selectedNote?.workspaceName ?? 'Unknown workspace'}</Text>
<Text style={styles.body}>Status: {selectedNote?.status ?? 'unknown'}</Text>
<Text style={styles.body}>Last updated: {formattedUpdatedAt}</Text>
</View>
<View style={styles.card}>
<Text style={styles.sectionTitle}>Artifacts</Text>
<Text style={styles.body}>Attachments: 0</Text>
<Text style={styles.body}>Extracted tasks: 1</Text>
<Text style={styles.body}>Agent actions: 1 pending review</Text>
<Text style={styles.sectionTitle}>Current mobile scope</Text>
<Text style={styles.body}>Artifacts and review context continue to load from the fuller web surface.</Text>
<Text style={styles.body}>This mobile screen now focuses on reading and updating the persisted note body.</Text>
</View>
</ScrollView>
);