线上紧急修复 round7-9:审核工作台加载、随机领取入口、视频进度条 #39

Merged
zhanghongming merged 3 commits from codex/slow-page-performance-20261009 into dev 2026-10-12 14:53:13 +08:00

3 Commits

Author SHA1 Message Date
d-robotics
fc52ae9e3d 🐛 Make review/acceptance random-claim entries always usable (all-tabs, all-projects) and rename to 随机领取 2026-10-12 11:17:51 +05:30
d-robotics
bc58adb1a6 🐛 Restore review/acceptance random-claim entries and fix movi playhead updates
Production report: for all three roles the video progress bar stayed frozen
during playback and only jumped to the playhead position on pause, and the
reviewer/acceptance random-claim buttons were gone.

Root cause (progress bar): the vendored movi-player 0.4.1 dist re-dispatches
play/pause/ended/playing/canplay/loadedmetadata/durationchange/progress on
the host element but NOT timeupdate/seeking/seeked/waiting from its shadow
<video>. Verified with an instrumented page: the shadow video fires ~4
timeupdate/s during playback while the host receives zero. The workbench
playhead, time display and fragment-end enforcement are driven by
onTimeUpdate, so they only moved when the transport re-read currentTime on
pause. MoviVideo now bridges those four events from the shadow video onto
the registered handlers with the host as currentTarget, so master-element
checks and proxied media property reads keep working for both camera
bridging and MaterializedSliceWorkbench sync.

Buttons: round7 (9d1c2252) dropped the acceptance random-claim entry as
collateral of the pool-join rework — restore it verbatim
(claimPrepackageAcceptance returns the claimed item again). The reviewer
random-claim entry (随机领取并开始审核) only ever lived on
codex/oct8-feedback-fixes and never merged; port it gated to quality review
workspaces.

Verified against the local snapshot replica: reviewer and acceptance
buttons render, claim and navigate (browser E2E); the production build
plays video with the playhead advancing at ~4Hz through 8s of samples;
frontend suite 631/645 pass vs 630/645 at the parent commit (failures are
pre-existing UI-copy debt, unchanged).
2026-10-12 10:01:43 +05:30
d-robotics
9d1c225293 🐛 Fix review workspace loading: pool stage pushdown, task pool-item join, claim-count batched batch reads
User report on production: reviewers saw 正在加载任务… for a long time and
then 任务关联数据缺失,请联系管理员核查; annotator loading slow; acceptance
fast. Production traces showed three distinct causes:

1. /api/human-items available pool 12-14s: the role pools filtered stages
   only in-memory, so Mongo sorted the whole 17,220-doc unassigned backlog
   (~7s per fetch round, up to 6 rounds) before the handler dropped nearly
   every row. Acceptance was fast because its query already pushed stageId.
   Fix: HumanItemQuery.StageIDs  pushdown (parseHumanItemQuery accepts
   stageIds=a,b,c merged with stageId); the quality/clip-quality/acceptance
   workspaces send their stage set; review pool joins no longer depend on
   the backlog sort.

2. 任务关联数据缺失 regression (introduced by the round4 task-list
   pagination): review pool pages reference tasks across the whole backlog,
   but the tasks fetch took a newest-first 200 window — only 60/500 pool
   items could find their task. Fix: review workspaces (reviewOnly) fetch
   tasks by the pool page's legacyTaskIds via the new ids= parameter
   (id_unique ); ListAnnotationTasksFiltered gains an IDs mode in both
   stores; the misleading 任务关联数据缺失 empty-state is scoped to
   non-review workspaces (review pool loading shows its own message).

3. claim-count 3.4s: one per-candidate GetHumanBatch point lookup over
   12,009 legacy batches. Fix: single ListHumanBatchAccessRecords  read;
   its projection now also carries status (the completed check read a
   missing field before).

Verified on the 17k-item stress replica: pool 421→308ms with stage pushdown;
ids join returns 500/500 pool items in 78ms (was 0/440 outside the window);
claim-count 128ms. Full suites: 65 failures = the 65 pre-existing upstream
debt, no new.
2026-10-12 06:57:27 +05:30