Commit graph

75 commits

Author SHA1 Message Date
Vadym Samoilenko
9beb2c1936 Fix Studio textarea focus loss on every keystroke
Replaced inner Textarea component (defined inside StudioCustomizeModal)
with a plain renderTextarea() function called directly — prevents React
from unmounting/remounting the textarea on each re-render.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 23:12:32 +00:00
Vadym Samoilenko
b6a30f5830 Redesign notebook detail page to full dark production UI
- Consistent #0D0D0D dark theme throughout, no white sections
- Unified action buttons: dark surface with FFCB05/FF5C00 icon accents
- Studio grid: refined cards with hover lift, pencil shows on hover
- All modals/panels (share, edit, podcast, upload) match dark surface
- Processing/failed banners: dark blue/red tints with proper contrast
- Documents list, synthesis, studio viewer all dark themed
- Studio sub-views (flashcards, quiz, report, datatable) dark themed
- globals.css .dk class resets forced color override for dark sections

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 23:10:51 +00:00
Vadym Samoilenko
f1af6b3d5a Studio: always-visible dark grid, customize modals, downloads for all types
UI:
- Studio grid always visible (dark #1C1C1E, 3-col, 8 cards incl. Audio Overview)
- Each card: click body to view/generate, pencil icon to customize
- Active indicator (green dot) on cards with generated content
- StudioCustomizeModal: dark theme, type-specific options (count, difficulty, format, length, orientation, detail, custom_prompt)

Downloads:
- Mind Map → SVG (server endpoint)
- Flashcards → CSV (client-side)
- Quiz → TXT (client-side)
- Infographic → HTML (client-side, styled)
- Data Table → CSV (client-side)
- Slides → PPTX (existing server endpoint)
- Report → PDF (existing server endpoint)

Backend:
- All gen_* endpoints accept StudioGenerateRequest body with optional params
- All generator functions accept options dict and adjust prompts accordingly
- New GET /notebooks/{id}/studio/mindmap/download → SVG

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 22:47:29 +00:00
Vadym Samoilenko
6dc2096948 Apply OLIVER brand style to Slide Deck viewer and PPTX export
Browser preview:
- White background for content slides, dark (#1A1A1A) for title slide
- Yellow (#FFCB05) top bar, title underline, slide number highlight
- Orange (#FF5C00) bullet dots
- Montserrat font via CSS, responsive clamp() sizing

PPTX download:
- Blank layout with programmatic shapes (no default theme artifacts)
- Dark title slide with yellow left bar and separator line
- White content slides with yellow top/accent bars
- Orange bullet markers, Montserrat font, proper sizing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 22:33:32 +00:00
Vadym Samoilenko
2526897bd9 Move Studio to top action bar as collapsible button row
Studio is now a 5th button in the main action bar. Clicking it expands a second row of 7 colored buttons (Mind Map, Flashcards, Quiz, Slide Deck, Report, Infographic, Data Table) styled to match existing Chat/Share/Analysis/Podcast buttons. Removes the old card grid section.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 22:29:43 +00:00
Vadym Samoilenko
d36c38e2fd Add Studio features: Flashcards, Quiz, Mind Map, Slides, Report, Infographic, Data Table
- studio_generators.py: 7 Pydantic output models + async generators using LLM factory
- database.py: add studio_data TEXT column with safe ALTER TABLE migration
- notebooks.py: GET /studio, POST /studio/{type}, GET /studio/{slides,report}/download
- types/index.ts, api.ts: Studio type interfaces and API calls
- page.tsx: Studio grid section, modal overlay, 7 viewer sub-components (SVG mind map, 3D flashcard flip, scored quiz, slide carousel, report PDF, infographic, data table)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 22:18:06 +00:00
Vadym Samoilenko
4608ca3c5e Add Docker migration: Dockerfiles, compose config, and deployment scripts
- backend/Dockerfile: Python 3.13-slim with uv, ffmpeg, psycopg2
- frontend/Dockerfile: multi-stage Node 22 build with standalone output
- docker-compose.yml: add backend/frontend services with named volumes
- backend/.dockerignore, frontend/.dockerignore: exclude build artifacts
- audio.py: write podcasts to PODCAST_DATA_DIR env var (default: conversations/)
- background_tasks.py: handle .md files directly without LlamaParse
- pyproject.toml: add python-pptx, weasyprint, matplotlib deps
- page.tsx: add Markdown to supported file types hint
- scripts/1_backup.sh: pg_dump + tar files + Docker volume backup
- scripts/2_deploy.sh: full systemd→Docker migration with health checks
- scripts/3_cleanup.sh: post-migration cleanup of build artifacts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 21:34:59 +00:00
michael
f2b1bc47a7 Fix document list auto-refresh after upload
Replace broken useEffect-based refresh (which had race conditions) with
simpler refetchInterval approach. Now the notebook query polls every 2s
while any tasks are processing, then stops when all complete.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 17:21:52 -06:00
michael
5cd835f589 Auto-refresh document list when processing completes
Added useEffect that tracks completed task count and invalidates the
notebook query when new tasks finish. This ensures documents appear
in the list immediately after processing without requiring a manual
page refresh.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 17:03:37 -06:00
michael
5c51379065 Update LLM model options and migrate to new Google GenAI SDK
- Upgrade GPT-5 to GPT-5.1 (gpt5-exp -> gpt51-exp)
- Migrate Gemini from deprecated llama-index-llms-gemini to llama-index-llms-google-genai
- Update Gemini models: gemini-2.5-pro -> gemini-3-pro-preview, gemini-2.0-flash -> gemini-2.5-flash
- Remove GPT-4 option from frontend (legacy, expensive)
- Update pricing information for all models

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 16:40:41 -06:00
michael
269117a460 Add voice preview functionality to podcast generation UI
Users can now preview ElevenLabs voices before selecting them for podcast
generation. Added play/stop buttons next to each voice dropdown that play
the official ElevenLabs preview audio samples.

- Added previewUrl to each voice in the voices array
- Added playPreview function with HTML5 Audio API
- Added play/stop buttons with visual feedback when playing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 10:27:34 -06:00
michael
ee0d98d585 Fix podcast voice selection and update default voice IDs 2025-11-26 08:33:15 -06:00
michael
c2d7f80e8a Update podcast voices list 2025-11-25 15:53:04 -06:00
michael
4df7d52a60 JWT improvements to MSAL routine, .env changes 2025-11-17 14:10:08 -06:00
michael
3df343adef Implement JWT authentication, email autocomplete for sharing, and fix local dev routing
Security improvements:
- Add JWT token authentication for all API endpoints
- Create jwt_auth middleware with token generation and validation
- Update auth routes to return access tokens on login/signup
- Add Authorization header interceptor in frontend API client
- Store JWT tokens in Zustand auth store
- Remove insecure user_id query parameters

Sharing enhancements:
- Add user search API endpoint (GET /api/auth/users/search)
- Implement autocomplete in share modal with debounced search
- Show email and username suggestions in dropdown
- Add keyboard navigation (arrows, Enter, Escape)
- Filter out already-shared users and current user from results
- Add email format validation on frontend and backend

Developer experience:
- Make basePath environment-specific (empty in dev, /notebookllama in prod)
- Update next.config.js to support local development without basePath
- Fix routing issues in local development (login/signup redirects)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 12:51:39 -06:00
Michael Clervi
50897b8a5d changed permissions on deploy script 2025-10-28 21:26:51 +00:00
michael
0556a7f0f9 added deploy script 2025-10-28 16:25:35 -05:00
michael
074eb1bf08 fixed systemd service file for standalone operation 2025-10-28 16:15:18 -05:00
michael
60baaa2597 added red banner and retries for pipline initialization on document uploads 2025-10-20 13:38:12 -05:00
michael
244b550c48 separation between queued and processing in UI 2025-10-20 13:18:59 -05:00
michael
3c0ba1b01c added retry for failed document processing 2025-10-20 12:47:33 -05:00
michael
b83e998a9a fix for failed notebook creation due to llamaindex outage 2025-10-20 12:15:46 -05:00
michael
04049c958d troubleshooting markdown display 2025-10-20 07:15:03 -05:00
michael
cdabbcfa5a added prose styles for response formatting 2025-10-20 06:59:32 -05:00
michael
c102731b81 permanently dismiss failed processing warnings 2025-10-17 18:32:07 -05:00
michael
35ac80c943 made upload failure warnings dismissable and fixed google gemini video processing API syntax 2025-10-17 16:36:57 -05:00
michael
8ccf676df7 migrated to the new google-genai SDK 2025-10-17 16:25:21 -05:00
michael
68108bd472 added gemini video processing support 2025-10-17 16:08:15 -05:00
michael
c70dc59bfc added 30+ supported file formats 2025-10-17 15:11:44 -05:00
michael
464fa23c59 fixed more light colored text -> darker, and made default dark as well 2025-10-17 14:17:20 -05:00
michael
208e912cf2 fixed 'interaction in progress' error with auth 2025-10-17 13:59:20 -05:00
michael
62e2a5b460 switched from popup to redirect based MSAL auth 2025-10-17 13:26:32 -05:00
michael
aac7a52be4 removed user sign up registration from login page 2025-10-16 17:17:23 -05:00
michael
7fffca7143 added base path to front end config 2025-10-16 16:55:36 -05:00
michael
f753dfd74b added front end service 2025-10-16 16:46:05 -05:00
michael
aa6f1c15b7 fixed front end build errors 2025-10-16 16:18:00 -05:00
michael
126803821b changed backend URLs in frontend config for production 2025-10-16 16:12:07 -05:00
michael
f40ed9ad37 fixed some aesthetic things and added MSAL/PKCE login 2025-10-16 11:18:06 -05:00
DJP
292475efc3 Fix chat messages not saving - use existing session_id
- Frontend now passes session_id in WebSocket URL
- Backend uses existing session instead of creating new one
- Messages now save to correct chat session
- Fixes messages disappearing after refresh

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 16:57:37 -04:00
DJP
e9001d977b Fix shared notebooks not showing - add user_id parameter
- getSharedNotebooks now passes user_id
- Shared notebooks will now display correctly
- Users can see notebooks shared with them

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 16:44:53 -04:00
DJP
cfe646068f Add warning about LlamaCloud index sync delay
- Alert users after document deletion
- Warn to wait 1-2 minutes before querying
- LlamaCloud index updates are async and take time

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 16:30:32 -04:00
DJP
c801d197c2 Add confirmation dialog for notebook deletion
- Warn user about consequences before deleting
- Show what will be deleted (docs, chats, pipeline)
- Clear confirmation message

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 16:08:39 -04:00
DJP
94522657c4 Support multiple document types beyond PDF
- Accept PDF, DOCX, DOC, PPTX, PPT, TXT, MD files
- Update UI text to show supported formats
- LlamaParse handles all these file types
- Backend validation for supported extensions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 16:03:22 -04:00
DJP
735a5ffc4f Fix admin panel refresh to prevent logout
- Use refetchUsers() instead of window.location.reload()
- Admin actions now update UI without logging out
- Suspend/unsuspend works correctly
- User management stays on same page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 16:01:12 -04:00
DJP
09749c6b68 Add user suspension feature
- Add is_suspended column to users table
- Suspended users cannot log in
- Admin panel shows SUSPENDED badge
- Suspend/Unsuspend button in admin panel
- Cannot suspend yourself
- Backend blocks auth for suspended users

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 15:55:51 -04:00
DJP
8cc8325221 Add admin user management and fix timestamps
- Add user management UI in admin panel
- Promote/demote admin functionality
- Delete user functionality (removes all data)
- Show ADMIN badge for admin users
- Hide Admin nav link from non-admin users
- Strict admin-only access control
- Fix timestamps to use local time instead of UTC
- Add bulk delete for chat sessions
- Add unshare option for shared chats
- Backend returns is_admin field for users

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 15:48:38 -04:00
DJP
7e1eb60a4a Fix critical bugs and improve features
- Add getSynthesis API endpoint (fixes console error)
- Fix message count display in chat sessions (SQL JOIN)
- Smart notebook deletion with share confirmation
- Auto-trigger synthesis when documents complete
- Regenerate synthesis on document add/delete
- Auto-retry pending background tasks on startup
- Backend session deduplication (10-second window)
- Disable React Query mutation retries
- Disable React Strict Mode
- Clean up old documentation files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 15:27:32 -04:00
DJP
a0029fbc65 Fix synthesis persistence - set state directly in queryFn
- Remove useEffect dependency (was causing issues)
- Set synthesis state directly in queryFn
- Always refetch on mount
- Added extensive console logging for debugging

Synthesis WILL persist now!
2025-10-03 11:34:29 -04:00
DJP
f6a0aa9209 Add custom prompt to podcast, invalidate synthesis cache
 Podcast Customization:
- Added 'Additional Instructions' textarea field
- Now matches Streamlit app (theme + custom prompt)
- Full customization available

 Synthesis Persistence:
- Invalidate React Query cache after generating
- Forces reload from database
- Synthesis persists across logout/login

These were the critical missing features!
2025-10-03 11:31:21 -04:00
DJP
477a9cd606 Simplify new chat mutation and fix synthesis loading
- Removed creatingSession flag (was causing issues)
- Mutation uses disabled state properly
- Synthesis useEffect always sets when loaded (removed !synthesis check)
- Added console log for debugging

Should fix both new chat spam and synthesis not showing!
2025-10-03 11:01:14 -04:00