feat: 切片编辑 UX 全量 + 最终验收六缺陷修复(批0-2 收口 + acceptance-fixes) #45

Closed
zhanghongming wants to merge 0 commits from codex/inplace-slice-editing into dev
Collaborator

Summary

dev + bigupdate-1 (43 commits)
 └─ 切片编辑 UX 批 0-2(票 01-11,全 resolved)
     ├─ 批0: E 面板/拖动快路径/常驻槽位(01-06)
     ├─ 批1: 快捷键/键盘导引/清理(07-08)
     └─ 批2: QC 双板块/判定键 1·2/退回基线契约 ADR0008(09-10)
        └─ 收口票 11: 走查文档⑨-⑩ 1:1 改写 + 人工验收闭环
 └─ acceptance-fixes(票 01-02,客户六缺陷)
     ├─ 缺陷1: 总进度条=全片累计窗(多源时钟重置安全)+ 跨片寻址
     ├─ 缺陷2: 视频下画面标注去重(QC 专属侧板)
     ├─ 缺陷3: 池计数与列表过滤解耦(三角色)
     ├─ 缺陷4/5: useReviewDraft 双死锁 + saving 楔子 + 脏草稿页面级提示
     ├─ 缺陷6: ConfirmOnly 老 item 逐 item 分派 + 已发布源 approve 解拦
     │        + 幽灵写栅栏 takeover 释放 + coverage 缺失回退
     └─ 服务端: review_decision_plan / review_session 两根因(快照 curl 实证)

Evidence

  • Before: 六缺陷线上复现路径各拥 409/400/静默禁用/计数清零(客户反馈原文 + 快照 curl 复现)
    After: 前端 node --test 798/784/14、Go go test ./... 70 失败名集均与基线逐名一致(新增测试全绿);线上已部署 daccd8df(发布记录 fanyu-20261014-sliceux-accfix-amd64,8/8 证据);真实客户 item 验收深链(领取→会话→意见保存落库→释放)线上实测通过;59 个线上 JS 分包修复特征串全命中
  • 兼容性:旧数据形状(缺 materialization.coverage / ConfirmOnly / 已发布源 / pre-materialization)快照实测,仅流程内数据读兼容,零迁移零配置变更

Merge Danger

Door: two-way

镜像回退即回滚(发布记录已绑定 rollback digest 896c2c1c…);无迁移/无 schema/无配置变更。

Blast Radius: 全标注/质检/验收工作台(三角色 UI + 决策服务端),任务池计数与验收判定路径。

## Summary ```text dev + bigupdate-1 (43 commits) └─ 切片编辑 UX 批 0-2(票 01-11,全 resolved) ├─ 批0: E 面板/拖动快路径/常驻槽位(01-06) ├─ 批1: 快捷键/键盘导引/清理(07-08) └─ 批2: QC 双板块/判定键 1·2/退回基线契约 ADR0008(09-10) └─ 收口票 11: 走查文档⑨-⑩ 1:1 改写 + 人工验收闭环 └─ acceptance-fixes(票 01-02,客户六缺陷) ├─ 缺陷1: 总进度条=全片累计窗(多源时钟重置安全)+ 跨片寻址 ├─ 缺陷2: 视频下画面标注去重(QC 专属侧板) ├─ 缺陷3: 池计数与列表过滤解耦(三角色) ├─ 缺陷4/5: useReviewDraft 双死锁 + saving 楔子 + 脏草稿页面级提示 ├─ 缺陷6: ConfirmOnly 老 item 逐 item 分派 + 已发布源 approve 解拦 │ + 幽灵写栅栏 takeover 释放 + coverage 缺失回退 └─ 服务端: review_decision_plan / review_session 两根因(快照 curl 实证) ``` ## Evidence - **Before:** 六缺陷线上复现路径各拥 409/400/静默禁用/计数清零(客户反馈原文 + 快照 curl 复现) **After:** 前端 `node --test` 798/784/14、Go `go test ./...` 70 失败名集均与基线逐名一致(新增测试全绿);线上已部署 daccd8df(发布记录 fanyu-20261014-sliceux-accfix-amd64,8/8 证据);真实客户 item 验收深链(领取→会话→意见保存落库→释放)线上实测通过;59 个线上 JS 分包修复特征串全命中 - 兼容性:旧数据形状(缺 materialization.coverage / ConfirmOnly / 已发布源 / pre-materialization)快照实测,仅流程内数据读兼容,零迁移零配置变更 ## Merge Danger **Door:** two-way 镜像回退即回滚(发布记录已绑定 rollback digest 896c2c1c…);无迁移/无 schema/无配置变更。 **Blast Radius:** 全标注/质检/验收工作台(三角色 UI + 决策服务端),任务池计数与验收判定路径。
zhanghongming added 205 commits 2026-10-14 09:41:38 +08:00
Wire the existing zero-call saveCombinedDraft endpoint into the Capture
annotation workbench per .scratch/autosave-workbench spec:

- D1 triggers: slice switch (new onSelectedSliceChange workbench prop),
  20s idle debounce after the last edit, and visibilitychange(hidden)/
  pagehide immediate keepalive flush.
- D4 payload merge: unconfirmed workbench description drafts with a
  complete start<end range join segments; mid-selection drafts stay in
  the editor until their range completes.
- D2 conflict handling: 409 with a foreign server draft raises an
  explicit banner (load server draft via reload / overwrite with local
  content using the authoritative version); 409 without a server draft
  (our own formal confirmation cleared it) silently resyncs the version.
- Single in-flight PUT, formal mutations take priority (isBlocked),
  validation 4xx does not retry identical payloads, network errors do
  not block editing; monotonic version guard on apply; non-blocking
  "草稿已自动保存 HH:mm" status line.

Verification: tsc clean; 7 new unit tests (fake-clock scheduler, draft
fingerprint, merge/filter); full frontend suite 656 tests with a failure
set byte-identical to the pre-change baseline (14 pre-existing); Go
internal/api failures unchanged (no Go files touched). Manual E2E
evidence on the local replica stack remains open in the ticket.
Record the approved catch-up work order outcome: Go lane suites and the
28-test Python suite pass at c8794dd7; the retained 20260927 seeded
database replays the five-role HTTP workflow on current binaries (sl-2
snapshot full pass through final acceptance; sl-3 stops at quality as
designed; BLF scratch needs a fresh batch per the documented boundary).
Note the colima 27019 forward workaround (lane-mongo-2 on 27020, same
volumes), the session-sandbox localhost-TCP gating requirement, the
part-index delivery shape addition to the delivery-packaging coverage
gap, and the still-open movi browser smoke.
- extract domain-neutral idle flush scheduler to src/lib/idle-flush-scheduler.js;
  annotation-autosave.js delegates and keeps its 20s default (A01 tests unchanged)
- new review-draft-autosave.js: 8s constant + collector with write-guards,
  empty-text/legacy/clear-intent never auto-executed
- useReviewDraft: touch on edit, autosave enqueue isomorphic with manual save
  (background+autosave), settle keeps editor open with refreshed baseline,
  conflicts reuse existing blocked handling (no auto-retry), cancel on leave;
  beforeunload stays dirty-only
- 10 new node tests; full-suite failure set identical to pre-change baseline
  (14 known pre-existing); tsc clean; fixes one pre-existing prettier violation
- resolve autosave-workbench issue 02; fold browser E2E evidence into ticket 04
- A02 review autosave browser E2E 10/10: exactly one PUT after 8s idle, editor
  kept open, status text, reload restores opinion verbatim, no decision
  auto-submit, idle zero traffic
- A01 workbench E2E 4/5: claim/continue/render/idle-clean pass; typing->PUT->
  reload deferred to online verification (slice generation needs k8s worker
  runtime; company kubeconfig refused by policy)
- 50-user write-rate load test PASS: 350/350 draft PUTs 200 (4 cadence rounds
  at 20s + 3 synchronized bursts), p50 65ms / p99 1.1s, 0 failures, 0 5xx,
  0 Mongo slow ops (profiler slowms=100)
- regression: frontend failure set identical to baseline (14 known); Go 70
  failing subtests all pre-existing families, zero Go files changed
- fixture/loadtest/e2e tooling documented in local-data/verification/
  autosave-replica/ (untracked, referenced from ticket)
- server: timestamp scope in canonicalReviewProblems (identity = source +
  canonical frame, discard-slice/out-of-range/exclusive-end rejections with
  explicit messages, zero duration, dual basis conversion; fixes input
  timeBasis being clobbered by the shared branch) and reviewOpinionKey
  (microsecond frame identity); comment summary gains per-point labels;
  slice-id statistics cover timestamp problems
- rework routing: FANYU_REWORK_RETURN=directed|pool rollback switch applied
  at both decision entries (v5.8 plan + legacy /reviews); directed branch
  already existed (22ca5cd8) with 7-scenario matrix; new pool-branch test
  asserts public-pool restore + admin reassignment channel stays available
- frontend (D5): timestamp option in the F scope menu (three-card navigation
  untouched via opinionCardScopes), timestamp opinion list in the review
  panel with click-to-locate, independent G key jump command wired through
  quality + acceptance workbenches; scope type widened
- tests: 4 new Go tests (canonicalization, 6-case rejection table, per-frame
  uniqueness, pool switch) green; api suite failures identical to baseline
  (65); frontend failures subset of baseline 14, zero new; replica-stack
  live demo: save at 60.05s -> exclusive-end rejected -> formal rejection ->
  directed return to original annotator with labeled timestamp comment
- resolve review-rework-workflow issue 01; interactive rework-side point
  positioning handed to issue 02 (return-baseline view)
- ReworkBaselineRecord: frozen at formal quality rejection via a new decision
  effect (idempotent apply); embeds original opinions, reject comment, and the
  reviewed revision's slice/action summaries - self-contained by design so
  revision pruning can never orphan it and no customer data is deleted
- ReworkFeedbackRecord + GET/PUT /api/human-items/{id}/rework-feedback:
  writer restricted to the directed owner (incl. admin-reassigned owner) or
  manager; entries must reference baseline opinions; CAS version conflicts;
  readable by the reviewer; missing-baseline rounds return a graceful conflict
- GET /rework-baseline returns null baseline for legacy rounds (degraded read,
  never blocks the flow)
- ReviewDraft.Confirmations (D7): canonical validation against the current
  round's baseline (unknown/duplicate opinions rejected; unresolved requires
  note or a current-round opinion; no-baseline rounds must stay empty);
  frozen into AnnotationReviewRecord at the formal decision, matching the
  irreversible-verdict principle
- tests: baseline freeze+embedded evidence, feedback contract (403/400/CAS/
  reviewer-read), confirmation validation+freeze, graceful-missing - all
  green; internal/api failures identical to baseline (65), zero new
- rework API client (baseline/feedback GET + CAS save)
- useReworkReviewData: fetches current-round baseline + feedback when
  reviewRound >= 1, degrades to null on missing/legacy data
- ReviewProblemPanel: read-only original-opinion section with per-opinion
  annotator feedback, D7 confirmation controls (已解决 / 仍有问题+note) that
  upsert into the review draft confirmations and ride the existing 8s
  autosave + formal-decision freeze
- frontend failure set identical to baseline (14), tsc clean
- ReworkFeedbackEditor: read-only original opinions from the frozen
  baseline, per-opinion feedback textarea, 8s idle autosave via the shared
  scheduler, CAS conflict banner preserving local text, mounted above the
  annotate workbench for rework rounds
- replica-stack five-role demo (fresh binary after killing a stale go-run
  child that still held :3001): quality timestamp-opinion rejection ->
  baseline frozen (1 problem, 4 embedded slices, labeled comment) ->
  directed return -> admin reassignment -> annotator reads baseline +
  saves feedback (stale replay 409) -> resubmit -> reviewer reads feedback,
  D7 confirmation draft, formal approval, confirmations frozen in the
  review record
- resolve review-rework-workflow issue 02; frontend failures identical to
  baseline (14), tsc clean
- retention: baselines/feedback kept forever (<=0.3MB per task lifetime,
  no cleanup jobs); materialized slices keep K=2 generations, older-gen
  cleanup registered as a known-gap for the C-block maintenance track
- comparison media: zero new video files - metadataOnly materialization
  references source run artifacts, manifestSha256 content-addressed reuse
  (existing code branch cited), playback over the existing presigned/direct
  pipeline
- capacity at 50 users: sequential two-stream comparison <=2x single path
  (~250Mbps peak), consistent with the C-block 50-user criteria; no new
  storage/bandwidth budget items for B03
- resolve issue 06; unblocks issue 03
- random-claims: my directed rework item is returned as-is (no version bump)
  before any random draw, and keeps priority on repeat claims until the
  rework is submitted; other annotators never receive someone else's
  directed item (assigned filter unchanged)
- quality pool rows gain a 返工复查 badge + detail line for round>0 items;
  workbench header shows the same state; DetailedTaskStatus widened
- pool list stable-sorts rework items to the top (先清自己的错再领新)
- tests: rework-first claim matrix (priority, idempotent resume, priority
  release after submit, invisible to others) green; api suite failures
  identical to baseline (65); frontend failures identical (14); tsc clean
- ReworkFeedbackEditor: 定位 button per timestamp opinion, seeking the
  annotate workbench player via the existing seekRequest channel
  (revision-deduped), same capture-seconds timeline; B03 全局导航 for the
  rework side without touching workbench internals
- tsc clean; frontend failures identical to baseline (14)
- adjustSlice: actions crossed by a moved slice boundary split into two
  source-positioned halves (deterministic :split: ids) marked status
  needs-check; touching boundaries still stretch; untouched actions kept
  verbatim (D2 ruling 2026-10-12)
- action list renders 待核对(边界拆分) with amber emphasis for
  needs-check segments
- ReworkComparisonPanel: structural baseline-vs-workspace diff (slice
  boundaries/names/dispositions, action text/boundaries, additions and
  removals, split detection) per spec §5.1/§5.3 + §11.2 zero-new-media
  conclusion; collapsible details region above the workbench
- tsc clean; frontend failures identical to baseline (14)
The 1d1c9f50 editor patch called s.replace() without reassigning the
variable, so the 定位 button never landed despite the commit message;
this adds it for real (verified: browser shows 定位钮 on the rework
feedback section, seek wired via seekRequest). Also recorded: Vite's
module cache served stale transforms until restart, and the app-level
project scope defaulted to review-focused (no rework rows there) —
both cost one debug cycle each.
- GET /api/human-items/{id}/source-opinions: per-source projection of
  rework baselines (round, frozen problems incl. timestamps, comment) and
  formal quality reviews (round, decision, reviewer, frozen D7
  confirmations); aggregate items only
- multi-source coordination detail: requireAcceptanceSourceReady and the
  decision gate now name the pending sources (itemKey + stage + status)
  instead of a generic message
- AcceptanceSourceOpinions panel in the final-acceptance workspace:
  collapsible per-source history labelled who/which-round
- rework_review badge extends to prepackage_acceptance rounds
- tests: pending-gate names source then approves after ready; projection
  carries baselines/reviews/confirmations and rejects non-aggregate items;
  api failures identical to baseline (65), frontend zero new, tsc clean
- B05 matrix (1413x615): five work modes incl. rework folding, dual-camera,
  legacy replay, keyboard-focus guard - 13/13 with two explicit deployment-
  time exemptions (D2 interactive drag, aggregate acceptance demo) routed to
  the established online-verification list
- known-gap table terminal: materialization cleanup -> formal backlog
  ticket; no silent downgrades outstanding
- docs/rework-review-manual.zh-CN.md: three-role manual (annotator rework /
  quality reject+recheck / acceptance batch recheck) aligned with CONTEXT.md
- compat evidence: optional-field read compat, rollback switch, legacy
  payload writes; asymmetry documented (timestamp/confirmation editing
  needs the new frontend by design)
- perf evidence: A04 50-user load + B06 capacity conclusions
- resolve issues 03 and 05; roadmap moves to the deployment phase
- rework_baseline: drop hand-rolled itoa for strconv.Itoa (P6 reuse)
- AcceptanceSourceOpinions goes through reworkApi.sourceOpinions instead
  of a direct apiRequest (API-wrapper layering)
- shared opinionScopeLabel in review-opinions.ts replaces the triplicated
  scope→label cascades
- rework-first scan limit named and justified in place
- feedback editor tracks conflict via state flag instead of matching
  human-readable error text
- kept: reworkReturnMode os.Getenv follows the 24-precedent api-package
  flag style (auth.go DROBOTICFLOW_ENABLE_LEGACY_ORGANIZATION_ADMIN);
  baseline double-fetch note (useReworkReviewData is review-stage gated,
  annotate mode needs its own fetch)
- c3 rework-first: drop the Limit-20 newest-first window that could bury an
  old returned task under newer claims (review finding: silent priority
  loss); full personal-item scan is the documented correct behavior
- c4 timestamp jump: per-source ordering (current source first, cycle
  within source before moving on) - never interleaves seconds from
  different sources on one axis (spec §4.3)
- c5 unresolved confirmation now requires an explicit note (spec §5.3
  明确引用; the any-opinion loophole closed)
- a1 D1 downgrade: opinions with saved handling feedback render amber
  有修改,待复核 instead of full red; unhandled keep the strong alert
- a2 reviewer-side structural comparison: ReworkComparisonPanel now also
  mounts beside the review panel for re-review rounds (§5.3)
- a3 D4 counters: reviewer header shows 待处理 N / 待复核 M (non-blocking)
- a5 confirmation-only autosave: idle flush now carries confirmation
  changes via an in-place opinion re-save; zero-opinion drafts degrade to
  an explicit message instead of silence (§5.4-8)
- a4 axis markers: backlog ticket maintenance-backlog#02 (visual
  enhancement; discovery already covered by list + G + locate)
- regressions: api 65=65 zero new; frontend 14=14 zero new; tsc clean
Default proxy.golang.org is unreachable from some networks; the env value
now flows into the Dockerfile ARG (goproxy.cn mirror used for this
release build). No behavior change when GOPROXY is unset.
- worker maintenance job (hourly, batch of 3 tasks/tick): terminal-only
  (accepted/rejected) tasks keep the newest K=2 materialized generations,
  older generation directories are reclaimed from disk
- ownership filter by artifact ID marker prevents cross-task deletion;
  path traversal rejected at identifier level (Join-cleaning-proof) plus
  reconstructed-path prefix containment
- source video artifacts, rework baselines (embedded data), and formal
  records are never touched; artifact records stay as tombstones per
  spec §7 graceful-degradation semantics; rescans are idempotent no-ops
- tests: K=2 retention + source/other-task isolation, non-terminal and
  shallow-history skips, traversal rejection - all green
- thin marker strip atop the review slice timeline: orange dots at
  capture-seconds positions; near-neighbours (<0.8% track width) cluster
  into a count badge; single marker click seeks via reviewController,
  cluster click expands a popover listing each opinion (time + text)
- parent slices are never painted red (markers live on their own strip,
  visually distinct from the playhead)
- data flows through the new reviewTimestampOpinions prop mapped from
  reviewDraft.timestampProblems (same source as G-jump and locate)
- browser-verified on the replica stack: two nearby opinions (0.09s/
  0.14s) cluster into one '2 条' marker, expansion lists both; frontend
  regressions identical to baseline (14), tsc clean
- delete ReworkFeedback concept (editor, domain, API, store) per user decision
- add /rework-handling API: one-click skip ('no change') with CAS + trace for re-review
- add rework-emphasis pure lib: baseline-vs-workspace diff auto-clears red,
  merge reattach, multi-round (latest red, older dimmed), J/K jump order
- workbench: red slice blocks + count badges, red/gray action blocks,
  red timestamp markers, per-slice opinion cards, summary strip above track,
  soft submit gate, help entries, one-line notice pointer
- QC ripple: skipped chips replace feedback read in ReviewProblemPanel
- docs: CONTEXT.md glossary (意见处理状态), ADR 0006, manual rewrite
- new ReworkOpinionRail: all opinions in a scrollable right-column mini window
  (focused/compact layout only), grouped red → skipped → gray → old, click to locate
- jumpOrder extended from red-only to full navigation order with per-entry state;
  J/K walk the full list in both layouts (red first), gate dialog filters red
- focused layout: per-slice cards under the slice track removed (no stacking),
  summary strip slimmed to one line pointing at the rail
- docs: manual + ADR 0006 wording updated for the new J/K semantics
- remove the two annotate-phase stage locks in canonicalSliceDispositionState:
  boundary moves of discarded slices and explicit merges are now edited in
  place, first pass and rework share one server path (spec §3.4, R2-Q7:a)
- keep the bottom line untouched: every action must fall fully inside exactly
  one slice and carry a whitelisted status (annotation_operations.go /
  annotation_contiguous.go), pinned by new table-driven cases incl. half
  actions and the three triage products
- retire the reslice write endpoint: POST /slice-reset now answers 409
  slice_reset_disabled pointing at in-place editing and never writes;
  sliceResetHistory evidence and reads stay intact (R3-2:a)
- reset-family tests flipped to the disabled contract; historical post-reset
  invariants still covered via a legacy-state fixture helper
# Conflicts:
#	src/components/CaptureAnnotationWorkbench.tsx
One command now rebuilds TWO tasks sharing the org/accounts: task A
(unchanged, round-1 rework returned to the annotator) and new task B
on a second ise-demo-b-* capture driven through the full loop — first
submit, QC 8 opinions, reject, partial rework via real endpoints
(split S1 @15s, discard S3 via dictionary reason, act-07 description,
act-13 invalid), resubmit ending round-2 submitted awaiting QC
re-review with structureChangeSummary split=1/discarded=1. Deliberately
unresolved act-17, both timepoints and the overall opinion keep the QC
receive view red/gray mixed out of the box. Walkthrough §0 becomes a
two-task table and case-2 points at task B directly (manual path via A
kept as an optional note).
R1-Q8/R2-Q7 (spec slice-edit-ux-rework, seam ②):
- planQualityReviewDecision now builds the next rework baseline as
  unresolved prior opinions (same entry IDs, QC still-problem notes
  merged into the original text) followed by this round's new opinions;
  resolved opinions never enter the new baseline
- rework-baseline reads (any round) and the acceptance source-opinions
  baseline projection narrow to unresolved-only via the frozen round's
  review confirmations; frozen records stay untouched (B02)
- legacy fallback: missing confirmations mean unresolved and opinions
  keep carrying (documented + tested); missing prior baseline keeps the
  first-round fresh-only behavior
- ADR 0008 records the decision, consequences and the rejected
  collapsed-display alternative
# Conflicts:
#	src/components/CaptureAnnotationWorkbench.tsx
Removed with no feature flags: SliceTriageCard.tsx, slice-triage-card.js,
slice-triage-card-types.ts, slice-boundary-triage.js, the sliceTriage page
state + applySliceTriage/choose/dismiss, workbench card render + key-swallow
dispatch + props, triageCardShortcut/Help key tables, and the .slice-triage-*
CSS block. Commit-style boundary moves (slice-phase </>arrows and Shift+arrows)
now route through planSliceEditDragRelease into the 04 conflict list — the
same single disposition entry as drag release / hover+split / trash merge.

Grep evidence: src/ tests/ scripts/ have zero slice-boundary-triage /
slice-triage-card / SliceTriageCard / triageCardShortcut / triageCardAnchor /
sliceTriage / applySliceTriage / classifyBoundaryMove / applyBoundaryMove /
slice-triage references outside the new anti-resurrection guard test.
Dead helpers commitSliceBoundaryDraft / stepSliceBoundaryByFrame (unreferenced
since the numeric-draft sidebar was removed) deleted with their state.

Gates: tsc exit 0; frontend 775/760/15 — failure set identical to baseline by
name except the intentionally-red ticket-06 guard (old E-mode still present,
next commit).
Removed with no feature flags: sliceEditActive state + auto-exit effect,
enter/exit/nudge/switch boundary helpers, the sliceEditShortcut dispatch
branch + key table + help rows, the slice-edit-mode-banner render, and the
in-mode highlighted-boundary overlay. E opens the 04 reconfig panel only
(toggle-slice-edit / slice-edit-unavailable dispatch unchanged); the batch-0
constant slot stays and still hosts the single-slice E notice and the
panel lock notice with zero layout shift.

Keymap finalized per ticket 04's judgments, pinned by tests: panel-internal
E = cancel; panel keys C/G/arrows/Enter/Esc; list keys up/down/1/2/3/Enter/
Esc; outside-mode keys unchanged incl. Shift+arrow action boundary (I3).

Grep evidence: src/ tests/ scripts/ have zero sliceEditActive /
sliceEditShortcut / slice-edit-mode-banner / enterSliceEditMode /
nudgeSliceEditBoundary / slice-edit-highlighted-boundary references outside
the anti-resurrection guard test and one explanatory comment.

Gates: tsc exit 0; frontend 774/760/14 — failure set identical to the
pre-change baseline by name (14 known upstream debts).
Acceptance finding (ticket 09 scope 5): the QC review view showed no action rail —
and neither did the annotator side. Root cause was NOT a review-phase render gate:
continuousActionsForItem derives task.continuousActions from
batch.processingProfile === raw_human + the three-role stage list, and the seeded
ise-demo(-b) batches never set the profile, so the workbench gate
continuousActions && phase === annotate was false everywhere.

- seed: perCapture.batch now carries processingProfile: raw_human (stages already
  matched IsFanyuV58ThreeRoleHumanLoop).
- new static test pins the demo-data contract (ise-demo-seed.test.mjs).
- live stack patched in-place (db.humanBatches updateMany on ise-demo-batch /
  ise-demo-b-batch) so the user's in-flight acceptance progress is preserved.
User reported the two timeline tracks nearly overlapping in the QC review view at
narrower viewports. Reproduced in the review-focused layout (reviewFocus=1): the
workbench grid pinned row 4 (slice timeline editor) at 66px and row 5 (action
timeline) at 90px — both smaller than their content (slider + heading + 46px slice
track ≈ 104px; action timeline min-h-40 = 160px). Flex children with min-height:0
were crushed (heading ≈ 4px, banner slot 32→18px, slice track 46→42px) and the
slice blocks overflowed onto the action blocks: 24px container gap, ~6px block
overlap at every viewport ≥1413. Same family as ticket 01's focused-mode
regression (fixed-height rows + absolutely positioned tracks + a dead slot).

- rows 4/5 now content-driven (auto); the video row (1fr) absorbs the difference.
- the slice-edit banner slot is display:none under [data-review-focused]: both
  notices are unreachable in review (E and the panel are gated by the review
  keymap), so the slot is dead weight there; annotator-side constant-slot
  semantics in capture-workspace.css are untouched.
- measured gap after: 44px at 1680/1440/1366/1280 (focused), 173px unfocused;
  evidence under .scratch/slice-edit-ux-rework/probe-out/fix-afterB-*.json
User: E almost never opened (「E 老是按不出来,操作暂时没有完成」). Two defects:

1) openSliceEditPanel hard-blocked on outstandingDrafts — but parked drafts are
   the normal state during continuous annotation, so E was almost always dead.
   The blocked notice also never reached the user: it starts with 请, and
   userErrorMessage's instructive-copy rule replaces such messages with the
   generic 「操作暂时未完成」 fallback.

   Design change (ticket 04): OPEN despite parked drafts. New
   onSliceEditSessionChange channel tells the page when the panel session is
   open; the page extends the autosave isBlocked gate (panel session OR any
   conflict list) so drafts stay in workbench state and the structure snapshot
   reference stays stable, then flushes once immediately on release
   (slice-edit-close edge via sliceEditSessionFlushEdge). Guards kept:
   slices<2, and the non-continuous active-editor block with unchanged copy.
   The apply-time drafts guard stays (applying structure edits while draft
   intervals reference the pre-apply layout can orphan content); the docs now
   spell out that split.

2) The E-panel sanity walk exposed a pre-existing dead Enter: the
   applySliceEditPanel workspace-drift guard compared prop references against
   panel.snapshot.slices/actions, but snapshotSliceEditWorkspace deep-copies, so
   Enter was ALWAYS rejected with 「面板期间工作区发生了其它修改」. The guard now
   compares by value (same sorted-JSON convention as the preview-equality check
   below it); genuine external changes still fail the check.

Verified live (probe-e-walk): E open → ←/→ nudge (red block) → Shift coarse →
Enter → conflict list → 1+Enter applied → E reopen → Esc; task A structure
round-trips byte-identically.
User: 「shift 左右能改变切片或标注动作的边界…这个也没有做」. The global map
returned null for every shift+arrow outside the panel (line ~68), and in
continuousActions mode the early adjust-boundary return fired regardless of
whether an action editor was open — startBoundaryHold then silently no-oped
without editingAnnotation, so the key looked dead in both shapes.

- annotation-shortcuts: shift+arrows in annotate phase now resolve to
  coarse-nudge-boundary unless (continuousActions && actionEditor) keeps the I3
  action-boundary binding; slice-phase behaviour unchanged either way; repeats
  consume; modifiers still fall through natively.
- workbench dispatch: coarseNudgeSliceBoundary nudges the selected slice's
  boundary 0.5s (selectedBoundary if one was clicked/dragged, else the panel's
  default-focus rule: selected slice end, last slice falls back to start) and
  commits through onSliceBoundaryChange — the same committed pipeline the slice
  phase uses (clean → immediate apply, conflict → the ticket 04 list,
  Esc = nudge never happened).
- help table: new annotate row for the slice-boundary nudge; the continuous
  context relabels it to the dual semantics; the old continuous extra row is now
  slice-phase only.
- keyboard guide: the committed-nudge paragraph and the panel prerequisites
  (drafts no longer block opening; apply still requires them) updated.

Tests: annotation-shortcuts (new dispatch matrix incl. no cross-talk with the
panel table, editable inert, modifiers) + continuous-shortcuts pins updated to
the actionEditor-aware contract.
The captions-visibility static guard pinned '((isQualityReview || captionsViewable)'
byte-for-byte. Prettier's paren wrapping for that expression depends on the
surrounding line-width context; after the acceptance-fix edits it now emits the
single-paren form (both are valid prettier output — HEAD's double-paren form was
also clean). The assertion now pins the condition composition, not the paren
shape. No behavior change.
✅ ticket 11: close slice-edit UX feature — user acceptance rounds + online deployment verified
Some checks failed
web-ci / checks (push) Waiting to run
web-ci / checks (pull_request) Has been cancelled
04f28c4fce
zhanghongming added 5 commits 2026-10-14 13:53:25 +08:00
zhanghongming added 3 commits 2026-10-14 13:53:48 +08:00
longtao.wu added 3 commits 2026-10-15 12:07:09 +08:00
Clicking an unclaimed row in the claimable pool wrote its id into the URL,
which an effect misread as ownership and flipped the list to My Tasks; the
selection sync then dropped the previewed task entirely. Gate the flip on
confirmed assignment (pools.mine / task detail), and start review
workspaces on the claimable pool for URL arrivals, so owned deep links
still land in My Tasks via the ownership effect. Claim-without-preview
keeps preserving the current list view.
🐛 Keep returned annotations visible to annotators when import waves bury their tasks
Some checks failed
web-ci / checks (push) Has been cancelled
web-ci / checks (pull_request) Has been cancelled
90d5c0c5a2
A quality rejection reassigns the ORIGINAL annotation task, whose
createdAt keeps the original import date. The task list pages
org-wide newest-first and then role-filters each window, so once newer
import waves fill the window with unreadable foreign tasks the
annotator's own returned task can no longer be fetched: each page
filtered to empty, and the filtered-empty response dropped the
continuation cursor so paging stopped for good (production incident
2026-10-14: reviewer saw the return, annotator saw nothing).

- server: authorization-empty pages now carry the store window's
  nextCursor/hasMore (taskPageCursor helper shared with the success
  path) so limited consumers can always continue paging
- client: non-manager workspaces (annotators included, previously
  review-only) fetch tasks by pool legacyTaskIds via the existing
  ids= join instead of the newest-first window, mirroring the
  任务关联数据缺失 fix
- tests: Go windowed-paging contract test (empty page keeps cursor,
  page 2 returns the rework task, ids join reaches it directly) and a
  frontend source pin for the ids-join condition
Reviewed-on: #48
Owner

@zhanghongming 本次按 #44 的 21127800 → 本 PR 原 head 7b299abe 审查增量,并检查与 dev=03db2a28 的整合结果。#48 已独立审查并合入本功能分支(5be3e79f);结论仍是暂缓本 PR 合入 dev。

Standards

继承 #44 两项未修复问题:跨任务自动保存迟到响应污染(P1,已离线复现)及物化清理固定前三任务导致后续任务无法推进(P2)。本 PR 的 useAnnotationAutosave.ts 没有补任务/用户代次隔离;原 head 的 AnnotationOperations.tsx:2707-2721 仍仅比较版本号就更新当前 detail 与基线。详见 #44 本轮审查评论。

Spec

[P2] internal/api/rework_handling.go:69-74 的写权限只判断 item.AssignedUserID,没有限制标注角色、返工阶段及当前轮次。重新送检后质检员领取同一 item,即可满足这个写条件,改写 skippedOpinionIds;?round= 还允许选历史轮次。ADR 0006 §3 把该状态定义为标注员一键“不改了”,复审侧显示“标注员标记不改”,因此复审员不能通过当前领取身份改写这份记录。请限制 PUT 为当前返工阶段的合法标注归属人及当前轮次,历史读取保持只读;补质检阶段写入/历史轮写入拒绝回归。此项目前是代码路径核实,独立接口复现另行补充。

ADR 0006/0008 已明确调整反馈编辑器和已解决意见展示,这些有依据的变更不作为缺陷。

本轮验证:隔离整合树 tsc 通过,相关前端 25/25、API/store/worker 定向测试通过。全量前端门禁的 devboot 测试超过 22 分钟未结束,已终止该测试;不能宣称全量通过,也不将此次中止当成已证实的产品回归。Gitea CI 仍等待运行。没有执行公司部署或客户数据写操作。

@zhanghongming 本次按 #44 的 21127800 → 本 PR 原 head 7b299abe 审查增量,并检查与 dev=03db2a28 的整合结果。#48 已独立审查并合入本功能分支(5be3e79f);结论仍是暂缓本 PR 合入 dev。 ## Standards 继承 #44 两项未修复问题:跨任务自动保存迟到响应污染(P1,已离线复现)及物化清理固定前三任务导致后续任务无法推进(P2)。本 PR 的 useAnnotationAutosave.ts 没有补任务/用户代次隔离;原 head 的 AnnotationOperations.tsx:2707-2721 仍仅比较版本号就更新当前 detail 与基线。详见 #44 本轮审查评论。 ## Spec [P2] internal/api/rework_handling.go:69-74 的写权限只判断 item.AssignedUserID,没有限制标注角色、返工阶段及当前轮次。重新送检后质检员领取同一 item,即可满足这个写条件,改写 skippedOpinionIds;?round= 还允许选历史轮次。ADR 0006 §3 把该状态定义为标注员一键“不改了”,复审侧显示“标注员标记不改”,因此复审员不能通过当前领取身份改写这份记录。请限制 PUT 为当前返工阶段的合法标注归属人及当前轮次,历史读取保持只读;补质检阶段写入/历史轮写入拒绝回归。此项目前是代码路径核实,独立接口复现另行补充。 ADR 0006/0008 已明确调整反馈编辑器和已解决意见展示,这些有依据的变更不作为缺陷。 本轮验证:隔离整合树 tsc 通过,相关前端 25/25、API/store/worker 定向测试通过。全量前端门禁的 devboot 测试超过 22 分钟未结束,已终止该测试;不能宣称全量通过,也不将此次中止当成已证实的产品回归。Gitea CI 仍等待运行。没有执行公司部署或客户数据写操作。
Owner

@zhanghongming 按最新合并请求再次复核:当前 head 仍为 5be3e79f,目标 dev 仍为 03db2a28;相较上一轮审查没有新增修复提交,#48 已包含在本分支。

合并结论保持暂缓,请逐项修复并补回归:

  1. P1:自动保存成功、409 回读及失败处理统一增加任务/用户会话代次校验,覆盖“A 在途保存→切换 B→A 迟到返回”,保证 B 的 humanItem、编辑基线和保存状态不被污染。
  2. P2:继承的物化清理增加跨轮公平推进,验证超过 3 个任务、多状态、多组织均可得到处理。
  3. P2:rework-handling PUT 限制为当前返工阶段的合法标注处理人及当前轮次,拒绝质检领取后写入和历史轮写入,避免复审员修改“标注员标记不改”。

本次仅复核远端提交和既有评论,没有新代码可供增量测试;上一轮测试结果不等于上述问题已经修复。更新提交后再按新 head 审查合并。

@zhanghongming 按最新合并请求再次复核:当前 head 仍为 5be3e79f,目标 dev 仍为 03db2a28;相较上一轮审查没有新增修复提交,#48 已包含在本分支。 合并结论保持暂缓,请逐项修复并补回归: 1. P1:自动保存成功、409 回读及失败处理统一增加任务/用户会话代次校验,覆盖“A 在途保存→切换 B→A 迟到返回”,保证 B 的 humanItem、编辑基线和保存状态不被污染。 2. P2:继承的物化清理增加跨轮公平推进,验证超过 3 个任务、多状态、多组织均可得到处理。 3. P2:rework-handling PUT 限制为当前返工阶段的合法标注处理人及当前轮次,拒绝质检领取后写入和历史轮写入,避免复审员修改“标注员标记不改”。 本次仅复核远端提交和既有评论,没有新代码可供增量测试;上一轮测试结果不等于上述问题已经修复。更新提交后再按新 head 审查合并。
Owner

@zhanghongming 10月17日复核:本 PR head 仍为5be3e79f,没有新增修复,不单独合入 dev。整合 PR #49 已完整包含本 PR,并补上自动保存会话隔离及清理公平推进;本 PR 曾报告的 rework-handling 权限缺口在整合版本仍存在,现已通过实际 HTTP handler 复现质检员写当前轮及历史轮均返回200,详见 #49 本轮评论。#50 的独立增量已审查并合入整合功能分支(10b0dddd),不是合入 dev。请在整合分支限制返工处理 PUT 的角色、阶段、当前轮次并补拒绝回归;通过后再统一审查整合 PR。本次保留 #45 开放,不自动关闭或合并。

@zhanghongming 10月17日复核:本 PR head 仍为5be3e79f,没有新增修复,不单独合入 dev。整合 PR #49 已完整包含本 PR,并补上自动保存会话隔离及清理公平推进;本 PR 曾报告的 rework-handling 权限缺口在整合版本仍存在,现已通过实际 HTTP handler 复现质检员写当前轮及历史轮均返回200,详见 #49 本轮评论。#50 的独立增量已审查并合入整合功能分支(10b0dddd),不是合入 dev。请在整合分支限制返工处理 PUT 的角色、阶段、当前轮次并补拒绝回归;通过后再统一审查整合 PR。本次保留 #45 开放,不自动关闭或合并。
Owner

@zhanghongming 本 PR 的5be3e79f已通过 #52 完整进入 dev=1aad4029,Git祖先关系已确认。自动保存隔离、清理公平推进及返工处理写权限的后续修复也已整合;#53 的15项权限边界、本轮相关回归已通过。按“已由整合PR覆盖”关闭本重复入口,不再单独合并旧版本,源分支保留。#56/#57 的新问题在各自PR跟进,不影响本次已通过范围;没有新增部署或客户数据操作。

@zhanghongming 本 PR 的5be3e79f已通过 #52 完整进入 dev=1aad4029,Git祖先关系已确认。自动保存隔离、清理公平推进及返工处理写权限的后续修复也已整合;#53 的15项权限边界、本轮相关回归已通过。按“已由整合PR覆盖”关闭本重复入口,不再单独合并旧版本,源分支保留。#56/#57 的新问题在各自PR跟进,不影响本次已通过范围;没有新增部署或客户数据操作。
longtao.wu closed this pull request 2026-10-22 13:01:30 +08:00
Some checks failed
web-ci / checks (push) Has been cancelled
web-ci / checks (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: longtao.wu/droboticflow#45
No description provided.