Commit Graph

3 Commits

Author SHA1 Message Date
Steffen Schuhmann
fbac62a0ea feat: band NC folder config, fix watcher event filter, add light/dark theme
- Add PATCH /bands/{id} endpoint for admins to update nc_folder_path
- Add band NC scan folder UI panel with inline edit
- Fix watcher: use activity type field (not human-readable subject) for upload detection
- Reorder watcher filters: audio extension check first, then band path, then type
- Add dark/light theme toggle using GitHub Primer-inspired CSS custom properties
- All inline styles migrated to CSS variables for theme-awareness

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 00:29:58 +01:00
Steffen Schuhmann
5536bf4394 fix: watcher path normalization, subject filter, and debug logging
Two filter bugs caused every activity to be silently dropped:

1. Path format: Nextcloud activity API returns paths as
   /username/files/bands/... but is_band_audio_path() was checking
   parts[0] == "bands" after strip("/"), getting "username" instead.
   Fix: normalize_nc_path() strips the /username/files/ and DAV prefixes
   before any path checks are applied.

2. Subject names: filter was checking for "file_created"/"file_changed"
   but Nextcloud uses "created_by"/"changed_by"/"created_self"/etc.
   Fix: expanded _UPLOAD_SUBJECTS to cover all known NC activity subjects.

3. Expose NextcloudWatcherClient.username so normalize_nc_path() can
   construct the correct prefix for the configured user.

4. Set watcher log level to DEBUG with per-activity skip reasons logged,
   so the next filter edge case is immediately diagnosable. httpx/httpcore
   kept at INFO/WARNING to avoid flooding the output.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 22:12:56 +01:00
Steffen Schuhmann
f7be1b994d Initial commit: RehearsalHub POC
Full-stack self-hosted band rehearsal platform:

Backend (FastAPI + SQLAlchemy 2.0 async):
- Auth with JWT (register, login, /me, settings)
- Band management with Nextcloud folder integration
- Song management with audio version tracking
- Nextcloud scan to auto-import audio files
- Band membership with link-based invite system
- Song comments
- Audio analysis worker (BPM, key, loudness, waveform)
- Nextcloud activity watcher for auto-import
- WebSocket support for real-time annotation updates
- Alembic migrations (0001–0003)
- Repository pattern, Ruff + mypy configured

Frontend (React 18 + Vite + TypeScript strict):
- Login/register page with post-login redirect
- Home page with band list and creation form
- Band page with member panel, invite link, song list, NC scan
- Song page with waveform player, annotations, comment thread
- Settings page for per-user Nextcloud credentials
- Invite acceptance page (/invite/:token)
- ESLint v9 flat config + TypeScript strict mode

Infrastructure:
- Docker Compose: PostgreSQL, Redis, API, worker, watcher, nginx
- nginx reverse proxy for static files + /api/ proxy
- make check runs all linters before docker compose build

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 21:53:03 +01:00