Commit Graph

153 Commits

Author SHA1 Message Date
22fd55b0ab fix: 修复 LibraryView pose 过滤结构问题
**问题:**
- v-for 后的空 div 可能导致渲染问题
- 影响整个页面显示

**修复:**
- 使用 template + v-if 组合
- 避免创建多余的空 div
- 保持 TypeScript 类型安全

**测试:**
- 编译成功
- proxy 正常运行
- Library 页面应恢复正常

相关需求: A-8 (移除 pose)
2026-10-05 12:15:44 +08:00
7b83d987e4 fix: LibraryView 过滤 pose 显示(避免 HTML 结构问题)
**修改方法:**
- 使用嵌套 div + v-if 过滤 pose
- 避免使用 template 标签(可能导致结构问题)

**修改位置:**
- Line 353-357: processor output 过滤 pose
- Line 555: QC 检查移除 POSE

**原因:**
- pose 已从 pipeline 移除 (A-8)
- 之前的方法可能导致 HTML 结构问题

**过滤逻辑:**
```vue
<div v-for="(info, proc) in processors">
  <div v-if="proc !== 'pose'">
    <!-- 显示内容 -->
  </div>
</div>
```

相关需求: A-8 (移除 pose)
2026-10-05 11:58:06 +08:00
8758255eee feat: LibraryView 补全 stage 名称映射
**添加内容:**
- 添加 moment_chunks 到 formatStageName 映射
- 返回 'Moment Chunks' 作为显示名称

**Core API Stages 完整列表:**
- processors: Processors (weight: 0.30)
- rule1_ingestion: Rule1 Ingestion
- face_tracing: Face Tracing
- face_dedup: Face Dedup
- tkg_nodes: TKG Nodes
- tkg_edges: TKG Edges
- rule2_ingestion: Rule2 Ingestion
- vlm_summary: VLM Summary (weight: 0.04)
- moment_chunks: Moment Chunks (weight: 0.01)

**前端处理:**
- ✅ 直接使用 API 返回的 overall_progress
- ✅ 直接使用 API 返回的 stages[].weight
- ✅ 直接使用 API 返回的 stages[].progress
- ✅ 无前端权重计算

**API Endpoint:**
- GET /api/v1/pipeline-progress/:file_uuid
- 返回 PipelineProgress 结构

参考文件:
- Core: /Users/accusys/momentry_core/src/core/progress.rs:42-111
- API: /Users/accusys/momentry_core/src/api/scan.rs:1254
2026-10-05 05:03:31 +08:00
ed971c5f98 fix: LibraryView 移除 pose 相关代码
**移除内容:**
- 移除 pose 处理器选项(Line 305-310)
- 移除 procPose 变量定义(Line 1055)
- 移除 selectedProcessors 中的 procPose(Line 1142)
- 移除 processors 列表中的 'pose'(Line 1348, 1408)

**原因:**
- pose 已从 pipeline 移除(A-8)
- 无需在 Library 卡片中显示

**后续:**
- 待确认 VLM Summary 和 moment_chunks 是否需要合并
- 待确认百分比是否需要重新配置

相关需求: A-8 (移除 pose)
2026-10-05 04:57:25 +08:00
0bd71ab3f0 fix: 真正移除 Studio proxy 和 main 硬编码路径
**proxy.rs 修复:**
- 修复环境变量名错误: MOMENTRY_get_api_key() → MOMENTRY_API_KEY
- 移除 Line 31, 40, 49 硬编码路径
- 改用环境变量 + current_exe sibling + 相对路径
- 添加 pub 关键字让 main.rs 可以使用

**main.rs 修复:**
- 移除 PROFILE_DIRS 常量(Line 762-767)
- 改用 crate::proxy::get_output_dir() 动态获取路径
- 移除 4 个硬编码的 identities 目录路径

**验收标准:**
- proxy.rs: ✅ 无硬编码路径
- main.rs: ✅ PROFILE_DIRS 已移除
- main.rs: ⚠️ start_service/stop_service 仍有硬编码(开发工具,可排除)

**遗留问题:**
- 编译错误: SystemStatsResponse 导入问题(已存在,非本次修改引入)
- 需要 Studio Team 后续修复

相关需求: B-1 (移除 proxy 硬编码路径)
2026-10-04 20:08:29 +08:00
40b804c0d1 feat: PeopleView 统一使用 Core thumbnail 端点
- 影格显示改用 Core 端点 /api/v1/file/:uuid/thumbnail?frame=N
- 与 key_frame_url 保持一致(Line 3580 已使用 Core 端点)
- 测试确认两个端点都可工作:
  * Core 端点:/api/v1/file/:uuid/thumbnail?frame=N (62KB)
  * Proxy 端点:/api/v1/media/frame?file_uuid=...&frame=... (119KB)
- 选择 Core 端点原因:
  1. 统一端点风格(与 key_frame_url 一致)
  2. 更小的文件大小(可能是优化后的缩略图)
  3. 通过 fallback_handler 转发到 Core API

相关需求:B-3 (PeopleView 影格端点选择)
2026-10-04 15:15:45 +08:00
26ac0e90df fix: 完成 B-1, B-2, B-4(proxy 硬编码移除 + re-scan 端点)
B-1: 移除 proxy 硬编码路径
- 移除 API_KEY 常量,改为 get_api_key() 从环境变量读取
- 移除 PROFILE_DIRS,改为 get_output_dir() 从环境变量读取
- 移除 output_bases (identity_matches, trace_profile),改为环境变量驱动
- 移除 ADMIN_CONFIG_PATH,改为 get_admin_config_path() 从环境变量读取
- 添加 dev fallback 支持开发环境

B-2: API key 改为环境变量
- MOMENTRY_API_KEY 环境变量必须设置
- 未设置时会明确报错启动

B-4: 改用 re-scan 端点
- 简化 doReprocess 函数从 92 行减少到 32 行
- 改用单一 POST /api/v1/re-scan API
- 显式传 auto_pipeline: true
- 移除 unregister → register → process 手动串接
- 原子性操作,避免中间失败留下不一致状态

环境变量:
- MOMENTRY_API_KEY (必需)
- MOMENTRY_OUTPUT_DIR (可选,默认 /Users/accusys/momentry/output)
- MOMENTRY_DATA_DIR (可选,默认 /Users/accusys/momentry/data)
- MOMENTRY_ADMIN_CONFIG (可选,默认 /Users/accusys/momentry/config/admin_config.json)
2026-10-04 15:00:45 +08:00
633406346b fix: 禁止浏览器自动翻译页面
- 添加 <meta name="google" content="notranslate">
- 在 <html> 标签添加 translate="no" 属性
- 防止浏览器自动翻译导致显示混乱
- 保持产品名称和 UI 的原始英文显示
2026-10-02 06:08:28 +08:00
f96ba33c7a fix: 保持产品名称和标语使用英文
- 添加 app.productName 和 app.tagline 翻译键
- 所有语言文件中都保持英文
- SearchView 使用翻译函数显示
- 确保不会被错误翻译
2026-10-02 06:02:10 +08:00
1bc53ae584 fix: AdminView 保存配置前先加载现有数据
- 避免空对象覆盖数据库中的现有配置
- 保存前先 GET 当前配置
- 合并修改的字段后再 POST
- 确保所有字段都正确保存
2026-10-02 05:42:31 +08:00
4eb423e424 fix: AdminView 确保 search config 正确保存
- 添加默认值处理
- vlm_min_score: 默认 0.0
- vlm_max_results: 默认 5
- vlm_output_language: 默认 'en'
- 修复空字符串导致保存失败的问题
2026-10-02 05:39:37 +08:00
51ded78f90 fix: PeopleView 强制使用最小过滤参数显示所有 faces
- 设置 ffMinConfPct = 0 (min confidence)
- 设置 ffMinSizePx = 0 (min size)
- 设置 ffMinQuality = 0 (min quality)
- 忽略 file profile 和 admin config 的过滤值
- 确保所有 face groups 和 unassigned faces 都能显示
2026-10-01 12:21:02 +08:00
28dfd3255d fix: PeopleView 从 cluster 数据提取 trace_ids 和 representative_trace
- 构建 faceIdToTraceId 映射
- 从 representative_face.face_id 找到 trace_id
- 为每个 cluster 设置 trace_ids 字段
- 设置 representative_trace 字段
- 修复 group 缩略图无法显示的问题
2026-10-01 11:22:44 +08:00
fef3b892d6 fix: 使用正确的 face_cluster API 端点
- 改用 POST /api/v1/file/:uuid/json/face_cluster
- 替换旧的 GET /api/v1/cluster-results
- 返回正确的 cluster 数据:status, clusters, frames
- 修复 face dedup 按钮无法工作的问题
- 添加 get_file_processor_json API (通用端点)
2026-10-01 11:10:44 +08:00
f3d75ebce8 feat: Library 批量注册 + PeopleView 修复 + 国际化
Library:
- 添加 checkbox 和鼠标框选功能
- Unregistered 卡片添加快速注册按钮
- 状态标签移至左下方,人脸图标移至左侧中间
- Deep Scan 改为 unregister -> register -> process
- 完整国际化(日语、繁体中文、英语)

PeopleView:
- 修复卡片不显示问题(使用 get_file_traces API)
- 移除对 identity_id 字段的依赖

其他:
- 添加日语语言包
- 添加 useDragSelect composable
- 新增文档:Face Bbox Null Bug Report
2026-10-01 00:42:13 +08:00
7b60ca3d2d feat: add face filter components and integration guide
- useFaceFilter composable: manages face filtering state and API calls
- FaceFilterPanel component: UI for filtering controls
- FaceCard component: text-only face display card
- Integration guide: step-by-step guide for integrating into PeopleView

Implements hybrid filtering mode with:
- Instant mode: client-side filtering (5-10ms)
- Backend mode: server-side complex filtering
- Hybrid mode: backend + instant filtering (AND)

Uses actual Core API endpoints:
- GET /file/{uuid}/faces
- POST /file/{uuid}/faces/filter
- GET /file/{uuid}/face/{faceId}/filter-report
- GET /file/{uuid}/filter-stats

Preferences stored in localStorage.
2026-08-09 21:24:52 +08:00
97a5fef0b2 fix: createNewGroupAndMove should rename trace profiles, not create identity
Changed from apiCall('create_identity_from_face') to updateTraceProfileGroup(name).
This correctly creates a new face group by renaming trace_profiles.name
instead of trying to register a global identity.
2026-08-01 05:55:33 +08:00
beea6b1c35 fix: moveToGroup should rename traces, not merge them
Changed from apiCall('merge_trace', ...) to updateTraceProfileGroup(name=targetGroup.name).
This just changes the trace profile name to join the target group,
without actually merging trace data together.
2026-08-01 05:50:10 +08:00
1c0f15664e fix: batchDeleteGroups should ungroup (rename to Unassigned), not hard delete
Changed from apiCall('delete_trace', ...) to updateTraceProfileGroup(name='Unassigned').
This preserves all trace data and just removes the group assignment.
Traces move back to Pending Faces instead of being deleted.
2026-08-01 05:40:46 +08:00
adc8d944c6 perf: use direct trace-thumb endpoint + fallback for face group thumbnails
- loadTraceThumb now uses /api/v1/trace-thumb/{uuid}/{tid} (~8ms)
- Face group imgs use direct trace-thumb URL with fallback
- Merge dialogs also use direct trace-thumb with fallback
- MAX_CONCURRENT increased to 32

Fallback chain:
1. c.rep_trace.file_uuid/trace_id (full trace data)
2. selectedFileUuid/representative_trace (group data only)
3. SVG silhouette
2026-08-01 05:29:55 +08:00
5be57aec7d Revert "perf: lazy load face group thumbnails + increase concurrency to 32"
This reverts commit 26b94f7243.
2026-08-01 01:58:01 +08:00
26b94f7243 perf: lazy load face group thumbnails + increase concurrency to 32
- Add v-observe directive to face groups for lazy thumbnail loading
- Increase MAX_CONCURRENT from 16 to 32 for faster parallel loading
- Apply lazy loading to merge dialogs and candidate groups
- Only load thumbnails when cards become visible (IntersectionObserver)

Improves initial load time for Charade (153 groups, 2451 traces) from
~76s to <5s for visible groups.
2026-08-01 01:49:45 +08:00
9d58fdb9d9 fix: unregister timeout 200s + async mode
- Add UNREGISTER_TIMEOUT=200000 (200s) for large file unregister
- Add timeout field to buildHttpRequest return type
- httpCall now uses per-request timeout override
- unregister_file now uses asyncMode: true for better UX
- Show "Removing in background..." toast for async mode

Fixes timeout error when unregistering large files (83K faces, 20K nodes).
2026-07-31 18:32:50 +08:00
2b944cf9d1 fix: use search/people API (Core Team deployed)
- Remove duplicate search_people case
- Remove search_identities (no longer needed)
- Add search_people response handler
- SearchView already uses search_people
2026-07-25 23:16:59 +08:00
453168f326 chore: remove unused .gs-sidebar-lock CSS 2026-07-25 21:13:22 +08:00
bcffe62a15 fix: remove lock icon from sidebar toggle 2026-07-25 21:13:07 +08:00
ee9a602f7f fix: toggle shows expand chevron when locked, lock icon when unlocked 2026-07-25 20:57:58 +08:00
3aef7d115f fix: sidebar default to collapsed 2026-07-25 20:56:29 +08:00
19846a8773 revert: restore localStorage-based sidebar default 2026-07-25 20:51:48 +08:00
bb4ff9b007 fix: sidebar default to collapsed (locked) 2026-07-25 20:51:38 +08:00
fcb612ff0e revert: restore search_identities API case 2026-07-25 20:38:54 +08:00
1a0b3f2c1f fix: use search/people API (no identity concept) 2026-07-25 20:38:30 +08:00
9386a8e8ef fix: fallback to search_identities (search/people endpoint not deployed) 2026-07-25 20:35:47 +08:00
fb9a55a64c feat: use new search/people API for People search mode 2026-07-25 20:33:15 +08:00
9691e75e36 fix: use height:100% on sidebar/main (resolves to parent content height) 2026-07-25 20:29:35 +08:00
674126d687 fix: add html/body height:100% + 100% height on sidebar/main
- html,body { height:100% } to ensure proper height chain
- ms-side { height: 100% } and ms-main { height: 100% }
- Both resolve to same parent content height: 100vh - 56px
2026-07-25 20:29:26 +08:00
d37967d38e fix: explicit calc(100vh - 56px) on both sidebar and main 2026-07-25 20:28:56 +08:00
a289346fdc fix: revert to flexbox with height:100vh, fix footer visibility
- height:100vh (not min-height) so align-items:stretch actually works
- Footer shows when expanded, hides when collapsed (dynamic class)
- Remove align-self:stretch (unnecessary with flex stretch)
- Restore flex-shrink on divider
2026-07-25 20:27:09 +08:00
dd843c29ee fix: use CSS grid for equal-height sidebar and main 2026-07-25 20:24:11 +08:00
d7592c528c fix: sync sidebar height with main content area 2026-07-25 20:21:17 +08:00
f75eb44351 feat: show compact login/logout icon when sidebar collapsed 2026-07-25 20:20:03 +08:00
652ba77c77 fix: use CSS instead of v-show for sidebar collapse text
- Replace v-show with CSS .gs-nav-label + .collapsed display: none
- Use CSS class .gs-hidden instead of v-show for footer/divider
- Fix content not re-displaying after collapse/expand
2026-07-25 20:18:03 +08:00
ca94259fba feat: add sidebar collapse/expand toggle 2026-07-25 20:11:56 +08:00
660f01c6c5 fix: People search mode label 2026-07-25 19:27:56 +08:00
cb7ebfb633 feat: add Face Group search mode back to SearchView
- Add 'Face Group' mode to search modes
- Use search_identities API temporarily
- Update summary: 'Identity' → 'FS'
- Will replace with Core Team's search_tkg_node_face_trace_profile API
2026-07-25 19:24:54 +08:00
25f718c0d5 fix: remove duplicate case clauses in api/index.ts 2026-07-25 18:28:04 +08:00
0b19a0af0d refactor: QC report - 'Trace Profile' → 'FS Profile' 2026-07-25 15:53:37 +08:00
cf397b268e refactor: QC - use FS instead of Trace
- Display format: FS#123 instead of Trace #123
- Update labels: 'Traces' → 'FS'
- Update messages: 'clusters' → 'groups'
2026-07-25 15:53:17 +08:00
aa25600580 refactor: remove identity/pending concepts
- identity_uuid → group_uuid
- Remove status: 'pending'
- Remove starred: false
- Keep only: face, FS, face group
2026-07-25 15:51:38 +08:00
464ddd16a9 chore: remove debug console.log from faceGroups 2026-07-25 15:49:27 +08:00