Commit Graph

288 Commits

Author SHA1 Message Date
ae2f59b829 fix: loadSessions variable shadowing bug
- Local variable 'sessions' was shadowing the ref 'sessions'
- sessions.value = sessions was not updating the ref
- Renamed local variable to 'sessionList' and properly assign to sessions.value
- This fixes sessions not appearing in history list after save
2026-10-27 17:25:19 +08:00
69b83e212b feat: save session with name prompt
- Save button now prompts for session name
- Uses same rename dialog with different labels
- confirmSaveSession saves messages to MarkBase SQLite
- Session appears in history list after save
2026-10-27 17:14:19 +08:00
1b9f0850e8 feat: add Save Session button
- Added 💾 Save button to history header
- saveCurrentSession saves all messages to current session
- If no session exists, creates one with timestamp name
- Saved sessions appear in history list for selection
2026-10-27 17:06:02 +08:00
1de8be6e19 fix: wait for loadMessages to complete before restoring session messages
- Added await loadMessages(s.id) in handleSelectSession
- Ensures messages are loaded from API before displaying
2026-10-27 16:50:15 +08:00
ab7281dbf4 fix: clear localStorage when creating new session
- Added localStorage.removeItem(SESSION_STORAGE_KEY) to handleNewSession
- Prevents old messages from reappearing after page refresh
- New session now starts completely clean
2026-10-27 16:41:51 +08:00
c5b8069af4 fix: add debug logging to handleNewSession
- Added console.log to track save and clear operations
- Will help diagnose why messages are not being saved
2026-10-27 16:34:03 +08:00
f37c36f637 feat: save current session before creating new session
- handleNewSession now saves all messages from current session
- Saves both user and assistant messages
- Then creates new session with timestamp name
2026-10-27 16:06:56 +08:00
c38c0fba6d fix: remove duplicate + New button, keep only + New Session
- Removed + New button from history header
- Only + New Session button remains for creating sessions
2026-10-27 16:02:14 +08:00
e15d2cd31e fix: Core API health check path - use /api/v1/health for all cases
- Removed incorrect localhost conditional that used /health (404)
- Now uses /api/v1/health for both localhost and remote access
- Added console.error logging for debugging
- Aligns with Core API route design
2026-10-27 15:52:30 +08:00
a5100e59ea fix: add debug logging for session message saving
- Added console.log to track currentSession and save operations
- Will help diagnose why messages are not being saved
2026-10-27 15:23:27 +08:00
d6fb0adcfe fix: add error logging for session message saving
- Added console.error logs to debug save failures
- Now logs when no current session exists
- Now logs when saveMessage returns null
2026-10-27 15:21:48 +08:00
a58ac8165c fix: remove tags from search cards, keep only in detail modal
- Removed card-tags display from search result cards
- Tags now only visible in scene detail modal
2026-10-27 15:17:45 +08:00
ece3747a98 fix: use vlm_description_localized directly instead of text_content
- Card now shows vlm_description_localized directly (no 【ZH-TW】 label)
- Avoids incorrect language labels from Core API text_content field
- Japanese content now displays correctly without wrong prefix
2026-10-27 15:16:09 +08:00
98161f3ebd fix: keep history panel open after creating new session
- Removed showHistory.value = false from handleNewSession
- History panel now stays visible after clicking + New Session
2026-10-27 15:12:07 +08:00
2213703a77 fix: add 'visual' mode to formatMode map
- Visual search mode was showing as '—' in session history
- Added 'visual': 'Visual' to the formatMode mapping
2026-10-27 15:09:07 +08:00
bb80d52e98 feat: show last search query in session history
- Added last_query field to SearchSession interface
- loadSessions now fetches last user message for each session
- Session list displays: mode badge, title, last query, message count, time
- Added .hs-query CSS style for query text
2026-10-27 14:50:44 +08:00
763e4ecf33 fix: remove duplicate text content in scene detail when VLM data exists
- text_detail-content now only shows if no VLM description is present
- Prevents duplicate display of VLM summary text
2026-10-27 07:54:16 +08:00
a934ec57e4 feat: show multilingual VLM summary and tags in scene detail modal
- Added VLM description sections (localized + English) to text detail modal
- Added VLM tags display with both local and English labels
- Styled with language labels, tag badges, and proper spacing
2026-10-27 06:38:22 +08:00
63f8f3562a feat: add VLM tags display to search result cards
- Shows up to 5 tags per card
- Uses localized language (tag.local) if available, falls back to English
- Styled with small rounded badges
2026-10-27 06:32:03 +08:00
7f31453723 fix: startNewChat now always creates new session
- Changed startNewChat to async and always create a new session
- No longer depends on currentSession existing
2026-10-27 06:17:35 +08:00
06217bc314 fix: improve session initialization flow
- Fixed onMounted to properly set currentSession after creating default
- Ensure loadSessions is called after createSession to refresh list
2026-10-27 06:16:17 +08:00
433b5dc797 fix: ensure currentSession is set before saving messages
- Added check to set currentSession from sessionList if null
- This ensures messages are always saved to a session
2026-10-27 06:14:28 +08:00
f5dd8577b2 fix: improve session initialization and save logic
- Fixed onMounted to properly set currentSession after creating default
- startNewChat now creates a new session when called
- Ensure authToken before all session API calls
2026-10-27 06:11:28 +08:00
ac281b0766 fix: startNewChat now creates new session
- Updated startNewChat to call handleNewSession if currentSession exists
- This ensures + New button also creates a new session in MarkBase
2026-10-27 05:41:54 +08:00
bd52128031 fix: auto-login with demo credentials for session API
- Added ensureAuthToken() function that auto-logs in with demo/demo123
- All session API functions now call ensureAuthToken() first
- Fixes 'Missing Authorization header' errors
- Sessions now save correctly without manual admin login
2026-10-27 05:36:16 +08:00
fe91afff98 feat: integrate MarkBase Search Session API into Studio
- Created useSearchSession composable for session management
- Added 7 API endpoints in api/index.ts
- Updated SearchView.vue to use sessions instead of history
- Session sidebar with create, rename, delete functionality
- Auto-save messages to current session after each search
- Auto-create default session on first load
- Updated CSS for session active state and new session button
2026-10-27 05:06:03 +08:00
86d90f4f53 fix: remove scene thumbnail_url from all VLM search result mappings
- Removed thumbnail_url from VLM scene results (lines 901, 1312)
- Scene thumbnail files often don't exist for unprocessed videos
- Frontend now falls back to regular thumbnail loading mechanism
- Eliminates 404 errors in browser console
2026-10-27 03:31:11 +08:00
1afdb52373 fix: remove scene thumbnail URL from VLM search results
- Scene thumbnails often don't exist for unprocessed files
- Use regular thumbnail fallback instead of scene-specific URLs
- Eliminates 404 errors in browser console for scene_*.jpg requests
2026-10-27 03:28:37 +08:00
49e23c39f3 fix: hide broken scene thumbnail images with @error handler
- Scene thumbnails may not exist for all files
- Added @error handler to hide broken images instead of showing 404
- Cleaner UI when scene data is incomplete
2026-10-27 03:21:39 +08:00
712b5a6527 fix: remove debug console.error from ensureFiles
- Removed '[ensureFiles] starting' console.error
- Not an actual error, just debug log
- Follows 'no dev residue' guideline
2026-10-27 03:16:02 +08:00
8b5d5cfd0d fix: remove loadMbeModels call from onMounted
- /api/v2/mbe/models endpoint doesn't exist on MarkBase
- Removing the call eliminates the 404 error on page load
- MBE model selector dropdown will remain empty but functional
2026-10-27 03:09:44 +08:00
3d630afc4e fix: auto-create config directory when saving admin config
- save_admin_config_handler now creates parent directory if it doesn't exist
- Prevents 500 error when config/ directory is missing
- Enables first-time config save without manual directory creation
2026-10-27 03:07:12 +08:00
1f885406dd fix: allow saving admin config when config file doesn't exist
- saveConfig no longer throws error when current config returns 404
- Creates new config file with current values if none exists
- User can save config for the first time without errors
2026-10-27 02:40:45 +08:00
776cf197c8 fix: handle 404 gracefully for admin config endpoint
- loadConfig now uses default values when config file doesn't exist (404)
- No error shown to user when config file is missing
- Config tab loads with empty defaults instead of error message
2026-10-27 02:37:30 +08:00
969b4d85ef fix: suppress 404 errors for optional MBE models endpoint and defer user loading
- loadMbeModels no longer logs console.error for 404 (endpoint may not exist)
- loadUsers removed from onMounted - only called after admin login
- Prevents 401 errors on page load before user has authenticated
- Users tab now only loads data after successful login
2026-10-27 02:32:54 +08:00
1caca73614 feat: integrate settings validation API before saving upload path
- saveUploadPath now validates path via POST /api/v2/settings/validate
- Shows clear error message if path doesn't exist or isn't writable
- Only saves if validation passes (valid: true)
- 5 validation checks: format, existence, type, read/write permissions
2026-10-27 02:28:49 +08:00
3b638f0416 feat: integrate MarkBase Admin API with Bearer token authentication
- Added useAdminAuth composable for login/logout/token management
- Admin Users tab now requires login before showing users
- loadUsers/loadShares now use direct fetch with Bearer token
- Added login form with username/password fields
- Token stored in localStorage with expiry check
- Default credentials: demo/demo123
2026-10-27 02:17:41 +08:00
4129c174ed feat: integrate MarkBase Settings API (GET/POST /api/v2/settings)
- Replaced deprecated /api/v2/config with new /api/v2/settings
- loadSettings() now uses GET /api/v2/settings (structured JSON)
- saveUploadPath() now uses POST /api/v2/settings
- Removed PostgreSQL migration error handling (no longer needed)
- Settings page now works correctly with SQLite-only MarkBase
2026-10-27 02:06:57 +08:00
59bcd9a9b5 docs: add MarkBase API requirements for Studio integration
- Created MARKBASE_API_REQUIREMENTS.md with detailed API specs
- Requests GET/POST /api/v2/settings endpoints from MarkBase team
- Documents current issues with /api/v2/config returning 500
- Defines required fields, error handling, and priority levels
2026-10-27 01:45:44 +08:00
cb2b6a0292 fix: show clear error message when MarkBase needs restart (PostgreSQL→SQLite migration)
- Detects 'missing field postgresql' error from MarkBase config endpoint
- Shows user-friendly message: 'MarkBase needs restart (PostgreSQL→SQLite migration)'
- Helps users understand the error is due to outdated MarkBase instance
2026-10-27 01:41:07 +08:00
052178b084 fix: improve Settings page error message for MarkBase config failures
- loadSettings now shows detailed error from MarkBase response body
- MarkBase /api/v2/config returns 500 when config file is incomplete
- Error message now includes actual error details instead of just HTTP status
2026-10-27 01:27:34 +08:00
388c548e4a feat: multi-language support for agent search and admin pipeline config
- search_agents now accepts output_language parameter (en/zh-TW/ja)
- Admin Settings: added Pipeline Configuration section (enabled, max_concurrent_stages, default_timeout_secs)
- Admin Settings: search config now includes vlm_output_language dropdown
- Added translations for pipeline config in en/zh-TW/ja locales
- Agent search uses searchConfig.vlm_output_language for output language
2026-10-27 01:18:19 +08:00
716d3954e7 fix: proxy forwards mbe health to Core API instead of direct llama-server access
- Previously proxy accessed llama-server /health endpoint directly
- Now forwards /api/v1/mbe/health to Core API (3002) which has full health check
- Returns complete health info: status, model, uptime
- Fixes frontend not showing 'online' status in Admin Settings
2026-10-24 12:25:01 +08:00
b1978fabc5 fix: add /health proxy rule to Vite config
- Vite now forwards /health to Rust proxy (port 8888)
- Required for Admin Panel proxy health check to work in dev mode
- External Caddy reverse proxy may also need /health forwarding rule
2026-10-23 21:36:57 +08:00
fa7a9e1084 fix: Admin Panel health checks work via reverse proxy
- loadServiceUrls: use window.location.origin for remote access, localhost for local dev
- testCoreApi: use /api/v1/health for remote, /health for localhost
- testProxy: health check path works for both
- testMbe: already uses getApiBase() which handles both cases

This fixes the issue where Admin Panel showed offline when accessed via
https://nextorage.momentry.ddns.net because localhost health checks
point to user's machine, not the server.
2026-10-23 21:35:29 +08:00
88867e80e5 fix: handle 404 for scenes endpoint gracefully
- Scenes endpoint may not be implemented in Core API yet
- useVLMScenes returns empty array instead of error on 404
2026-10-23 20:22:48 +08:00
e2612dde72 feat: add VLM composables for Vue 3 integration
- useVLMScenes(fileUuid): load scenes for a specific file with thumbnails
- useVLMSearch(): search VLM scenes and traces with bilingual support
- useSceneThumbnail(fileUuid, sceneIndex): load scene thumbnail URLs
- TypeScript interfaces: VLMTag, VLMScene, VLMTrace, FileScene
- Uses direct HTTP calls via getApiBase() (no Tauri IPC needed)
- Follows Vue 3 composable best practices (ref, loading, error states)
2026-10-23 20:21:00 +08:00
6db184c7d0 feat: export marked results with VLM data and tags
- toggleMark now captures vlm_description, vlm_description_localized, vlm_tags, vlm_objects, thumbnail_url
- exportMarked generates structured JSON with vlm section containing en/localized descriptions and tags
- Export filename changed to vlm-marked-export-{timestamp}.json
- Includes source_type, scene_index, trace_id for complete result metadata
2026-10-23 18:15:38 +08:00
fa8e4a9191 fix: simplify bilingual VLM search - use single API call
- Core API now returns both vlm_description (EN) and vlm_description_localized (JA)
- Removed duplicate API calls (was fetching EN + JA separately)
- Single API call with output_language param, uses both fields from response
- Load More also updated to use results array and correct field names
- Format: 【JA】localized text...【English】english text...
2026-10-23 04:59:55 +08:00
76d9afd43b fix: use vlm_description_localized field name from Core API
- Changed vlm_description_lang to vlm_description_localized
- Core API outputs vlm_description (EN) + vlm_description_localized (JA)
- Frontend shows localized first: 【JA】...【English】...
2026-10-23 04:56:56 +08:00