Annotation workspace: keyboard editing, focused layout and production slicing fixes #1
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/local-dev-toolkit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Resulting behavior
The annotation workbench adds keyboard editing, frame stepping, slice review bookmarks, dictionary selection, throttled undo/redo, guarded deletion and invalid-gap filling, with ownership and version checks on persistence. A dedicated focused workspace keeps synchronized videos, playback controls, timelines and the current editor visible down to a 1280×640 CSS-pixel viewport. It supports original-layout fallback, single-camera inspection and guarded continuous task handling.
This update fixes three production issues and improves the annotation workflow:
Existing review fixes remain: ordinary HTTP supports manual work; dedicated work pages require secure-context Web Locks and do not bypass coordination failures. Local snapshot tooling validates chunk lists and hashes before restoring. Personal
myuse/, local data and credential files are excluded.Verification and deployment
Latest UI code
64118cadis deployed to Fanyu. Real Edge browser checks passed in both layouts across seven layout/viewport combinations, including 1280×640. Action navigation sought both videos correctly; input/dictionary isolation, unsaved-edit protection, phase-specific help, card containment and timeline alignment passed. No business save/submit/claim requests were made in this UI acceptance; the inspected task remained version 11. All 61 public assets match the committed build. API backend binary and annotation processor are unchanged by the UI release.The frame and lease fixes have scoped Go/real-FFmpeg regression coverage, independent review and recorded cluster rollout/recovery evidence. Failed tasks were recovered through version-checked APIs using their preserved boundaries. The frame fix recovered five slices; the lease fix recovered six slices. The latter reused completed media and is not a production long-transcode stress test.
TypeScript checks and clean web builds passed. At the user's request, the latest annotation UI change was tested on the company site instead of running local test suites; its newly added unit cases have not been executed. Earlier full frontend runs recorded the same 9 baseline failures (568/577 passed). Historical full Go/Python failures and remaining limitations are documented; this PR does not claim all repository suites pass.
Publication check: 39 outgoing blobs contained no matches for the configured Gitea credential or supplied high-entropy production account passwords; no
myuse/orlocal-data/files are included. Historical POC credentials were previously accepted by the repository owner; this update does not rewrite history or rotate credentials.Production remains HTTP. Focused-work acceptance used the previously authorized browser exception limited to that origin, which is not an HTTPS deployment. Existing worker readiness fluctuations remain a separate known issue. Rollback records are retained; temporary build resources were cleaned. This PR does not merge dev.
Reports and guides
docs/annotation-keyboard-guide.zh-CN.mddocs/annotation-workspace-layout.mddocs/verification/annotation-navigation-20260918.mddocs/verification/dictionary-pagination-20260918.mddocs/verification/slice-frame-mismatch-20260918.mddocs/verification/slice-heartbeat-root-cause-20260918.mddocs/verification/slice-heartbeat-fix-20260918.mddocs/verification/pr-review-20260918/report.mddocs/verification/annotation-workspace-layout/acceptance-results.mddocs/verification/annotation-workspace-layout/full-suite-results.mdThe newly reported inability to enter work mode after a random claim is being investigated separately and is not represented as fixed by this update.
29e414bedcto839883ff89Local dev toolkit: isolated environment + real-data annotation testingto Annotation workbench: keyboard workflow, undo, continuous tasks and local verification审查结论:暂缓合并及 Fanyu 部署,需要先修正以下问题
审查版本:head
54a35afad95d77b1f23c955f9c4671cae83a664d,basecb474b6abcad05333092374903eb0a34440039cc。已在隔离工作树模拟合并,无 Git 冲突;这不等于当前线上环境可运行。P1:普通 HTTP 下,新增工作页和原随机领取都被 Web Locks 前置条件阻塞
位置:
src/hooks/useAnnotationWorkSession.ts:55-58,117-120;src/pages/AnnotationOperations.tsx:3198-3200,3612,3727。Fanyu 实际入口
http://120.48.180.80/,本次在真实 Chrome 只读检查得到window.isSecureContext === false、typeof navigator.locks === 'undefined'。hook 会将unavailable置为 true,acquire()返回 null。结果不仅是“开始工作/继续工作”禁用:原来的“随机领取任务”也先调用 acquire,拿不到锁便直接 return,不发起领取。隔离 PR 预览中模拟缺少 Web Locks 后,已复现“开始工作”禁用;点击仍可点的“随机领取任务”,可领取 6 / 我的任务 1 均不变。localhost 属于安全上下文,不能覆盖普通 HTTP 的这个上线场景。
请在合并上线前选择并验证:为现有 HTTP 入口提供明确、安全的兼容方案(至少不破坏原手动领取路径),或者先完成 Fanyu HTTPS 入口和切换验收。不要通过要求员工关闭浏览器安全限制、或直接跳过互斥检查来规避。
P2:快照只有 1–9 个分块时,脚本生成和读取的文件名不一致
位置:
scripts/local/fetch-mongo-snapshot.sh:37,43-45。split -d默认生成p00,但 WIDTH 按分块数量的十进制位数计算;N=1 时读取p0。本地小样本已复现:实际[p00],脚本请求p0,文件不存在。请统一指定 split 与 seq 的后缀宽度,或直接按实际分块文件名传输,并补小快照回归。没有执行该脚本的集群写入或 Mongo 恢复操作。已验证
当前不执行远端合并、不部署本 PR。上述问题处理并复验后再继续合并及 Fanyu 发布。
建议处理方案与重新合并条件
补充上一条评审:这不是 Git 冲突导致的“不能合并”,而是当前 Fanyu 运行条件下会出现功能回退。以下是建议,尚未实施;不建议跳过验收直接强制合并。
1. P1 推荐:先兼容当前 HTTP,分阶段开放新工作模式
建议本 PR 先采用方案 A;如果本次必须开放完整的独立工作页/连续领取,再采用方案 B。
方案 A:HTTP 保留原手动模式,新协调模式按能力开放。
useAnnotationWorkSession明确区分“不支持 Web Locks”“锁被其他页面占用”“协调过程异常”,不要把三种情况都处理成静默 return。startWork/ 连续领取路径分开。无 Web Locks 的 HTTP 环境继续允许原任务池手动随机领取、查看我的任务、继续标注;只关闭依赖 Web Locks 的新工作页和自动连续领取。/work时,明确提供返回手动工作台的入口,保留 projectId/taskId 和服务器已领取归属;不要释放、重领任务或静默丢弃草稿。提示写成“当前连接使用手动模式;独立工作页和连续领取需安全连接”,不要只让用户更换浏览器。方案 B:先完成 Fanyu HTTPS,再开放完整新模式。
isSecureContext和锁的 request/query 都可用,再做同一浏览器同源双标签、关闭、刷新和返回恢复测试。不要把浏览器内锁描述成跨浏览器/跨设备的独占锁。2. P2:修正快照分块命名,并避免共享临时目录互相影响
split -d -a 6;优先读取实际生成的分块文件名并按固定规则排序传输,不再用“分块数量的位数”猜文件名。若保留数字循环,生成和读取必须共用同一宽度。mktemp -d目录,退出时只清理自己创建的目录,不删除固定的共享/tmp/fetch-chunks*路径。mongorestore --drop。备份目录参数应校验,并以参数传递给远端脚本,避免直接拼接进 shell 命令。3. 修复提交与验收顺序
建议优先执行:HTTP 手动兼容 + 分块脚本修复 → 回归/复审 → 合并上线;HTTPS 完整新模式作为明确的后续发布项。 如果选择一次性开放全部新模式,则先完成方案 B,不要把 HTTP 降级算成全部完成。
本评论仅提出处理建议,未修改代码、未合并、未部署。
Annotation workbench: keyboard workflow, undo, continuous tasks and local verificationto Annotation workspace: keyboard editing, focused dual-video layout and review fixes新提交复审(80ae2913)
复审范围:54a35afa 之后的新提交,head:80ae2913481d4daf3512cb13bdf7f5a14110f03f,base dev:cb474b6a。已在独立工作树验证,未混入本地未提交修改。
结论:上一轮两个阻塞项已修复,本轮增量审查未发现新的必须阻塞合并的代码问题,可以进入合并流程。这不等于生产全流程验收通过。
上轮问题复核
7ed51d32区分不支持、锁占用、协调失败、上下文失效;只有不支持时原手动工作台允许后端原子领取,锁占用或异常不绕过。HTTP /work 提供保留项目和任务的手动返回入口,新工作页/自动连续领取仍要求安全上下文。024dfd01使用固定六位分块名及实际清单,恢复前 SHA-256 校验,临时目录隔离。1/2/9/10/99/100 块边界、缺块/截断、校验和异常、中断重试和非法路径行为测试通过。独立验证结果
非阻塞后续建议与验收边界
92be2e36不同,复审末次探测未连通;不可把本地验证或旧记录当作当前线上整套版本验收。本次没有修改 PR 代码、合并或部署。
Annotation workspace: keyboard editing, focused dual-video layout and review fixesto Annotation workspace: keyboard editing, focused layout and production slicing fixesLGTM