1.9 KiB
Project slice-name dictionary
Project detail keeps its existing horizontal navigation. Inside 语义标签, administrators can switch between 动作描述字典 and 切片字典. Both use the same explicit add/edit/remove interaction. Editing creates a replacement entry for this project's selection, so other projects sharing an entry are unaffected.
In the annotator's slice phase, 从切片字典选择 searches active names enabled
for the current project and fills the selected slice's existing name field.
The name remains editable. Selection does not seek video, change boundaries or
submit work; 确认全部切片 retains the existing save/materialization flow.
No dictionary means manual naming still works. Editing/removing dictionary
entries never rewrites already saved slice names or historical delivery data.
Compatibility and API
AnnotationLabelRecord.kind:actionorslice; missing legacy kind meansaction. Purpose cannot be changed on an existing entry.- Existing
/api/annotation-labelsdefaults to the action dictionary. Creating a slice entry uses the same admin-only POST withkind: "slice". Organization-wide slice listing is admin-only. GET /api/projects/{id}/slice-labels: returnslabelIdsand activeitems, constrained to the authorized project.PUT /api/projects/{id}/slice-labels: admin-only{labelIds: [...]}. Rejects foreign-organization, inactive and wrong-purpose IDs, and deleting projects.- Project selections store
sliceLabelIdsindependently from existinglabelIds. Memory/Mongo updates change only the relevant dictionary selection. - Task/project switches abort stale reads; reopening the picker refreshes names. Load failures do not disable manual name entry.
Tests cover legacy action compatibility, purpose and project isolation, permissions, independent updates, removal without history mutation, and the existing name callback.