Skip to content

Conversation

philippotto
Copy link
Member

This PR only renames store.tracing to store.annotation, since this fits our terminology better (a tracing is only a layer of an annotation).
No need to view the diff in my opinion, as it's only renaming.

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • CI should be enough thanks to TS and tests

Issues:


Did not update changelog because this doesn't affect the user.

@philippotto philippotto requested a review from hotzenklotz April 1, 2025 14:31
@philippotto philippotto self-assigned this Apr 1, 2025
Copy link
Contributor

coderabbitai bot commented Apr 1, 2025

📝 Walkthrough

Walkthrough

The pull request refactors the codebase by replacing the old “tracing” model with an “annotation” model. Function parameter types, state selectors, type imports, Redux state properties, and test expectations have been updated to use the new type StoreAnnotation (formerly Tracing or HybridTracing). These changes affect APIs, controllers, reducers, sagas, various UI components, and test fixtures. In essence, all references to a tracing-based data structure have been systematically renamed and reorganized to ensure that annotation data is correctly handled throughout the codebase.

Changes

File(s) Change Summary
frontend/javascripts/admin/admin_rest_api.ts, .../oxalis/api/api_latest.ts, .../oxalis/controller/td_controller.tsx Updated function parameters and signatures—changing from Tracing to StoreAnnotation and switching state selectors from state.tracing to state.annotation.
frontend/javascripts/dashboard/explorative_annotations_view.tsx, frontend/javascripts/navbar.tsx, .../oxalis/view/** Modified Redux selectors and component prop types to reference state.annotation instead of state.tracing; updated type imports from HybridTracing to StoreAnnotation.
frontend/javascripts/oxalis/model/reducers/**, frontend/javascripts/oxalis/model/sagas/** Replaced all references to state.tracing with state.annotation and updated all related type signatures accordingly.
frontend/javascripts/oxalis/store.ts, .../model/accessors/**, .../model/helpers/nml_helpers.ts Renamed HybridTracing to StoreAnnotation and revised type annotations and state structure to align with the new annotation model.
frontend/javascripts/test/** Updated mock states, test assertions, and type references to replace tracing with annotation in accordance with the refactor.

Possibly related issues

  • Clean up (front-end) types #8308: The change of the importVolumeTracing parameter type from Tracing to StoreAnnotation addresses the issue’s need to correct the usage of StoreState.tracing, aligning it with the new annotation-based model.

Possibly related PRs

  • Send right parameter to createNodeSkeletonAction #8185: The changes in the main PR, which involve updating the parameter type in the importVolumeTracing function from Tracing to StoreAnnotation, are related to the retrieved PR, as both involve modifications to the handling of tracing and annotation data, specifically in the context of node creation and management. Both PRs reflect a shift in terminology and data structure from tracing to annotation.

Suggested labels

bug

Suggested reviewers

  • MichaelBuessemeyer
  • hotzenklotz

Poem

I'm a little rabbit, hopping with glee,
Refactoring code so merrily.
From tracing to annotation, each line I mend,
New types and selectors around every bend.
With a twitch of my nose, I celebrate the change,
A codebase renewed—fresh and re-arranged!
🐰✨


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@philippotto philippotto changed the title Rename tracing to annotation in frontend Rename store.tracing to store.annotation in frontend Apr 1, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (15)
frontend/javascripts/oxalis/view/action-bar/private_links_view.tsx (1)

142-142: State reference updated while preserving variable name

The selector has been updated to reference state.annotation instead of state.tracing, while maintaining the variable name as "tracing". Consider renaming the variable to "annotation" for consistency with the state property it references.

-  const tracing = useSelector((state: OxalisState) => state.annotation);
+  const annotation = useSelector((state: OxalisState) => state.annotation);

When using this variable later (line 165), update the reference accordingly:

-              ? getReadableNameByVolumeTracingId(tracing, layer.tracingId)
+              ? getReadableNameByVolumeTracingId(annotation, layer.tracingId)
frontend/javascripts/oxalis/view/right-border-tabs/bounding_box_tab.tsx (2)

38-38: Consider renaming the variable to match the state property.

While the reference to state.annotation is correct, the variable name tracing no longer matches what it represents. Consider renaming the variable to annotation for consistency with the state property it's accessing.

-  const tracing = useSelector((state: OxalisState) => state.annotation);
+  const annotation = useSelector((state: OxalisState) => state.annotation);
-  const allowUpdate = tracing.restrictions.allowUpdate;
-  const isLockedByOwner = tracing.isLockedByOwner;
+  const allowUpdate = annotation.restrictions.allowUpdate;
+  const isLockedByOwner = annotation.isLockedByOwner;

46-46: Update this reference to use the annotation variable.

If you rename the tracing variable to annotation as suggested above, this line should also be updated to use the new variable name.

-  const { userBoundingBoxes } = getSomeTracing(tracing);
+  const { userBoundingBoxes } = getSomeTracing(annotation);
frontend/javascripts/oxalis/view/action-bar/share_modal_view.tsx (1)

180-180: Consider renaming the variable to match the state property.

While the reference to state.annotation is correct, the variable name tracing no longer matches what it represents. Consider renaming the variable to annotation for consistency with the state property it's accessing.

-  const tracing = useSelector((state: OxalisState) => state.annotation);
+  const annotation = useSelector((state: OxalisState) => state.annotation);

This would also require updating all references to the tracing variable in the component, such as tracing.isLockedByOwner, tracing.visibility, tracing.othersMayEdit, and tracing.owner.

frontend/javascripts/oxalis/view/action-bar/starting_job_modals.tsx (1)

504-504: Consider renaming local variables to match state property names.

While the state property access has been correctly updated from state.tracing to state.annotation, the local variables are still named tracing. For better code clarity and consistency, consider renaming these variables to annotation to match the state property name.

-const tracing = useSelector((state: OxalisState) => state.annotation);
+const annotation = useSelector((state: OxalisState) => state.annotation);

Also applies to: 718-718, 1162-1162

frontend/javascripts/oxalis/model/sagas/annotation_saga.tsx (1)

67-67: Variable name could be updated for consistency

The state selection has been updated to use state.annotation, but the variable name is still tracing. Consider renaming the variable to annotation for consistency with the new state structure.

-const tracing = yield* select((state) => state.annotation);
+const annotation = yield* select((state) => state.annotation);

And then update the references at lines 83-84:

 const editObject: Partial<EditableAnnotation> = {
-  name: tracing.name,
-  visibility: tracing.visibility,
+  name: annotation.name,
+  visibility: annotation.visibility,
   viewConfiguration,
 };

As well as the reference at line 92:

-  tracing.annotationId,
-  tracing.annotationType,
+  annotation.annotationId,
+  annotation.annotationType,
frontend/javascripts/test/reducers/volumetracing_reducer.spec.ts (1)

15-16: Function signature updated with correct type

The function parameter type has been updated from the previous tracing type to StoreAnnotation, while keeping the parameter name as tracing. Consider renaming the parameter to annotation for complete consistency.

-export function getFirstVolumeTracingOrFail(tracing: StoreAnnotation): Maybe<VolumeTracing> {
+export function getFirstVolumeTracingOrFail(annotation: StoreAnnotation): Maybe<VolumeTracing> {
   if (tracing.volumes.length > 0) {
     return Maybe.Just(tracing.volumes[0]);
   }
frontend/javascripts/oxalis/controller/url_manager.ts (1)

304-305: Variable assignment updated but variable name retained.

The value assignment has been updated to use state.annotation instead of state.tracing, but the variable is still named tracing. While this works and maintains the existing logic, consider renaming the variable to annotation for improved consistency.

-const tracing = state.annotation;
+const annotation = state.annotation;

And then update subsequent uses of this variable accordingly.

frontend/javascripts/oxalis/view/statusbar.tsx (1)

533-533: LGTM: State selector renamed from tracing to annotation.

The state property is correctly accessed as state.annotation instead of state.tracing, consistent with the PR objective.

Consider renaming the variable from tracing to annotation in a future PR for complete terminology consistency.

frontend/javascripts/dashboard/explorative_annotations_view.tsx (1)

450-484: LGTM: Tag editing logic updated to use annotations terminology.

The tag editing logic now correctly references annotations property, consistent with the PR objective.

Consider renaming the variable newTracings to newAnnotations in a future PR for complete terminology consistency.

frontend/javascripts/oxalis/api/api_latest.ts (2)

196-202: Consider renaming the function parameter.
Here, the function parameter is named tracing but has type StoreAnnotation. For consistency, you might rename it to annotation.

-export function assertSkeleton(tracing: StoreAnnotation): SkeletonTracing {
+export function assertSkeleton(annotation: StoreAnnotation): SkeletonTracing {

253-253: Rename local variable for clarity.
In these lines, you store the result of assertSkeleton(Store.getState().annotation) in a variable named tracing. Since assertSkeleton returns a SkeletonTracing, consider renaming that variable to skeletonTracing to better reflect its true type.

-const tracing = assertSkeleton(Store.getState().annotation);
+const skeletonTracing = assertSkeleton(Store.getState().annotation);

Also applies to: 261-261, 269-269

frontend/javascripts/oxalis/model/reducers/annotation_reducer.ts (1)

16-19: Consider renaming the helper function.
The helper is called updateTracing, but it updates the annotation key. For consistency and clarity, consider renaming it to something like updateAnnotation.

-const updateTracing = (
+const updateAnnotation = (
  state: OxalisState,
  shape: Partial<OxalisState["annotation"]>,
): OxalisState => ...
frontend/javascripts/oxalis/view/jobs/train_ai_model.tsx (1)

138-138: State selector correctly updated, but variable name remains 'tracing'.

The selector now correctly references state.annotation instead of state.tracing, but the variable name is still called tracing. While functionally correct, this naming inconsistency could be confusing for future developers.

-const tracing = useSelector((state: OxalisState) => state.annotation);
+const annotation = useSelector((state: OxalisState) => state.annotation);
frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx (1)

280-280: State selector correctly updated, but variable name remains 'tracing'.

The selector now correctly references state.annotation instead of state.tracing, but the variable name is still called tracing. While functionally correct, this naming inconsistency could be confusing for future developers.

-const tracing = useSelector((state: OxalisState) => state.annotation);
+const annotation = useSelector((state: OxalisState) => state.annotation);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d3a5a7a and 635dbb9.

📒 Files selected for processing (101)
  • frontend/javascripts/admin/admin_rest_api.ts (2 hunks)
  • frontend/javascripts/dashboard/explorative_annotations_view.tsx (12 hunks)
  • frontend/javascripts/navbar.tsx (1 hunks)
  • frontend/javascripts/oxalis/api/api_latest.ts (36 hunks)
  • frontend/javascripts/oxalis/controller.tsx (3 hunks)
  • frontend/javascripts/oxalis/controller/combinations/bounding_box_handlers.ts (3 hunks)
  • frontend/javascripts/oxalis/controller/combinations/skeleton_handlers.ts (10 hunks)
  • frontend/javascripts/oxalis/controller/combinations/tool_controls.ts (3 hunks)
  • frontend/javascripts/oxalis/controller/scene_controller.ts (4 hunks)
  • frontend/javascripts/oxalis/controller/td_controller.tsx (5 hunks)
  • frontend/javascripts/oxalis/controller/url_manager.ts (3 hunks)
  • frontend/javascripts/oxalis/controller/viewmodes/arbitrary_controller.tsx (4 hunks)
  • frontend/javascripts/oxalis/controller/viewmodes/plane_controller.tsx (7 hunks)
  • frontend/javascripts/oxalis/default_state.ts (1 hunks)
  • frontend/javascripts/oxalis/merger_mode.ts (2 hunks)
  • frontend/javascripts/oxalis/model/accessors/annotation_accessor.ts (3 hunks)
  • frontend/javascripts/oxalis/model/accessors/flycam_accessor.ts (2 hunks)
  • frontend/javascripts/oxalis/model/accessors/skeletontracing_accessor.ts (4 hunks)
  • frontend/javascripts/oxalis/model/accessors/tool_accessor.ts (2 hunks)
  • frontend/javascripts/oxalis/model/accessors/tracing_accessor.ts (5 hunks)
  • frontend/javascripts/oxalis/model/accessors/volumetracing_accessor.ts (15 hunks)
  • frontend/javascripts/oxalis/model/actions/skeletontracing_actions.tsx (2 hunks)
  • frontend/javascripts/oxalis/model/bucket_data_handling/data_cube.ts (1 hunks)
  • frontend/javascripts/oxalis/model/bucket_data_handling/wkstore_adapter.ts (5 hunks)
  • frontend/javascripts/oxalis/model/helpers/deep_update_test.ts (2 hunks)
  • frontend/javascripts/oxalis/model/helpers/nml_helpers.ts (4 hunks)
  • frontend/javascripts/oxalis/model/reducers/annotation_reducer.ts (10 hunks)
  • frontend/javascripts/oxalis/model/reducers/save_reducer.ts (3 hunks)
  • frontend/javascripts/oxalis/model/reducers/settings_reducer.ts (1 hunks)
  • frontend/javascripts/oxalis/model/reducers/skeletontracing_reducer.ts (42 hunks)
  • frontend/javascripts/oxalis/model/reducers/skeletontracing_reducer_helpers.ts (9 hunks)
  • frontend/javascripts/oxalis/model/reducers/ui_reducer.ts (2 hunks)
  • frontend/javascripts/oxalis/model/reducers/volumetracing_reducer.ts (5 hunks)
  • frontend/javascripts/oxalis/model/reducers/volumetracing_reducer_helpers.ts (3 hunks)
  • frontend/javascripts/oxalis/model/sagas/annotation_saga.tsx (2 hunks)
  • frontend/javascripts/oxalis/model/sagas/dataset_saga.ts (1 hunks)
  • frontend/javascripts/oxalis/model/sagas/effect-generators.ts (1 hunks)
  • frontend/javascripts/oxalis/model/sagas/mapping_saga.ts (2 hunks)
  • frontend/javascripts/oxalis/model/sagas/mesh_saga.ts (2 hunks)
  • frontend/javascripts/oxalis/model/sagas/min_cut_saga.ts (1 hunks)
  • frontend/javascripts/oxalis/model/sagas/prefetch_saga.ts (1 hunks)
  • frontend/javascripts/oxalis/model/sagas/proofread_saga.ts (7 hunks)
  • frontend/javascripts/oxalis/model/sagas/save_saga.ts (6 hunks)
  • frontend/javascripts/oxalis/model/sagas/settings_saga.ts (1 hunks)
  • frontend/javascripts/oxalis/model/sagas/skeletontracing_saga.ts (8 hunks)
  • frontend/javascripts/oxalis/model/sagas/task_saga.tsx (2 hunks)
  • frontend/javascripts/oxalis/model/sagas/undo_saga.ts (10 hunks)
  • frontend/javascripts/oxalis/model/sagas/volume/floodfill_saga.tsx (1 hunks)
  • frontend/javascripts/oxalis/model/sagas/volume/helpers.ts (1 hunks)
  • frontend/javascripts/oxalis/model/sagas/volume/volume_interpolation_saga.ts (3 hunks)
  • frontend/javascripts/oxalis/model/sagas/volumetracing_saga.tsx (2 hunks)
  • frontend/javascripts/oxalis/model/volumetracing/volumelayer.ts (1 hunks)
  • frontend/javascripts/oxalis/model_initialization.ts (2 hunks)
  • frontend/javascripts/oxalis/store.ts (3 hunks)
  • frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx (4 hunks)
  • frontend/javascripts/oxalis/view/action-bar/merge_modal_view.tsx (1 hunks)
  • frontend/javascripts/oxalis/view/action-bar/private_links_view.tsx (1 hunks)
  • frontend/javascripts/oxalis/view/action-bar/share_modal_view.tsx (2 hunks)
  • frontend/javascripts/oxalis/view/action-bar/starting_job_modals.tsx (5 hunks)
  • frontend/javascripts/oxalis/view/action-bar/toolbar_view.tsx (2 hunks)
  • frontend/javascripts/oxalis/view/action-bar/tracing_actions_view.tsx (3 hunks)
  • frontend/javascripts/oxalis/view/action-bar/view_modes_view.tsx (1 hunks)
  • frontend/javascripts/oxalis/view/action_bar_view.tsx (1 hunks)
  • frontend/javascripts/oxalis/view/components/command_palette.tsx (1 hunks)
  • frontend/javascripts/oxalis/view/context_menu.tsx (2 hunks)
  • frontend/javascripts/oxalis/view/jobs/train_ai_model.tsx (5 hunks)
  • frontend/javascripts/oxalis/view/largest_segment_id_modal.tsx (1 hunks)
  • frontend/javascripts/oxalis/view/layouting/flex_layout_wrapper.tsx (1 hunks)
  • frontend/javascripts/oxalis/view/layouting/tracing_layout_view.tsx (1 hunks)
  • frontend/javascripts/oxalis/view/left-border-tabs/layer_settings_tab.tsx (2 hunks)
  • frontend/javascripts/oxalis/view/left-border-tabs/mapping_settings_view.tsx (1 hunks)
  • frontend/javascripts/oxalis/view/left-border-tabs/modals/add_volume_layer_modal.tsx (2 hunks)
  • frontend/javascripts/oxalis/view/right-border-tabs/abstract_tree_tab.tsx (1 hunks)
  • frontend/javascripts/oxalis/view/right-border-tabs/bounding_box_tab.tsx (1 hunks)
  • frontend/javascripts/oxalis/view/right-border-tabs/comment_tab/comment_tab_view.tsx (2 hunks)
  • frontend/javascripts/oxalis/view/right-border-tabs/dataset_info_tab_view.tsx (3 hunks)
  • frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segment_statistics_modal.tsx (2 hunks)
  • frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segments_view.tsx (1 hunks)
  • frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segments_view_helper.tsx (3 hunks)
  • frontend/javascripts/oxalis/view/right-border-tabs/trees_tab/skeleton_tab_view.tsx (5 hunks)
  • frontend/javascripts/oxalis/view/statusbar.tsx (3 hunks)
  • frontend/javascripts/oxalis/view/tracing_view.tsx (1 hunks)
  • frontend/javascripts/oxalis/view/version_entry.tsx (14 hunks)
  • frontend/javascripts/oxalis/view/version_list.tsx (8 hunks)
  • frontend/javascripts/test/api/api_skeleton_latest.spec.ts (2 hunks)
  • frontend/javascripts/test/fixtures/hybridtracing_object.ts (1 hunks)
  • frontend/javascripts/test/fixtures/volumetracing_object.ts (1 hunks)
  • frontend/javascripts/test/geometries/skeleton.spec.ts (4 hunks)
  • frontend/javascripts/test/libs/nml.spec.ts (31 hunks)
  • frontend/javascripts/test/model/binary/cube.spec.ts (1 hunks)
  • frontend/javascripts/test/model/binary/layers/wkstore_adapter.spec.ts (1 hunks)
  • frontend/javascripts/test/model/volumetracing/volume_annotation_sampling.spec.ts (1 hunks)
  • frontend/javascripts/test/reducers/skeletontracing_reducer.spec.ts (55 hunks)
  • frontend/javascripts/test/reducers/volumetracing_reducer.spec.ts (11 hunks)
  • frontend/javascripts/test/sagas/annotation_saga.spec.ts (3 hunks)
  • frontend/javascripts/test/sagas/compact_toggle_actions.spec.ts (3 hunks)
  • frontend/javascripts/test/sagas/saga_integration.spec.ts (3 hunks)
  • frontend/javascripts/test/sagas/save_saga.spec.ts (4 hunks)
  • frontend/javascripts/test/sagas/skeletontracing_saga.spec.ts (31 hunks)
  • frontend/javascripts/test/sagas/volumetracing/volumetracing_saga.spec.ts (3 hunks)
  • frontend/javascripts/test/sagas/volumetracing/volumetracing_saga_integration.spec.ts (6 hunks)
🧰 Additional context used
🧠 Learnings (3)
frontend/javascripts/oxalis/model/sagas/volumetracing_saga.tsx (2)
Learnt from: dieknolle3333
PR: scalableminds/webknossos#8168
File: frontend/javascripts/oxalis/model/sagas/volumetracing_saga.tsx:433-434
Timestamp: 2025-03-26T13:22:21.455Z
Learning: In the codebase, certain usages of `segmentationLayer.resolutions` are intentionally retained and should not be changed to `segmentationLayer.mags` during refactoring.
Learnt from: dieknolle3333
PR: scalableminds/webknossos#8168
File: frontend/javascripts/oxalis/model/sagas/proofread_saga.ts:1039-1039
Timestamp: 2025-03-26T13:22:21.455Z
Learning: In `frontend/javascripts/oxalis/model/sagas/proofread_saga.ts`, when calling `getMagInfo`, the use of `volumeTracingLayer.resolutions` is intentional and should not be changed to `volumeTracingLayer.mags`.
frontend/javascripts/oxalis/model/sagas/volume/volume_interpolation_saga.ts (1)
Learnt from: dieknolle3333
PR: scalableminds/webknossos#8168
File: frontend/javascripts/oxalis/model/sagas/volumetracing_saga.tsx:433-434
Timestamp: 2025-03-26T13:22:21.455Z
Learning: In the codebase, certain usages of `segmentationLayer.resolutions` are intentionally retained and should not be changed to `segmentationLayer.mags` during refactoring.
frontend/javascripts/oxalis/view/action-bar/starting_job_modals.tsx (1)
Learnt from: MichaelBuessemeyer
PR: scalableminds/webknossos#8221
File: frontend/javascripts/oxalis/view/action-bar/starting_job_modals.tsx:584-584
Timestamp: 2025-03-26T13:22:21.455Z
Learning: When evaluation is done, ensure that `useAnnotation` is always set to `true` in the form data by using a hidden `Form.Item` with `initialValue={true}`.
🧬 Code Definitions (39)
frontend/javascripts/oxalis/model/sagas/volumetracing_saga.tsx (1)
frontend/javascripts/oxalis/model/sagas/effect-generators.ts (1)
  • select (12-14)
frontend/javascripts/oxalis/model/sagas/dataset_saga.ts (1)
frontend/javascripts/oxalis/model/sagas/effect-generators.ts (1)
  • select (12-14)
frontend/javascripts/oxalis/model/sagas/task_saga.tsx (1)
frontend/javascripts/oxalis/model/sagas/effect-generators.ts (1)
  • select (12-14)
frontend/javascripts/oxalis/model/sagas/mapping_saga.ts (1)
frontend/javascripts/oxalis/model/sagas/effect-generators.ts (1)
  • select (12-14)
frontend/javascripts/oxalis/view/largest_segment_id_modal.tsx (1)
frontend/javascripts/oxalis/model/accessors/volumetracing_accessor.ts (1)
  • getVolumeTracingByLayerName (84-92)
frontend/javascripts/oxalis/view/left-border-tabs/modals/add_volume_layer_modal.tsx (1)
frontend/javascripts/oxalis/store.ts (1)
  • StoreAnnotation (279-284)
frontend/javascripts/oxalis/model/bucket_data_handling/wkstore_adapter.ts (1)
frontend/javascripts/oxalis/model/accessors/volumetracing_accessor.ts (1)
  • getVolumeTracingById (66-77)
frontend/javascripts/oxalis/view/components/command_palette.tsx (1)
frontend/javascripts/oxalis/store.ts (1)
  • OxalisState (599-635)
frontend/javascripts/oxalis/model/sagas/undo_saga.ts (2)
frontend/javascripts/oxalis/model/accessors/volumetracing_accessor.ts (3)
  • getVolumeTracings (62-64)
  • getVolumeTracingById (66-77)
  • getVolumeTracingByLayerName (84-92)
frontend/javascripts/oxalis/model/accessors/skeletontracing_accessor.ts (1)
  • enforceSkeletonTracing (68-70)
frontend/javascripts/oxalis/view/left-border-tabs/mapping_settings_view.tsx (1)
frontend/javascripts/oxalis/model/accessors/volumetracing_accessor.ts (2)
  • hasEditableMapping (588-597)
  • isMappingLocked (599-608)
frontend/javascripts/oxalis/model/sagas/volume/floodfill_saga.tsx (1)
frontend/javascripts/oxalis/model/sagas/effect-generators.ts (1)
  • select (12-14)
frontend/javascripts/oxalis/view/right-border-tabs/comment_tab/comment_tab_view.tsx (3)
app/models/annotation/AnnotationRestrictions.scala (3)
  • allowUpdate (15-15)
  • allowUpdate (25-25)
  • allowUpdate (68-82)
frontend/javascripts/oxalis/store.ts (1)
  • OxalisState (599-635)
frontend/javascripts/oxalis/model/accessors/skeletontracing_accessor.ts (1)
  • getSkeletonTracing (33-39)
frontend/javascripts/oxalis/model/reducers/save_reducer.ts (1)
frontend/javascripts/oxalis/model/accessors/annotation_accessor.ts (2)
  • TracingStats (42-42)
  • getStats (44-59)
frontend/javascripts/oxalis/model/actions/skeletontracing_actions.tsx (1)
frontend/javascripts/oxalis/model/accessors/skeletontracing_accessor.ts (1)
  • enforceSkeletonTracing (68-70)
frontend/javascripts/oxalis/view/action-bar/private_links_view.tsx (1)
frontend/javascripts/oxalis/store.ts (1)
  • OxalisState (599-635)
frontend/javascripts/oxalis/model/reducers/skeletontracing_reducer_helpers.ts (1)
frontend/javascripts/oxalis/model/accessors/skeletontracing_accessor.ts (1)
  • getSkeletonTracing (33-39)
frontend/javascripts/test/sagas/volumetracing/volumetracing_saga.spec.ts (2)
frontend/javascripts/test/fixtures/hybridtracing_object.ts (1)
  • initialState (82-95)
frontend/javascripts/test/fixtures/volumetracing_object.ts (1)
  • initialState (20-107)
frontend/javascripts/oxalis/view/layouting/tracing_layout_view.tsx (1)
frontend/javascripts/oxalis/model/accessors/dataset_accessor.ts (1)
  • is2dDataset (650-656)
frontend/javascripts/oxalis/model/bucket_data_handling/data_cube.ts (1)
frontend/javascripts/oxalis/model/accessors/tracing_accessor.ts (1)
  • getSomeTracing (29-39)
frontend/javascripts/test/sagas/compact_toggle_actions.spec.ts (1)
frontend/javascripts/oxalis/model/accessors/skeletontracing_accessor.ts (1)
  • enforceSkeletonTracing (68-70)
frontend/javascripts/oxalis/controller/combinations/bounding_box_handlers.ts (1)
frontend/javascripts/oxalis/model/accessors/tracing_accessor.ts (1)
  • getSomeTracing (29-39)
frontend/javascripts/oxalis/view/right-border-tabs/dataset_info_tab_view.tsx (1)
frontend/javascripts/oxalis/store.ts (1)
  • StoreAnnotation (279-284)
frontend/javascripts/oxalis/model/sagas/settings_saga.ts (1)
frontend/javascripts/oxalis/model/sagas/effect-generators.ts (1)
  • select (12-14)
frontend/javascripts/oxalis/merger_mode.ts (1)
frontend/javascripts/oxalis/model/accessors/skeletontracing_accessor.ts (1)
  • getSkeletonTracing (33-39)
frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segment_statistics_modal.tsx (3)
frontend/javascripts/oxalis/store.ts (1)
  • OxalisState (599-635)
frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segments_view_helper.tsx (1)
  • getVolumeRequestUrl (45-57)
frontend/javascripts/oxalis/model/accessors/volumetracing_accessor.ts (1)
  • getVolumeTracingById (66-77)
frontend/javascripts/oxalis/controller.tsx (1)
frontend/javascripts/oxalis/model.ts (1)
  • stateSaved (290-301)
frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segments_view_helper.tsx (1)
frontend/javascripts/oxalis/store.ts (1)
  • StoreAnnotation (279-284)
frontend/javascripts/oxalis/view/version_list.tsx (1)
frontend/javascripts/oxalis/store.ts (2)
  • StoreAnnotation (279-284)
  • OxalisState (599-635)
frontend/javascripts/oxalis/view/action-bar/starting_job_modals.tsx (1)
frontend/javascripts/oxalis/store.ts (1)
  • OxalisState (599-635)
frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx (1)
frontend/javascripts/oxalis/store.ts (2)
  • StoreAnnotation (279-284)
  • OxalisState (599-635)
frontend/javascripts/oxalis/model/accessors/tracing_accessor.ts (1)
frontend/javascripts/oxalis/store.ts (4)
  • StoreAnnotation (279-284)
  • SkeletonTracing (224-234)
  • VolumeTracing (252-272)
  • ReadOnlyTracing (273-275)
frontend/javascripts/oxalis/view/version_entry.tsx (2)
frontend/javascripts/oxalis/store.ts (2)
  • StoreAnnotation (279-284)
  • OxalisState (599-635)
frontend/javascripts/oxalis/model/accessors/volumetracing_accessor.ts (1)
  • getReadableNameByVolumeTracingId (119-125)
frontend/javascripts/test/sagas/saga_integration.spec.ts (2)
frontend/javascripts/oxalis/model/accessors/skeletontracing_accessor.ts (1)
  • enforceSkeletonTracing (68-70)
frontend/javascripts/oxalis/model/accessors/annotation_accessor.ts (1)
  • getStats (44-59)
frontend/javascripts/oxalis/model/sagas/proofread_saga.ts (2)
frontend/javascripts/oxalis/model/sagas/effect-generators.ts (1)
  • select (12-14)
frontend/javascripts/oxalis/model/accessors/skeletontracing_accessor.ts (1)
  • enforceSkeletonTracing (68-70)
frontend/javascripts/oxalis/view/action-bar/tracing_actions_view.tsx (3)
frontend/javascripts/oxalis/model/accessors/tracing_accessor.ts (1)
  • getTracingType (47-57)
frontend/javascripts/admin/admin_rest_api.ts (1)
  • createExplorational (635-683)
frontend/javascripts/oxalis/model/accessors/skeletontracing_accessor.ts (1)
  • enforceSkeletonTracing (68-70)
frontend/javascripts/oxalis/model/accessors/skeletontracing_accessor.ts (1)
frontend/javascripts/oxalis/store.ts (3)
  • StoreAnnotation (279-284)
  • SkeletonTracing (224-234)
  • BranchPoint (103-103)
frontend/javascripts/oxalis/view/jobs/train_ai_model.tsx (2)
frontend/javascripts/oxalis/store.ts (2)
  • OxalisState (599-635)
  • StoreAnnotation (279-284)
frontend/javascripts/types/api_flow_types.ts (1)
  • APIAnnotation (570-572)
frontend/javascripts/oxalis/view/right-border-tabs/trees_tab/skeleton_tab_view.tsx (2)
frontend/javascripts/oxalis/model/accessors/skeletontracing_accessor.ts (1)
  • enforceSkeletonTracing (68-70)
frontend/javascripts/oxalis/model/helpers/nml_helpers.ts (1)
  • serializeToNml (133-158)
frontend/javascripts/oxalis/api/api_latest.ts (3)
frontend/javascripts/oxalis/store.ts (3)
  • StoreAnnotation (279-284)
  • SkeletonTracing (224-234)
  • VolumeTracing (252-272)
frontend/javascripts/oxalis/model/accessors/skeletontracing_accessor.ts (3)
  • getActiveNode (72-80)
  • getActiveTree (82-93)
  • getFlatTreeGroups (270-279)
frontend/javascripts/oxalis/model/accessors/volumetracing_accessor.ts (5)
  • getVolumeTracingById (66-77)
  • getVolumeTracingByLayerName (84-92)
  • getVolumeDescriptors (98-102)
  • getVolumeTracings (62-64)
  • hasVolumeTracings (94-96)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: circleci_build
🔇 Additional comments (289)
frontend/javascripts/oxalis/view/action-bar/view_modes_view.tsx (1)

110-110: Path updated correctly to state.annotation

The path to the allowedModes property has been updated from state.tracing to state.annotation, which aligns with the overall PR objectives to standardize terminology.

frontend/javascripts/oxalis/model/reducers/settings_reducer.ts (1)

179-179: Path updated correctly to state.annotation

The destructuring assignment has been updated to access state.annotation.restrictions rather than state.tracing.restrictions, which aligns with the overall PR objectives to standardize terminology.

frontend/javascripts/oxalis/model/sagas/mesh_saga.ts (2)

345-345: State reference updated to state.annotation

The selector has been updated to reference state.annotation.tracingStore.url instead of state.tracing.tracingStore.url, which aligns with the overall PR objectives.


469-469: State reference updated to state.annotation

The selector has been updated to reference state.annotation.tracingStore.url instead of state.tracing.tracingStore.url, which aligns with the overall PR objectives.

frontend/javascripts/oxalis/view/largest_segment_id_modal.tsx (1)

60-60: Correctly updated state reference to use annotation instead of tracing.

The reference has been properly updated from state.tracing to state.annotation to access the active cell ID through the getVolumeTracingByLayerName function. This change is consistent with the PR objective of renaming tracing to annotation throughout the codebase.

frontend/javascripts/oxalis/model/sagas/effect-generators.ts (1)

10-10: Updated example code comment to use annotation instead of tracing.

The comment has been appropriately updated to reflect the renaming from tracing to annotation while maintaining the same educational purpose about TypeScript type safety.

frontend/javascripts/oxalis/model/volumetracing/volumelayer.ts (1)

214-214: State reference updated from tracing to annotation.

The getContourList method now correctly retrieves data from Store.getState().annotation instead of Store.getState().tracing, aligning with the overall renaming strategy.

frontend/javascripts/oxalis/model/sagas/volume/helpers.ts (1)

175-175: Updated state reference to annotation for permissions check.

The allowUpdate permission is now correctly retrieved from state.annotation.restrictions.allowUpdate instead of state.tracing.restrictions.allowUpdate. This maintains the same functionality while using the updated state structure.

frontend/javascripts/test/fixtures/hybridtracing_object.ts (1)

83-83: Consistent renaming of tracing to annotation

The state structure has been properly updated to use annotation instead of tracing as the top-level key in the state object, while maintaining the nested structure.

frontend/javascripts/oxalis/view/action-bar/merge_modal_view.tsx (1)

301-302: Correctly updated state references

The state property paths have been properly updated from state.tracing to state.annotation while maintaining the same functionality.

frontend/javascripts/test/model/volumetracing/volume_annotation_sampling.spec.ts (1)

18-18: Properly updated mock store structure

The test mock structure has been appropriately updated to match the new state structure, using annotation instead of tracing as the parent key.

frontend/javascripts/oxalis/view/layouting/tracing_layout_view.tsx (2)

377-377: State property path correctly updated

The path to the allowUpdate restriction has been properly updated to use the new annotation state structure.


382-382: Correctly updated name property reference

The reference to the annotation name has been properly updated to use the new state path while maintaining the fallback to dataset name.

frontend/javascripts/oxalis/view/layouting/flex_layout_wrapper.tsx (1)

580-580: Properly renamed tracing to annotation.

This change correctly updates the source of the isUpdateTracingAllowed property from state.tracing.restrictions.allowUpdate to state.annotation.restrictions.allowUpdate, aligning with the PR objective.

frontend/javascripts/oxalis/model/accessors/flycam_accessor.ts (2)

431-431: Correctly renamed state property source.

The source of the magRestrictions variable has been properly changed from state.tracing.restrictions to state.annotation.restrictions which aligns with the PR objective of renaming tracing to annotation.


461-461: Properly renamed state property source.

The source of the magRestrictions variable has been correctly updated from state.tracing.restrictions to state.annotation.restrictions which maintains consistency with the renaming pattern throughout the codebase.

frontend/javascripts/oxalis/model/sagas/volume/floodfill_saga.tsx (1)

156-156: State property source renamed correctly.

The selector has been properly updated to retrieve allowUpdate from state.annotation.restrictions instead of state.tracing.restrictions, which aligns with the PR objective of renaming tracing to annotation.

frontend/javascripts/oxalis/model/sagas/task_saga.tsx (2)

137-137: State property source correctly renamed.

The selector has been appropriately updated to retrieve allowUpdate from state.annotation.restrictions instead of state.tracing.restrictions, aligning with the overall renaming pattern.


152-152: State property source properly updated.

The destructured selector has been correctly modified to extract allowUpdate from state.annotation.restrictions instead of state.tracing.restrictions, maintaining consistency with the renaming effort.

frontend/javascripts/oxalis/view/left-border-tabs/mapping_settings_view.tsx (2)

283-283: State property reference updated correctly.

This change correctly updates the reference to allowUpdate from state.tracing.restrictions.allowUpdate to state.annotation.restrictions.allowUpdate as part of the overall renaming effort.


287-287: State property reference updated correctly.

This change correctly updates the reference to isAnnotationLockedByOwner from state.tracing.isLockedByOwner to state.annotation.isLockedByOwner as part of the overall renaming effort.

frontend/javascripts/oxalis/view/action-bar/share_modal_view.tsx (1)

127-127: State property reference updated correctly.

This change correctly updates the reference to annotationVisibility from state.tracing.visibility to state.annotation.visibility as part of the overall renaming effort.

frontend/javascripts/oxalis/model/sagas/min_cut_saga.ts (1)

200-200: State property reference updated correctly.

This change correctly updates the reference to retrieve the skeleton from store.annotation.skeleton instead of store.tracing.skeleton as part of the overall renaming effort.

frontend/javascripts/oxalis/model/sagas/dataset_saga.ts (1)

186-186: Approved: Variable source renamed from 'tracing' to 'annotation'

This change aligns with the PR's objective to rename 'tracing' to 'annotation' throughout the codebase. The variable name 'tracing' is kept for backward compatibility with the function call at line 191, but it's now sourced from state.annotation instead of state.tracing.

frontend/javascripts/oxalis/view/tracing_view.tsx (1)

40-40: Approved: State property reference updated from 'tracing' to 'annotation'

This change is consistent with the PR's goal of renaming 'tracing' to 'annotation' throughout the codebase. The property path has been updated to access restrictions from the annotation state instead of the tracing state.

frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segment_statistics_modal.tsx (3)

107-109: Approved: Destructured state property renamed from 'tracing' to 'annotation'

Consistent with the PR's renaming effort, the state property has been updated from 'tracing' to 'annotation' in the useSelector hook. This aligns with the application-wide terminology change.


117-117: Approved: Function argument updated to use 'annotation' instead of 'tracing'

The argument passed to getVolumeRequestUrl has been updated to use the renamed state property, maintaining consistency with the codebase-wide renaming.


134-134: Approved: Function call updated to use 'annotation' instead of 'tracing'

The getVolumeTracingById function call now correctly uses the annotation state object instead of the previous tracing state object, preserving the functionality while updating the terminology.

frontend/javascripts/test/model/binary/layers/wkstore_adapter.spec.ts (1)

47-47: Approved: Test mock state property renamed from 'tracing' to 'annotation'

The StoreMock object has been updated to use 'annotation' instead of 'tracing' as the property name, ensuring test consistency with the production code changes. The internal structure of the object remains unchanged.

frontend/javascripts/oxalis/view/right-border-tabs/comment_tab/comment_tab_view.tsx (3)

114-116: LGTM: Renamed state.tracing.restrictions.allowUpdate to state.annotation.restrictions.allowUpdate

This change aligns with the PR objective of renaming tracing to annotation.


119-121: LGTM: Renamed state.tracing.isLockedByOwner to state.annotation.isLockedByOwner

This change aligns with the PR objective of renaming tracing to annotation.


563-565: LGTM: Updated getSkeletonTracing to use state.annotation instead of state.tracing

This change aligns with the PR objective of renaming tracing to annotation.

frontend/javascripts/oxalis/controller/viewmodes/arbitrary_controller.tsx (4)

238-239: LGTM: Renamed state.tracing.skeleton to state.annotation.skeleton

This change aligns with the PR objective of renaming tracing to annotation.


261-262: LGTM: Updated skeleton tracing reference to use annotation instead of tracing

This change aligns with the PR objective of renaming tracing to annotation.


281-282: LGTM: Updated skeleton tracing reference to use annotation instead of tracing

This change aligns with the PR objective of renaming tracing to annotation.


433-433: LGTM: Updated skeleton check to use annotation instead of tracing

This change aligns with the PR objective of renaming tracing to annotation.

frontend/javascripts/oxalis/model/reducers/ui_reducer.ts (2)

58-58: LGTM: Updated permissions check to use state.annotation.restrictions.allowUpdate

This change aligns with the PR objective of renaming tracing to annotation.


69-69: LGTM: Updated permissions check to use state.annotation.restrictions.allowUpdate

This change aligns with the PR objective of renaming tracing to annotation.

frontend/javascripts/oxalis/view/right-border-tabs/abstract_tree_tab.tsx (1)

109-109: LGTM: Updated mapStateToProps to use state.annotation.skeleton

This change aligns with the PR objective of renaming tracing to annotation.

frontend/javascripts/oxalis/model/sagas/settings_saga.ts (1)

47-47: Prop rename consistent with PR objective.

The state selector has been correctly updated from state.tracing to state.annotation in the error handling logic, maintaining consistency with the PR's renaming initiative.

frontend/javascripts/oxalis/view/left-border-tabs/modals/add_volume_layer_modal.tsx (2)

26-26: Import updated to use new type.

The import has been updated to use StoreAnnotation in place of the previous type, aligning with the PR's renaming initiative.


112-112:

❓ Verification inconclusive

Parameter type updated to StoreAnnotation.

The tracing parameter type has been updated to StoreAnnotation from the previous Tracing type. Note that while the parameter name hasn't changed (still called "tracing"), the type reflects the new model structure.

Consider renaming the parameter itself to annotation in a future PR for full consistency with the domain model change:


🏁 Script executed:

#!/bin/bash
# Check if other "tracing" parameter names still exist in component props
rg "tracing: StoreAnnotation" --type=ts --type=tsx

Length of output: 80


Parameter type updated to StoreAnnotation.

The tracing parameter in frontend/javascripts/oxalis/view/left-border-tabs/modals/add_volume_layer_modal.tsx now correctly uses the StoreAnnotation type reflecting the updated model structure. Note that while the parameter name is still "tracing", for full consistency with the domain model you might consider renaming it to annotation in a future PR.

To ensure there aren’t any lingering instances of the "tracing" parameter with the updated type elsewhere in the codebase, please verify its usage manually with a command such as:


---

🏁 Script executed:

```shell

#!/bin/bash
# Re-run the search for any instance of "tracing: StoreAnnotation" in TypeScript and TSX files.
rg "tracing: StoreAnnotation" -g "*.ts" -g "*.tsx"

Length of output: 1259


🏁 Script executed:

rg "tracing: StoreAnnotation" -g "*.ts" -g "*.tsx"

Length of output: 1137


Parameter type update verified – approved; consider renaming in a future refactor

The tracing parameter in
frontend/javascripts/oxalis/view/left-border-tabs/modals/add_volume_layer_modal.tsx (line 112)
now correctly uses the StoreAnnotation type, reflecting the updated model. A search across the codebase confirms that this change has been applied consistently (see occurrences in files like volumetracing_reducer.spec.ts, segments_view_helper.tsx, version_list.tsx, download_modal_view.tsx, api_latest.ts, and admin_rest_api.ts).

For full consistency with the domain model, consider renaming the parameter itself from tracing to annotation in a future PR.

frontend/javascripts/oxalis/model/helpers/deep_update_test.ts (2)

17-28: Test cases updated with new prop names.

The TypeScript test cases have been properly updated to use "annotation" instead of "tracing" in the parameter to updateKey. This maintains the integrity of the type-checking tests.


36-36: Test case updated with new prop name.

The TypeScript test case for updateKey2 has been properly updated to use "annotation" instead of "tracing", consistent with the other changes.

frontend/javascripts/test/sagas/volumetracing/volumetracing_saga.spec.ts (2)

93-93: Test state structure updated.

The initialState object has been correctly updated to use annotation instead of tracing, maintaining consistency with the renaming changes across the codebase.


145-145: State references updated in saga tests.

All references to tracing.volumes[0] have been properly updated to annotation.volumes[0] in the saga test logic, ensuring the tests correctly interact with the updated state structure.

Also applies to: 151-151, 165-165, 171-171

frontend/javascripts/oxalis/model/actions/skeletontracing_actions.tsx (2)

561-561: Consistent variable rename from state.tracing to state.annotation.

The change aligns with the PR's objective to rename "tracing" to "annotation" throughout the codebase for better terminology alignment.


598-598: Consistent variable rename from state.tracing to state.annotation.

This change follows the same pattern as line 561, maintaining consistency in the renaming effort.

frontend/javascripts/oxalis/default_state.ts (1)

162-185: Key change: renamed tracing property to annotation in the default state.

This is the core change in the PR, modifying the property name in the defaultState object while preserving all nested properties and their values.

frontend/javascripts/oxalis/model/sagas/volumetracing_saga.tsx (2)

113-113: Consistently renamed selector path from state.tracing.volumes to state.annotation.volumes.

The state selector has been updated to reference the new location of the volumes data.


167-167: Consistently renamed selector path from state.tracing.restrictions.allowUpdate to state.annotation.restrictions.allowUpdate.

The state selector for permission checks has been properly updated to reference the renamed structure.

frontend/javascripts/oxalis/model/bucket_data_handling/data_cube.ts (1)

134-134: Updated parameter passed to getSomeTracing from state.tracing to state.annotation.

The store listener has been updated to use the renamed state property, ensuring the bounding box is correctly retrieved from the new state structure.

frontend/javascripts/oxalis/model/reducers/save_reducer.ts (3)

34-34: State property renamed correctly from tracing to annotation.

This change updates the reference to the state property from state.tracing to state.annotation, correctly aligning with the PR's objective to rename the tracing property throughout the codebase.


164-166: Consistent property rename in updateKey function.

This correctly updates the state key from "tracing" to "annotation" when setting the version number, maintaining the same functionality while using the renamed property.


175-177: Consistent property rename in updateKey2 function.

The nested property path has been updated from state.tracing.restrictions to state.annotation.restrictions when disabling saving, maintaining the same functionality while using the renamed property.

frontend/javascripts/test/sagas/save_saga.spec.ts (4)

55-81: State initialization property renamed from tracing to annotation.

The test's initial state object has been correctly updated to use annotation instead of tracing, while maintaining the same structure and properties.


88-90: Test function references updated to use the renamed property.

The test function calls have been updated to reference initialState.annotation instead of initialState.tracing, ensuring consistency with the property renaming.


290-292: Consistent property rename in test case for removing update actions.

The test for removing update actions has been updated to reference initialState.annotation instead of initialState.tracing, maintaining test consistency.


327-330: Consistent property rename in test case for compacted save queue.

The test for version numbering with compacted save queue has been updated to reference initialState.annotation instead of initialState.tracing, ensuring all test cases use the renamed property.

frontend/javascripts/oxalis/merger_mode.ts (2)

485-485: State access updated in resetState function.

This change correctly updates the code to access the skeleton tracing from state.annotation instead of state.tracing, using the existing accessor function.


505-505: State access updated in subscription callback.

The Store subscription callback now correctly accesses the skeleton tracing from state.annotation instead of state.tracing, ensuring the merger mode functionality works with the renamed state property.

frontend/javascripts/oxalis/model/sagas/mapping_saga.ts (2)

430-430: State selection updated in updateLocalHdf5Mapping function.

This line correctly updates the state selection to get state.annotation instead of state.tracing, maintaining the same functionality with the renamed property.


653-657: Volumes access path updated in state selection.

The state selection for editable mappings now correctly accesses state.annotation.volumes instead of state.tracing.volumes, ensuring consistency with the property renaming throughout the application.

frontend/javascripts/test/fixtures/volumetracing_object.ts (1)

21-21: Renaming of tracing to annotation looks good.

The property name change from tracing to annotation in the initialState object aligns with the PR objective of updating terminology throughout the codebase.

frontend/javascripts/test/sagas/volumetracing/volumetracing_saga_integration.spec.ts (7)

890-890: Property access updated correctly.

Properly updated access to state.annotation.volumes[0] in state assertions, consistent with the terminology change.


901-901: Variable reference updated consistently.

Reference to restored state updated from tracing to annotation as expected.


942-942: State reference updated properly.

Consistent renaming of state.annotation.volumes[0] property reference.


949-949: Restored state reference updated.

Properly renamed state reference for consistency with the new annotation terminology.


991-991: Redux state access updated.

Direct Redux state access updated to use annotation instead of tracing.


1012-1012: Store state access renamed properly.

Consistent update of the Redux store state access pattern.


1028-1028: Variable naming updated for consistency.

Variable name updated to match the new terminology while maintaining the same functionality.

frontend/javascripts/oxalis/model/accessors/tool_accessor.ts (2)

288-289: State property access updated correctly.

References to state.tracing properties have been properly updated to state.annotation while maintaining the same functional checks for volumes and skeleton presence.


352-352: Helper function updated to use new property path.

The _getDisabledInfoForTools function now correctly references state.annotation.skeleton instead of state.tracing.skeleton.

frontend/javascripts/admin/admin_rest_api.ts (1)

866-866: Type signature updated appropriately.

Function parameter type has been updated from Tracing to StoreAnnotation to align with the new type naming convention, while maintaining the same functionality.

frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segments_view.tsx (2)

207-207: Property access updated to match new annotation model.

The state property has been correctly updated from tracing to annotation, maintaining the same functionality while aligning with the new naming convention.


214-215: Property access updated to match new annotation model.

The state property has been correctly updated from tracing to annotation, preserving the same permission check logic.

frontend/javascripts/test/sagas/saga_integration.spec.ts (3)

58-58: Function parameter updated to use annotation instead of tracing.

The parameter passed to enforceSkeletonTracing has been correctly updated to use state.annotation instead of state.tracing, aligning with the function's updated signature that expects a StoreAnnotation parameter.


69-71: Function parameter updated to use annotation instead of tracing.

The parameter passed to enforceSkeletonTracing in the UpdateActions.updateSkeletonTracing call has been correctly updated, maintaining consistency with the state model changes.


79-79: Function parameter updated to use annotation instead of tracing.

The parameter passed to getStats has been correctly updated to use state.annotation instead of state.tracing, aligning with the function's updated signature.

frontend/javascripts/oxalis/controller/scene_controller.ts (5)

219-219: Property access updated to use annotation instead of tracing.

The parameter passed to getSomeTracing has been correctly updated to use state.annotation instead of state.tracing, aligning with the new state structure.


237-238: Conditional check and function parameter updated to use annotation instead of tracing.

Both the conditional check and the parameter in the callback function have been correctly updated to use annotation instead of tracing, aligning with the new state structure.


549-550: Selector function parameter updated to use annotation instead of tracing.

The parameter in the selector function for the listenToStoreProperty call has been correctly updated to reference storeState.annotation instead of storeState.tracing.


561-562: Selector function parameter updated to use annotation instead of tracing.

The parameter in the selector function for the listenToStoreProperty call has been correctly updated to reference storeState.annotation instead of storeState.tracing.


565-567: Property access in selector function updated to use annotation instead of tracing.

The property access in the selector function for the listenToStoreProperty call has been correctly updated to reference storeState.annotation.skeleton instead of storeState.tracing.skeleton.

frontend/javascripts/test/model/binary/cube.spec.ts (1)

19-21: Mock store state updated to use annotation instead of tracing.

The mock store state object has been correctly updated to use annotation instead of tracing as the property name, while maintaining the same internal structure with the skeleton property.

frontend/javascripts/oxalis/controller.tsx (3)

144-144: Consistent usage of annotation instead of tracing

The reference to Store.getState().annotation.restrictions.allowUpdate aligns with the PR's goal of renaming from tracing to annotation across the codebase.


233-233: Consistently renamed state property

This change properly updates the state access from tracing.restrictions to annotation.restrictions for retrieving allowed modes.


327-327: Consistent renaming in render method

The render method now correctly accesses allowedModes from annotation.restrictions instead of tracing.restrictions.

frontend/javascripts/oxalis/view/components/command_palette.tsx (1)

65-74: Properly updated state selectors to use annotation instead of tracing

All state selectors have been consistently updated to reference state.annotation instead of state.tracing. This change maintains the component functionality while aligning with the new terminology.

frontend/javascripts/oxalis/model/sagas/skeletontracing_saga.ts (6)

107-107: Updated state reference in centerActiveNode function

The state selection properly references state.annotation instead of state.tracing when enforcing skeleton tracing.


137-137: Updated state reference in watchBranchPointDeletion function

Branch point retrieval now correctly accesses state.annotation instead of state.tracing.


168-168: Updated state reference in watchFailedNodeCreations function

The active tree ID is now properly retrieved from state.annotation instead of state.tracing.


181-181: Updated state references in loop iterations

The loops now correctly iterate over trees from state.annotation instead of state.tracing.

Also applies to: 212-212


245-245: Updated state selection in getAgglomerateSkeletonTracing

State selection now properly retrieves state.annotation instead of state.tracing.


343-343: Updated state references in loadAgglomerateSkeletonWithId

The function now correctly retrieves allowUpdate from state.annotation.restrictions and gets trees with type from state.annotation.

Also applies to: 354-354

frontend/javascripts/oxalis/model/reducers/volumetracing_reducer_helpers.ts (3)

31-41: Updated state references in updateVolumeTracing function

The function now correctly maps over state.annotation.volumes instead of state.tracing.volumes and updates the state using the "annotation" key instead of "tracing".


47-57: Updated state references in updateEditableMapping function

The function now correctly maps over state.annotation.mappings instead of state.tracing.mappings and updates the state using the "annotation" key instead of "tracing".


118-118: Updated state reference in addToLayerReducer

The function now correctly extracts allowUpdate from state.annotation.restrictions instead of state.tracing.restrictions.

frontend/javascripts/oxalis/view/action_bar_view.tsx (1)

326-327: Properly renamed state paths from tracing to annotation

The state properties are now correctly accessed from state.annotation instead of state.tracing which aligns with the PR objective to rename these references for better terminology alignment.

frontend/javascripts/test/api/api_skeleton_latest.spec.ts (3)

213-214: Updated test assertions for renamed state properties

Test assertions now correctly check state.annotation.skeleton.trees instead of state.tracing.skeleton.trees, maintaining test validity with the renamed state structure.


223-223: Correctly updated tree group validation assertion

The assertion now properly checks against state.annotation.skeleton.treeGroups instead of state.tracing.skeleton.treeGroups.


228-230: Updated visibility assertions to use renamed state path

Tree visibility assertions now correctly reference Store.getState().annotation.skeleton.trees instead of the previous tracing path.

frontend/javascripts/oxalis/view/left-border-tabs/layer_settings_tab.tsx (2)

1063-1063: Updated state access in handleFindData method

State destructuring now properly gets tracingStore from Store.getState().annotation instead of Store.getState().tracing.


1603-1603: Updated mapStateToProps to use renamed state property

The tracing property now maps to state.annotation instead of state.tracing, consistent with the PR's renaming objective.

frontend/javascripts/oxalis/view/context_menu.tsx (3)

1390-1390: Updated state reference in selector function

Now correctly passes state.annotation to maybeGetSomeTracing instead of state.tracing.


1393-1393: Properly renamed state properties in component props mapping

State properties are now correctly accessed from state.annotation instead of state.tracing.

Also applies to: 1398-1398


1475-1486: Updated state destructuring and API call in useFetch hook

Now correctly destructures annotation (instead of tracing) from the state and passes it to getVolumeRequestUrl function, maintaining consistent terminology throughout.

frontend/javascripts/oxalis/model/sagas/prefetch_saga.ts (1)

96-98: Changes look good: state.tracing renamed to state.annotation

The property access has been consistently renamed from tracing to annotation while maintaining the same functionality.

frontend/javascripts/test/sagas/annotation_saga.spec.ts (3)

20-28: Test state initialization properly updated to use annotation instead of tracing

The test initialization code correctly creates a state object with annotation instead of tracing while preserving the same structure and properties.


55-56: Saga test interactions updated to use annotation property

The test cases correctly use the renamed property path for saga interactions.


73-83: Test assertions updated to check against annotation state

All assertions and value extractions have been correctly updated to reference the annotation property instead of tracing.

frontend/javascripts/test/reducers/skeletontracing_reducer.spec.ts (3)

47-57: Initial test state properly updated to use annotation property

The test's initialState definition correctly uses annotation instead of tracing while maintaining the same structure.


60-64: ActiveTreeId state properly structured under annotation

The initialStateWithActiveTreeId2 correctly uses the new structure with annotation.skeleton.activeTreeId.


111-112: Updated enforceSkeletonTracing function calls to use annotation property

All references to enforceSkeletonTracing() have been updated to pass state.annotation instead of state.tracing.

Also applies to: 147-148, 218-219, 238-239, 245-246

frontend/javascripts/oxalis/model_initialization.ts (2)

406-408: Updated setInitialTool function to check annotation.skeleton

The function now correctly checks annotation.skeleton instead of tracing.skeleton to determine if the skeleton tool should be activated.


816-818: Error handling properly updated to check annotation.skeleton

The validation logic for agglomerate imports now properly checks annotation.skeleton for null instead of tracing.skeleton.

frontend/javascripts/oxalis/model/reducers/volumetracing_reducer.ts (1)

93-93: Clean implementation of the state property renaming.

All instances of state.tracing have been consistently replaced with state.annotation throughout the reducer, maintaining the same functionality while improving terminology alignment.

Also applies to: 291-291, 305-305, 312-312, 317-317, 351-351, 356-356, 411-411

frontend/javascripts/oxalis/controller/combinations/bounding_box_handlers.ts (1)

169-169: Consistent state property rename in bounding box handlers.

All three instances where bounding boxes are retrieved via getSomeTracing have been properly updated to use state.annotation instead of state.tracing, aligning with the terminology refactor.

Also applies to: 251-251, 307-307

frontend/javascripts/oxalis/model/reducers/skeletontracing_reducer.ts (1)

118-118: Comprehensive and consistent state property renaming across the skeleton tracing reducer.

All instances of state.tracing have been properly replaced with state.annotation throughout this extensive reducer file, including state initialization, updates, and error handling. The systematic application of this change ensures consistency in the state management.

Also applies to: 129-129, 141-141, 179-179, 198-198, 214-214, 244-244, 262-262, 277-277, 295-295, 321-321, 343-343, 362-362, 383-383, 402-402, 426-426, 467-467, 483-483, 513-513, 531-531, 556-556, 597-597, 629-629, 662-662, 697-697, 732-732, 762-762, 783-783, 812-812, 836-836, 869-869, 897-897, 932-932, 967-967, 992-992, 1012-1012, 1032-1032, 1054-1054, 1076-1076, 1097-1097, 1115-1115, 518-518

frontend/javascripts/oxalis/view/action-bar/starting_job_modals.tsx (2)

927-929: State property correctly renamed for conditional check.

The state property access for checking the existence of a skeleton annotation has been properly updated from state.tracing.skeleton to state.annotation.skeleton.


1043-1043: State property correctly renamed for annotation ID access.

The state property access for retrieving the annotationId has been properly updated from state.tracing.annotationId to state.annotation.annotationId.

frontend/javascripts/oxalis/model/bucket_data_handling/wkstore_adapter.ts (3)

103-103: State access changed from tracing to annotation

These changes correctly implement the renaming from tracing to annotation to better align with the terminology used throughout the project, as specified in the PR objectives.


114-114: Function parameter updated to use annotation state

The parameter source for getVolumeTracingById has been properly updated to use state.annotation instead of state.tracing.


132-132: Property access updated consistently

All instances of accessing the annotationId and version have been correctly migrated from the previous state.tracing location to state.annotation.

Also applies to: 163-163, 209-209

frontend/javascripts/oxalis/model/sagas/proofread_saga.ts (4)

230-230: Enforcement of skeleton tracing now uses annotation state

References to enforceSkeletonTracing(state.tracing) have been correctly updated to use state.annotation as the source for skeleton tracing data.

Also applies to: 327-327


323-323: Permissions check uses updated state path

All instances where permissions are checked via allowUpdate have been updated to source from state.annotation.restrictions instead of state.tracing.restrictions.

Also applies to: 704-704, 897-897


541-541: URL retrieval uses new state structure

References to tracingStoreUrl now correctly retrieve data from state.annotation.tracingStore.url instead of the previous state.tracing path.

Also applies to: 607-607, 1283-1283


1282-1282: Annotation ID selection updated

The selection of annotation ID now correctly points to state.annotation.annotationId instead of state.tracing.annotationId.

frontend/javascripts/oxalis/model/sagas/annotation_saga.tsx (1)

242-243: State selections correctly updated

The selections for allowUpdate, annotationId, and othersMayEdit have been properly updated to use the new state.annotation path instead of state.tracing.

Also applies to: 247-247

frontend/javascripts/test/sagas/skeletontracing_saga.spec.ts (4)

2-2: Type import updated for new state structure

The import statement correctly updates the type from HybridTracing to StoreAnnotation to reflect the changes in the underlying state structure.


54-55: Function parameters and usage updated

Parameter names and types have been properly updated from prevTracing and nextTracing to prevAnnotation and nextAnnotation with the correct type, and the function implementation has been updated to match.

Also applies to: 62-63


144-156: Initial state structure updated

The initialState definition has been updated to use annotation instead of tracing in its structure, correctly reflecting the changes in the state store structure.


182-182: Test cases updated to reflect new state structure

All test assertions and function calls have been properly updated to reflect the new annotation state structure instead of the previous tracing structure.

Also applies to: 188-188, 201-201, 207-207, 216-217, 235-236, 273-274, 311-312, 353-354, 374-375, 401-402, 418-419, 440-441, 451-452, 477-478, 488-489, 519-520, 571-572, 815-817, 829-831, 839-842, 1068-1068, 1073-1074, 1192-1195, 1226-1227

frontend/javascripts/test/geometries/skeleton.spec.ts (5)

53-53: State property reference updated correctly

The state property reference has been updated from tracing to annotation, consistent with the PR's renaming objective.


64-64: State accessor function parameter updated successfully

The parameter in the Skeleton constructor has been updated from referencing state.tracing to state.annotation.


67-67: State selector pattern consistently updated

This change maintains consistency with the overall renaming pattern throughout the test file.


178-178: State access in variable assignment correctly updated

The state property reference for retrieving skeleton tracing has been properly updated to use annotation.


189-190: State access in test validation updated correctly

The getter from state now references the annotation property consistently in this test assertion.

frontend/javascripts/test/reducers/volumetracing_reducer.spec.ts (4)

11-11: Type import correctly updated

The import statement now correctly references StoreAnnotation instead of the previous tracing type, consistent with the type system changes.


31-31: State property access consistently updated across test assertions

Multiple test assertions have been updated to reference newState.annotation instead of newState.tracing. This change is consistent throughout the test file.

Also applies to: 39-41, 49-52, 62-64, 74-76, 97-99, 126-128, 132-134, 199-202, 222-225, 239-241


57-58: Initial state property access updated correctly

References to initialState.tracing.volumes have been updated to initialState.annotation.volumes.

Also applies to: 69-70, 81-82, 106-107


85-94: State mutation operations updated correctly

Update operations in test fixtures now target the annotation property instead of tracing.

Also applies to: 112-121, 252-258

frontend/javascripts/oxalis/model/sagas/undo_saga.ts (6)

182-184: State initialization updated correctly in saga

The initialization of local state variables now correctly references state.annotation instead of state.tracing. This change ensures the saga correctly initializes using the new state structure.


198-202: Helper functions updated to use annotation instead of tracing

The helper functions setPrevSegmentsAndGroupsToCurrent and areCurrentVolumeUndoBucketsEmpty now correctly retrieve volume tracings from state.annotation.

Also applies to: 210-215


367-368: State selectors in action handlers updated correctly

All select operations within action handlers now properly reference state.annotation when retrieving volume tracings by ID or layer name.

Also applies to: 417-418, 437-438, 460-461


490-491: Post-action state update correctly uses annotation

The updated tracing state is correctly retrieved from state.annotation.skeleton after action processing.


516-517: Skeleton tracing enforcement updated correctly

The getSkeletonTracingToUndoState function now correctly enforces skeleton tracing from state.annotation.


807-808: Final state access in complex saga function updated correctly

The selection of volume tracing by ID now correctly references state.annotation in the applyAndGetRevertingVolumeBatch function.

frontend/javascripts/test/libs/nml.spec.ts (4)

179-192: State structure correctly updated in test fixture

The initialState object now correctly uses annotation instead of tracing while preserving the same nested structure. This change maintains the data model consistency with the new naming convention.


203-204: NML serialization parameters updated consistently

All calls to serializeToNml now correctly pass state.annotation instead of state.tracing, ensuring serialization works correctly with the new state structure.

Also applies to: 235-237, 265-267, 296-298, 331-333, 384-387, 399-401, 442-444, 487-490


271-273: Test assertions updated correctly to use annotation

All test assertions that previously accessed tracing now correctly access annotation to verify test outcomes.

Also applies to: 302-304, 337-339, 363-368, 391-395, 507-511, 751-753, 818-821, 846-848


307-315: State manipulation in test cases updated correctly

All test cases that modify the initial state now correctly manipulate the annotation property instead of the tracing property. This ensures tests remain valid with the new state structure.

Also applies to: 417-425, 515-535, 559-576, 577-594, 595-612, 613-638, 639-664, 665-692, 693-705, 706-718, 719-733, 856-873

frontend/javascripts/test/sagas/compact_toggle_actions.spec.ts (4)

60-61: Good change of state structure from tracing to annotation.

This part of the code changes the state structure to use annotation instead of tracing, in line with the PR objective to rename tracing to annotation across the frontend.


106-108: Correctly updated function parameters.

The references to enforceSkeletonTracing function have been properly updated to use the new annotation property instead of tracing.


127-130: Properly updated type check.

The null check has been correctly updated to use newState.annotation.skeleton instead of newState.tracing.skeleton, and the error message has been appropriately updated too.


132-133: Updated parameter properly.

The call to compactToggleActions now correctly uses newState.annotation.skeleton instead of newState.tracing.skeleton.

frontend/javascripts/oxalis/controller/combinations/tool_controls.ts (2)

100-111: Correctly updated destructuring and conditional checks.

The state destructuring has been properly changed from tracing to annotation, and the subsequent conditional check has been updated to reference annotation.skeleton instead of tracing.skeleton.


273-278: State property change properly implemented.

The destructured property from Store.getState() has been correctly changed from tracing to annotation, and the null check has been updated accordingly.

frontend/javascripts/oxalis/model/sagas/volume/volume_interpolation_saga.ts (3)

60-61: Correctly updated restriction check.

The check for whether volume interpolation is allowed now correctly references annotation.restrictions instead of tracing.restrictions.


266-267: State selector properly updated.

The Redux selector has been correctly updated to access state.annotation.restrictions.allowUpdate instead of state.tracing.restrictions.allowUpdate.


274-276: Properly updated permission check.

The check for isVolumeInterpolationAllowed now correctly references state.annotation.restrictions instead of state.tracing.restrictions.

frontend/javascripts/oxalis/controller/url_manager.ts (2)

249-250: Correctly updated state property reference.

The access to activeNodeId now correctly uses state.annotation.skeleton instead of state.tracing.skeleton.


361-363: URL parameters properly updated.

The URL building logic now correctly references state.annotation.annotationType and state.annotation.annotationId instead of their tracing counterparts.

frontend/javascripts/oxalis/model/reducers/skeletontracing_reducer_helpers.ts (9)

58-58: State property reference updated consistently.

The state access has been correctly updated from state.tracing to state.annotation to match the new property name.


173-173: LGTM! Function parameter updated to use new state structure.

The getSkeletonTracing function is now correctly being called with state.annotation instead of state.tracing.


229-229: LGTM! Function parameter updated to use new state structure.

Same pattern as before - correctly updated to use the new annotation property name.


380-389: State update path correctly modified.

The nested path in the update function has been correctly changed from tracing to annotation to correspond with the new state structure.


492-492: LGTM! Function parameter updated to use new state structure.

Continuing the consistent pattern of updating getSkeletonTracing calls to use the new state property.


773-777: State update path correctly modified.

Update expression correctly uses the new annotation property path for accessing skeleton data.


817-821: State update path correctly modified.

Update expression correctly uses the new annotation property path for accessing skeleton data.


829-829: Variable reference updated consistently.

The optional chaining reference to tree groups has been properly updated to use state.annotation.


843-849: State update path correctly modified.

The final update call in this file has been properly updated to use the annotation property.

frontend/javascripts/oxalis/store.ts (3)

279-284: Type renamed from HybridTracing to StoreAnnotation.

The type has been renamed to better reflect its purpose. The structure remains the same, containing skeleton, volumes, readOnly and mappings properties.


604-604: State property renamed from tracing to annotation.

The OxalisState type now uses the renamed StoreAnnotation type for its annotation property (formerly tracing).


624-624: Updated comment to reference new state property.

The comment has been appropriately updated to reference state.annotation.volume.segments instead of state.tracing.volume.segments.

frontend/javascripts/oxalis/view/action-bar/toolbar_view.tsx (2)

556-556: Updated selector to use new state structure.

The useSelector hook has been updated to access the active tree from state.annotation.skeleton instead of state.tracing.skeleton.


837-838: Updated selectors to use new state structure.

Both hasVolume and hasSkeleton selectors have been updated to reference the properties from state.annotation instead of state.tracing.

frontend/javascripts/navbar.tsx (1)

1017-1021: Updated state property references in mapStateToProps.

All references in mapStateToProps have been updated to use state.annotation instead of state.tracing, maintaining consistent naming throughout the application.

frontend/javascripts/oxalis/view/statusbar.tsx (4)

189-189: LGTM: State selector renamed from tracing to annotation.

The state selector correctly accesses the renamed property state.annotation.skeleton instead of state.tracing.skeleton, consistent with the PR objective.


419-421: LGTM: State selector renamed from tracing to annotation.

The state selector correctly accesses the renamed property state.annotation.skeleton instead of state.tracing.skeleton, consistent with the PR objective.


427-427: LGTM: State selector renamed from tracing to annotation.

The state selector correctly accesses the renamed property state.annotation.skeleton instead of state.tracing.skeleton, consistent with the PR objective.


430-430: LGTM: State selector renamed from tracing to annotation.

The state selector correctly accesses the renamed property state.annotation.skeleton instead of state.tracing.skeleton, consistent with the PR objective.

frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segments_view_helper.tsx (3)

12-12: LGTM: Updated type import to use StoreAnnotation.

The type import correctly includes StoreAnnotation instead of HybridTracing, consistent with the PR objective.


47-47: LGTM: Updated function parameter type from HybridTracing to StoreAnnotation.

The parameter type for getVolumeRequestUrl has been correctly updated to use StoreAnnotation | null instead of HybridTracing | null, consistent with the PR objective.


62-62: LGTM: Updated function parameter type from HybridTracing to StoreAnnotation.

The parameter type for hasSegmentIndex has been correctly updated to use StoreAnnotation | null | undefined instead of HybridTracing | null | undefined, consistent with the PR objective.

frontend/javascripts/oxalis/model/sagas/save_saga.ts (7)

171-173: LGTM: State selectors updated to reference annotation state.

The selectors now correctly access state.annotation properties instead of state.tracing properties, consistent with the PR objective.


419-421: LGTM: Updated allowUpdate selector to reference annotation restrictions.

The selector now correctly checks state.annotation.restrictions properties instead of state.tracing.restrictions, consistent with the PR objective.


460-462: LGTM: Updated allowSave selector to reference annotation restrictions.

The selector now correctly checks state.annotation.restrictions properties instead of state.tracing.restrictions, consistent with the PR objective.


484-487: LGTM: Updated state selectors to reference annotation state.

The selectors now correctly access state.annotation properties instead of state.tracing properties, consistent with the PR objective.


509-509: LGTM: Updated reference to version from annotation state.

The selector now correctly accesses state.annotation.version instead of state.tracing.version, consistent with the PR objective.


541-541: LGTM: Updated allowSave selector to reference annotation state.

The selector now correctly accesses state.annotation.restrictions.allowSave instead of state.tracing.restrictions.allowSave, consistent with the PR objective.


547-547: LGTM: Updated othersMayEdit selector to reference annotation state.

The selector now correctly accesses state.annotation.othersMayEdit instead of state.tracing.othersMayEdit, consistent with the PR objective.

frontend/javascripts/dashboard/explorative_annotations_view.tsx (5)

74-74: LGTM: Type definition renamed from tracings to annotations.

The type definition for TracingModeState correctly uses annotations property instead of tracings, consistent with the PR objective.


115-115: LGTM: State initialization renamed from tracings to annotations.

The state initialization in both archivedModeState and unarchivedModeState correctly uses annotations instead of tracings, consistent with the PR objective.

Also applies to: 120-120


164-165: LGTM: Updated method to use annotations terminology.

The method now correctly accesses annotations property and uses appropriate variable names, consistent with the PR objective.

Also applies to: 168-168


373-375: LGTM: Method renamed from getCurrentTracings to getCurrentAnnotations.

The method has been properly renamed and updated to use annotations terminology, consistent with the PR objective.


413-427: LGTM: State update logic renamed to use annotations terminology.

The state update logic in archiveAll method correctly uses annotations instead of tracings, consistent with the PR objective.

frontend/javascripts/oxalis/controller/td_controller.tsx (6)

34-34: Import updated to use StoreAnnotation

Good update of the import to use StoreAnnotation instead of the previous Tracing type. This is consistent with the renaming effort.


86-86: Property type updated in OwnProps interface

Successfully updated the property type from tracing?: Tracing to annotation?: StoreAnnotation in the OwnProps interface, maintaining the optional nature of the property.


95-96: Updated property access in maybeGetActiveNodeFromProps

Correctly refactored the property access from tracing to annotation while maintaining the optional chaining pattern to safely access the skeleton.activeNodeId property.


117-118: Updated condition check in componentDidUpdate

The condition check in componentDidUpdate has been properly updated to reference this.props.annotation instead of this.props.tracing.


123-123: Updated getActiveNode reference

Successfully updated the reference to pass this.props.annotation.skeleton to the getActiveNode function instead of this.props.tracing.skeleton.


185-185: Updated conditional check in getTDViewMouseControls

Properly updated the optional chaining reference from this.props.tracing?.skeleton to this.props.annotation?.skeleton in the conditional check.

frontend/javascripts/oxalis/view/right-border-tabs/dataset_info_tab_view.tsx (3)

30-30: Updated type imports

Successfully updated the import to use StoreAnnotation instead of Tracing while maintaining alphabetical order of the imported types.


43-43: Updated property type in StateProps

Correctly updated the property type in StateProps from annotation: Tracing to annotation: StoreAnnotation.


657-657: Updated state reference in mapStateToProps

Successfully updated the state reference in mapStateToProps from state.tracing to state.annotation, ensuring that the component receives data from the correct part of the Redux store.

frontend/javascripts/oxalis/api/api_latest.ts (2)

167-167: No concerns.
The import of StoreAnnotation looks good and aligns with the overall rename effort.


285-2028: All other renamed references look good.
No further issues found in this extensive rename from tracing to annotation. The changes appear consistent with the PR’s objectives.

frontend/javascripts/oxalis/model/accessors/annotation_accessor.ts (2)

2-28: Rename consistency looks fine.
All references to state.annotation (e.g., owner, restrictions, organization) are correctly replaced, and the updates match the rebranding to “annotation.”


44-46: Overall naming and logic are aligned.
The new signatures explicitly use StoreAnnotation, and the code consistently references annotation.skeleton, annotation.volumes, etc. No functional or syntax issues observed.

Also applies to: 61-63

frontend/javascripts/oxalis/model/reducers/annotation_reducer.ts (1)

28-28: Rename changes appear coherent.
All references correctly shift from tracing to annotation properties. The logic remains the same, with no functionality or performance impact introduced.

Also applies to: 32-32, 42-42, 48-48, 104-104, 126-126, 132-132, 142-142, 165-165, 221-221, 244-244, 470-470

frontend/javascripts/oxalis/view/version_list.tsx (8)

29-29: Type import updated correctly.

The type import has been properly updated to import StoreAnnotation from the store, which aligns with the renaming effort from tracing to annotation.


52-52: State properties correctly renamed.

The destructuring of state properties from state.tracing to state.annotation is consistent with the overall renaming goal and keeps the property structure intact.


96-97: Annotation state access correctly updated.

The access to annotationType, annotationId, and volumes properties has been properly migrated from the tracing to the annotation state.


106-107: Restrictions access path updated consistently.

The path to access initialAllowUpdate has been correctly updated to use state.annotation.restrictions instead of state.tracing.restrictions.


129-130: Function parameter type correctly updated.

The parameter type for getUpdateActionLogPage has been changed from HybridTracing to StoreAnnotation which is consistent with the renaming effort throughout the codebase.


189-193: Redux selectors properly updated.

All selectors now correctly access properties from state.annotation instead of state.tracing, maintaining consistency with the renaming effort.


217-217: Component state selector updated.

The tracing selector has been properly renamed to use state.annotation, maintaining consistency in the component.


232-234: Store access updated in fetchPaginatedVersions.

The function has been updated to access state properties from annotation instead of tracing, ensuring consistency throughout the component.

frontend/javascripts/oxalis/controller/viewmodes/plane_controller.tsx (7)

60-60: Type import updated correctly.

The import has been updated to include StoreAnnotation from the store, which is consistent with the renaming effort.


102-102: State props type updated.

The StateProps type has been updated to use annotation: StoreAnnotation instead of the previous tracing property, ensuring type safety throughout the component.


517-518: Conditional checks correctly updated.

The conditional checks for skeleton and volumes have been properly updated to access these properties from this.props.annotation instead of this.props.tracing.

Also applies to: 521-522


531-537: Extended keyboard controls access updated.

The checks for skeleton and volumes presence have been correctly updated to reference this.props.annotation instead of this.props.tracing.


567-569: Looped keyboard controls access updated.

The check for skeleton presence has been correctly updated to reference this.props.annotation instead of this.props.tracing.


696-698: Component props correctly updated.

The props passed to the TDController have been correctly updated to use annotation instead of tracing.


703-708: mapStateToProps function properly updated.

The Redux state mapping has been correctly updated to map state.annotation to the annotation prop instead of mapping state.tracing to the tracing prop.

frontend/javascripts/oxalis/controller/combinations/skeleton_handlers.ts (5)

64-64: Store state access consistently updated.

The access to skeleton tracing from the Redux store now correctly references Store.getState().annotation instead of Store.getState().tracing.

Also applies to: 81-81


184-184: getSkeletonTracing calls updated.

The calls to getSkeletonTracing now correctly pass Store.getState().annotation instead of Store.getState().tracing.

Also applies to: 226-226


247-247: Restrictions access path updated.

The access to somaClickingAllowed flag has been correctly updated to use state.annotation.restrictions instead of state.tracing.restrictions.


277-277: State object references updated correctly.

All references to the tracing state object have been consistently updated to use state.annotation instead of state.tracing.

Also applies to: 345-345, 364-364


460-460: Navigation function state access updated.

The state access in navigation functions has been correctly updated to enforce skeleton tracing from annotation state instead of tracing state.

Also applies to: 494-494

frontend/javascripts/oxalis/model/accessors/skeletontracing_accessor.ts (4)

10-10: StoreAnnotation type import added.

The type import for StoreAnnotation has been correctly added to the imports, which is necessary for the parameter type changes.


33-36: getSkeletonTracing function parameter updated.

The parameter type for getSkeletonTracing has been changed from Tracing to StoreAnnotation and the parameter name updated accordingly. The function body correctly references annotation.skeleton instead of tracing.skeleton.


68-69: enforceSkeletonTracing function parameter updated.

The parameter type and name for enforceSkeletonTracing have been correctly updated to use StoreAnnotation type and annotation name. The function call inside has been updated accordingly.


264-267: getBranchPoints function parameter updated.

The parameter type and name for getBranchPoints have been correctly updated to use StoreAnnotation type and annotation name. The function continues to work correctly with the updated parameter.

frontend/javascripts/oxalis/view/jobs/train_ai_model.tsx (3)

42-42: Type import correctly updated to StoreAnnotation.

The import statement has been updated to use StoreAnnotation instead of HybridTracing, which aligns with the renaming initiative.


172-172: Function type parameter correctly updated.

The generic type constraint has been properly updated from HybridTracing to StoreAnnotation.


508-508: Function signature correctly updated.

The function parameter type has been correctly updated from HybridTracing to StoreAnnotation.

frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx (3)

50-50: Type import correctly updated to StoreAnnotation.

The import statement has been updated to use StoreAnnotation instead of HybridTracing, aligning with the renaming initiative.


94-94: Function parameter type correctly updated.

The parameter type for getExportLayerInfos has been properly updated from HybridTracing to StoreAnnotation.


230-230: Function parameter type correctly updated.

The parameter type for getPythonAnnotationDownloadSnippet has been properly updated from HybridTracing to StoreAnnotation.

frontend/javascripts/oxalis/model/helpers/nml_helpers.ts (6)

30-30: Type import correctly updated to StoreAnnotation.

The import statement has been updated to use StoreAnnotation instead of Tracing, aligning with the renaming initiative.


121-122: Variable and property accesses correctly updated.

The destructuring of annotation from state and subsequent property access have been properly updated.


130-130: Property access correctly updated to use 'annotation'.

The code now correctly references annotation.annotationId instead of tracing.annotationId.


135-135: Function parameter type correctly updated.

The parameter type for serializeToNml has been properly updated from Tracing to StoreAnnotation.


162-162: Function parameter type correctly updated.

The parameter type for serializeMetaInformation has been properly updated from Tracing to StoreAnnotation.


238-238: Function parameter type correctly updated.

The parameter type for serializeParameters has been properly updated from Tracing to StoreAnnotation.

frontend/javascripts/oxalis/view/version_entry.tsx (8)

52-52: Type import correctly updated.

The import statement has been updated to use StoreAnnotation instead of HybridTracing, aligning with the renaming initiative.


69-69: Function type signature correctly updated.

The function parameter type has been properly updated from HybridTracing to StoreAnnotation in the Record type.


157-163: Multiple handler functions correctly updated to use StoreAnnotation.

All handler functions have been properly updated to use StoreAnnotation instead of HybridTracing. The variable names have also been updated to annotation for consistency.

Also applies to: 171-176, 215-220, 229-234, 243-248, 257-262, 271-276


316-319: Function signature and implementation correctly updated.

The maybeGetReadableVolumeTracingName function has been properly updated to use annotation instead of tracing, both in its signature and implementation. The variable names within the function have also been updated for consistency.


326-335: Function signature and implementation correctly updated.

The getDescriptionForSpecificBatch function has been properly updated to use annotation instead of tracing, and the parameter is correctly passed to the description function.


350-350: Function signature correctly updated.

The parameter type for getDescriptionForBatch has been properly updated from HybridTracing to StoreAnnotation.


430-434: State selectors correctly updated.

The selectors now correctly reference properties from state.annotation instead of state.tracing. A new selector for the entire annotation state has also been added to support the updated function calls.


449-449: Function call correctly updated.

The call to getDescriptionForBatch now correctly passes annotation instead of tracing.

frontend/javascripts/oxalis/view/action-bar/tracing_actions_view.tsx (4)

543-545: State property renamed from tracing to annotation.

The code has been updated to access the annotation state instead of tracing state from the Redux store. This change is consistent with the PR objective to rename the variable store.tracing to store.annotation.


555-555: Updated volume access from annotation state.

The volume access pattern has been updated to check for fallback layer in sandboxAnnotation.volumes instead of sandboxTracing.volumes. This is consistent with the overall renaming.


559-560: Updated enforceSkeletonTracing calls to use annotation data.

Both the sandbox and current state skeleton tracing enforcement now correctly use the annotation objects.


806-819: Updated mapStateToProps to use annotation state properties.

The mapStateToProps function has been updated to map from state.annotation instead of state.tracing for multiple properties. This maintains the component's functionality while aligning with the new state structure.

frontend/javascripts/oxalis/view/right-border-tabs/trees_tab/skeleton_tab_view.tsx (6)

225-227: State destructuring updated to use annotation instead of tracing.

The code correctly destructures annotation from the state instead of tracing, and maintains the check for volumes length using the new property name.


239-244: Updated importVolumeTracing function parameters.

The importVolumeTracing function now receives the annotation object instead of the tracing object, which is consistent with the changes in the API as shown in the relevant code snippets.


247-247: Updated version number action to use annotation version.

The version number action now correctly uses annotation.version for incrementing, which maintains the component's functionality with the new state structure.


304-304: Updated skeleton tracing enforcement.

The checkAndConfirmDeletingInitialNode function now correctly retrieves the skeleton tracing from state.annotation.


547-551: Updated serializeToNml parameters.

The serializeToNml function now correctly receives state.annotation as a parameter instead of state.tracing, which is consistent with its signature as shown in the relevant code snippets from oxalis/model/helpers/nml_helpers.ts.


985-990: Updated mapStateToProps to use annotation state.

All state properties accessed in mapStateToProps have been correctly updated to use state.annotation instead of state.tracing, which maintains the component's functionality.

frontend/javascripts/oxalis/model/accessors/tracing_accessor.ts (6)

8-8: Added StoreAnnotation to imports.

Added the StoreAnnotation type to imports, necessary for the parameter type changes throughout the file.


16-25: Updated maybeGetSomeTracing parameter and property access.

The function's parameter has been renamed from tracing to annotation and all property accesses have been updated accordingly. This maintains the function's behavior while using the new data structure.


29-38: Updated getSomeTracing parameter and call.

The function's parameter has been renamed from tracing to annotation and the call to maybeGetSomeTracing has been updated to pass annotation instead of tracing.


47-54: Updated getTracingType parameter and property access.

The getTracingType function now accepts a StoreAnnotation parameter instead of Tracing, and all property accesses have been updated to access annotation properties. This is a key function used throughout the codebase.


67-78: Updated selectTracing to access state.annotation.

The selectTracing function now correctly accesses properties from state.annotation instead of state.tracing, which is consistent with the new state structure.


93-93: Updated getUserBoundingBoxesFromState to use state.annotation.

The getUserBoundingBoxesFromState function now correctly passes state.annotation to maybeGetSomeTracing.

frontend/javascripts/oxalis/model/accessors/volumetracing_accessor.ts (18)

40-40: Added StoreAnnotation to imports.

Added the StoreAnnotation type to imports, necessary for the parameter type changes throughout the file.


62-64: Updated getVolumeTracings parameter and return.

The getVolumeTracings function now accepts a StoreAnnotation parameter instead of Tracing and returns annotation.volumes.


66-77: Updated getVolumeTracingById parameter and property access.

The getVolumeTracingById function now accepts a StoreAnnotation parameter and accesses volumes from the annotation object.


84-92: Updated getVolumeTracingByLayerName parameter and property access.

The getVolumeTracingByLayerName function now accepts a StoreAnnotation parameter and accesses volumes from the annotation object.


94-96: Updated hasVolumeTracings parameter and property access.

The hasVolumeTracings function now accepts a StoreAnnotation parameter and checks annotation.volumes.length.


99-102: Updated getVolumeDescriptors parameter type.

The getVolumeDescriptors function now accepts StoreAnnotation as one of its possible parameter types.


105-117: Updated getVolumeDescriptorById parameter type.

The getVolumeDescriptorById function now accepts StoreAnnotation as one of its possible parameter types.


119-125: Updated getReadableNameByVolumeTracingId parameter type.

The getReadableNameByVolumeTracingId function now accepts StoreAnnotation as one of its possible parameter types.


129-150: Updated getSegmentationLayerByHumanReadableName parameter type.

The getSegmentationLayerByHumanReadableName function now accepts StoreAnnotation as one of its possible parameter types.


152-162: Updated getAllReadableLayerNames parameter and property access.

The getAllReadableLayerNames function now accepts a StoreAnnotation parameter and correctly checks for store.skeleton.


166-176: Updated getReadableNameForLayerName parameter type.

The getReadableNameForLayerName function now accepts StoreAnnotation as one of its possible parameter types.


225-233: Updated volume check in isVolumeAnnotationDisallowedForZoom.

The function now checks state.annotation.volumes.length instead of state.tracing.volumes.length.


286-286: Updated getTracingForSegmentationLayer to use state.annotation.

The getTracingForSegmentationLayer function now correctly calls getVolumeTracingById with state.annotation.


313-314: Updated volume check and access in getRequestedOrDefaultSegmentationTracingLayer.

The function now checks state.annotation.volumes.length and returns state.annotation.volumes[0].


469-469: Updated getActiveSegmentPosition to use state.annotation.

The getActiveSegmentPosition function now correctly calls getVolumeTracingByLayerName with state.annotation.


651-651: Updated getEditableMappingForVolumeTracingId to use state.annotation.

The getEditableMappingForVolumeTracingId function now correctly accesses state.annotation.mappings.


843-843: Updated needsLocalHdf5Mapping to use state.annotation.

The needsLocalHdf5Mapping function now correctly calls getVolumeTracingByLayerName with state.annotation.


890-895: Updated getReadableNameOfVolumeLayer parameter type.

The getReadableNameOfVolumeLayer function now accepts StoreAnnotation as one of its possible parameter types.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
frontend/javascripts/oxalis/api/api_latest.ts (3)

220-229: Documentation comments still use 'tracing' terminology.

The API documentation comments still use the term "tracing" which might cause confusion when combined with the new "annotation" terminology in the code. Consider updating the documentation to use consistent terminology.


232-232: Consider renaming the class for consistency.

The class is still named TracingApi while the underlying state property has been renamed from tracing to annotation. For better consistency, you might want to consider renaming this class to AnnotationApi in a future PR.


1555-1577: Method name uses old terminology.

The method getVolumeTracingLayerName still uses the old "tracing" terminology. Consider deprecating this method and creating a new one with the updated "annotation" terminology in a future PR for more consistent naming.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 635dbb9 and 4a52a6e.

📒 Files selected for processing (8)
  • frontend/javascripts/admin/admin_rest_api.ts (2 hunks)
  • frontend/javascripts/oxalis/api/api_latest.ts (36 hunks)
  • frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx (5 hunks)
  • frontend/javascripts/oxalis/view/left-border-tabs/layer_settings_tab.tsx (11 hunks)
  • frontend/javascripts/oxalis/view/left-border-tabs/modals/add_volume_layer_modal.tsx (4 hunks)
  • frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segments_view_helper.tsx (2 hunks)
  • frontend/javascripts/oxalis/view/version_list.tsx (9 hunks)
  • frontend/javascripts/test/reducers/volumetracing_reducer.spec.ts (11 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
  • frontend/javascripts/oxalis/view/left-border-tabs/modals/add_volume_layer_modal.tsx
  • frontend/javascripts/admin/admin_rest_api.ts
  • frontend/javascripts/oxalis/view/right-border-tabs/segments_tab/segments_view_helper.tsx
  • frontend/javascripts/oxalis/view/left-border-tabs/layer_settings_tab.tsx
  • frontend/javascripts/oxalis/view/version_list.tsx
  • frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: circleci_build
🔇 Additional comments (12)
frontend/javascripts/test/reducers/volumetracing_reducer.spec.ts (8)

11-11: Import types correctly updated to reflect new terminology.

The import type has been properly updated from Tracing to StoreAnnotation, which aligns with the PR's objective of renaming tracing to annotation throughout the codebase.


15-18: Function signature and implementation correctly updated.

The function parameter has been properly renamed from tracing to annotation, and the implementation correctly accesses annotation.volumes instead of tracing.volumes. The change is consistent with the renaming goal.


20-20: Error message updated to match new terminology.

The error message has been updated to reference "Annotation" instead of "Tracing," maintaining consistency with the renamed concept.


31-31: Test case updated to use new state property.

The test case now correctly uses newState.annotation instead of newState.tracing when calling getFirstVolumeTracingOrFail.


57-58: Property access in createCellAction updated correctly.

The property access has been properly updated to reference initialState.annotation.volumes[0] instead of initialState.tracing.volumes[0].


84-93: State update correctly uses new object path.

The state update correctly uses annotation in the object path instead of tracing when modifying the state with update().


111-120: Another state update correctly uses the new terminology.

This state update also correctly uses annotation in the object path, maintaining consistency with the renaming pattern.


252-258: Restrictions property access updated properly.

The access to the restrictions property has been correctly updated to use annotation instead of tracing in the object path.

frontend/javascripts/oxalis/api/api_latest.ts (4)

167-167: Import of StoreAnnotation type added correctly.

The import of StoreAnnotation type has been properly added to the imports section, which will be used to replace the previous Tracing type throughout the codebase.


196-201: Function signature and implementation updated correctly.

The assertSkeleton function has been updated to use the new type StoreAnnotation instead of Tracing, maintaining the same functionality while using the new terminology.


204-204: Reference to annotation state updated correctly.

The property access has been properly updated from state.tracing.volumes.length to state.annotation.volumes.length.


253-253: Consistent renaming of state property access.

All references to state.tracing or Store.getState().tracing have been correctly updated to use state.annotation or Store.getState().annotation respectively, maintaining consistent terminology throughout the file.

Also applies to: 261-261, 269-269, 286-286, 295-295, 303-303, 311-311, 319-319, 328-328, 345-345, 365-365, 384-384, 396-396, 423-423, 451-451, 467-467, 483-485, 495-497, 507-509, 527-529, 539-541, 551-552, 565-567, 591-593, 613-618, 821-824, 846-847, 887-888, 921-922, 1009-1011, 1057-1058, 1080-1080, 1168-1171, 1181-1184, 1229-1236, 1256-1267, 1281-1289, 1598-1599, 1638-1640

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
frontend/javascripts/oxalis/view/action-bar/starting_job_modals.tsx (1)

1162-1162: Consider renaming the variable to match state property.

While the state selector has been updated to use state.annotation, the variable is still named tracing. For consistency with the state property renaming, consider renaming this variable to annotation.

-  const tracing = useSelector((state: OxalisState) => state.annotation);
+  const annotation = useSelector((state: OxalisState) => state.annotation);

Remember to update all references to this variable in the component.

frontend/javascripts/oxalis/model/reducers/annotation_reducer.ts (2)

79-86: Consistent function name update in INITIALIZE_ANNOTATION case

The function call has been properly updated from updateTracing to updateAnnotation. The comment still refers to "tracings" which might be considered for updating to maintain terminology consistency.

Consider updating the comment to refer to "annotations" instead of "tracings" for complete terminology consistency:

-        // Clear all tracings. These will be initialized in corresponding
+        // Clear all annotations. These will be initialized in corresponding

27-27: Consider updating comment terminology

The comment on line 27 still refers to "tracing objects" while the code has been updated to use "annotation".

Consider updating the comment for complete terminology consistency:

-  // We mirror/sync the user bounding boxes between all tracing objects.
+  // We mirror/sync the user bounding boxes between all annotation objects.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4a52a6e and aba52c1.

📒 Files selected for processing (13)
  • frontend/javascripts/dashboard/explorative_annotations_view.tsx (28 hunks)
  • frontend/javascripts/oxalis/controller/url_manager.ts (3 hunks)
  • frontend/javascripts/oxalis/model/reducers/annotation_reducer.ts (10 hunks)
  • frontend/javascripts/oxalis/model/sagas/annotation_saga.tsx (3 hunks)
  • frontend/javascripts/oxalis/model/sagas/save_saga.ts (6 hunks)
  • frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx (11 hunks)
  • frontend/javascripts/oxalis/view/action-bar/private_links_view.tsx (2 hunks)
  • frontend/javascripts/oxalis/view/action-bar/share_modal_view.tsx (3 hunks)
  • frontend/javascripts/oxalis/view/action-bar/starting_job_modals.tsx (6 hunks)
  • frontend/javascripts/oxalis/view/jobs/train_ai_model.tsx (6 hunks)
  • frontend/javascripts/oxalis/view/right-border-tabs/bounding_box_tab.tsx (1 hunks)
  • frontend/javascripts/oxalis/view/statusbar.tsx (3 hunks)
  • frontend/javascripts/oxalis/view/version_list.tsx (12 hunks)
🚧 Files skipped from review as they are similar to previous changes (11)
  • frontend/javascripts/oxalis/view/right-border-tabs/bounding_box_tab.tsx
  • frontend/javascripts/oxalis/controller/url_manager.ts
  • frontend/javascripts/oxalis/view/action-bar/share_modal_view.tsx
  • frontend/javascripts/oxalis/model/sagas/annotation_saga.tsx
  • frontend/javascripts/oxalis/view/version_list.tsx
  • frontend/javascripts/dashboard/explorative_annotations_view.tsx
  • frontend/javascripts/oxalis/view/statusbar.tsx
  • frontend/javascripts/oxalis/view/jobs/train_ai_model.tsx
  • frontend/javascripts/oxalis/view/action-bar/private_links_view.tsx
  • frontend/javascripts/oxalis/model/sagas/save_saga.ts
  • frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx
🧰 Additional context used
🧠 Learnings (1)
frontend/javascripts/oxalis/view/action-bar/starting_job_modals.tsx (1)
Learnt from: MichaelBuessemeyer
PR: scalableminds/webknossos#8221
File: frontend/javascripts/oxalis/view/action-bar/starting_job_modals.tsx:584-584
Timestamp: 2025-03-26T13:22:21.455Z
Learning: When evaluation is done, ensure that `useAnnotation` is always set to `true` in the form data by using a hidden `Form.Item` with `initialValue={true}`.
🧬 Code Definitions (1)
frontend/javascripts/oxalis/view/action-bar/starting_job_modals.tsx (1)
frontend/javascripts/oxalis/store.ts (1)
  • OxalisState (599-635)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: circleci_build
🔇 Additional comments (23)
frontend/javascripts/oxalis/view/action-bar/starting_job_modals.tsx (5)

504-505: Looks good: Updated state selector for annotation.

The state selector has been properly updated from state.tracing to state.annotation and the property access has been updated accordingly.


525-537: Looks good: Updated annotation property references.

The conditional checks have been updated to use annotation.annotationId and annotation.skeleton instead of the previous tracing references.


718-718: Looks good: Updated state selector in StartJobForm.

The selector properly retrieves state.annotation instead of state.tracing.


927-929: Looks good: Updated skeleton check in NeuronSegmentationForm.

The check for skeleton annotation now correctly uses state.annotation.skeleton.


1043-1043: Looks good: Updated annotationId selector.

The annotationId selector now properly uses state.annotation.annotationId.

frontend/javascripts/oxalis/model/reducers/annotation_reducer.ts (18)

16-19: Correctly renamed function to match new state structure

The function updateTracing has been properly renamed to updateAnnotation to align with the broader renaming effort. The parameter type has also been updated to use OxalisState["annotation"] instead of OxalisState["tracing"].


28-31: Properly updated state property reference

The reference to state.tracing.volumes has been correctly updated to state.annotation.volumes while preserving the function's behavior.


32-36: Consistent state reference update

The conditional check for skeleton state has been properly updated to reference state.annotation.skeleton.


42-46: Consistent state reference update for readOnly property

The reference to state.tracing.readOnly has been correctly updated to state.annotation.readOnly.


48-52: Updated state object structure in update call

The object structure in the update call has been properly modified to use annotation instead of tracing.


91-93: Consistent function call update for SET_ANNOTATION_NAME

The function call has been properly updated from updateTracing to updateAnnotation.


98-100: Consistent function call update for SET_ANNOTATION_VISIBILITY

The function call has been properly updated from updateTracing to updateAnnotation.


104-110: Properly updated state property for annotation layers

The reference to state.tracing.annotationLayers has been correctly updated to state.annotation.annotationLayers.


111-113: Consistent function call update for EDIT_ANNOTATION_LAYER

The function call has been properly updated from updateTracing to updateAnnotation.


118-120: Consistent function call update for SET_ANNOTATION_DESCRIPTION

The function call has been properly updated from updateTracing to updateAnnotation.


125-127: Properly updated nested state property path for updateKey2

The path for the updateKey2 function has been correctly updated to use "annotation" instead of "tracing".


132-134: Consistent state property update for SET_BLOCKED_BY_USER

The state property path has been properly updated to use "annotation" instead of "tracing".


142-142: Updated accessor function parameter

The call to maybeGetSomeTracing has been correctly updated to use state.annotation instead of state.tracing.


165-165: Consistent state property reference in ADD_NEW_USER_BOUNDING_BOX

The call to maybeGetSomeTracing has been correctly updated to use state.annotation instead of state.tracing.


221-221: Consistent state property reference in ADD_USER_BOUNDING_BOXES

The call to maybeGetSomeTracing has been correctly updated to use state.annotation instead of state.tracing.


244-244: Consistent state property reference in DELETE_USER_BOUNDING_BOX

The call to maybeGetSomeTracing has been correctly updated to use state.annotation instead of state.tracing.


470-472: Properly updated state property in SET_OTHERS_MAY_EDIT_FOR_ANNOTATION

The state property path has been correctly updated to use "annotation" instead of "tracing".


1-5:

✅ Verification successful

Consider updating import name for consistency

Line 5 imports a function named maybeGetSomeTracing from "tracing_accessor". While this function is used correctly with the updated state property, the function name and file path still use the old "tracing" terminology.

This might be intentional if the accessor itself hasn't been renamed yet, but it's worth checking if this import should also be updated for consistency.


🏁 Script executed:

#!/bin/bash
# Verify if the tracing_accessor file or its imports have been renamed in this PR
rg -g "*.ts" -g "*.tsx" "maybeGetSomeTracing|tracing_accessor" --type-add "web:*.{ts,tsx}"

Length of output: 16102


Accessor Import Naming Verified

After reviewing the codebase, the references to the tracing accessor—including maybeGetSomeTracing imported from "oxalis/model/accessors/tracing_accessor"—are consistent with existing usage elsewhere. The accessor file and its naming remain unchanged across the repository, suggesting that the old terminology is intentionally maintained until a broader refactor is performed. No update is needed here for consistency.

Copy link
Member

@hotzenklotz hotzenklotz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such much renaming. Nice! Green CI ✅ is good to see :-)

Now onwards to the merge hell for everyone 👿 😆

@philippotto philippotto enabled auto-merge (squash) April 2, 2025 12:50
@philippotto
Copy link
Member Author

Now onwards to the merge hell for everyone 👿 😆

yeah, sorry about that! the band-aid had to come off at some point (it's overdue for several years now, I think 🙈).

@philippotto philippotto merged commit e72cf9e into master Apr 2, 2025
3 checks passed
@philippotto philippotto deleted the rename-tracing branch April 2, 2025 13:03
@hotzenklotz hotzenklotz mentioned this pull request Apr 14, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants