Commit Graph

108 Commits

Author SHA1 Message Date
Thomas Richter
5dbabe6a2d docs: complete v2.0 CI/CD and observability research
Files:
- STACK-v2-cicd-observability.md (ArgoCD, Prometheus, Loki, Alloy)
- FEATURES.md (updated with CI/CD and observability section)
- ARCHITECTURE.md (updated with v2.0 integration architecture)
- PITFALLS-CICD-OBSERVABILITY.md (14 critical/moderate/minor pitfalls)
- SUMMARY-v2-cicd-observability.md (synthesis with roadmap implications)

Key findings:
- Stack: kube-prometheus-stack + Loki monolithic + Alloy (Promtail EOL March 2026)
- Architecture: 3-phase approach - GitOps first, observability second, CI tests last
- Critical pitfall: ArgoCD TLS redirect loop, Loki disk exhaustion, k3s metrics config

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 03:29:23 +01:00
Thomas Richter
6cdd5aa8c7 docs: start milestone v2.0 Production Operations 2026-02-03 03:14:14 +01:00
Thomas Richter
51b4b34c19 feat(ci): add GitOps pipeline with Gitea Actions and ArgoCD
- Add Gitea Actions workflow for building and pushing Docker images
- Configure ArgoCD Application for auto-sync deployment
- Update Helm values to use Gitea container registry
- Add setup documentation for GitOps configuration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 00:05:45 +01:00
Thomas Richter
b205fedde6 fix: remove deleted tags from filter automatically
When a tag is deleted as orphaned, it's now automatically removed
from the active filter selection.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:16:49 +01:00
Thomas Richter
c92aec14d3 feat: auto-cleanup orphaned tags when removed from entries
Tags that are no longer associated with any entry are automatically
deleted from the database when a tag is removed from an entry.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:13:50 +01:00
Thomas Richter
b00d71956e fix: explicit tag scanning with delete UI
- Remove auto-parsing on collapse
- Add "Scan for #tags" button that parses from current textarea content
- Always show tags section with delete buttons
- Show help text when no tags exist

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:41:35 +01:00
Thomas Richter
a19e51b6b9 fix: parse hashtags only when collapsing entry card
Move tag parsing from textarea blur to entry collapse action.
This prevents incomplete tags from being created while editing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:35:32 +01:00
Thomas Richter
79c9b12702 fix: parse hashtags only on blur/submit, add tag delete UI
- Parse hashtags when content textarea loses focus (blur)
- Parse hashtags when QuickCapture form is submitted
- Add tag display with delete buttons in expanded entry view
- Remove automatic hashtag parsing during typing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:27:02 +01:00
Thomas Richter
4a57000c38 fix: only parse complete hashtags (followed by word boundary)
Prevents incomplete hashtags from being saved during typing when
auto-save fires mid-word.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:17:39 +01:00
Thomas Richter
ce07d79652 feat: parse hashtags from content instead of dedicated tag input
Tags are now automatically extracted from #hashtags in content text.
Removed TagInput from entry editing, keeping it only in FilterBar.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 21:59:04 +01:00
Thomas Richter
21a11bbb22 docs: add v1.1 milestone for Kubernetes deployment
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 21:41:28 +01:00
Thomas Richter
e1092ce459 feat(helm): add basic auth support via Traefik middleware
- Add basicAuth.enabled and basicAuth.htpasswd values
- Create middleware.yaml template for Secret and Traefik Middleware
- Update ingress to include middleware annotation when enabled

Usage:
  helm upgrade taskplaner ./helm/taskplaner \
    --set basicAuth.enabled=true \
    --set basicAuth.htpasswd='admin:$apr1$...'

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:52:43 +01:00
Thomas Richter
5e893aaf23 fix(helm): rename service to avoid envPrefix conflict
SvelteKit adapter-node uses TASKPLANER_ envPrefix for config.
Kubernetes creates SERVICENAME_* env vars for each service.
Service named "taskplaner" creates TASKPLANER_PORT_* which conflicts.

Changes:
- Add service.name option (default: "tp-app")
- Update ingress to reference configured service name

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 18:49:21 +01:00
Thomas Richter
0945f01563 feat: add Helm chart for Kubernetes deployment
Includes:
- Deployment with health checks and resource limits
- Service (ClusterIP by default)
- PersistentVolumeClaim for data storage
- Optional Ingress with TLS support
- Configurable via values.yaml

Usage: helm install taskplaner ./helm/taskplaner

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 17:16:11 +01:00
Thomas Richter
37023b2605 docs: complete milestone v1.0 archival
- Archive roadmap, requirements, and audit to .planning/milestones/
- Update PROJECT.md with validated requirements and decisions
- Reset STATE.md for next milestone cycle
- Create MILESTONES.md for project history

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 17:15:53 +01:00
Thomas Richter
8793e155d6 docs: add v1 milestone audit report
All 31 requirements satisfied, 6/6 phases verified, 96% integration score.
Ready for milestone completion.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 16:02:06 +01:00
Thomas Richter
84ad332737 fix(deploy): resolve Docker startup and CSRF issues
- Rename TASKPLANER_DATA_DIR to DATA_DIR (avoid adapter-node envPrefix conflict)
- Add TASKPLANER_ORIGIN for CSRF protection in docker-compose.yml
- Add automatic database schema initialization on startup
- Add Playwright E2E tests for Docker deployment verification
- Update .env.example with correct variable names

Fixes container restart loop and 403 errors on form submission.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 15:54:44 +01:00
Thomas Richter
89e703daa5 docs(06): complete deployment phase
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:29:06 +01:00
Thomas Richter
4abff06d26 docs(06-02): complete runtime configuration plan
Tasks completed: 3/3
- Create health check endpoint
- Create environment documentation and backup script
- Add Docker deployment section to README

SUMMARY: .planning/phases/06-deployment/06-02-SUMMARY.md
2026-02-01 13:25:23 +01:00
Thomas Richter
f3a544937b docs(06-02): add Docker deployment section to README
- Quick Start with docker-compose commands
- Configuration with key environment variables
- Reverse proxy setup instructions
- Data persistence and volume info
- Backup and restore procedures
- Health check verification
2026-02-01 13:24:13 +01:00
Thomas Richter
c92cb3e78c feat(06-02): add environment docs and backup script
- .env.example documents all configuration options
- backup.sh creates timestamped archive of Docker volume
- Supports custom volume name via VOLUME_NAME env var
2026-02-01 13:23:48 +01:00
Thomas Richter
de09b14239 feat(06-02): create health check endpoint
- Returns 200 'ok' when database is accessible
- Returns 503 'unhealthy' when database query fails
- Simple text response for Docker HEALTHCHECK
2026-02-01 13:23:12 +01:00
Thomas Richter
8947ba30f0 docs(06-01): complete docker configuration plan
Tasks completed: 3/3
- Switch to adapter-node with environment prefix
- Create Docker configuration files
- Update data paths for environment variable configuration

SUMMARY: .planning/phases/06-deployment/06-01-SUMMARY.md
2026-02-01 13:21:52 +01:00
Thomas Richter
457bacaeab feat(06-01): configure data paths via TASKPLANER_DATA_DIR env var
- Update db/index.ts to read data directory from env var
- Update storage.ts to read data directory from env var
- Both default to ./data for local development
2026-02-01 13:20:49 +01:00
Thomas Richter
5e31b697e7 feat(06-01): add Docker configuration for production deployment
- Create Dockerfile with multi-stage build using node:22-alpine
- Run as non-root 'nodejs' user for security
- Add HEALTHCHECK for container orchestration
- Create docker-compose.yml with taskplaner_data named volume
- Add .dockerignore to optimize build context
2026-02-01 13:20:23 +01:00
Thomas Richter
3b9f434ed5 feat(06-01): switch to adapter-node with environment prefix
- Install @sveltejs/adapter-node as dev dependency
- Configure adapter with out: 'build', precompress: true
- Set envPrefix to 'TASKPLANER_' for environment variables
2026-02-01 13:19:13 +01:00
Thomas Richter
80e4769221 docs(06): create phase plan
Phase 06: Deployment
- 2 plans in 2 waves
- Wave 1: Docker configuration (adapter-node, Dockerfile, docker-compose)
- Wave 2: Runtime configuration (health endpoint, env docs, backup script)
- Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:06:33 +01:00
Thomas Richter
94044cc49a docs(06): research phase domain
Phase 6: Deployment
- Standard stack identified (adapter-node, node:22-alpine)
- Multi-stage Dockerfile patterns documented
- Native module (better-sqlite3, sharp) considerations
- SQLite WAL mode and Docker volume best practices
- Environment variable configuration patterns
- Health check and backup script examples
2026-02-01 13:03:07 +01:00
Thomas Richter
ef89b721f6 docs(06): capture phase context
Phase 06: Deployment
- Implementation decisions documented
- Phase boundary established

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:56:27 +01:00
Thomas Richter
4a5e9ff04f docs(05): complete search phase
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 17:24:36 +01:00
Thomas Richter
311bfeaca4 docs(05-03): complete search integration plan
Tasks completed: 3/3
- Create recent searches store and add dropdown UI
- Integrate filtering into EntryList with flat list mode
- Add highlighting to EntryCard and integrate search UI

SUMMARY: .planning/phases/05-search/05-03-SUMMARY.md
2026-01-31 17:20:10 +01:00
Thomas Richter
bb1e64ad2b feat(05-03): add highlighting to EntryCard and integrate search UI
- Add searchQuery prop to EntryCard for text highlighting
- Use {@html highlightText()} for title and content in collapsed view
- Integrate SearchBar and FilterBar in +page.svelte
- Add search/filter state with reactive sync to filters.query
- Pass recentSearches store to SearchBar
- Update filterEntries to use generics for type preservation
2026-01-31 17:18:55 +01:00
Thomas Richter
9642b51ef8 feat(05-03): integrate filtering into EntryList with flat list mode
- Add filters and searchQuery props to EntryList
- Apply filterEntries via $derived for reactive filtering
- Display flat list (no pinned separation) when filtering
- Show search-specific empty state when no matches
- Pass searchQuery to EntryCard for highlighting
2026-01-31 17:17:31 +01:00
Thomas Richter
af61b10a59 feat(05-03): create recent searches store and add dropdown UI
- Add recentSearches persisted store with 5-item limit
- Add addRecentSearch() function for deduplication
- Update SearchBar with recentSearches dropdown
- Show dropdown on focus when input empty
- Use onmousedown to handle selection before blur
- Add to recent searches on blur with >= 2 chars
2026-01-31 17:17:03 +01:00
Thomas Richter
6090d78824 docs(05-01): complete search UI components plan
Tasks completed: 3/3
- Create search types and utility functions
- Create SearchBar component with debounced input
- Create FilterBar component with type, tag, date controls

SUMMARY: .planning/phases/05-search/05-01-SUMMARY.md
2026-01-31 17:14:42 +01:00
Thomas Richter
628312dbd9 docs(05-02): complete filtering utilities plan
Tasks completed: 2/2
- Create filterEntries utility function
- Create highlightText utility function

SUMMARY: .planning/phases/05-search/05-02-SUMMARY.md
2026-01-31 17:13:47 +01:00
Thomas Richter
5e94609286 feat(05-01): create FilterBar component with type, tag, date controls
- Type filter: three-state toggle (All/Tasks/Thoughts)
- Tag filter: multi-select using Svelecte
- Date range: quick presets (Today/Week/Month) + custom inputs
- Clear button: only visible when hasActiveFilters() returns true
- Horizontal flex-wrap layout for responsive design
2026-01-31 17:13:16 +01:00
Thomas Richter
6dbe660a8e feat(05-02): create highlightText utility function
- Wrap matching text in <mark> tags with bold styling
- Escape HTML before highlighting to prevent XSS
- 2-character minimum query requirement
- Uses bg-transparent (no background per CONTEXT.md)
2026-01-31 17:12:43 +01:00
Thomas Richter
b7a982c104 feat(05-01): create SearchBar component with debounced input
- Debounced value binding (300ms delay via $effect cleanup)
- Only trigger search when query >= 2 chars OR cleared to empty
- Bindable value prop for parent integration
- '/' keyboard shortcut to focus search (GitHub-style)
- Native event listener to avoid Svelte 5 keydown bug
2026-01-31 17:12:25 +01:00
Thomas Richter
8f544a9989 feat(05-02): create filterEntries utility function
- Add SearchFilters type and utilities (search.ts)
- Implement filterEntries with query, tags, type, dateRange filters
- Case-insensitive text search with 2-character minimum
- AND logic for tag filtering
- Date range inclusive of end date
2026-01-31 17:11:53 +01:00
Thomas Richter
b1e62a4658 feat(05-01): create search types and utility functions
- Add SearchFilters interface for query, tags, type, dateRange
- Add defaultFilters constant with empty/default values
- Add hasActiveFilters() to detect when filters are active
- Add getDatePreset() helper for today/week/month presets
2026-01-31 17:11:51 +01:00
Thomas Richter
f6144f4edf docs(05): create phase plan
Phase 05: Search
- 3 plans in 2 waves
- Wave 1: 05-01 (UI components), 05-02 (filtering logic) — parallel
- Wave 2: 05-03 (integration + recent searches + "/" shortcut)
- Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 14:15:38 +01:00
Thomas Richter
9d4f9bb67f docs(05): research phase domain
Phase 05: Search
- Client-side filtering recommended (small dataset)
- Svelte 5 $effect cleanup for debouncing
- HTML <mark> for text highlighting
- svelte-persisted-store for recent searches
- Native event listener for "/" shortcut (Svelte bug workaround)
2026-01-31 14:12:26 +01:00
Thomas Richter
2f905274c4 docs(05): capture phase context
Phase 05: Search
- Implementation decisions documented
- Phase boundary established

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 13:43:33 +01:00
Thomas Richter
26619ecbe3 docs(04): complete Tags & Organization phase
- All 3 plans executed (04-01, 04-02, 04-03)
- 7/7 success criteria verified
- 7 requirements completed (TAG-01-04, ORG-01-03)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 13:14:10 +01:00
Thomas Richter
e924839ee4 docs(04-03): complete tag input UI plan
Tasks completed: 2/2
- Install Svelecte and update load/actions for tags
- Create TagInput component and integrate into EntryCard

SUMMARY: .planning/phases/04-tags/04-03-SUMMARY.md
2026-01-31 13:10:39 +01:00
Thomas Richter
0c1a66b4c6 feat(04-03): create TagInput component and integrate into EntryCard
- Create TagInput.svelte with Svelecte for multi-select autocomplete
- Support creating new tags inline via creatable mode
- Display tags on collapsed entry cards (max 3 with +N indicator)
- Add TagInput in expanded view for editing entry tags
- Pass availableTags through EntryList to EntryCard
- Handle tag changes with immediate save via updateTags action
2026-01-31 13:09:34 +01:00
Thomas Richter
cfdb804118 feat(04-03): install Svelecte and add tag support to load/actions
- Install svelecte package for tag input with autocomplete
- Import tagRepository in +page.server.ts
- Attach tags to entries in load function alongside images
- Return allTags for autocomplete suggestions
- Add updateTags action to update entry tags via JSON payload
2026-01-31 13:07:08 +01:00
Thomas Richter
66fc04efe7 docs(04-01): complete tag schema and repository plan
Tasks completed: 2/2
- Add tags schema with case-insensitive unique index
- Create tagRepository with tag operations

SUMMARY: .planning/phases/04-tags/04-01-SUMMARY.md
2026-01-31 13:05:30 +01:00
Thomas Richter
7539d1591a docs(04-02): complete pin/favorite and due date plan
Tasks completed: 2/2
- Add togglePin and updateDueDate form actions
- Add pin button, due date picker, and pinned section UI

SUMMARY: .planning/phases/04-tags/04-02-SUMMARY.md
2026-01-31 13:05:04 +01:00