mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 19:21:33 +02:00
Track and display who performs key actions in Bambuddy: - Archives: who uploaded each archive file - Library: who uploaded each file in File Manager - Queue: who added each print job to the queue - Printers: who started the current print (reprint tracking) Backend changes: - Add created_by_id column to print_archives, library_files, print_queue tables - Add database migrations for new columns (auto-run on startup) - Update archive, library, and queue routes to capture current user - Add current-print-user endpoint for printer reprint tracking - Track reprint user in PrinterManager in-memory state - Fix file uploads not sending auth headers (FormData requires explicit headers) Frontend changes: - Display username on archive cards, library files, queue items - Show "Started by" on printer cards during active prints - Add auth headers to all 12 FormData upload functions - Update TypeScript types for user tracking fields Tests: - Add unit tests for PrinterManager user tracking methods (7 tests) - Add integration tests for current-print-user endpoint (3 tests) - Add integration tests for library file user tracking (3 tests) Works when authentication is enabled; gracefully hidden when disabled. Closes #206