Commit Graph

15 Commits

Author SHA1 Message Date
Ruben Rosario fa03a30a31 Add vertical scroll to Notes field in EditTask popup
- Added notes_scroll to App and AppView
- Up/Down in Notes field scrolls (Tab cycles fields instead)
- Reset scroll on opening EditTask popup
- Notes Paragraph uses .scroll((notes_scroll, 0))
2026-06-21 17:05:01 +01:00
Ruben Rosario 915f0a3197 Feature 2: Notes field in EditTask with wrap and 5-line minimum
- Increased popup height from 12 to 14 lines
- Notes constraint increased from Length(3) to Length(5)
- Notes Paragraph uses multi-line Text from notes.lines()
- Added Wrap { trim: false } to Notes Paragraph
2026-06-21 16:57:53 +01:00
Ruben Rosario 1ff594e9b7 Feature 1: Wrap text in Details panel
Add ratatui Wrap widget to Paragraph in render_detail so
long titles and notes wrap within the detail area.
2026-06-21 16:57:28 +01:00
Ruben Rosario c9e99cddd0 Fix task list alignment: use char count not byte count, truncate title
- Use .chars().count() instead of .len() for accurate visual width
- Truncate title with … when title + due_text exceeds available width
- Compute padding from truncated title width for consistent alignment
2026-06-21 16:33:22 +01:00
Ruben Rosario aa91fb7a9d Feature 3: relative due dates right-aligned in task list
- Replace absolute date with relative string (Overdue, Xh left, X days left)
- Overdue in Red, <24h in Yellow, >=24h in DarkGray
- Due string right-aligned via padding calculation
2026-06-21 16:24:54 +01:00
Ruben Rosario 98409ff88b Feature 2: show created_at and updated_at in detail panel 2026-06-21 16:11:58 +01:00
Ruben Rosario 747d40b1e9 Feature 1: date buttons in EditTask popup
- Add 3 buttons (Today, Tomorrow, Next Week) below Notes
- Popup height increased from 10 to 12
- Tab/Up/Down cycle through 5 fields (Title, Notes, 3 buttons)
- Enter on a date button saves task and sets due date
- Text editing keys restricted to fields 0 and 1
2026-06-21 16:07:16 +01:00
Ruben Rosario e45631b235 Remove POPUP_BG from EditTask popup, rely on Clear widget 2026-06-21 15:48:11 +01:00
Ruben Rosario 11bdb712f6 chore: checkpoint before removing POPUP_BG 2026-06-21 15:45:14 +01:00
Ruben Rosario 6eee90f128 Add task count to task list panel header
Show 'X todo / Y done' in the Tasks panel title bar.

Also includes prior uncommitted work:
- Pagination in fetch_tasks (maxResults=100 + pageToken loop)
- fetch_tasks_since for incremental pull sync
- SyncStats struct with version/last_sync/last_pull/changed counts
- Periodic push (30s) and pull (5min) sync engine
- event::poll(100ms) for non-blocking UI refresh
- Ctrl+R full sync (push + pull)
- refresh_if_needed() to reload data after background sync
- Retry mechanism (MAX_SYNC_RETRIES=3) for sync queue items
- HTTP status code checks in fetch_lists/fetch_tasks/fetch_tasks_since
- Fix move_task URL to use reqwest query()
- Remove CASCADE via replace_all_lists (use insert_list instead)
- has_pending_sync() to prevent pull during pending push
2026-06-21 14:21:14 +01:00
Ruben Rosario 1c95f5f6be refactor: simplify auth popup to show status instead of URL 2026-06-21 10:04:27 +01:00
Ruben Rosario 0cbf9262c7 fix: replace device flow with loopback ip redirect flow (RFC 8252)
- Device Flow only works with 'TV and Limited Input devices' OAuth client type
- Desktop app type requires Authorization Code flow with localhost redirect
- New flow: start local TCP server on random port, open browser with auth URL,
  catch redirect containing authorization code, exchange for tokens
- Uses webbrowser crate to auto-open the browser
- Self-contained: no separate HTTP server framework needed, uses std::net
- Popup shows auth URL and waits for browser authorization
- Support for refresh_token for long-lived access
2026-06-20 20:55:08 +01:00
Ruben Rosario 985e8c9bc9 fix: show oauth url and code properly on device auth popup
- Auth flow now waits for user's Enter before starting
- Start auth only when user presses Enter on DeviceAuth popup
- Proper error handling: missing GOOGLE_CLIENT_ID shows clear message
- Error messages displayed in popup with Retry option
- Popup shows instructions before auth, URL+code during auth
- Handle both verification_url and verification_uri field names from Google
- Check HTTP status code and show error_description on failures
- AuthError propagated to render function for display
- Popup border turns green when URL+code are ready
2026-06-20 19:56:41 +01:00
Ruben Rosario efc3c1c84c feat(ui): render layout, tabs, panes, popups, and status bar
- ui/mod.rs: AppView struct, Focus/Popup/NetworkStatus enums, draw() layout function
- Top-Tabs + Bottom-Split layout (50/50 left/right)
- TabsBar: list selector with highlight on active
- TaskListPane: checkbox + title + due date per task
- DetailPane: title, status, due, notes of selected task
- InputPopup: centered modal with cursor
- DatePickerPopup: date/time edit modal with instructions
- ConfirmDeletePopup: confirmation dialog
- DeviceAuthPopup: OAuth URL + code display
- StatusBar: ONLINE/OFFLINE/SYNCING with color coding
2026-06-20 19:37:13 +01:00
Ruben Rosario adf3889863 chore: initial project setup
- Cargo init with dependencies (ratatui, crossterm, tokio, reqwest, rusqlite, serde, chrono, dirs)
- Module structure: domain/, ui/, infrastructure/
- Domain models (TaskList, Task, TaskStatus, SyncAction, SyncQueueItem)
- .gitignore for target/ and *.db
- Rustls-based TLS (no OpenSSL dependency)
2026-06-20 19:35:19 +01:00