feat(app): add git diff viewer with dropdown menu and UI improvements

- Add git diff viewer screen to display local changes per agent
  - Parse git diff output into file sections with syntax highlighting
  - Horizontal scrolling for long diff lines (no text wrapping)
  - Request diff data on mount via new WebSocket messages

- Add dropdown menu to agent header
  - Three-dot menu button with "View Changes" option
  - Position menu below button using window-aware measurements
  - Account for safe area insets and orientation changes

- Implement server-side git operations
  - Add git_diff_request/response message types
  - Execute `git diff HEAD` in agent's working directory
  - Handle errors gracefully with proper error messages

- Update session context for git diff state
  - Add gitDiffs Map to store diff content per agent
  - Add requestGitDiff helper function
  - WebSocket handler for git_diff_response messages

- Improve agent input area layout
  - Move status bar inline with attachment button
  - Full-width text input above button row
  - Better spacing and visual hierarchy

- Simplify agent status bar to show only status dot

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Mohamed Boudra
2025-10-26 22:30:43 +01:00
co-authored by Claude
parent 086dde30cc
commit c5446e808d
4 changed files with 205 additions and 131 deletions
@@ -78,16 +78,13 @@ export function AgentStatusBar({ agentId }: AgentStatusBarProps) {
</Pressable>
)}
{/* Agent Status Indicator */}
<View style={styles.statusIndicator}>
<View
style={[
styles.statusDot,
{ backgroundColor: getStatusColor(agent.status) },
]}
/>
<Text style={styles.statusText}>{getStatusLabel(agent.status)}</Text>
</View>
{/* Agent Status Indicator - just a dot */}
<View
style={[
styles.statusDot,
{ backgroundColor: getStatusColor(agent.status) },
]}
/>
{/* Mode selector modal */}
<ModeSelectorModal
@@ -105,9 +102,6 @@ const styles = StyleSheet.create((theme) => ({
flexDirection: "row",
alignItems: "center",
gap: theme.spacing[3],
paddingHorizontal: theme.spacing[4],
paddingTop: theme.spacing[2],
paddingBottom: theme.spacing[1],
},
modeBadge: {
flexDirection: "row",