UI Architecture (iOS + Mac Catalyst)
Overview of the app’s user interface. For component details, see linked notes.
Navigation
- Single unified ContentView (no tabs)
- Settings via gear icon (top right) - 405-settings-sheet
- Floating play button (bottom center)
Main Sections
| Section | Description | Details |
|---|---|---|
| Running Timers | Active timers at top | 406-record-editor |
| Today | Completed records for today | Swipe to delete with 412-deletion-toast |
| History | Filtered records with export | 407-history-section |
State Management
- 403-app-state - Central state via @EnvironmentObject
- 404-storage-location - User folder selection
Key Components
| Component | Purpose |
|---|---|
| 406-record-editor | Edit running timers and completed records |
| 407-history-section | Date/tag filtering, Grid table, export |
| 408-date-range-picker | Preset buttons + custom range |
| 409-tag-filter | Tag toggle buttons with context menu |
| 410-flow-layout | CSS flex-wrap style layout |
| 411-share-export-sheet | Export format selection |
| 412-deletion-toast | Undo support for deletions |
File Structure
Sources/
TimeTrackerApp.swift # Entry point, AppState
AppIntents.swift # Shortcuts integration
Services/
StorageLocationManager.swift # Folder selection
Views/
ContentView.swift # Main view (~105 lines)
Components/ # Reusable components
History/ # History-related views
Sections/ # Main sections
Settings/ # Settings views Mac Catalyst
- Title bar hidden via SceneDelegate
- Native save panel for exports
- Traffic lights visible
App Intents
| Intent | Description |
|---|---|
| StartTimerIntent | Start timer with optional tag/comment |
| StopTimerIntent | Stop all running timers |
Related
- 401-macos - macOS-specific notes
- 101-overview - System architecture
- 403-app-state - State management details