summaryrefslogtreecommitdiff
path: root/SESSION_STATE.md
blob: 55138c98b4038380929840de1d04bc8a679e94e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Current Session State

## 🎯 Active Goal
Board sorting implementation complete.

## ✅ Completed
- Initial Phase 1 feature set (Trello, Todoist, Obsidian, PlanToEat)
- Basic testing suite (9/9 passing)
- **Database Hardening:** Enabled WAL mode for better concurrency (sqlite.go:32-35)
- **Database Hardening:** Set MaxOpenConns(1) to prevent "database is locked" errors (sqlite.go:38)
- **Security Fix:** SQL injection vulnerability in GetNotes LIMIT clause (sqlite.go:215-221)
- **Commit:** 4c03e9c "Harden database security and reliability"
- **Security Fix:** Path traversal mitigation - skip symbolic links in Obsidian scanner (obsidian.go:54-57)
- **Commit:** 325811c "Mitigate path traversal risk in Obsidian scanner"
- **Performance Optimization:** Parallelized Trello card fetching with semaphore-limited concurrency (trello.go:197-220)
- **Commit:** 80c2332 "Parallelize Trello card fetching for improved performance"
- **Cleanup:** Removed AI Agent middleware and `/api/claude/snapshot` endpoint
  - Deleted: internal/middleware/ai_auth.go, ai_auth_test.go
  - Removed: AIAgentAPIKey from config.go
  - Removed: AI Endpoint reference from CLAUDE.md documentation
  - All tests passing after removal
  - **Commit:** 1d47891 "Remove AI agent middleware and snapshot endpoint"
  - **Commit:** 6a89948 "Remove obsolete AI endpoint reference from documentation"
- **Test Coverage:** Added security tests for path traversal and SQL injection fixes
  - internal/api/obsidian_test.go: TestGetNotes_SymlinkSecurity validates symlink protection
  - internal/store/sqlite_test.go: TestGetNotes_LimitClause validates LIMIT parameterization
  - 2 new test files with 7 total test cases, all passing
  - **Commit:** e576710 "Add security tests for path traversal and SQL injection fixes"
- **UX Improvement:** Board sorting - non-empty boards first, then alphabetical
  - internal/api/trello.go:220-228: Added sort logic to GetBoardsWithCards
  - internal/store/sqlite.go:428-433: Updated SQL query to sort cached boards consistently
  - Empty boards now pushed to bottom, active boards at top

## 🏗️ Architecture & Decisions
- **Decision:** Use SQLite for caching with a 5-minute TTL.
- **Decision:** Trello is the primary task system, requiring Key+Token auth.
- **Decision:** Limit Trello concurrent requests to 5 to prevent API rate limiting.
- **Decision:** Removed AI agent endpoint - dashboard is human-facing only.

## 📋 Next Steps
1. **Future:** Consider Phase 2 features (write operations, user management).

## ⚠️ Known Blockers / Debt
- None currently.