Commit Graph

194 Commits

Author SHA1 Message Date
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
1ffceaba26 fix: search visual cards show localized language first (JA before EN)
- Bilingual format: 【JA】... then 【English】...
- Summary uses localized language (vlm_description_lang) as primary
- Load More function now also supports bilingual format
- Fallback: only vlm_description shows single language without labels
2026-10-23 04:41:15 +08:00
342d4e33b8 fix: Admin panel always uses localhost URLs for service health checks
- Removed isLocalhost checks from loadServiceUrls()
- All services now default to http://localhost:XXXX
- Health check URLs always use direct paths (/health)
- Fixes Core API and Proxy showing offline from external URL
2026-10-23 02:22:28 +08:00
6e0e306082 fix: optimize MBE start flow - skip redundant frontend polling
- Backend already polls 60s for MBE port readiness
- Frontend no longer polls 30s after backend returns
- Total wait time: ~60s instead of ~90s
- Start timeout set to 60s for MBE
2026-10-23 01:31:50 +08:00
c21c186e0c fix: increase start_service timeout for MBE to 60s
- MBE needs up to 60s to load model
- Default timeout (30s) was too short causing timeout errors
2026-10-23 01:22:44 +08:00
951a2964f3 feat: add MBE health check proxy endpoint
- Added /api/v1/mbe/health proxy in Studio proxy (port 8888)
- Frontend now uses proxy endpoint instead of direct mbeUrl
- Works for both localhost and external access (once proxy is deployed)
- MBE health response: {status: 'healthy', model: 'e4b', layers: 42}
2026-10-22 23:52:23 +08:00
a429aca344 fix: accept MBE 'healthy' status and show model info
- Updated testMbe() to accept status='healthy' from MarkBaseServer
- Added model and layers info to mbeInfo display
- MBE now shows 'MBE (e4b)' instead of generic 'MarkBaseEngine'
2026-10-22 21:55:52 +08:00
2cff332d55 feat: fix MBE health check and add model selection dropdown
- Fixed testMbe() to always use /health instead of /v1/health
- Added model selection dropdown for MarkBaseEngine
- Modified startService('mbe') to pass model and port parameters
- Added loadMbeModels() to fetch available models on mount
- Added getApiBase import
2026-10-22 21:40:47 +08:00
38260a4c61 fix: full file playback resets all state to play to end of file
- Clear all marks (not just face marks)
- Reset playMode to 'continuous' to disable trace/segment limits
- Reset currentTraceIdx and currentSegmentIdx to 0
- Reset seekFrame to 0
- This ensures full file plays from start to end without restrictions
2026-10-21 01:47:20 +08:00
3b2c7c65ae feat: clickable file name in video player for full file playback
- File name in header is now clickable
- Click reloads video with full file range (startFrame=0, endFrame=999999)
- Added play icon and hover effect for visual feedback
2026-10-21 01:32:23 +08:00
fc32fb0f86 fix: full file playback and file name display
- Use endFrame=999999 for full file playback (backend clips correctly)
- Add z-index:10 to card-file-info to prevent being obscured
- Full file now plays complete duration
2026-10-20 22:26:38 +08:00
971cfe50f5 feat: add clickable file name bar with full-file playback
- Add card-file-info bar at top of search result cards
- Click file name to play full file (startFrame: 0, endFrame: 0)
- Show video/document icon based on file extension
- Display file UUID badge
- Remove duplicate card-file section from bottom of card
2026-10-20 22:01:53 +08:00
c425c29d01 feat: persist search session across page navigation
- Save messages to localStorage when leaving search page
- Restore messages when returning to search page
- Clear session on newChat()
- Session includes: messages, conversationId, fileUuidCache, mode
2026-10-20 18:06:52 +08:00
55c39e7732 feat: keep only last 2 hours of search history
- Filter history to show only items from last 2 hours
- Pinned items are always kept regardless of age
- Auto-cleanup old unpinned items from database
- Increased fetch limit to 50 to ensure enough items for filtering
2026-10-20 17:57:27 +08:00
ca569f3e5c fix: re-scan now shows status update immediately
Root cause: finally block called loadFiles() which cleared the cache
and reloaded from server, overwriting the manual 'scanning' status.
Server videos.status may not be synced yet by PostgreSQL trigger.

Fix: Remove loadFiles() from finally block. Keep manual status update.
Polling mechanism will sync status from server automatically.
2026-10-18 23:43:45 +08:00
7f6db1a387 debug: add console.log to re-scan flow
- Added logging to ctxReprocess, doReprocess
- Log API call and response for debugging
- Check if reprocessing flag is blocking the action
2026-10-18 23:21:28 +08:00
5e0eac6700 fix: allow re-scan for paused files
- Added Rescan button for paused files in context menu
- Re-scan now removes file from paused set
- Paused files can be re-scanned directly without resuming first
2026-10-18 23:13:44 +08:00
ef45cd53df feat: add paused status count to library status bar
- Added pausedCount computed property
- Added ⏸ Paused N to status bar between Scanning and Completed
- Paused count displayed in warning color (yellow) to distinguish from Scanning
2026-10-18 22:59:13 +08:00
46c0a6ff64 fix: show Resume button instead of Deep Scan for paused files
- Deep Scan button hidden when status is 'paused'
- Resume button shows when status is 'paused'
- Pause button shows when status is 'scanning'
- Simplified conditions: no longer need isFilePaused check in template
2026-10-18 22:50:47 +08:00
ed15f4c3e7 refactor: use PostgreSQL trigger for status sync instead of manual cache update
Core Team implemented PostgreSQL trigger (sync_video_status) that automatically
syncs videos.status when monitor_jobs.status changes. Removed frontend workaround
that manually updated filesCache/fileStatusCache.

Now ctxPause/batchPause call loadFiles() + loadPausedFiles() after success
to get the properly synced status from backend.
2026-10-18 22:14:19 +08:00
a64e200ca5 fix: pause/resume now manually updates file status in cache
Root cause: backend pause updates monitor_jobs table, but frontend
displays status from videos table (via get_files API). These are separate.

Fix:
- ctxPause: manually sets file.status = 'paused' in filesCache + fileStatusCache
- batchPause: same manual cache update for each file
- ctxResume/batchResume: calls loadFiles() to refresh from backend
- Added console.log debug for troubleshooting
- Fixed i18n: removed duplicate emoji from translation strings
2026-10-18 21:38:47 +08:00
67e806037f fix: pause/resume now reloads files to update status badge
- ctxPause and ctxResume now call loadFiles() + loadPausedFiles()
- batchPause and batchResume also reload after completion
- Use new Set() for proper Vue reactivity
- Fixes status badge not updating after pause
2026-10-18 21:13:39 +08:00
4e90f832d9 feat: add pause/resume to library context menu and batch operations
- Add pause/resume buttons to file context menu (right-click)
- Add batch pause/resume buttons to section titles
- Support concurrent pause/resume with pLimit(3)
- Add paused status badge (⏸) with warning color
- Integrate with Core API /api/v1/jobs/:uuid/pause|resume
- Track paused files via Redis jobs:paused set
- Add i18n translations (zh-TW, en)
2026-10-18 21:09:05 +08:00
f298626487 feat: 实现四阶段进度显示
问题:
- 当前进度显示使用旧的处理器列表
- 显示了所有独立的处理步骤,而不是分阶段

解决方案:
- 将处理步骤聚合到四个主要阶段
- 实现阶段级进度计算
- 更新阶段名称显示

四阶段结构:
1. Processors (30%)
   - 包含所有处理器 (ASR, FACE, OCR, etc.)

2. Knowledge Graph (35%)
   - tkg_nodes
   - tkg_edges

3. Moment Extraction (6%)
   - vlm_summary
   - scene_vlm
   - moment_chunks

4. Integration (29%)
   - rule1_ingestion
   - rule2_ingestion
   - face_tracing
   - face_dedup

实现细节:
- loadPipelineStats() 中添加阶段聚合逻辑
- 根据步骤权重计算阶段进度
- 根据步骤状态确定阶段状态
- formatStageName() 更新阶段名称映射

进度计算:
- 阶段进度 = 加权平均步骤进度
- 阶段状态 = 优先级: failed > completed > running > pending
- 总体进度 = 加权阶段进度之和

显示效果:
- ✗ Processors: 0%
- ✓ Knowledge Graph: 100%
- ✗ Moment Extraction: 33%
- ✗ Integration: 50%

优势:
- 更清晰的阶段划分
- 更好的进度概览
- 更符合实际处理流程
2026-10-14 20:23:42 +08:00
86832229a9 feat: 添加 Pipeline Progress API 支持
新增功能:
1. Pipeline Phases 配置
   - loadPipelinePhases() 函数
   - 调用 GET /api/v1/pipeline/phases
   - 缓存配置(静态,不常变化)

2. File Progress API
   - loadFileProgress() 函数
   - 调用 GET /api/v1/file/{uuid}/progress
   - 返回详细的阶段和处理器进度

3. 类型定义
   - PipelinePhasesConfig
   - FileProgressDetail
   - PhaseProgressDetail
   - ProcessorProgressDetail

4. loadPipelineStats() 增强
   - 优先使用新的 progress API
   - 自动降级到旧 API
   - 支持阶段进度计算

API Endpoints:
GET /api/v1/pipeline/phases
GET /api/v1/file/{uuid}/progress

返回格式:
{
  "file_uuid": "...",
  "overall_progress": 0.75,
  "current_phase": "tkg_nodes",
  "phases": {
    "processors": {
      "status": "completed",
      "progress": 1.0,
      "processors": {...}
    }
  }
}

用途:
- LibraryView 显示文件处理进度
- 实时更新 Pipeline 状态
- 支持阶段级进度显示

状态: ✅ 编译通过
2026-10-14 20:15:24 +08:00
3e7eba0741 feat: 添加 Scene VLM Stats 快速 endpoint 支持
新增功能:
1. loadSceneVlmStats() 函数
   - 调用快速 endpoint: /api/v1/file/{uuid}/scene-vlm-stats
   - 返回: {total_scenes, status, vlm_done, vlm_total}
   - 响应时间: < 10ms (vs 旧 API 100ms+)

2. loadFileStats() 增强
   - 如果 get_file_stats 未返回 scene_vlm 数据
   - 自动调用 loadSceneVlmStats() 获取

3. 测试脚本
   - scripts/test_scene_vlm_api.sh
   - 测试新 endpoint 性能
   - 对比新旧 API

API Endpoint:
GET /api/v1/file/{file_uuid}/scene-vlm-stats

返回示例:
{
  "total_scenes": 1204,
  "status": "ready",
  "vlm_done": 1204
}

优势:
- 快速响应 (< 10ms)
- 轻量级数据
- 无需加载完整文件信息
- 适合频繁轮询

使用场景:
- LibraryView 显示 Scene VLM 状态
- Pipeline Progress 更新
- 文件状态监控
2026-10-14 10:11:10 +08:00
b1ef9b19fa fix: 修复 loadMore 重复结果问题
问题:
- Visual 搜索使用 page 参数导致返回重复结果
- 所有模式缺少与现有结果的去重逻辑
- Agent 模式没有实现 loadMore 支持

修复:
1. ✅ 实现 existingIds 去重机制
   - 使用 file_uuid:start_frame:source_type 作为唯一标识
   - 在追加新结果前检查是否已存在

2. ✅ 修复 Visual 搜索分页
   - 将 page 参数改为 offset 参数
   - 确保每次加载不同的结果

3. ✅ 添加 Agent 模式 loadMore 支持
   - 使用 semantic search 作为 fallback
   - 实现去重逻辑

4. ✅ 优化分页参数
   - Keyword/Semantic: limit: 15, offset: nextOffset
   - Visual: page_size: 10, offset: nextOffset
   - People: limit: 10, offset: nextOffset
   - Agent: fallback 到 Semantic

技术细节:
- existingIds Set 存储已显示结果的 ID
- globalKey 确保跨模式去重
- 减小 limit 值提高性能

效果:
- ✅ More 按钮现在返回不同的结果
- ✅ 无重复卡片
- ✅ 支持所有 5 种搜索模式
2026-10-11 22:07:06 +08:00
cf498dc4d3 feat: 添加搜索分页功能(More 按钮)
功能:
- ✅ 初始搜索显示 5 条结果(快速响应)
- ✅ More 按钮追加 10 条结果(渐进式加载)
- ✅ 支持所有搜索模式(Keyword, Semantic, Visual, Agent, People)
- ✅ 显示剩余结果数量
- ✅ 加载动画和禁用状态

技术实现:
- 添加分页状态: sessionId, hasMore, nextOffset, totalResults, loadingMore
- 实现 loadMore() 函数
- 修改 sendMessage() 支持分页(limit: 5)
- 添加 More 按钮 UI 和样式

性能改进:
- 初始加载时间: ~2s → ~0.5s (预估)
- 内存占用: 渐进式加载
- 用户体验: 立即反馈

临时方案:
- 使用现有 API 实现
- 未实现 Session 管理(后续优化)
- 通过缓存查询参数实现分页

测试清单:
- [ ] Keyword 搜索分页
- [ ] Semantic 搜索分页
- [ ] Visual 搜索分页
- [ ] Agent 搜索分页
- [ ] People 搜索分页
- [ ] More 按钮显示/隐藏逻辑
- [ ] 性能验证
2026-10-11 21:48:04 +08:00
9f6939ecc7 fix: 修复 get_files HTTP 请求参数名错误
问题:
- 前端在浏览器模式下使用 `limit` 参数
- Core API 的实际参数名是 `page_size`
- 导致 Core API 忽略参数,使用默认值 20
- 用户只看到 20 个文件(Completed 18 + Registered 1 + Unregistered 1)
- 实际 API 返回 118 个文件

修复:
- 将 `limit=` 改为 `page_size=`
- 与 Core API 参数名保持一致
- 确保前端获取所有文件

影响:
- Library 页面现在显示所有 118 个文件
- Completed 64 张卡片
- Registered 53 张卡片
- Unregistered 1 张卡片

测试:
✅ 编译通过
✅ API 正确返回 118 个文件
✅ 参数正确传递
2026-10-10 22:54:02 +08:00
a7f80d02e5 fix: 修复 get_files 参数传递错误
问题:
- ensureFiles 和 startFilesWatch 调用 apiCall('get_files', { args: { pageSize: 500 } })
- 这导致参数被嵌套传递: { args: { pageSize: 500 } }
- 但 Tauri command 期望: { pageSize: 500 }
- 导致 unregistered 文件无法正确加载

修复:
- 移除 args 嵌套包装
- 直接传递参数: apiCall('get_files', { pageSize: 500 })
- 与其他 API 调用方式保持一致

影响:
- unregistered 文件现在可以正确加载
- Library 页面可以显示所有文件(包括 unregistered)
- 文件列表刷新功能正常工作

测试:
✅ 编译通过
✅ 服务启动成功
✅ API 调用参数正确
2026-10-10 20:21:56 +08:00
af60ea118a feat: 添加 Scene VLM 阶段到 Pipeline Progress 显示
问题:
- Core API 新增 scene_vlm 阶段
- Studio 需要同步更新权重映射和显示名称

修复:
- 更新 WEIGHT_MAP,添加 scene_vlm (0.03)
- 调整 vlm_summary 权重从 0.04 到 0.03
- 更新 formatStageName 函数,添加 'Scene VLM' 显示名称

权重映射:
- processors: 0.30
- rule1_ingestion: 0.05
- face_tracing: 0.05
- face_dedup: 0.10
- tkg_nodes: 0.20
- tkg_edges: 0.15
- rule2_ingestion: 0.10
- vlm_summary: 0.03
- scene_vlm: 0.03
- moment_chunks: 0.01

影响:
- 文件处理流程显示 Scene VLM 阶段
- 深度扫描文件显示完整的处理进度
- 用户可以实时监控 Scene VLM 处理状态

测试:
✅ 编译通过 (npm run build)
✅ 阶段显示名称正确
2026-10-10 14:57:22 +08:00
086278616e fix: Scene VLM 始终显示,无 scenes 时显示 '—'
问题:
- Scene VLM 只在有 CUT 的文件上运行
- 没有 CUT 的文件不会生成 scenes.json
- 前端检测到 total_scenes === 0 时,不显示 Scene VLM 行
- 用户看不到完整的处理流程

修复:
- 移除 v-if 条件,始终显示 Scene VLM 行
- 修改 sceneVlmLabel 函数:
  - total_scenes > 0: 显示 '(X)'
  - total_scenes = 0: 显示 '—'
- 添加 hasSceneVlm 函数,控制点击事件
- 添加 ms-proc-clickable 样式,提供视觉提示

影响:
- 用户可以看到所有处理步骤
- 清楚知道 Scene VLM 不适用于该文件
- 更好的用户体验

测试:
✅ 编译通过
✅ 无 scenes 的文件显示 '—'
✅ 有 scenes 的文件显示 '(X)' 并可点击查看详情
2026-10-10 14:07:35 +08:00
670ef45c32 fix: 修复 LibraryView formatDate 函数日期格式化错误
问题:
- Library 页面渲染时崩溃
- Console 错误: RangeError: Invalid time value
- formatDate 函数未处理无效日期

原因:
- formatDate(date) 没有 null/undefined 检查
- new Date(date) 对无效字符串创建 Invalid Date
- Invalid Date.toISOString() 抛出 RangeError

修复:
- 添加 null/undefined 检查
- 添加 try-catch 错误处理
- 验证日期有效性后才格式化

测试:
- ✅ TypeScript 编译通过
- ✅ Vite build 成功
- ✅ 错误处理正确

影响:
- Library 页面正常显示文件列表
- 无效日期显示为空字符串
- 不会崩溃
2026-10-09 23:02:58 +08:00
c90d93c224 fix: 修复 get_files 调用错误的 API 端点
问题:
- 前端调用 /api/v1/files/scan
- 该 API 扫描文件系统,依赖 MOMENTRY_SFTP_ROOT 环境变量
- 如果未设置或目录不存在,返回空数组
- 导致显示 'No files found'

修复:
- 改为调用 /api/v1/files
- 该 API 直接从数据库读取已注册文件
- 返回 { success: true, total: 176, data: [...] }

测试:
- ✅ /api/v1/files 返回 176 个文件
- ✅ 前端应该能正确显示文件列表
2026-10-09 22:35:24 +08:00
589712e868 fix: 修复 ensureFiles 解析 API 响应错误
问题:
- API 返回 { success: true, total: number, data: File[] }
- 代码错误地期望 result 直接是数组
- 导致 filesCache.value = [],显示 'No files found'

修复:
- 优先读取 result.data
- 向后兼容直接返回数组的情况
- filesCache.value = result.data || result || []

测试:
- ✅ API 正常返回 176 个文件
- ✅ 前端应该能正确显示文件列表
2026-10-09 22:29:55 +08:00
f75ebfac88 fix: 修复 Face Filter UI 参数持久化到后端数据库
问题:
- UI Filter Rules (min_confidence, min_bbox_size 等) 修改后只保存到 localStorage
- 不会持久化到后端数据库,导致刷新页面或换浏览器后设置丢失

修复:
- updateRules() 函数现在会调用 markSingleFrameSettingsModified()
- 触发 500ms debounce 的 auto-save 到后端 API
- 保存完整的 FaceFilterSettings (包括 ui_filter_rules, processing_thresholds, trace_settings)

变更:
1. src/composables/useFaceFilter.ts
   - updateRules() 新增调用 markSingleFrameSettingsModified()
   - 确保 UI Filter Rules 修改后自动保存到后端

2. docs/FACE_FILTER_PERSISTENCE_TEST_GUIDE.md
   - 完整的测试指南
   - 包含调试方法和后端 API 要求

持久化流程:
- FaceFilterPanel 打开 → loadSingleFrameSettings() 从后端加载
- 用户修改参数 → updateRules() → markSingleFrameSettingsModified() → auto-save
- 500ms debounce → saveSingleFrameSettings() → PUT /api/v1/file-profile

测试:
- ✅ TypeScript 编译通过
- ⏳ 需要验证后端 API 支持

测试文件: 020.mp4 (UUID: b496a68800f90770aa7246c877f38985)
2026-10-09 16:25:26 +08:00
8789770af2 fix: 移除 FaceFilterSettings 重复字段,与 Rust 端结构一致
问题修正:
- 移除 FaceFilterSettings 中的重复字段
- 简化为三段式结构(ui_filter_rules, processing_thresholds, trace_settings)
- 新增 version 字段用于版本控制
- 删除 useFaceFilter.ts 中的 rules 变量
- 重命名 faceFilterSettings 为 settings
- 更新所有访问方式为 settings.value.ui_filter_rules.*

变更内容:
1. src/types/faceFilter.ts
   - FaceFilterSettings 只保留三段式结构
   - fromLegacy() 和 defaults() 不再返回重复字段

2. src/composables/useFaceFilter.ts
   - 删除 rules 变量(不再需要)
   - 删除 defaultRules 常量
   - 重命名 faceFilterSettings 为 settings
   - 更新 localStorage 逻辑保存完整 settings
   - 所有访问改为 settings.value.ui_filter_rules.*

3. src/components/FaceFilterPanel.vue
   - 更新 v-model 绑定为 settings.trace_settings.*
   - 更新解构,删除 rules
   - 更新所有访问为 settings.ui_filter_rules.*

测试:
- ✅ TypeScript 编译通过
- ✅ Vite build 成功

对应 Core API: 86c776ce
修正文档: docs/FACE_FILTER_TYPES_FIX_REQUIRED.md
2026-10-09 15:55:30 +08:00
6423eeed77 feat: 更新 FaceFilterSettings TypeScript 类型定义为三段式统一结构
变更内容:
- 创建 src/types/faceFilter.ts 类型定义文件
- 新增 UiFilterRules, ProcessingThresholds, TraceSettings 三个子结构
- 更新 FaceFilterSettings 为三段式统一结构
- min_confidence 范围从 0-100 改为 0.0-1.0
- min_size 重命名为 min_bbox_size
- 新增字段: max_confidence, max_bbox_size, source, backend_status

向后兼容性:
- FaceFilterSettingsMigration.fromLegacy() 自动转换旧格式
- FaceFilterSettingsMigration.defaults() 提供默认值
- 保留向后兼容字段(deprecated 标记)

更新文件:
- src/composables/useFaceFilter.ts: 使用新类型,更新变量名
- src/components/FaceFilterPanel.vue: 更新导入和变量引用
- docs/FACE_FILTER_SETTINGS_MIGRATION_GUIDE.md: 完整迁移指南

测试:
- ✅ TypeScript 编译通过
- ✅ Vite build 成功

对应 Core API commit: 86c776ce
2026-10-09 15:13:50 +08:00
8e71996ab1 fix: 修复 MarkBase Engine 健康检查状态不匹配问题
问题:
- MarkBase Engine 的 /health 端点返回 JSON 格式 {"status":"ok"}
- testMbe 函数期望纯文本 "OK"
- 导致状态被错误地设置为 offline

修复:
- 使用 Content-Type 判断响应格式
- JSON 格式:解析并检查 status 字段
- 纯文本格式:检查是否为 "OK" 或包含 JSON 状态
- 兼容两种响应格式,确保状态正确

改进:
- 从 JSON 响应中提取 version 和 uptime 信息
- 更健壮的错误处理
2026-10-08 09:44:30 +08:00
af04d08458 fix: search_agents timeout 90s→180s 2026-10-08 09:30:48 +08:00
4f2dc359fb fix: 使用 p-limit API 准确显示队列状态
问题:
- 手动计算队列数量不准确
- 无法正确反映 p-limit 内部的队列状态

修复:
- 使用 limit.pendingCount 获取等待中的任务数量
- 使用 limit.activeCount 获取正在处理的任务数量
- 显示更详细的进度:"Processing 1/5 (3 queuing, 2 active)..."

优点:
- 准确反映 p-limit 内部状态
- 用户可以清楚看到有多少任务在排队
- 可以看到有多少任务正在并发处理
2026-10-08 01:49:53 +08:00
e83d5c7a8c fix: 添加延迟确保批量 Deep Scan 严格限制并发为 2
问题:
- re_scan_file API 是异步的,立即返回成功
- 后端可能同时启动多个扫描任务
- 导致有 4 个文件同时在 scanning 状态

临时修复:
- 在每个文件启动扫描后等待 2 秒
- 确保后端有足够时间开始处理并释放资源
- 保持前端并发控制为 2,避免过多任务同时启动

未来改进:
- 需要在后端实现真正的队列机制
- 或者检查当前 scanning 状态,动态调整启动速度
2026-10-08 01:37:35 +08:00
4e1df67857 fix: 修复批量 Deep Scan 队列显示问题
问题:
- 使用静态的 position 计算 queuePosition,导致队列显示不准确
- 任务实际执行时间不确定,导致队列状态显示错误

修复:
- 使用 processing 变量跟踪正在处理的任务数量
- 动态计算队列数量:queueCount = filesToProcess.length - successCount - failCount - processing
- 确保队列状态实时更新

改进:
- 添加 processing 变量跟踪正在处理的任务
- 在 finally 块中递减 processing 计数器
- 实时更新队列显示,反映真实状态
2026-10-08 01:32:43 +08:00
593b83d61a refactor: 批量 Deep Scan 并发数改为 2,优化排队显示
修改:
- maxConcurrent 从 3 改为 2
- 开始时显示:"Starting: 2 immediate, 3 queuing..."
- 处理时显示:"Processing 1/5" 或 "Processing 3/5 (1 queuing)..."
- 更清晰的队列状态显示
2026-10-08 01:00:24 +08:00
d3df1e54d0 feat: 添加批量 Deep Scan 功能
功能:
- 在 Registered 和 Completed section 添加批量 Deep Scan 按钮
- 显示条件:当有已选择的 registered/completed 文件时
- 使用 p-limit 控制并发(maxConcurrent = 3)
- 超过并发的文件自动排队等待

实现细节:
- 添加 batchProcessing ref 跟踪批量处理状态
- 实现 batchDeepScan 函数,调用 re_scan_file API
- 显示处理进度和队列信息
- 成功后更新文件状态为 'scanning'
- 处理完成后清空选择并刷新文件列表

用户体验:
- 点击按钮 → 确认对话框 → 显示进度
- 显示格式:"Processing 1/10 (7 in queue)..."
- 完成后显示成功/失败统计
2026-10-08 00:50:24 +08:00