Commit Graph

4 Commits

Author SHA1 Message Date
chihlasm
e39819f8d0 Add Playwright e2e coverage and Node 20 pin 2026-03-16 02:29:22 -04:00
chihlasm
791fd133c4 test: set up Vitest with 61 frontend tests
Add Vitest + testing-library/react + jsdom for frontend testing.
Tests cover: cn() utility (6), usePermissions hook (27), useTreeValidation
hook (22), and userPreferencesStore (6). CI updated to run frontend tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:18:38 -05:00
chihlasm
e216d5039e test: add export security tests and CI coverage reporting
Export security tests (26 new tests):
- 11 XSS prevention tests covering all user-supplied fields in HTML export
  (tree name, ticket, client, decisions, notes, timestamps, scratchpad)
- 7 edge case tests (unicode/emoji, empty decisions, missing fields, long content)
- 5 format-specific tests (markdown headers, text numbering)
- 3 HTML structure tests (valid document, CSS, timestamp toggle)

CI coverage reporting:
- Add --cov=app --cov-report flags to pytest in GitHub Actions
- Display per-module coverage summary after test run
- Baseline: 63% overall, 98% on export_service.py

Total tests: 215 (189 existing + 26 new)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 14:53:22 -05:00
chihlasm
b97596d286 refactor: tech debt reduction - extract hooks, deduplicate helpers, update deps, add CI
- Extract useCustomStepFlow hook from TreeNavigationPage (1040 → 759 lines)
- Create core/filters.py with shared tree/step visibility filters
- Create services/export_service.py from session export logic
- Add GitHub Actions CI/CD pipeline (pytest + lint + build)
- Add GIN index migration for full-text search on trees
- Update FastAPI 0.128.5, Pydantic 2.12.5, SQLAlchemy 2.0.46, +5 more
- Fix regex → pattern deprecation in Query() params

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 08:14:22 -05:00