Skip to content

Fix frontend Jest setup and stabilize tests#217

Draft
davewaring wants to merge 4 commits intomainfrom
feature/fs-primitives
Draft

Fix frontend Jest setup and stabilize tests#217
davewaring wants to merge 4 commits intomainfrom
feature/fs-primitives

Conversation

@davewaring
Copy link
Contributor

@davewaring davewaring commented Jan 26, 2026

Summary

  • stabilize frontend Jest with custom transformer, CSS mock, and test setup helpers
  • fix published mode interaction tracking and cache invalidation behavior
  • adjust animation hook state handling and test expectations across auth/published/renderer suites

Testing

  • npx jest src/features/unified-dynamic-page-renderer/tests/UnifiedPageRenderer.test.tsx --runInBand
  • npm test -- --runInBand

Implements Phase 1 & 2 of library-integration project:

Endpoints:
- GET /api/v1/fs/config - Get Library configuration (path, exists)
- GET /api/v1/fs/read - Read file content
- POST /api/v1/fs/write - Create/replace file
- POST /api/v1/fs/append - Append to file
- GET /api/v1/fs/list - List directory contents
- DELETE /api/v1/fs/delete - Delete file (admin only)
- POST /api/v1/fs/init - Initialize Library with starter content

Configuration:
- LIBRARY_PATH setting in config.py (default: ~/BrainDrive-Library)
- Supports .env override
- Tilde expansion for home directory

Security:
- Path traversal prevention
- Restricted to text file extensions (.md, .txt, .json, .yaml, .yml)
- Delete requires admin authentication
- All endpoints require user authentication

See: projects/active/library-integration/build-plan.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@davewaring davewaring marked this pull request as draft January 28, 2026 13:08
@davewaring davewaring changed the title Add core filesystem primitives API (/api/v1/fs/*) Add filesystem primitives and library setup Jan 28, 2026
@davewaring davewaring changed the title Add filesystem primitives and library setup Fix frontend Jest setup and stabilize tests Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant