summaryrefslogtreecommitdiff
path: root/SESSION_STATE.md
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-01-28 23:32:26 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-01-28 23:32:26 -1000
commitd39220eac03fbc5b714bde989665ed1c92dd24a5 (patch)
tree03e1985745043b9af6e7442ac21fdcd5d843146f /SESSION_STATE.md
parent05b1930e04ac222d73ffb2f45c1b1febb69f893d (diff)
Expand agent context API with completed log and calendar view
- 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>
Diffstat (limited to 'SESSION_STATE.md')
-rw-r--r--SESSION_STATE.md23
1 files changed, 16 insertions, 7 deletions
diff --git a/SESSION_STATE.md b/SESSION_STATE.md
index b4dd64d..cc637a7 100644
--- a/SESSION_STATE.md
+++ b/SESSION_STATE.md
@@ -8,14 +8,23 @@ Agent Context API - Refactored for simplicity and clarity
- Status: [REVIEW_READY] Phase 1 Complete + Browser-Only Agent Endpoints + Refactored
- Phase 2 (Write Operations) and Phase 3 (Create + Management) pending
-### Recent Refactoring (agent.go)
+### Recent Updates
+**Refactoring (agent.go):**
- Reused `BuildTimeline()` from timeline_logic.go instead of duplicating fetch logic
-- Removed ~60 lines of duplicate timeline building code
-- Added section headers for code organization: Constants, Types, Helpers, Auth Handlers, Context Handlers, Middleware, Web Handlers
-- Extracted `isSessionExpired()` helper to reduce duplication
-- Extracted `renderAgentTemplate()` helper to simplify template rendering
-- Moved `AgentRequestPayload` from websocket.go to agent.go (agent-specific type)
-- Used `config.Now()` and `config.Today()` for consistent timezone handling
+- Added section headers for code organization
+- Extracted helpers: `isSessionExpired()`, `renderAgentTemplate()`
+
+**Enhanced Context API:**
+- Extended date range: 7 days back (overdue) to 14 days forward
+- Added `completed_log` - tracks completed tasks with title, due date, completion date
+- Added `day_section` field to timeline items (overdue/today/tomorrow/later)
+- Calendar-style view for today (6am-10pm) in HTML template
+- Tabs for Timeline vs Completed Log in web view
+
+**New Database:**
+- `completed_tasks` table (migration 011) - logs completed task history
+- `SaveCompletedTask()` / `GetCompletedTasks()` store methods
+- `CompletedTask` model type
### Phase 1 Completed Items
- [x] Migration `migrations/010_agent_tables.sql` — agents and agent_sessions tables