summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
10 daysrefactor: RF-04/08 migrate inline HTML to templates, standardize form parsingClaude Agent
RF-04: Already complete in codebase (handlers use HTMLResponse + partials). RF-08: Migrate single-required-field handlers from Pattern A/B to Pattern C (requireFormValue). Affected: HandleCompleteTask, HandleCompleteCard, HandleReportBug, HandleCreateTask in handlers.go; HandleToggleFeature, HandleCreateFeature in settings.go. Reduces 6-8 lines of boilerplate to 2. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 daystest: add coverage for planning tab, meals, Google Tasks, bug handlers, ↵Agent
completed task parsing - HandleTabPlanning: happy-path test verifying tasks/cards land in correct sections (scheduled/unscheduled/upcoming); boundary test confirming a task due exactly at midnight of tomorrow lands in Upcoming, not Scheduled - HandleTabMeals: grouping test verifying two meals sharing date+mealType produce one CombinedMeal with both recipe names merged - Google Tasks GetTasksByDateRange: four boundary tests (start inclusive, end exclusive, no-due-date always included, out-of-range excluded) using redirectingTransport mock server pattern - HandleGetBugs: data assertions verifying bug list and empty-list cases - HandleReportBug: success test verifying bug is saved and bugs template is re-rendered - GetCompletedTasks: timestamp parsing test ensuring CompletedAt is not zero when inserted with a known "2006-01-02 15:04:05" string Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 daysrefactor: RF-03/06 extract groupMeals helper, eliminate ↵Claude
convertSyncItemToTask wrapper RF-03: Extract shared groupMeals helper into internal/handlers/meals.go. Both HandleTabMeals and BuildTimeline now call groupMeals instead of duplicating the date+mealType grouping algorithm inline. CombinedMeal gains ID and Meals fields to carry the first-meal ID and original records needed by BuildTimeline when constructing TimelineItems. RF-06: Add api.ConvertSyncItemToTask for single-item conversion. ConvertSyncItemsToTasks now delegates to it, eliminating duplication. The Handler.convertSyncItemToTask wrapper (which allocated a one-element slice just to unwrap it) is deleted; its caller uses api.ConvertSyncItemToTask directly. Covered by TestConvertSyncItemToTask in internal/api/todoist_test.go. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 dayschore: autocommit uncommitted changesClaudomator Agent
11 daystest: add Google Calendar unit tests for pure functionsClaudomator Agent
11 tests covering deduplicateEvents (dedup key, ordering, empty input), parseEventTime (RFC3339, date-only, empty, no-timezone), and GetUpcomingEvents (normal, empty, API error fallback) via httptest mock. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
12 daysdocs: add comprehensive REFACTOR_PLAN.md with code analysis and ↵Peter Stone
implementation roadmap
12 dayschore: migrate deploy + ops scripts from SSH to local executionPeter Stone
Replace SSH-based deploy.sh with scripts/deploy that runs locally on the server. Update scripts/bugs, scripts/logs, and scripts/resolve-bug to drop SSH wrappers. Update CLAUDE.md and DESIGN.md to reflect new local workflow. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04fix: migrate Todoist client from deprecated REST v2 to API v1Peter Stone
REST v2 (https://api.todoist.com/rest/v2) is being sunset — the /close endpoint was returning HTTP 410 in production, breaking task completion. Update base URL to https://api.todoist.com/api/v1; endpoint paths are unchanged (/tasks/{id}/close, /tasks/{id}/reopen, etc.). Test: TestTodoistClient_UsesAPIv1BaseURL asserts the correct base URL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04feat: sync log, cache clear endpoint, Todoist projects from cached tasksPeter Stone
- migration 016: sync_log table - store: AddSyncLogEntry, GetRecentSyncLog, InvalidateAllCaches, GetProjectsFromTasks - settings: HandleClearCache (POST /settings/clear-cache), SyncLog in page data - settings: use GetProjectsFromTasks instead of deprecated Todoist REST /projects - handlers: populate atom projects from store - agent: log warning on registration failure instead of silently swallowing - google_tasks: simplify URL literal - tests: sync log CRUD, clear cache handler, settings page includes sync log, sync sources adds log entry, incremental sync paths, task completion response/headers, calendar cache fallback Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04chore: move role definitions to ~/.claude/roles, trim CLAUDE.md and DESIGN.mdPeter Stone
Role prompts extracted to ~/.claude/roles/ (project-agnostic). CLAUDE.md slimmed from 87→72 lines, references global methodology. DESIGN.md trimmed ~200 lines of duplicated workflow content. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17Add calendar cache layer, incremental sync tests, completion assertionsPeter Stone
- Google Calendar events now cached via CacheFetcher pattern with stale-cache fallback on API errors (new migration 015, store methods, fetchCalendarEvents handler, BuildTimeline reads from store) - Todoist incremental sync path covered by 5 new tests - Task completion tests assert response body, headers, and template data Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07Add self-improvement cycles to all role definitionsPeter Stone
Each role now has a structured post-task cycle: reflect on specific questions, perform 1-3 concrete improvements (test helpers, scripts, checklists, docs, role definitions), and record changes in SESSION_STATE. Updated CLAUDE.md and DESIGN.md to reference the cycle in the multi-agent workflow documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07Update project docs: fix stale references, add missing sectionsPeter Stone
- CLAUDE.md: fix data sources, add debugging/deploy sections, test checklist - DESIGN.md: update directory tree, fix h.templates→h.renderer, add endpoints/env vars - Role files: fix Go version to 1.24, update tool names to Edit/Read/Glob - scripts/logs: fix CRLF line endings for WSL compatibility Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07Add no-cache header tests, update SESSION_STATE with audit resultsPeter Stone
- Added TestHTMLResponse_SetsNoCacheHeaders and TestJSONResponse_SetsNoCacheHeaders - Rewrote SESSION_STATE.md with verified test coverage per completed item - Documented known gaps (Google API client unit tests, WebAuthn env vars) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07Fix passkey registration showing broken UI when WebAuthn not configuredPeter Stone
Root cause: WEBAUTHN_RP_ID and WEBAUTHN_ORIGIN env vars not set in production, so WebAuthn is nil and all passkey endpoints return 404. The settings page was unconditionally showing the passkey registration card, leading to confusing "Failed to start registration" errors. Fix: Pass WebAuthnEnabled flag from main.go through Handler to the settings template, which now conditionally renders the passkey card only when WebAuthn is properly configured. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07Add build version footer, deploy ldflags, template test helper, and logs scriptPeter Stone
- Display build commit hash in unobtrusive footer overlay - Inject buildCommit/buildTime via ldflags in deploy.sh - Add assertTemplateContains test helper, refactor existing template tests - Add scripts/logs for fetching production journalctl via SSH Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07Fix timeline task completion replacing view, fix passkey registration CSRFPeter Stone
- Fix checkboxes in timeline calendar grid targeting #tab-content (replaced entire view). Now target closest .untimed-item/.calendar-event with outerHTML - Fix passkey registration 403 by passing CSRFToken from settings handler and exposing it via meta tag for JS to read - Add TDD workflow requirement to CLAUDE.md - Tests written first (red-green): template content assertions for checkbox targets and CSRF token presence, handler data struct verification Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06Fix missing settings button, disappeared events, and tab refresh bugPeter Stone
- Add settings gear icon link to dashboard header - Fix GetTasksByDateRange/GetCardsByDateRange to include overdue items (changed from BETWEEN to <= end, filter completed tasks) - Fix refresh replacing active tab with tasks tab by using htmx.trigger(body, 'refresh-tasks') instead of innerHTML+htmx.process - Add refresh-tasks hx-trigger to meals, shopping, conditions tabs - Add tests for overdue inclusion/exclusion, settings link, template data Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05Add passkey (WebAuthn) authentication supportPeter Stone
Enable passwordless login via passkeys as an alternative to password auth. Users register passkeys from Settings; the login page offers both options. WebAuthn is optional — only active when WEBAUTHN_RP_ID and WEBAUTHN_ORIGIN env vars are set. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05Improve session handling, shopping UI, and cleanupPeter Stone
Session improvements: - Extend session lifetime to 7 days for mobile convenience - Add idle timeout to extend session on activity - Use standard cookie name for better compatibility Shopping model: - Add FlattenItemsForStore helper for extracting store items - Add StoreNames helper for store list - Improve shopping-tab.html with inline add forms Frontend: - Add WebSocket reconnection and agent approval UI to app.js - Simplify timeline calendar JS (move event positioning to CSS) - Update login page styling Deployment: - Remove unused git checkout step from deploy.sh - Update apache.conf WebSocket proxy settings Documentation: - Add Agent Context API feature spec to issues/ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05Extract shopping handlers to dedicated filePeter Stone
Moved 8 shopping-related handlers from handlers.go to shopping.go: - HandleTabShopping - HandleShoppingQuickAdd - HandleShoppingToggle - HandleShoppingMode - HandleShoppingModeToggle - HandleShoppingModeComplete - HandleGetShoppingLists - aggregateShoppingLists handlers.go: 1633 → 1232 lines (24% reduction) shopping.go: 415 lines (new) All tests passing. No behavioral changes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05Document multi-agent workflow, ADRs, and Agent APIPeter Stone
- Add Development Workflow section to DESIGN.md documenting three-role system (Architect, Implementor, Reviewer) with handoff documents - Update CLAUDE.md with Key Documents section pointing to DESIGN.md, role definitions, and ADRs - Add ADR-first documentation policy across all role definitions - Update REVIEWER_ROLE.md with comprehensive test quality checklist - Document Agent API and completed tasks log in DESIGN.md - Update database schema table with 5 missing tables - Update endpoint reference with 10 missing routes - Create ADRs 002-005 capturing key architectural decisions: - 002: Timeline aggregation architecture - 003: HTMX write operations pattern - 004: Concurrent data fetching with graceful degradation - 005: Agent API notification-based authentication - Add migrations/README.md documenting schema history and 007 gap Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03Document Quick Add UX pattern and filter checked shopping itemsPeter Stone
- Add Quick Add UX pattern to DESIGN.md documenting expected behaviors for form submission, error handling, and completed item display - Filter checked items from shopping-tab.html display (both grouped and ungrouped views) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03Add comprehensive test coverage across packagesPeter Stone
New test files: - api/http_test.go: HTTP client and error handling tests - config/config_test.go: Configuration loading and validation tests - middleware/security_test.go: Security middleware tests - models/atom_test.go: Atom model and conversion tests Expanded test coverage: - api/todoist_test.go: Todoist API client tests - api/trello_test.go: Trello API client tests - auth/auth_test.go: Authentication and CSRF tests - handlers/timeline_logic_test.go: Timeline building logic tests - store/sqlite_test.go: SQLite store operations tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03Refactor template rendering with Renderer interface for testabilityPeter Stone
Introduce a Renderer interface to abstract template rendering, enabling tests to use MockRenderer instead of requiring real template files. Changes: - Add renderer.go with Renderer interface, TemplateRenderer, and MockRenderer - Update Handler struct to use Renderer instead of *template.Template - Update HTMLResponse() to accept Renderer interface - Replace all h.templates.ExecuteTemplate() calls with h.renderer.Render() - Update all tests to use MockRenderer, removing template file dependencies This eliminates 15+ tests that previously skipped with "Templates not available" and improves test isolation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01Improve shopping mode and flatten nav barPeter Stone
Shopping mode: - Click to complete items (deletes user items, hides external items) - Add print button with compact two-column print layout - Fix CSRF token for HTMX requests - Fix input clearing with proper htmx:afterRequest handler - Remove "Quick Add" store option, require valid store Navigation: - Replace dropdown menu with flat nav showing all tabs - Remove unused dropdown JS Tests: - Add TestHandleShoppingModeComplete for user and external items Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01Add debounced hover effect to timeline eventsPeter Stone
Delays the highlight/raise effect by 100ms, allowing users to move their mouse across overlapping events without the first one blocking access to others underneath. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01Improve timeline view with dynamic bounds, now line, and overlap handlingPeter Stone
- Add dynamic calendar clipping: show 1 hour before/after events instead of hardcoded 6am-10pm - Add "NOW" line indicator showing current time position - Improve time label readability with larger font and better contrast - Add overlap detection with column-based indentation for concurrent events - Apply calendar view to Tomorrow section (matching Today's layout) - Fix auto-refresh switching to tasks tab (default was 'tasks' instead of 'timeline') Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31Update z-index hierarchy in DESIGN.mdPeter Stone
Document dropdowns/popups at z-100 for proper layering. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31Fix timeline calendar view and shopping UI bugs (#56, #65-73)Peter Stone
- #56: Add overflow-hidden to card/panel classes to prevent content overflow - #65: Fix Google Tasks not showing by including tasks without due dates - #66: Add no-cache headers to prevent stale template responses - #67: Increase dropdown z-index to 100 for proper layering - #69: Implement calendar-style Today section with hourly grid (6am-10pm), duration-based event heights, and compact overdue/all-day section - #70: Only reset shopping-mode form on successful submission - #71: Remove checkboxes from shopping tab (only show in shopping mode) - #72: Add inline add-item input at end of each store section - #73: Add Grouped/Flat view toggle for shopping list Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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-28Refactor agent handlers for simplicity and clarityPeter Stone
- Reuse BuildTimeline() from timeline_logic.go instead of duplicating fetch logic (~60 lines removed) - Add section headers for code organization - Extract isSessionExpired() and renderAgentTemplate() helpers - Move AgentRequestPayload from websocket.go to agent.go - Use config.Now() and config.Today() for consistent timezone handling Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27Fix CSP to allow conditions page embeds and fontsPeter Stone
Allow external resources in Content-Security-Policy: - frame-src: youtube.com, embed.windy.com (for webcams/weather) - style-src: fonts.googleapis.com (for Inter font) - font-src: fonts.gstatic.com (for font files) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27Add git practices section to development guidePeter Stone
Document clean history principles: - Never amend, rebase, or force push - Use merge to integrate changes - Keep commits focused and atomic Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27Merge branch 'master' of ssh://titanium/site/git.terst.org/repo/task-dashboardPeter Stone
2026-01-27Fix z-index, conditions auth, and meal combining (#62, #63, #64)Peter Stone
Bug fixes: - #62: Increase FAB button z-index from z-40 to z-50 - #63: Combine multiple meals per date+mealType in Meals tab - #64: Make /conditions route public (no auth required) Changes: - FAB button now z-50 (same as modals, appears on top when scrolling) - Meals tab groups meals by date+mealType, joins recipe names with " + " - Conditions page moved outside protected routes group DESIGN.md updates: - Updated z-index hierarchy table - Added Meals View section - Noted conditions page is public Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26Make Today collapsible and expand Tomorrow by default (#60)Peter Stone
- Convert Today section from static div to collapsible details element - Add item count to Today header for consistency - Expand both Today and Tomorrow sections by default - Later section remains collapsed - Update DESIGN.md with new timeline organization Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26Make Today collapsible and expand Tomorrow by default (#60)Peter Stone
- Convert Today section from static div to collapsible details element - Add item count to Today header for consistency - Expand both Today and Tomorrow sections by default - Later section remains collapsed Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26Fix z-index layering for FAB button and details dropdown (#58, #59)Peter Stone
- Add z-40 to FAB button so it floats above scrolling content - Increase details dropdown from z-20 to z-30 Z-index hierarchy: - Content: default - Sticky headers: z-10 - Details dropdown: z-30 - FAB button: z-40 - Modals: z-50 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26Add dev guide sections for bug management, TDD, and ADRsPeter Stone
Document the expected development workflow including: - Bug tracking with scripts/bugs and scripts/resolve-bug - Test-driven development requirements and patterns - When to update DESIGN.md vs create Architecture Decision Records Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26Fix shopping-mode template name to use filenamePeter Stone
The template was being called with define name "shopping-mode" but standalone page templates should be called by filename "shopping-mode.html". 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-26Add shopping mode for focused single-store shopping (#34)Peter Stone
- Full-screen view for one store at a time - Tap items to toggle completion - Completed items greyed and sorted to bottom - Quick-add form at bottom of screen - Store switcher pills for easy navigation - "Shop" button on each store in shopping tab Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26Fix multiple UI issues and shopping completion bugPeter Stone
- #54: Fix shopping item completion - now works for all sources (trello, plantoeat, user) with state stored in local DB - #48: Hide 12:00am times in timeline (all-day items) - #49: Remove "Task" type label from timeline items for cleaner UI - #51: Combine multiple PlanToEat meals for same date+mealType - #52: Change Conditions tab to standard link to standalone page Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26Add day of week to timeline section headingsPeter Stone
Section headings now show the day of week for better orientation: - "Today - Monday" - "Tomorrow - Tuesday" - "Wednesday, Jan 29+" (for later items) 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-26Fix calendar timezone handling with configurable display timezonePeter Stone
- Add TIMEZONE config option (defaults to Pacific/Honolulu) - Store display timezone in GoogleCalendarClient - Convert all event times to configured display timezone - Parse events in their native timezone then convert for display This fixes the issue where events were showing 10 hours off due to server running in UTC while user is in Hawaii. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26Fix Google Calendar timezone handlingPeter Stone
- Use event's TimeZone field when parsing DateTime - Handle cases where DateTime has no timezone offset - Parse in event timezone then convert to local for display Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>