summaryrefslogtreecommitdiff
path: root/internal/models
AgeCommit message (Collapse)Author
2026-01-31Add feature toggles system with settings UI (#74)Peter Stone
- Add feature_toggles table (migration 012) - Add source_config table for future source selection (migration 013) - Create settings page at /settings with: - Feature toggle management (enable/disable/create/delete) - Data source configuration (sync and toggle boards/calendars) - Add store methods for feature toggles and source config - Add GetCalendarList and GetTaskLists to Google API clients - Document feature toggle workflow in DESIGN.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28Expand agent context API with completed log and calendar viewPeter Stone
- Add completed_tasks table to log task completions with title, due date, and completion timestamp - Extend agent context date range: 7 days back to 14 days forward - Add completed_log to API response (last 50 completed tasks) - Add day_section field to timeline items (overdue/today/tomorrow/later) - Add calendar-style view for today's schedule (6am-10pm hourly grid) - Add tabbed interface for Timeline vs Completed Log in HTML view Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28Add Agent Context API for external agent integrationPeter Stone
Phase 1: Authentication and read-only context - POST /agent/auth/request - request access with name + agent_id - GET /agent/auth/poll - poll for approval status - POST /agent/auth/approve|deny - user approval (browser auth required) - GET /agent/context - 7-day timeline context (agent session required) Phase 1.5: Browser-only agent endpoints (HTML pages) - GET /agent/web/request - request page with token - GET /agent/web/status - status page with polling - GET /agent/web/context - context page with timeline data WebSocket notifications: - GET /ws/notifications - push agent requests to browsers - Approval modal with trust indicators and countdown timer Database: - agents table for registered agent tracking - agent_sessions table for pending/active sessions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26Add Google Tasks integration (#43)Peter Stone
- New GoogleTasksClient for fetching and managing Google Tasks - Tasks appear in Timeline view with yellow indicator dot - Tap checkbox to complete/uncomplete tasks via Google API - Shares credentials file with Google Calendar (GOOGLE_CREDENTIALS_FILE) - Configure task list via GOOGLE_TASKS_LIST_ID env var (default: @default) - Supports comma-separated list IDs for multiple lists New files: - internal/api/google_tasks.go - Google Tasks API client Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26Use configured timezone throughout codebasePeter Stone
- Add config/timezone.go with timezone utilities: - SetDisplayTimezone(), GetDisplayTimezone() - Now(), Today() - current time/date in display TZ - ParseDateInDisplayTZ(), ToDisplayTZ() - parsing helpers - Initialize timezone at startup in main.go - Update all datetime logic to use configured timezone: - handlers/handlers.go - all time.Now() calls - handlers/timeline.go - date parsing - handlers/timeline_logic.go - now calculation - models/atom.go - ComputeUIFields() - models/timeline.go - ComputeDaySection() - api/plantoeat.go - meal date parsing - api/todoist.go - due date parsing - api/trello.go - due date parsing This ensures all dates/times display correctly regardless of server timezone setting. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25Fix timezone and date handling bugs #40, #41, #42Peter Stone
#40, #41: Fix calendar event timezone handling - Parse all-day events in local timezone using ParseInLocation - Convert timed events to local time after parsing RFC3339 - Update ComputeDaySection to normalize both now and item time to local before comparison, ensuring consistent today/tomorrow classification #42: Mobile conditions page now uses 2 columns - Changed 600px breakpoint from 1 column to 2 columns Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25Implement architectural refactors for feature requests #28, #30, #31, #33-38Peter Stone
Phase 1: Bugs as First-Class Atoms (#28) - Add resolved_at column to bugs table (migration 007) - Add GetUnresolvedBugs(), ResolveBug(), UnresolveBug() store methods - Include bugs in Tasks tab via BugToAtom() with completion toggle - Add unit tests for bug resolution Phase 2: Timeline as Default + Enhancements (#35, #37) - Change default tab from tasks to timeline - Add IsCompleted, DaySection, Source fields to TimelineItem - Group timeline items by today/tomorrow/later sections - Add completion checkboxes for tasks/cards, grey completed items - Collapse tomorrow/later sections by default Phase 3: Shopping Quick-Add (#33) - Add user_shopping_items table (migration 008) - Add SaveUserShoppingItem(), GetUserShoppingItems(), ToggleUserShoppingItem() - Add HandleShoppingQuickAdd() and HandleShoppingToggle() handlers - Add quick-add form to shopping tab Phase 4: Mobile Swipe Navigation (#38) - Add touch event handlers for swipe left/right tab switching - 50px threshold triggers tab change Phase 5: Consistent Background Opacity (#30) - Add CSS variables for panel/card/input/modal backgrounds - Update templates to use consistent opacity classes Phase 6: Tab Reorganization (#37) - Reorganize tabs: Timeline, Shopping, Conditions as main tabs - Move Tasks, Planning, Meals under Details dropdown Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25Fix bugs and add bug management scriptsPeter Stone
Bug fixes: - #36: Hide recurring tasks until due day (add IsRecurring to Task/Atom) - Trello cards missing: change filter=visible to filter=open - Build fix: add missing fmt import in atom.go Infrastructure: - Add scripts/bugs and scripts/resolve-bug for DB bug tracking - Remove issues/ directory (bugs now tracked in DB) - Add timeline_logic_test.go Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24Fix UI bugs and add Timeline viewPeter Stone
Bug fixes: - #25: Replace 📅 with 🗓️ to avoid misleading date display - #30: Standardize background opacity (shopping items now use bg-white/5) New feature: - #11: Add Timeline view showing chronological events/tasks/meals Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24Add Shopping tab combining Trello and PlanToEat listsPeter Stone
- New Shopping tab aggregates items from Trello Shopping board and PlanToEat - Items grouped by store, then by category (for PlanToEat) - Trello list names treated as store names - Replace PlanToEat meals API with web scraping (uses session cookie) - Add error logging for PlanToEat fetch operations - Recipe links now point to cooking view (/recipes/{id}/cook/{event_id}) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22Add Google Calendar integrationPeter Stone
- Add GoogleCalendarClient for fetching upcoming events - Add GoogleCalendarAPI interface and CalendarEvent model - Add config for GOOGLE_CREDENTIALS_FILE and GOOGLE_CALENDAR_ID - Display events in Planning tab with date/time formatting - Update handlers and tests to support optional calendar client Config env vars: - GOOGLE_CREDENTIALS_FILE: Path to service account JSON - GOOGLE_CALENDAR_ID: Calendar ID (defaults to "primary") Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21Implement 10 UI/UX improvements and bug fixesPeter Stone
- Fix outdated Todoist task URL format (showTask -> app/task) - Fix quick-add date defaulting to tomorrow in evening (client-side JS) - Add tap-to-expand for task descriptions with checkbox completion - Add visual differentiation: overdue (red), future (gray), today (normal) - Sort tasks by urgency: overdue > today-timed > today-allday > future - Keep completed tasks visible with strikethrough until refresh - Add random Unsplash landscape background with content overlay - Hide future tasks behind collapsible fold with count badge - Unified modal menu for Quick Add + Bug Report (Ctrl+K shortcut) - Click task title to edit description in modal Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20UI improvements and bug fixesPeter Stone
- Gray out overdue tasks (past today) - Sort tasks with specific times before midnight-due tasks - Fix timezone bug in quick add (use local timezone) - Remove "Personal Dashboard" header, minimal refresh/logout bar - Change Todoist icon from checkmark to red circle - Show due time when set (not just date) - Compact task list styling Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20Remove Obsidian integration for public server deploymentPeter Stone
Obsidian relied on local filesystem access which is incompatible with public server deployment. This removes all Obsidian-related code including: - API client and interface - Store layer methods (SaveNotes, GetNotes, SearchNotes) - Handler methods and routes - UI tab and templates - Configuration fields - Related tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18Implement Trello task heuristics for Tasks tab (Phase 3 Step 6)Peter Stone
Add filtering logic to show Trello cards as actionable tasks when they have due dates OR are in lists named like "todo", "doing", "in progress", "tasks", "next", or "today". This makes the Tasks tab more useful by surfacing cards that represent work items even without explicit due dates. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13Implement Todoist write operations - API layer (Part 1)Peter Stone
Add CreateTask and CompleteTask methods to Todoist API client: Models: - Add Project struct (ID, Name) to types.go - Add Projects []Project field to DashboardData API Interface: - Change GetProjects signature to return []models.Project - Ensure CreateTask and CompleteTask are defined Todoist Client: - Add baseURL field for testability - Refactor GetProjects to return []models.Project - Update GetTasks to build project map from new GetProjects - Implement CreateTask with JSON payload support - Implement CompleteTask using POST to /tasks/{id}/close Tests: - Create comprehensive todoist_test.go - Test CreateTask, CreateTask with due date, CompleteTask - Test error handling and GetProjects - Update mock client in handlers tests All tests pass. Ready for handlers and UI integration. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-13Add Trello Lists support for UI dropdownsPeter Stone
Expose Trello Lists in Board model to enable card creation UI: - Add List model struct (ID, Name) to types.go - Add Lists []List field to Board model - Add GetLists method to TrelloAPI interface - Refactor private getLists to return []models.List - Update GetCards to build list map from slice - Add public GetLists method wrapping private implementation - Update GetBoardsWithCards to populate Lists field concurrently - Update mock Trello client in tests to implement GetLists All tests pass. Boards now include their lists for UI rendering. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-13Implement unified Atom model for multi-source abstractionPeter Stone
- Create internal/models/atom.go with Atom struct and enums - Add mapper functions for Task, Card, Note, and Meal types - Normalize priority scales (1-4) and assign brand colors - Update Phase 2 plan with Atom architecture as Step 1 - Document architectural decision in SESSION_STATE.md This abstraction enables consistent handling, sorting, and rendering of items from Trello, Todoist, Obsidian, and PlanToEat sources. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12Initial commit: Personal Consolidation Dashboard (Phase 1 Complete)Peter Stone
Implemented a unified web dashboard aggregating tasks, notes, and meal planning: Core Features: - Trello integration (PRIMARY feature - boards, cards, lists) - Todoist integration (tasks and projects) - Obsidian integration (20 most recent notes) - PlanToEat integration (optional - 7-day meal planning) - Mobile-responsive web UI with auto-refresh (5 min) - SQLite caching with 5-minute TTL - AI agent endpoint with Bearer token authentication Technical Implementation: - Go 1.21+ backend with chi router - Interface-based API client design for testability - Parallel data fetching with goroutines - Graceful degradation (partial data on API failures) - .env file loading with godotenv - Comprehensive test coverage (9/9 tests passing) Bug Fixes: - Fixed .env file not being loaded at startup - Fixed nil pointer dereference with optional API clients (typed nil interface gotcha) Documentation: - START_HERE.md - Quick 5-minute setup guide - QUICKSTART.md - Fast track setup - SETUP_GUIDE.md - Detailed step-by-step instructions - PROJECT_SUMMARY.md - Complete project overview - CLAUDE.md - Guide for Claude Code instances - AI_AGENT_ACCESS.md - AI agent design document - AI_AGENT_SETUP.md - Claude.ai integration guide - TRELLO_AUTH_UPDATE.md - New Power-Up auth process Statistics: - Binary: 17MB - Code: 2,667 lines - Tests: 5 unit + 4 acceptance tests (all passing) - Dependencies: chi, sqlite3, godotenv Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>