144 Commits

Author SHA1 Message Date
Thomas Richter
81920c9125 feat(09-04): add Slack notification on pipeline failure
Some checks failed
Build and Push / test (push) Has been cancelled
Build and Push / build (push) Has been cancelled
Build and Push / notify (push) Has been cancelled
- Add notify job that runs when test or build fails
- Use curl to Slack webhook for Gitea compatibility
- Notify job depends on both test and build jobs
2026-02-03 23:40:53 +01:00
Thomas Richter
0daf7720dc feat(09-04): add test job to CI pipeline
- Add test job with type checking, unit tests, and E2E tests
- Install Playwright browsers for E2E testing
- Upload coverage and playwright reports as artifacts
- Build job now depends on test job (fail-fast)
2026-02-03 23:40:36 +01:00
Thomas Richter
a98c06f0a0 docs(09-03): complete E2E test suite plan
Tasks completed: 3/3
- Configure Playwright for E2E with multi-viewport
- Create database seeding fixture
- Write E2E tests for core user journeys

SUMMARY: .planning/phases/09-ci-pipeline/09-03-SUMMARY.md
2026-02-03 23:39:18 +01:00
Thomas Richter
4aa0de9d1d docs(09-02): complete unit and component tests plan
Tasks completed: 3/3
- Write unit tests for highlightText and parseHashtags utilities
- Write browser-mode component tests for 3 Svelte 5 components
- Configure coverage thresholds with baseline

SUMMARY: .planning/phases/09-ci-pipeline/09-02-SUMMARY.md
2026-02-03 23:38:35 +01:00
Thomas Richter
ced5ef26b9 feat(09-03): add E2E tests for core user journeys
- Create workflow: quick capture, persistence, optional title
- Edit workflow: expand, modify, auto-save, persistence
- Search workflow: text search, no results, clear filter
- Organize workflow: type filter, tag filter, pinning
- Delete workflow: swipe delete, removal verification
- Task completion: checkbox toggle, strikethrough styling

Tests run on desktop and mobile viewports (34 total tests)
2026-02-03 23:38:07 +01:00
Thomas Richter
d647308fe1 chore(09-02): configure coverage thresholds with baseline
- Set global thresholds: statements 10%, branches 5%, functions 20%, lines 8%
- Current coverage: statements ~12%, branches ~7%, functions ~24%, lines ~10%
- Thresholds prevent regression, target is 80% (CI-01 decision)
- Thresholds will be increased incrementally as more tests are added
2026-02-03 23:37:22 +01:00
Thomas Richter
43446b807d test(09-02): add browser-mode component tests for Svelte 5 components
- CompletedToggle: 5 tests for checkbox rendering, state, and interaction
- SearchBar: 7 tests for input, placeholder, recent searches dropdown
- TagInput: 6 tests for rendering with various tag configurations
- Update vitest-setup-client.ts with $app/state, preferences, recentSearches mocks
- All component tests run in real Chromium browser via Playwright
2026-02-03 23:36:19 +01:00
Thomas Richter
283a9214ad feat(09-03): create database seeding fixture for E2E tests
- Add test fixture with seededDb for predictable test data
- Include 5 entries: tasks and thoughts with various states
- Include 3 tags with entry-tag relationships
- Export extended test with fixtures from tests/e2e/index.ts
- Install drizzle-seed dependency
2026-02-03 23:35:23 +01:00
Thomas Richter
20d9ebf2ff test(09-02): add unit tests for highlightText and parseHashtags utilities
- highlightText: 24 tests covering highlighting, case sensitivity, HTML escaping
- parseHashtags: 29 tests for extraction, 6 tests for highlightHashtags
- Tests verify XSS prevention, regex escaping, edge cases
2026-02-03 23:33:36 +01:00
Thomas Richter
3664afb028 feat(09-03): configure Playwright for E2E testing
- Set testDir to './tests/e2e' for E2E tests
- Configure single worker for database safety
- Add desktop and mobile viewports (Desktop Chrome, Pixel 5)
- Enable screenshots on failure, disable video
- Add webServer to auto-build and preview app
- Create separate docker config for deployment tests
2026-02-03 23:33:12 +01:00
Thomas Richter
623811908b docs(09-01): complete Vitest infrastructure plan
Tasks completed: 3/3
- Install Vitest dependencies and configure multi-project setup
- Create SvelteKit module mocks in setup file
- Write sample test to verify infrastructure

SUMMARY: .planning/phases/09-ci-pipeline/09-01-SUMMARY.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:30:46 +01:00
Thomas Richter
b930f1842c test(09-01): add filterEntries unit tests proving infrastructure
- Test empty input handling
- Test query filter (min 2 chars, case insensitive, title OR content)
- Test tag filter (AND logic, case insensitive)
- Test type filter (task/thought/all)
- Test date range filter (start, end, both)
- Test combined filters
- Test generic type preservation

17 tests covering filterEntries.ts with 100% coverage

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:29:44 +01:00
Thomas Richter
b0e8e4c0b9 feat(09-01): add SvelteKit module mocks for browser tests
- Mock $app/navigation (goto, invalidate, invalidateAll, beforeNavigate, afterNavigate)
- Mock $app/stores (page, navigating, updated)
- Mock $app/environment (browser, dev, building)
- Add Vitest browser type references

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:28:49 +01:00
Thomas Richter
a3ef94f572 feat(09-01): configure Vitest with multi-project setup
- Install Vitest, @vitest/browser, vitest-browser-svelte, @vitest/coverage-v8
- Configure multi-project: client (browser/Playwright) and server (node)
- Add test scripts: test, test:unit, test:unit:watch, test:coverage
- Coverage provider: v8 with autoUpdate thresholds

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:28:21 +01:00
Thomas Richter
49e1c90f37 docs(09): create phase plan
Phase 09: CI Pipeline Hardening
- 4 plan(s) in 3 wave(s)
- Wave 1: Infrastructure setup (09-01)
- Wave 2: Tests in parallel (09-02, 09-03)
- Wave 3: CI integration (09-04)
- Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:23:27 +01:00
Thomas Richter
036a81b6de docs(09): research CI pipeline hardening domain
Phase 9: CI Pipeline Hardening
- Standard stack: Vitest + browser mode, Playwright, svelte-check
- Architecture: Multi-project config for client/server tests
- Pitfalls: jsdom limitations, database parallelism, SvelteKit mocking

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:17:33 +01:00
Thomas Richter
7f3942eb7c docs(09): capture phase context
Phase 09: CI Pipeline Hardening
- Implementation decisions documented
- Phase boundary established
2026-02-03 23:09:24 +01:00
Thomas Richter
d248cba77f docs(08-03): complete observability verification plan
Tasks completed: 3/3
- Deploy TaskPlanner with ServiceMonitor and verify Prometheus scraping
- Verify critical alert rules exist
- Human verification checkpoint (all OBS requirements verified)

Deviation: Fixed Loki datasource conflict (isDefault collision with Prometheus)

SUMMARY: .planning/phases/08-observability-stack/08-03-SUMMARY.md
2026-02-03 22:45:12 +01:00
Thomas Richter
91f91a3829 fix(08-03): add release label to ServiceMonitor for Prometheus discovery
Some checks failed
Build and Push / build (push) Has been cancelled
- Prometheus serviceMonitorSelector requires 'release: kube-prometheus-stack' label
- Without this label, Prometheus doesn't discover the ServiceMonitor
2026-02-03 22:20:55 +01:00
Thomas Richter
de82532bcd docs(08-02): complete Promtail to Alloy migration plan
Some checks failed
Build and Push / build (push) Has been cancelled
Tasks completed: 2/2
- Deploy Grafana Alloy via Helm (DaemonSet on all 5 nodes)
- Verify log flow and remove Promtail

SUMMARY: .planning/phases/08-observability-stack/08-02-SUMMARY.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:13:22 +01:00
Thomas Richter
c2952284f9 feat(08-02): deploy Grafana Alloy for log collection
- Add helm/alloy Chart.yaml as umbrella chart for grafana/alloy
- Configure Alloy River config for Kubernetes pod log discovery
- Set up loki.write endpoint to forward logs to Loki
- Configure DaemonSet with control-plane tolerations for all 5 nodes

Replaces Promtail (EOL March 2026) with Grafana Alloy

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:09:50 +01:00
Thomas Richter
c6aa762a6c docs(08-01): complete TaskPlanner metrics and ServiceMonitor plan
Tasks completed: 2/2
- Add prom-client and create /metrics endpoint
- Add ServiceMonitor to Helm chart

SUMMARY: .planning/phases/08-observability-stack/08-01-SUMMARY.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:07:43 +01:00
Thomas Richter
f2a289355d feat(08-01): add ServiceMonitor for Prometheus scraping
- Create ServiceMonitor template for Prometheus Operator discovery
- Add metrics.enabled and metrics.interval to values.yaml
- ServiceMonitor selects TaskPlanner pods via selectorLabels
- Scrapes /metrics endpoint every 30s by default

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:06:14 +01:00
Thomas Richter
f60aad2864 feat(08-01): add Prometheus /metrics endpoint with prom-client
- Install prom-client library for Prometheus metrics
- Create src/lib/server/metrics.ts with default Node.js process metrics
- Add /metrics endpoint that returns Prometheus-format text
- Exposes CPU, memory, heap, event loop metrics

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:05:16 +01:00
Thomas Richter
8c3dc137ca docs(08): create phase plan
Phase 08: Observability Stack
- 3 plans in 2 waves
- Wave 1: 08-01 (metrics), 08-02 (Alloy) - parallel
- Wave 2: 08-03 (verification) - depends on both
- Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 21:24:24 +01:00
Thomas Richter
3d11a090be docs(07): complete GitOps Foundation phase
Phase 7 verified:
- GITOPS-01: ArgoCD server running ✓
- GITOPS-02: Auto-sync verified (137s response time) ✓
- GITOPS-03: Self-heal verified (pod restored) ✓
- GITOPS-04: ArgoCD UI accessible ✓

All 5/5 must-haves passed.
2026-02-03 20:04:52 +01:00
Thomas Richter
6a88c662b0 docs(07-02): complete GitOps verification plan
Tasks completed: 3/3
- Test auto-sync by pushing a helm change
- Test self-heal by deleting a pod
- Checkpoint - Human verification (approved)

Phase 7 (GitOps Foundation) complete.
SUMMARY: .planning/phases/07-gitops-foundation/07-02-SUMMARY.md
2026-02-03 20:01:20 +01:00
Thomas Richter
175930c395 test(gitops): verify auto-sync with annotation change
Some checks failed
Build and Push / build (push) Has been cancelled
2026-02-03 15:29:59 +01:00
Thomas Richter
d5fc8c8b2e docs(07-01): complete ArgoCD registration plan
Some checks failed
Build and Push / build (push) Has been cancelled
Tasks completed: 3/3
- Create ArgoCD repository secret for TaskPlanner
- Update and apply ArgoCD Application manifest
- Wait for sync and verify healthy status

SUMMARY: .planning/phases/07-gitops-foundation/07-01-SUMMARY.md
2026-02-03 15:28:27 +01:00
Thomas Richter
5a4d9ed5b9 fix(07-01): use admin namespace for Gitea repository
Some checks failed
Build and Push / build (push) Has been cancelled
- Change repo URL to admin/taskplaner (repo created under admin user)
- Update CI workflow image name to admin/taskplaner
- Update repo secret documentation with correct path
2026-02-03 15:20:47 +01:00
Thomas Richter
eff251ca70 feat(07-01): update ArgoCD application for internal cluster access
Some checks failed
Build and Push / build (push) Has been cancelled
- Change repoURL to internal Gitea cluster service
- Remove inline registry secret placeholder (created via kubectl)
- Registry secret created separately for security
2026-02-03 15:07:40 +01:00
Thomas Richter
54f933b1f7 chore(07-01): add ArgoCD repository secret documentation
- Document taskplaner-repo secret structure for ArgoCD
- Secret created via kubectl (not committed) for security
- Uses internal cluster URL for Gitea access
2026-02-03 15:07:05 +01:00
Thomas Richter
1d4302d5bf docs(07): create phase plan
Phase 07: GitOps Foundation
- 2 plan(s) in 2 wave(s)
- Wave 1: 07-01 (register application)
- Wave 2: 07-02 (verify gitops behavior)
- Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 14:54:41 +01:00
Thomas Richter
c1c46d9581 docs(07): capture phase context
Phase 07: GitOps Foundation
- ArgoCD already installed, UI accessible
- Apply TaskPlanner Application manifest
- Verify sync, self-heal, auto-deploy
2026-02-03 14:50:19 +01:00
Thomas Richter
27ed813413 docs: create milestone v2.0 roadmap (3 phases)
Phases:
7. GitOps Foundation: ArgoCD installation and configuration
8. Observability Stack: Prometheus/Grafana/Loki + alerts
9. CI Pipeline Hardening: Vitest, Playwright, type checking

All 17 requirements mapped to phases.
2026-02-03 14:41:43 +01:00
Thomas Richter
34b1c05146 docs: define milestone v2.0 requirements
17 requirements across 3 categories:
- GitOps: 4 (ArgoCD installation and configuration)
- Observability: 8 (Prometheus/Grafana/Loki stack + app metrics)
- CI Testing: 5 (Vitest, Playwright, type checking)
2026-02-03 13:27:31 +01:00
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