fix(annotator): the read-only mode closes its add-a-class doors, and a skipped frame in a closed batch still explains itself - #429
Merged
Conversation
…a skipped frame in a closed batch still explains itself (#423)
This was referenced Aug 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #423
What changed
Two holes in the annotation workspace's read-only mode (the mode
AnnotationPagederives fromannotatebeing absent from the frame'sallowed_actions— audit F2):The add-a-class doors go inert while the classes region is refusing. The region's
+, theCreate class "<text>"row, and the filter's Enter fallthrough all opened the add-a-class dialog from a viewer, and the dialog publishes a real schema version. Introduced by feat(annotator): class selection panel in the workspace side panel; top bar sheds the class field #422 (08e1483): the page handsonAddClassto the panel unconditionally, andClassRegiongated only row-arming on itsrefusal— the create paths never consulted it. Before feat(annotator): class selection panel in the workspace side panel; top bar sheds the class field #422 no class-selection surface rendered in the read-only mode at all, so no create door existed there. The+now disables carrying the rows' own sentence, andcreatableanswers null while refusing, which kills the row and the Enter fallthrough in one place.A skipped frame in a closed batch now says "Viewing only" and names the correction path. The read-only banner rendered only while the frame was not skipped — a guard from The annotator opens as a viewer when nothing can be written (F2, F23) #306, which predates the Correction-batch UI: the end of the forward-only story (G6) #313 correction link that lives inside the banner — so that frame showed no banner, no
Correct this batch, and a skipped notice promising "Un-skip it" over a move the wire withholds on a closed batch. The banner now renders wheneverwithheldBecause(batchState)speaks, and the skipped notice yields to it there; in an open batch the notice keeps the frame, unchanged, because its Un-skip is live exactly there.Not a legality change anywhere: the frontend still renders only what the wire declares (
create_correctionis declared onBatchOutexactly while the batch is completed, and both fixes read the declarations the page already holds).Investigation record
The issue's headline — a completed batch opening with editing live — was not reproducible at HEAD on any layer or entry path: the kernel probe answers
allowed_actions: []on a completed batch's assets, the stubbed e2e read-only tests pass, and a real-kernel browser walk (now committed as a cycle step) shows the banner, no palette, a disabled Skip, and a draw gesture that writes nothing. What was live is exactly the two items above. The remaining read-only presentation leaks — selection handles, move/resize cursors, the classes region rendering at all — are ruled on separately in #426 and deliberately not touched here.Found, not fixed
+and the class rows carry their reason as a nativetitle; the product's tooltip primitive is the better surface, and the Finish-job control has the same pattern (Finish job on the last frame: disabled state must explain itself #427 rules on that control; the classes region is expected to leave the read-only mode entirely under Read-only workspace: no class panel, no edit affordances, selection syncs to the panel #426).tests/kernel/test_video_processor.py,tests/server/test_sources.py::test_uploading_something_that_is_not_a_video_is_422, andtests/kernel/test_source_service.py::test_registering_something_that_is_not_a_video_stores_nothing— fails on this machine on cleanorigin/mainexactly as on this branch, each withMediaToolUnavailable: ffprobe is not installed or not on PATH. Environmental; the local run below is green except for exactly those ten, and CI (whose runners carry ffmpeg) is the arbiter for them.Test plan
classRegion.test.tsx— "closes every door into the add-a-class dialog while it is refusing" (red before the fix).e2e/annotate.spec.ts— "a completed batch's viewer leaves no door into the add-a-class dialog" and "a skipped frame in a completed batch still says viewing only, and names the correction path" (both red before the fix, chromium).cycle/cycle.spec.ts— new step "the completed batch reopens as a viewer, from the tile and the address bar": the first real-kernel proof of the read-only mode, covering the gallery-tile entry and a cold reload of the job URL; itsclass-addassertion was red before the fix.Gate stages, run in the worktree (staged; exit codes verbatim):
uv run pytest -q(green except the ten ffmpeg-environment tests above)uv run ruff check .uv run ruff format --check .uv run mypy src/visionsetuv run lint-importspnpm -r buildpnpm testpnpm -r lintCI=1 playwright test, 224 tests)CI=1 playwright test -c playwright.cycle.config.ts)