Skip to content

Conversation

@hotzenklotz
Copy link
Member

@hotzenklotz hotzenklotz commented Dec 2, 2025

This PR update Antd from version 5 to v6. For the most part everything just works. I followed the official migration guide and fixed all deprecation warnings that I encountered.

High level overview:

  • Updated antd to version 6.1.0
  • Updated @ant-design/icons and @ant-design/colors to match
  • Updated deprecated and renamed prop names for components, e.g. <Alert message={...}> --> <Alert title={...}>
  • Updated the DOM structure of several component to use antd's <Space> or <Flex> for more uniform layouting instead of our wild mix of margin, paddings, custom stuff...

Dev Instance

https://antdv6.webknossos.xyz/

Steps to test:

  • I clicked through all the views, modals etc and looked for visual regressions.
  • I did deep testing with Chrome on Mac. Lighter testing with Safari and FireFox

TODOs:

  • Fix navbar dropdown menu
  • Fix Dashboard > Dataset Table can be scrolled out of frame/parent container

Follow Ups

Issues:


(Please delete unneeded items, merge only when none are left open)

  • Added changelog entry (create a $PR_NUMBER.md file in unreleased_changes or use ./tools/create-changelog-entry.py)
  • Added migration guide entry if applicable (edit the same file as for the changelog)
  • Updated documentation if applicable
  • Adapted wk-libs python client if relevant API parts change
  • Removed dev-only changes like prints and application.conf edits
  • Considered common edge cases
  • Needs datastore update after deployment

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 2, 2025

📝 Walkthrough

Walkthrough

Bulk migration to Ant Design v6: widespread prop and type updates (e.g., borderedvariant, directionorientation, messagetitle), Select search API consolidation, Dropdown/Popover styling API changes, ref/handler typing updates, and numerous layout adjustments using Space/Flex and Tag variants. (≤50 words)

Changes

Cohort / File(s) Summary
Dependencies
package.json
Bumped antd^6.1.0, @ant-design/icons^6.1.0, @ant-design/colors^7.2.1.
Card / Space / Alert renames
frontend/javascripts/.../dataset_components.tsx, .../onboarding.tsx, .../dataset_folder_view.tsx, .../publication_card.tsx, many frontend/javascripts/**/admin/*, frontend/javascripts/**/dashboard/*, frontend/javascripts/**/viewer/*, frontend/javascripts/banners.tsx, frontend/javascripts/components/error_boundary.tsx
Replaced Card bordered={false}variant="borderless", Space direction="vertical"orientation="vertical", and many Alert/notification/toast messagetitle (some closable booleans → closable objects).
Dropdown/Popover styling API
frontend/javascripts/**/context_menu.tsx, .../dataset_table.tsx, .../helpers/settings_card.tsx, .../advanced_search_popover.tsx, .../sidebar_context_menu.tsx
Replaced overlayClassNameclassNames={{ root: ... }}, destroyPopupOnHidedestroyOnHidden, overlayInnerStylestyles={{ container: ... }}.
Select search config
frontend/javascripts/**/dataset_components.tsx, .../project_create_view.tsx, .../script_create_view.tsx, .../task/**, .../project_and_annotation_type_dropdown.tsx, .../user_selection_component.tsx, .../task_type_create_view.tsx
Consolidated Select search props: boolean showSearch + optionFilterProp/filterOption → object showSearch={{ optionFilterProp: "label", ... }} (moved custom filter logic where present).
Ref / typing updates
frontend/javascripts/**/scrollable_virtualized_tree.tsx, .../segments_view.tsx, .../upgrade_plan_modal.tsx, .../dataset_settings_context.tsx, .../dataset_settings_provider.tsx, .../context_menu.tsx, .../segments_view_helper.tsx
Updated types/handler signatures: RcTreeGetRef<typeof Tree>, InputNumber refs use GetRef, Menu handler types from MenuClickEventHandlerMenuProps["onClick"], and onValuesChange now accepts Partial<...> (provider variant changed to () => void).
Dropdown.Button → composite controls
frontend/javascripts/**/admin/account/account_profile_view.tsx, .../dashboard/dataset_view.tsx, .../viewer/view/action-bar/tools/volume_specific_ui.tsx, .../task_list_view.tsx
Replaced Dropdown.Button with Space.Compact combining a primary Button and a separate Dropdown to match v6 patterns.
ButtonComponent forwardRef
frontend/javascripts/viewer/view/components/button_component.tsx
Converted ButtonComponent to React.forwardRef, forwarding refs to underlying Button/anchor and replaced _.noop with noop import.
Layout refactors (Flex / Space)
many frontend/javascripts/**/project_list_view.tsx, .../script_list_view.tsx, .../time_tracking_overview.tsx, .../project_progress_report_view.tsx, .../team/*.tsx, .../user/*.tsx, and other admin/dashboard/viewer files
Replaced ad-hoc div/pull-right blocks with Antd Flex/Space, reorganized headers and action layouts for consistent spacing.
Tag styling
frontend/javascripts/**/task_type_list_view.tsx, .../team_list_view.tsx, .../dashboard/folders/*.tsx, .../categorization_label.tsx, .../dataset_info_tab_view.tsx
Added variant="outlined" to many Tag usages.
Toast / Notification / small API tweaks
frontend/javascripts/libs/toast.tsx, .../ai_model_list_view.tsx, .../private_links_view.tsx, .../dataset_rotation_popover_view.tsx, .../novel_user_experiences/welcome_toast.tsx, various action-bar files
Mapped toast fields (messagetitle, btnactions), removed one Modal onClose, added DatePicker array guard, changed iconPositioniconPlacement, notifications using title, and minor event typing adjustments.
Stylesheets
frontend/stylesheets/antd_overwrites.less, frontend/stylesheets/_dashboard.less, frontend/stylesheets/trace_view/_tracing_view.less
Removed obsolete table overflow/checkbox rules, added/adjusted welcome header rules, normalized selector whitespace and minor fixes.
Misc presentational & small guards
many files under frontend/javascripts/admin, frontend/javascripts/dashboard, frontend/javascripts/viewer
Various presentational and small-typing updates (Space wrappers, Select/Popover prop changes, small guards) consistent with Antd v6 migration.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

  • Files/areas needing extra attention:
    • frontend/javascripts/viewer/view/components/button_component.tsx — verify forwarded refs work with Dropdown overlays and anchors.
    • Tree/GetRef and InputNumber ref-type changes — confirm runtime access to expected methods/properties.
    • Select showSearch object and moved filterOption logic — verify equivalent search/filter behavior.
    • Menu handler type changes & newly guarded calls — ensure event shapes and optional handlers behave correctly.
    • Alert/notification/toast prop renames and closable-object shapes — validate runtime rendering and close callbacks.

Possibly related PRs

Suggested reviewers

  • philippotto
  • knollengewaechs

Poem

🐰 I hopped through props and typed each ref,
Cards lost their borders, Alerts found a head,
Space stacks turned vertical, Tags outlined bright,
Selects chase labels, dropdowns split in two,
I forwarded a Button’s ref — v6 feels light!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 1.87% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'WIP Upgrade to Antd v6' accurately summarizes the primary change: upgrading Ant Design from v5 to v6, as evidenced by the file summaries showing version bumps and comprehensive API updates.
Description check ✅ Passed The description is clearly related to the changeset, providing a high-level overview of the Ant Design v5-to-v6 migration, specific API changes, testing performed, and links to official migration resources.
Linked Issues check ✅ Passed The PR fully addresses the linked issue #9115 by upgrading antd to v6.1.0, updating related packages, and following the official migration guide. Package.json changes reflect the dependency versions specified in the issue objectives.
Out of Scope Changes check ✅ Passed All code changes are directly related to the Ant Design v5→v6 migration: deprecated prop renames (message→title), component API updates (bordered→variant), layout refactoring (Space/Flex), and import adjustments. No unrelated changes detected.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch antd-v6

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 62c7279 and 15eec4a.

📒 Files selected for processing (4)
  • frontend/javascripts/dashboard/dataset/dataset_settings_view.tsx (2 hunks)
  • frontend/javascripts/dashboard/folders/details_sidebar.tsx (4 hunks)
  • frontend/javascripts/libs/toast.tsx (1 hunks)
  • frontend/javascripts/viewer/view/action-bar/tools/volume_specific_ui.tsx (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • frontend/javascripts/dashboard/folders/details_sidebar.tsx
  • frontend/javascripts/viewer/view/action-bar/tools/volume_specific_ui.tsx
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T14:12:26.493Z
Learning: For Ant Design v6 component API documentation and migration guidance, use https://ant.design/llms-full.txt as the authoritative source. This llms-full.txt file contains the official v6 component APIs, including deprecated props and their replacements.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/admin/voxelytics/task_list_view.tsx:691-700
Timestamp: 2025-12-08T09:02:43.473Z
Learning: In Ant Design v6, Select (and similar components like AutoComplete, Cascader, TreeSelect) use a nested semantic DOM structure for styles and classNames. The correct pattern is `styles={{ popup: { root: { ... } } }}` or `classNames={{ popup: { root: "..." } }}`, NOT a flat structure. This is the official v6 API for targeting semantic parts of these components.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T13:41:44.919Z
Learning: In Ant Design v6, the Alert component's `message` prop has been deprecated and replaced by `title`. When migrating from v5 to v6, Alert components should use `title` for the main content (and optionally `description` for additional details).
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/dashboard/advanced_dataset/dataset_table.tsx:131-134
Timestamp: 2025-12-11T15:54:47.778Z
Learning: In Ant Design v6, the Dropdown component uses a flat classNames structure: `classNames={{ root: "..." }}`. This is different from Select, AutoComplete, Cascader, and TreeSelect components which use a nested structure: `classNames={{ popup: { root: "..." } }}`. The deprecated `overlayClassName` prop should be replaced with `classNames.root` for Dropdown.
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/admin/task/task_search_form.tsx:151-151
Timestamp: 2025-12-11T15:33:06.880Z
Learning: In Ant Design v6, the Select component's `optionFilterProp` prop is deprecated as a standalone prop. Instead, it should be passed as part of the `showSearch` object: `showSearch={{ optionFilterProp: "label" }}`. The `showSearch` prop accepts either a boolean or an object containing properties like `optionFilterProp`, `filterOption`, `autoClearSearchValue`, etc.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 8849
File: frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/collapsible_split_merger_evaluation_settings.tsx:39-51
Timestamp: 2025-08-14T14:12:03.293Z
Learning: Since Ant Design version 5.18, Form.Item components support the layout prop (layout="horizontal", layout="vertical", layout="inline"), allowing individual form items to override the parent Form's layout setting. This enables mixed layouts within a single form and was added as a new API feature in v5.18 according to the official changelog.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 8849
File: frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/collapsible_split_merger_evaluation_settings.tsx:39-51
Timestamp: 2025-08-14T14:12:03.293Z
Learning: Since Ant Design version 5.18, Form.Item components support the layout prop (layout="horizontal", layout="vertical", etc.), allowing individual form items to override the parent Form's layout setting. This is a newer API addition that provides more granular control over form item layouts.
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/admin/statistic/time_tracking_overview.tsx:261-279
Timestamp: 2025-12-11T15:25:53.526Z
Learning: Ant Design v6 Select component supports the `prefix` prop for displaying an icon or element before the selector input.
📚 Learning: 2025-12-04T13:41:44.919Z
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T13:41:44.919Z
Learning: In Ant Design v6, the Alert component's `message` prop has been deprecated and replaced by `title`. When migrating from v5 to v6, Alert components should use `title` for the main content (and optionally `description` for additional details).

Applied to files:

  • frontend/javascripts/libs/toast.tsx
  • frontend/javascripts/dashboard/dataset/dataset_settings_view.tsx
📚 Learning: 2025-12-04T14:12:26.493Z
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T14:12:26.493Z
Learning: For Ant Design v6 component API documentation and migration guidance, use https://ant.design/llms-full.txt as the authoritative source. This llms-full.txt file contains the official v6 component APIs, including deprecated props and their replacements.

Applied to files:

  • frontend/javascripts/libs/toast.tsx
📚 Learning: 2025-12-11T15:25:53.526Z
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/admin/statistic/time_tracking_overview.tsx:261-279
Timestamp: 2025-12-11T15:25:53.526Z
Learning: Ant Design v6 Select: when using the Select component, consider supplying a prefix prop to render an icon or element before the input for better visual context. Apply this guideline to TS and TSX files across the codebase where Ant Design Select is used; ensure prefix usage is accessible (e.g., provide meaningful aria-label if needed) and avoid unnecessary prefixes on simple inputs.

Applied to files:

  • frontend/javascripts/libs/toast.tsx
  • frontend/javascripts/dashboard/dataset/dataset_settings_view.tsx
📚 Learning: 2025-12-11T15:33:06.880Z
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/admin/task/task_search_form.tsx:151-151
Timestamp: 2025-12-11T15:33:06.880Z
Learning: In Ant Design v6, do not use optionFilterProp as a standalone prop on Select. Instead, pass it inside showSearch as optionFilterProp, e.g. showSearch={{ optionFilterProp: 'label' }}. showSearch accepts boolean or an object with keys like optionFilterProp, filterOption, autoClearSearchValue. Update all Select components that use optionFilterProp to adopt the new pattern and adjust types accordingly to maintain compatibility and avoid deprecation warnings.

Applied to files:

  • frontend/javascripts/libs/toast.tsx
  • frontend/javascripts/dashboard/dataset/dataset_settings_view.tsx
📚 Learning: 2025-12-11T15:54:47.778Z
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/dashboard/advanced_dataset/dataset_table.tsx:131-134
Timestamp: 2025-12-11T15:54:47.778Z
Learning: In Ant Design v6, Dropdown uses a flat classNames structure: classNames={{ root: '…' }}. Other components (Select, AutoComplete, Cascader, TreeSelect) use a nested structure. The deprecated overlayClassName prop for Dropdown should be replaced with classNames.root. In reviews, flag Dropdown usage that relies on overlayClassName and replace it with classNames={{ root: '…' }}. If you encounter related components, verify the correct classNames shape (flat for Dropdown, nested for others) and update accordingly. This guideline covers TSX files under the frontend codebase where Ant Design components are used.

Applied to files:

  • frontend/javascripts/libs/toast.tsx
  • frontend/javascripts/dashboard/dataset/dataset_settings_view.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build-smoketest-push
  • GitHub Check: backend-tests
  • GitHub Check: frontend-tests
🔇 Additional comments (2)
frontend/javascripts/dashboard/dataset/dataset_settings_view.tsx (1)

65-99: Alert migration to v6 completed correctly.

All three Alert components correctly use title instead of the deprecated message prop, aligning with the Ant Design v6 migration pattern.

Based on learnings, Alert components in Antd v6 use title for the main content.

frontend/javascripts/libs/toast.tsx (1)

151-155: LGTM! Notification API properties correctly updated for Ant Design v6.

The property name changes are correct for the Ant Design v6 notification API:

  • title replaces message for the notification heading
  • actions replaces btn for custom action buttons

This migration pattern is consistent with the Alert component changes throughout the codebase.

Based on learnings, Ant Design v6 Alert and notification components use title instead of message for the main content.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hotzenklotz hotzenklotz self-assigned this Dec 2, 2025
@hotzenklotz hotzenklotz marked this pull request as draft December 2, 2025 13:25
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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
frontend/javascripts/viewer/view/right-border-tabs/trees_tab/skeleton_tab_view.tsx (1)

838-844: Revert notification API change: use message instead of title.

Ant Design v6's notification API uses the message prop (type: string | ReactNode), not title. The current code change is incorrect and will break the notification display. Update the notification.open() call to use message as the prop name.

frontend/javascripts/viewer/view/action-bar/ai_job_modals/tabs/run_ai_model_tab.tsx (1)

71-82: Inconsistent Card API usage detected.

This Card component still uses bordered={false} (line 71), while the other two Card components at lines 91 and 112 have been migrated to variant="borderless". All Cards should be updated consistently for the Ant Design v6 migration.

Apply this diff to complete the migration:

-            <Radio.Button
-              className="aIJobSelection"
-              checked={aIJobModalState === APIJobType.INFER_NEURONS}
-              onClick={() => dispatch(setAIJobModalStateAction(APIJobType.INFER_NEURONS))}
-            >
-              <Card bordered={false}>
+            <Radio.Button
+              className="aIJobSelection"
+              checked={aIJobModalState === APIJobType.INFER_NEURONS}
+              onClick={() => dispatch(setAIJobModalStateAction(APIJobType.INFER_NEURONS))}
+            >
+              <Card variant="borderless">
                 <Space direction="vertical" size="small">
🧹 Nitpick comments (2)
frontend/javascripts/viewer/view/action-bar/tools/volume_specific_ui.tsx (1)

206-209: Add explicit type annotation for the onClick handler.

The onClick handler parameter lacks explicit typing, which reduces TypeScript's ability to validate property access. Since the file has strict: true and noImplicitAny: true enabled, add explicit typing using MenuProps["onClick"]:

-    onClick: (e) => {
+    onClick: ((e) => {
       dispatch(updateUserSettingAction("interpolationMode", e.key as InterpolationMode));
       onInterpolateClick(null);
-    },
+    }) satisfies MenuProps["onClick"],

This preserves type safety and allows TypeScript to verify the handler's parameter shape matches Ant Design v6's expected MenuProps contract.

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

2-2: Refresh/scan split is clearer; consider also disabling Refresh while loading

The new DatasetRefreshButton with a primary Refresh action and a separate Dropdown trigger (using DownOutlined) is a nice clarity improvement, and importing MenuProps from Antd aligns the filter menu typing with the component API.

One small UX tweak to consider: the Refresh button is disabled only when context.isChecking, but not when context.isLoading. That means users can trigger multiple concurrent fetchDatasets() calls while a normal refresh is still in progress. You may want:

-        <Button onClick={() => context.fetchDatasets()} disabled={context.isChecking}>
+        <Button
+          onClick={() => context.fetchDatasets()}
+          disabled={context.isChecking || context.isLoading}
+        >

to avoid redundant refreshes.

Also applies to: 22-22, 314-336

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fe82248 and 96c5a5f.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (33)
  • frontend/javascripts/admin/dataset/dataset_components.tsx (1 hunks)
  • frontend/javascripts/admin/dataset/dataset_upload_view.tsx (1 hunks)
  • frontend/javascripts/admin/onboarding.tsx (2 hunks)
  • frontend/javascripts/admin/organization/upgrade_plan_modal.tsx (4 hunks)
  • frontend/javascripts/admin/voxelytics/ai_model_list_view.tsx (0 hunks)
  • frontend/javascripts/admin/voxelytics/task_list_view.tsx (1 hunks)
  • frontend/javascripts/dashboard/advanced_dataset/dataset_table.tsx (1 hunks)
  • frontend/javascripts/dashboard/dashboard_task_list_view.tsx (1 hunks)
  • frontend/javascripts/dashboard/dataset/dataset_settings_context.tsx (1 hunks)
  • frontend/javascripts/dashboard/dataset/dataset_settings_provider.tsx (1 hunks)
  • frontend/javascripts/dashboard/dataset/helper_components.tsx (1 hunks)
  • frontend/javascripts/dashboard/dataset_folder_view.tsx (1 hunks)
  • frontend/javascripts/dashboard/dataset_view.tsx (3 hunks)
  • frontend/javascripts/dashboard/explorative_annotations_view.tsx (1 hunks)
  • frontend/javascripts/dashboard/folders/folder_selection.tsx (1 hunks)
  • frontend/javascripts/dashboard/publication_card.tsx (1 hunks)
  • frontend/javascripts/libs/toast.tsx (1 hunks)
  • frontend/javascripts/navbar.tsx (2 hunks)
  • frontend/javascripts/viewer/view/action-bar/ai_job_modals/tabs/alignment_tab.tsx (1 hunks)
  • frontend/javascripts/viewer/view/action-bar/ai_job_modals/tabs/run_ai_model_tab.tsx (2 hunks)
  • frontend/javascripts/viewer/view/action-bar/tools/volume_specific_ui.tsx (1 hunks)
  • frontend/javascripts/viewer/view/context_menu.tsx (5 hunks)
  • frontend/javascripts/viewer/view/help_modal.tsx (1 hunks)
  • frontend/javascripts/viewer/view/novel_user_experiences/welcome_toast.tsx (1 hunks)
  • frontend/javascripts/viewer/view/right-border-tabs/advanced_search_popover.tsx (1 hunks)
  • frontend/javascripts/viewer/view/right-border-tabs/comment_tab/comment_tab_view.tsx (2 hunks)
  • frontend/javascripts/viewer/view/right-border-tabs/scrollable_virtualized_tree.tsx (3 hunks)
  • frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx (2 hunks)
  • frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view_helper.tsx (4 hunks)
  • frontend/javascripts/viewer/view/right-border-tabs/sidebar_context_menu.tsx (1 hunks)
  • frontend/javascripts/viewer/view/right-border-tabs/trees_tab/skeleton_tab_view.tsx (1 hunks)
  • frontend/javascripts/viewer/view/right-border-tabs/trees_tab/tree_hierarchy_renderers.tsx (1 hunks)
  • package.json (2 hunks)
💤 Files with no reviewable changes (1)
  • frontend/javascripts/admin/voxelytics/ai_model_list_view.tsx
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-08-14T14:12:03.293Z
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 8849
File: frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/collapsible_split_merger_evaluation_settings.tsx:39-51
Timestamp: 2025-08-14T14:12:03.293Z
Learning: Since Ant Design version 5.18, Form.Item components support the layout prop (layout="horizontal", layout="vertical", etc.), allowing individual form items to override the parent Form's layout setting. This is a newer API addition that provides more granular control over form item layouts.

Applied to files:

  • frontend/javascripts/dashboard/dataset/helper_components.tsx
📚 Learning: 2025-11-03T17:50:57.587Z
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 9025
File: frontend/javascripts/dashboard/advanced_dataset/dataset_table.tsx:10-10
Timestamp: 2025-11-03T17:50:57.587Z
Learning: In the webknossos codebase, both `import { Component } from "antd";` and `import { Component } from "antd/lib";` are valid import paths for antd components. Do not flag imports from "antd/lib" as errors.

Applied to files:

  • frontend/javascripts/viewer/view/right-border-tabs/comment_tab/comment_tab_view.tsx
📚 Learning: 2025-09-08T13:33:47.097Z
Learnt from: MichaelBuessemeyer
Repo: scalableminds/webknossos PR: 8824
File: frontend/javascripts/viewer/view/context_menu.tsx:1033-1039
Timestamp: 2025-09-08T13:33:47.097Z
Learning: In frontend/javascripts/viewer/view/context_menu.tsx, the segmentIdLabel intentionally shows the unmapped segment ID (maybeUnmappedSegmentId) in the "within Segment ${id}" text when proofreading is active, as this can be helpful for users. The mapped segment ID (segmentIdAtPosition) is only used as a fallback when the unmapped ID is not available.

Applied to files:

  • frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view_helper.tsx
  • frontend/javascripts/viewer/view/context_menu.tsx
🧬 Code graph analysis (4)
frontend/javascripts/viewer/view/right-border-tabs/trees_tab/skeleton_tab_view.tsx (1)
frontend/javascripts/libs/format_utils.ts (1)
  • formatNumberToLength (219-233)
frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx (1)
frontend/javascripts/viewer/model/types/tree_types.ts (1)
  • Tree (61-75)
frontend/javascripts/dashboard/dataset/dataset_settings_provider.tsx (1)
frontend/javascripts/dashboard/dataset/dataset_settings_context.tsx (1)
  • DatasetSettingsFormData (9-15)
frontend/javascripts/viewer/view/context_menu.tsx (1)
frontend/javascripts/libs/format_utils.ts (1)
  • formatNumberToLength (219-233)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-smoketest-push
  • GitHub Check: backend-tests
🔇 Additional comments (30)
frontend/javascripts/dashboard/dataset_folder_view.tsx (1)

121-121: Card API migration looks correct.

The change from bordered={false} to variant="borderless" is consistent with the Ant Design v6 Card API update applied throughout the codebase.

frontend/javascripts/viewer/view/action-bar/ai_job_modals/tabs/alignment_tab.tsx (1)

15-15: Card API migration looks correct.

The change from bordered={false} to variant="borderless" is consistent with the Ant Design v6 Card API update applied throughout the codebase.

frontend/javascripts/dashboard/dataset/helper_components.tsx (1)

2-2: Import path update for form types.

The import source has been updated from rc-field-form/es/interface to @rc-component/form/es/interface, reflecting Ant Design v6's package reorganization. The @rc-component/form package is correctly listed in yarn.lock and the import path is valid.

frontend/javascripts/viewer/view/right-border-tabs/sidebar_context_menu.tsx (1)

28-31: Dropdown API migrations to v6 are correct.

Both API changes are accurately applied:

  1. classNames={{ root: ... }} correctly replaces the older dropdownClassName/popupClassName pattern for styling the popup overlay
  2. destroyOnHidden correctly replaces the deprecated destroyPopupOnHide for controlling popup lifecycle

Code looks good.

frontend/javascripts/admin/dataset/dataset_components.tsx (1)

31-31: Card API migration is incorrect and needs revision.

The variant prop does not apply to Card components in Ant Design v6. The Card component still uses the bordered boolean prop. The change from bordered={false} to variant="borderless" will not work as intended; the variant prop is only supported on form input components (Input, Select, DatePicker, etc.). Revert to bordered={false} to properly remove the card border.

Likely an incorrect or invalid review comment.

frontend/javascripts/viewer/view/right-border-tabs/advanced_search_popover.tsx (1)

146-146: Popover API migration to v6 is correct.

The change from overlayClassName to classNames={{ root: "search-input-popover" }} properly follows Ant Design v6's semantic classNames API, where root is a valid semantic key for targeting the popover root element.

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

216-216: LGTM! Card API migration to Ant Design v6.

The Card prop change from bordered={false} to variant="borderless" correctly follows the Ant Design v6 migration pattern.

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

373-373: LGTM! Consistent Card API migration.

The Card prop change aligns with Ant Design v6's variant="borderless" API.

frontend/javascripts/viewer/view/action-bar/ai_job_modals/tabs/run_ai_model_tab.tsx (1)

91-102: LGTM! Card API migration completed for these components.

These Card components correctly use variant="borderless" for Ant Design v6.

Also applies to: 112-123

frontend/javascripts/admin/voxelytics/task_list_view.tsx (1)

345-354: LGTM! Notification API migrated to Ant Design v6.

The notification calls correctly use title and description fields instead of the deprecated message field, aligning with Ant Design v6's notification API.

frontend/javascripts/viewer/view/right-border-tabs/trees_tab/tree_hierarchy_renderers.tsx (1)

537-544: LGTM! Notification API updated correctly.

The notification field change from message to title is consistent with Ant Design v6's API.

frontend/javascripts/viewer/view/novel_user_experiences/welcome_toast.tsx (1)

21-21: LGTM! Notification API migrated.

The field change from message to title aligns with Ant Design v6's notification API.

frontend/javascripts/dashboard/folders/folder_selection.tsx (1)

58-58: The TreeSelect styles structure is correct as written.

The nested structure styles={{ popup: { root: { maxHeight: 500, overflow: "auto" } } }} is the correct pattern for Ant Design v6's TreeSelect component. The root nesting level is required—this is the documented migration path from the deprecated dropdownStyle prop to the new semantic styles API in v6.

package.json (1)

127-127: Confirm Ant Design v6.0.0 compatibility with breaking changes.

Ant Design 6.0.0 is a stable release with significant breaking changes: React 18 is now required (React <18 no longer supported), CSS Variables are the default styling mode (IE support removed), component DOM/classNames have been refactored with semantic naming changes, and all v4-deprecated compatibility code has been removed. Ensure your application and its dependencies meet these requirements and that the necessary updates have been applied throughout the codebase.

Applies to @ant-design/icons ^6.0.0 (line 127) and antd ^6.0.0 (line 139).

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

483-513: Borderless Card migration is fine

Switching the empty‑state Card to variant="borderless" matches the Antd v6 Card API and preserves the previous borderless look together with the transparent background.

frontend/javascripts/admin/onboarding.tsx (1)

150-165: Steps items and borderless Card migration look good

  • OptionCard’s Card using variant="borderless" together with the existing styles.body keeps the previous “floating card” look under the new API.
  • The Steps items={availableSteps.map(({ title }) => ({ title, key: title }))} mirrors your availableSteps array and preserves the existing currentStep indexing logic, so step highlighting should behave exactly as before.

If you want to sanity‑check the Steps rendering, it’s enough to click through the onboarding flow locally and confirm the highlighted step matches currentStep at each transition.

Also applies to: 671-688

frontend/javascripts/navbar.tsx (1)

39-40: Using MenuProps["onClick"] for the help menu callback is reasonable

Typing openHelpModal as MenuProps["onClick"] keeps getHelpSubMenu in sync with Antd’s menu click signature while you still pass a simple () => setIsHelpModalOpen(true) from the caller. That’s safe at runtime (extra args from Antd are ignored) and keeps types coupled to the actual library API instead of a home‑grown alias.

If you ever need click metadata here (e.g., which item was used to open the modal), you can start consuming the info argument in the openHelpModal implementation without touching this helper.

If TS ever tightens the callback variance, you can switch to an explicit parameter to be future‑proof:

const openHelpModal: MenuProps["onClick"] = (_info) => setIsHelpModalOpen(true);

Also applies to: 310-325, 879-887

frontend/javascripts/admin/dataset/dataset_upload_view.tsx (1)

693-701: Form onValuesChange typing update is correct

Adapting onFormValueChange to (changedValues: Partial<UploadFormFieldTypes>, _allValues: UploadFormFieldTypes) matches Antd’s onValuesChange contract and keeps the previous behavior of reacting only to datastoreUrl changes.

frontend/javascripts/dashboard/advanced_dataset/dataset_table.tsx (1)

130-138: Dropdown context menu props correctly migrated

The context menu’s Dropdown now uses the v6 props:

  • classNames={{ root: "dropdown-overlay-container-for-context-menu" }} instead of overlayClassName.
  • destroyOnHidden instead of destroyPopupOnHide.

Combined with the existing open={contextMenuPosition != null} and getPopupContainer={() => refContent}, this preserves the old behavior and styling while matching the new Dropdown API.

If you notice any styling regressions around the context menu, inspect the rendered DOM to confirm the dropdown-overlay-container-for-context-menu class is attached to the correct overlay root element.

frontend/javascripts/viewer/view/right-border-tabs/comment_tab/comment_tab_view.tsx (1)

10-18: Typed Tree ref and Dropdown menu config are correct

  • Using GetRef<typeof AntdTree> for treeRef is the proper pattern for accessing Tree methods like scrollTo and keeps the ref properly aligned with antd's Tree typings.
  • The getSortDropdown() function correctly returns MenuProps with selectedKeys, onClick, and items, and passing it via menu={getSortDropdown()} to the Dropdown component matches the antd v6 API correctly.

TypeScript will catch any signature drift from antd in future versions at compile time rather than runtime.

frontend/javascripts/admin/organization/upgrade_plan_modal.tsx (1)

20-20: Ref typing is correct; .value access confirmed

The GetRef<typeof InputNumber> typing is working as expected across all three InputNumber refs (userInputRef at lines 81 and 319, storageInputRef at line 125). Each safely accesses .value after null-checking current, and there are no type mismatches.

No changes needed.

frontend/javascripts/libs/toast.tsx (1)

145-152: Notification option rename is correct and already consistent across the codebase

Using title: toastMessage in toastConfig aligns with Antd v6 notification API (which changed from message to title as the primary content property). All existing notification calls throughout the codebase already use title:, so no further updates are needed.

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

200-205: Typed hideContextMenu correctly against Antd menu onClick

Using Parameters<NonNullable<MenuProps["onClick"]>>[0] for the info parameter and guarding on info?.key === "load-stats" keeps this helper aligned with Antd’s menu click type while still allowing zero‑arg calls elsewhere. No issues spotted.


247-253: Notification title changes look consistent

Both measurement helpers now use notification.open({ title: ..., icon: ... }), and the formatted strings still include both physical and voxel units. This keeps the UI text consistent and doesn’t change behavior beyond the Antd API rename.

Also applies to: 270-278


2001-2007: Dropdown migration to classNames + destroyOnHidden looks coherent

Using classNames={{ root: "dropdown-overlay-container-for-context-menu" }} and destroyOnHidden matches the new Dropdown API and maintains the previous overlay styling and lifecycle semantics for the context menu.

frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view_helper.tsx (1)

2-2: Aligning mapping confirmation helper with MenuProps["onClick"] is sound

Typing originalOnClick and confirmMappingActivation as MenuProps["onClick"] removes the rc‑menu dependency and matches how this helper is used from menu items. The null check before invoking originalOnClick(menuClickEvent) prevents crashes when no handler is supplied. This looks correct.

Also applies to: 74-90, 102-139

frontend/javascripts/viewer/view/right-border-tabs/scrollable_virtualized_tree.tsx (1)

1-2: Ref type migration to GetRef<typeof AntdTree> is consistent

Switching the forwarded ref to React.Ref<GetRef<typeof AntdTree>> keeps the wrapper’s typing aligned with Antd’s Tree instance while preserving the generic TreeProps<T> API. Runtime behavior (passing the ref to <AntdTree ref={ref} />) is unchanged.

Also applies to: 13-16, 65-69

frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx (1)

30-37: Tree ref now correctly typed against Antd’s Tree component

Importing type GetRef/type Tree from Antd and updating tree to React.RefObject<GetRef<typeof Tree>> keeps the ref type consistent with ScrollableVirtualizedTree’s forwarded ref and with Antd v6’s Tree API. Calls like this.tree.current.scrollTo({ key: ... }) stay type‑safe.

Also applies to: 423-428

frontend/javascripts/dashboard/dataset/dataset_settings_provider.tsx (1)

320-325: Narrowing changedValues to Partial<DatasetSettingsFormData> is appropriate

Typing _changedValues as Partial<DatasetSettingsFormData> matches how Antd’s Form actually reports diffs and aligns with the updated context definition. Since the handler only toggles hasUnsavedChanges, this is a safe, type‑only improvement.

frontend/javascripts/dashboard/dataset/dataset_settings_context.tsx (1)

27-29: Context onValuesChange signature now matches Form/Provider usage

Updating onValuesChange to accept changedValues: Partial<DatasetSettingsFormData> keeps the context contract consistent with Antd Form’s change shape and with the provider implementation. Looks good.

Comment on lines 214 to 218
{
key: "view",
disabled: true,
label: "No actions available.",
title: "No actions available.",
},
Copy link
Contributor

@coderabbitai coderabbitai bot Dec 2, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

wc -l frontend/javascripts/viewer/view/context_menu.tsx

Repository: scalableminds/webknossos

Length of output: 122


🏁 Script executed:

sed -n '200,230p' frontend/javascripts/viewer/view/context_menu.tsx

Repository: scalableminds/webknossos

Length of output: 839


🏁 Script executed:

rg "key:|label:|disabled:|title:" frontend/javascripts/viewer/view/context_menu.tsx -B 1 -A 1 | head -100

Repository: scalableminds/webknossos

Length of output: 3183


🏁 Script executed:

cat frontend/javascripts/package.json | grep -A 5 -B 5 "antd"

Repository: scalableminds/webknossos

Length of output: 133


🏁 Script executed:

find . -name "package.json" -type f | head -5

Repository: scalableminds/webknossos

Length of output: 139


🏁 Script executed:

fd "package.json" | grep -E "(frontend|package)" | head -3

Repository: scalableminds/webknossos

Length of output: 133


🏁 Script executed:

cat package.json | grep -A 2 -B 2 "antd"

Repository: scalableminds/webknossos

Length of output: 213


🏁 Script executed:

rg "disabled.*true" frontend/javascripts/viewer/view/context_menu.tsx -B 2 -A 2

Repository: scalableminds/webknossos

Length of output: 321


🌐 Web query:

Ant Design v6 Menu item label vs title property behavior

💡 Result:

Short answer: In Ant Design v6 (and since the items API introduced in v4.20+), a Menu item's display content comes from the label prop (ReactNode), while title is a separate string used only for the collapsed/tooltip text (or the native title attribute) — it does not replace or render the label. To change what users see in the menu use label; to control the tooltip shown when the menu is collapsed (or to suppress the tooltip) set title (e.g. title: '' or null to hide). Examples and docs: menu items API (label = ReactNode, title = tooltip for collapsed items). [1][2][3]

Sources:

  • Menu docs (items API: label is ReactNode, title used for collapsed tooltip). [1]
  • Ant Design changelog (fixes/behaviour around Menu.Item tooltip / title). [2]
  • Community examples: set title: '' / null to remove default tooltip. [3]

Add label property to disabled menu item to display visible text

The menu item at lines 214-218 uses only title, but in Ant Design v6, title is for tooltip display only—the visible menu item text requires the label property. Without it, the disabled item renders as an empty row, creating a confusing visual gap in the context menu. Add label to make the text visible:

    {
      key: "view",
      disabled: true,
+     label: "No actions available.",
      title: "No actions available.",
    },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
key: "view",
disabled: true,
label: "No actions available.",
title: "No actions available.",
},
{
key: "view",
disabled: true,
label: "No actions available.",
title: "No actions available.",
},
🤖 Prompt for AI Agents
In frontend/javascripts/viewer/view/context_menu.tsx around lines 214-218, the
disabled menu item only uses the title prop (tooltip) so it renders as an empty
row in Ant Design v6; add a label property with the same visible text (e.g., "No
actions available.") to the menu item so the text is displayed while keeping it
disabled and retaining the title as the tooltip.

Copy link
Contributor

Choose a reason for hiding this comment

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

it looks exactly like before

Copy link
Contributor

Choose a reason for hiding this comment

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

🧩 Analysis chain

🌐 Web query:

Ant Design v6 Menu disabled item title vs label rendering

💡 Result:

Short answer

  • title (string) is used as the collapsed-item tooltip / display title (not rendered as the menu content). Use it to change the text shown in the collapsed-menu tooltip. [1]
  • label (ReactNode) is the actual rendered menu content (can be JSX, Tooltip, icons, etc.) and is the prop you should use if you want custom rendering or to show a tooltip for a disabled item. [1][2]

Implication for disabled items

  • If you want a tooltip that appears when hovering a disabled item, put a Tooltip around the label (label: Item) because title only controls the collapsed-menu tooltip and does not let you supply arbitrary React nodes. [2]

Minimal example

  • items = [{ key: '1', title: 'Short', label: Item, disabled: true }];

Sources

  • Ant Design Menu docs (items API: title = display title for collapsed item; label = ReactNode). [1]
  • Community guidance: wrap tooltip around label to show tooltip for disabled items (StackOverflow). [2]
  • AntD item props reference. [3]

@knollengewaechs Thank you for confirming! If it's rendering correctly with just title, then the current implementation is fine. I appreciate you testing and providing that feedback.


🧠 Learnings used
Learnt from: MichaelBuessemeyer
Repo: scalableminds/webknossos PR: 8824
File: frontend/javascripts/viewer/view/context_menu.tsx:1033-1039
Timestamp: 2025-09-08T13:33:47.097Z
Learning: In frontend/javascripts/viewer/view/context_menu.tsx, the segmentIdLabel intentionally shows the unmapped segment ID (maybeUnmappedSegmentId) in the "within Segment ${id}" text when proofreading is active, as this can be helpful for users. The mapped segment ID (segmentIdAtPosition) is only used as a fallback when the unmapped ID is not available.

@hotzenklotz hotzenklotz marked this pull request as ready for review December 4, 2025 13:24
@hotzenklotz
Copy link
Member Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 4, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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: 9

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (8)
frontend/javascripts/viewer/view/left-border-tabs/histogram_view.tsx (1)

264-276: Revert Alert prop from title back to message.

Ant Design v6 Alert component does not have a title prop. The valid prop for main content is message. Using title will cause the alert content to not render. Change line 267 back to message={...}.

frontend/javascripts/viewer/view/components/button_component.tsx (1)

68-71: Update ToggleButton to forward refs to fix positioning with overlay components.

ToggleButton is used as a trigger for Ant Design's Popover (in volume_specific_ui.tsx:349-367), but doesn't forward refs. This breaks the ref chain that overlay components need to calculate popup position. Without the ref, Popover cannot position itself correctly relative to the trigger.

Apply this change:

-export function ToggleButton(props: { active: boolean } & ButtonComponentProps) {
+export const ToggleButton = React.forwardRef<
+  HTMLButtonElement | HTMLAnchorElement,
+  { active: boolean } & ButtonComponentProps
+>((props, ref) => {
   const { active, ...restProps } = props;
-  return <ButtonComponent type={active ? "primary" : "default"} {...restProps} />;
-}
+  return <ButtonComponent type={active ? "primary" : "default"} {...restProps} ref={ref} />;
+});
+ToggleButton.displayName = "ToggleButton";
frontend/javascripts/admin/dataset/dataset_upload_view.tsx (1)

728-735: The Alert component prop change is incorrect for Ant Design v6.

The message prop has been renamed to title, but Ant Design v6 Alert does not have a title prop. The correct API uses message for the main content and description for secondary content. This change will break the Alert rendering—the alert content will not display. Revert to using message prop or refactor to use the correct Ant Design v6 API with message and description props as needed.

Also applies to: 742-752, 816-824

frontend/javascripts/admin/auth/login_form.tsx (1)

61-78: Alert prop title does not exist in Ant Design v6; use message or description instead

The Alert component in Ant Design v6 does not support a title prop. Replace it with either message (for brief headings) or description (for longer content). Since this warning text is substantial, description is more semantically appropriate. Without this fix, the Alert will render without any content, silently hiding the iFrame warning from users.

frontend/javascripts/admin/tasktype/task_type_create_view.tsx (2)

224-237: Fix the showSearch and optionFilterProp props at line 226 to use standalone configuration.

In Ant Design v6, optionFilterProp is a standalone prop on the Select component, not nested inside the showSearch object. The correct syntax is:

<Select
  showSearch
  optionFilterProp="label"
  // ... other props
/>

Line 226 incorrectly nests optionFilterProp inside showSearch. This should be corrected to match the implementation at line 288, which uses the correct standalone pattern.


309-335: Change the "Any" option value from "" (empty string) back to a value that properly represents "no preference" for the backend.

The showSearch API change correctly aligns with Ant Design v6. However, changing the "Any" option value from null to "" (line 318) introduces a type contract violation.

The backend expects preferredMode: Option[TracingMode.Value] where valid values are only orthogonal, oblique, or flight. When the Select field is cleared with allowClear, sending an empty string "" violates the APIAllowedMode type contract—it is neither a valid mode nor properly absent. Play Framework's JSON deserialization will not recognize "" as a valid enum value, causing unexpected behavior.

When the user clears the field, the form should submit either null or leave the field undefined (which JSON serializes as missing), not an empty string. Update line 318 to use null or implement a normalize callback on the FormItem to convert "" to undefined before submission.

frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/job_credit_cost_information.tsx (1)

26-36: Replace title prop with message prop on Alert component

Alert in Ant Design v6 does not support a title prop. The valid props are message (main content) and description (auxiliary content). Using title will silently fail to render the content—only the icon will display, leaving users with no billing/credit information. This needs to be corrected to:

        <Alert
-         title={
+         message={
           <>
             Billing for this job is not active during testing phase. This job is billed at{" "}
             {jobCreditCostPerGVx} {pluralize("credit", jobCreditCostPerGVx)} per Gigavoxel
             {jobCostInfoString}. Your organization currently has{" "}
             {formatCreditsString(organizationCredits)} WEBKNOSSOS credits.
           </>
         }
         type="info"
         showIcon
       />

Note: This pattern of using title instead of message appears in multiple Alert usages across the codebase (e.g., admin/user/user_list_view.tsx, admin/task/task_list_view.tsx, viewer/.../experimental_inference_alert.tsx). Audit and fix all occurrences.

frontend/javascripts/admin/user/user_list_view.tsx (1)

248-256: Fix row selection toggle logic (splice misuse and mutation)

onSelectUserRow currently mutates the selectedUserIds array and returns the removed items when deselecting, which will corrupt the selection state (e.g. leaving only the deselected ID).

Use an immutable update and filter instead of splice:

   function onSelectUserRow(userId: string) {
     setSelectedUserIds((selectedUserIds) => {
-      const indexOfUser = selectedUserIds.indexOf(userId);
-      if (indexOfUser >= 0) {
-        return selectedUserIds.splice(indexOfUser, 1);
-      } else {
-        return [...selectedUserIds, userId];
-      }
+      const indexOfUser = selectedUserIds.indexOf(userId);
+      if (indexOfUser >= 0) {
+        return selectedUserIds.filter((id) => id !== userId);
+      } else {
+        return [...selectedUserIds, userId];
+      }
     });
   }
♻️ Duplicate comments (1)
frontend/javascripts/viewer/view/help_modal.tsx (1)

45-48: LGTM! Correct Alert API migrations for Ant Design v6.

Both changes align with the official Ant Design v6 migration guide:

  1. Alert's message prop is deprecated and replaced by title in v6
  2. Alert's closable prop is enhanced to accept an object containing onClose and afterClose callbacks

Note: The past review comment suggesting title is incorrect is outdated and was based on v5 documentation. The v6 API now officially supports and recommends using title instead of message.

🧹 Nitpick comments (6)
frontend/javascripts/viewer/view/right-border-tabs/connectome_tab/connectome_settings.tsx (1)

136-149: Option value change looks correct; optional UX alignment with Select value

Switching the disabled "No files available" option to value="" is a sensible move for Antd v6 where Option values are typically strings/numbers rather than null. This should resolve type/runtime gripes around a null option.

One minor thing to be aware of: in the else branch, currentConnectomeFileName will usually be null, so the Select’s value (null) no longer matches this "" sentinel. That means the closed control will now show the placeholder ("Select a connectome file") instead of "No files available". If you prefer to keep "No files available" visible as the selected label when there are no options, you could optionally align the value to "" in that state (e.g., derive currentConnectomeFileName as "" when availableConnectomeFiles is empty). Otherwise, this change is fine as-is.

frontend/javascripts/viewer/view/components/button_component.tsx (1)

19-66: Well-implemented forwardRef for Ant Design v6 compatibility.

The implementation correctly forwards refs to support overlay positioning. The union type HTMLButtonElement | HTMLAnchorElement is appropriate since Ant Design's Button can render as either element.

Consider adding a displayName for better debugging in React DevTools:

 });
+ButtonComponent.displayName = "ButtonComponent";
 
 export function ToggleButton(props: { active: boolean } & ButtonComponentProps) {
frontend/javascripts/viewer/view/action-bar/tracing_actions_view.tsx (1)

127-134: Consider using gap for more consistent spacing.

The justify="space-between" approach will distribute buttons with maximum space between them. With a variable number of buttons (3 when auto-save is on, 4 when off), this may create inconsistent visual spacing.

Consider using a gap property for more consistent spacing:

 <Flex
-  justify="space-between"
+  gap={8}
   style={{
     padding: "0 16px",
   }}
frontend/javascripts/admin/statistic/project_and_annotation_type_dropdown.tsx (1)

55-59: Select search migration is good; tighten selectedFilters initialization

  • The change to showSearch={{ optionFilterProp: "label" }} correctly configures label‑based search with the newer Select API while keeping behavior the same.
  • Unrelated but nearby: useState(Array<string>) initializes selectedFilters with the Array constructor, not an empty string array, which is a bit misleading and momentarily gives Select a non‑array value.

Consider simplifying the state init for clarity and type safety:

-  const [selectedFilters, setSelectedFilters] = useState(Array<string>);
+  const [selectedFilters, setSelectedFilters] = useState<string[]>([]);

This avoids the brief incorrect initial value and better reflects the intended type.

Also applies to: 118-129

frontend/javascripts/viewer/view/action-bar/create_animation_modal.tsx (1)

492-503: Alert now correctly uses title; consider simplifying list keys

Switching the error display to title={...} is consistent with AntD v6 AlertProps, which exposes title as the main content prop. The key={errorMessage.slice(5)} is a bit magical though; using the full message as the key would be clearer and just as stable for these static strings.

Example diff:

-              title={
-                <ul>
-                  {validationErrors.map((errorMessage) => (
-                    <li key={errorMessage.slice(5)}>{errorMessage}</li>
-                  ))}
-                </ul>
-              }
+              title={
+                <ul>
+                  {validationErrors.map((errorMessage) => (
+                    <li key={errorMessage}>{errorMessage}</li>
+                  ))}
+                </ul>
+              }

Please verify against your TS/React lint rules before changing.

frontend/javascripts/banners.tsx (1)

207-229: UpgradeVersionBanner: dismissal side effects via closable work; consider avoiding forceUpdate

The banner now uses title={...} and the object closable prop with an onClose handler, which is in line with AntD v6’s Alert contract. Storing the dismissal timestamp in localStorage and forcing a rerender ensures shouldBannerBeShown flips to false and the navbar height effect runs.

If you’d like to avoid the dummy reducer, you could instead track a local dismissed state and include it in shouldBannerBeShown, calling setDismissed(true) in onClose (the effect would then rerun without forceUpdate). Behavior today is fine though, so this is optional.

Please verify that dismissal still hides the banner for ~3 days and that the navbar height returns to its default immediately after closing.

Also applies to: 232-240

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 96c5a5f and 6748da0.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (60)
  • frontend/javascripts/admin/account/account_profile_view.tsx (2 hunks)
  • frontend/javascripts/admin/account/account_security_view.tsx (1 hunks)
  • frontend/javascripts/admin/account/helpers/settings_card.tsx (1 hunks)
  • frontend/javascripts/admin/auth/authentication_modal.tsx (1 hunks)
  • frontend/javascripts/admin/auth/change_email_view.tsx (1 hunks)
  • frontend/javascripts/admin/auth/login_form.tsx (1 hunks)
  • frontend/javascripts/admin/dataset/composition_wizard/01_select_import_type.tsx (1 hunks)
  • frontend/javascripts/admin/dataset/dataset_components.tsx (2 hunks)
  • frontend/javascripts/admin/dataset/dataset_upload_view.tsx (5 hunks)
  • frontend/javascripts/admin/organization/organization_cards.tsx (2 hunks)
  • frontend/javascripts/admin/project/project_create_view.tsx (2 hunks)
  • frontend/javascripts/admin/scripts/script_create_view.tsx (1 hunks)
  • frontend/javascripts/admin/statistic/project_and_annotation_type_dropdown.tsx (1 hunks)
  • frontend/javascripts/admin/task/task_create_form_view.tsx (4 hunks)
  • frontend/javascripts/admin/task/task_list_view.tsx (1 hunks)
  • frontend/javascripts/admin/task/task_search_form.tsx (3 hunks)
  • frontend/javascripts/admin/tasktype/task_type_create_view.tsx (2 hunks)
  • frontend/javascripts/admin/team/team_list_view.tsx (1 hunks)
  • frontend/javascripts/admin/user/user_list_view.tsx (3 hunks)
  • frontend/javascripts/admin/user/user_selection_component.tsx (1 hunks)
  • frontend/javascripts/admin/voxelytics/ai_model_list_view.tsx (0 hunks)
  • frontend/javascripts/admin/voxelytics/task_list_view.tsx (4 hunks)
  • frontend/javascripts/banners.tsx (5 hunks)
  • frontend/javascripts/components/error_boundary.tsx (1 hunks)
  • frontend/javascripts/components/pricing_enforcers.tsx (1 hunks)
  • frontend/javascripts/dashboard/dashboard_task_list_view.tsx (2 hunks)
  • frontend/javascripts/dashboard/dataset/dataset_settings_view.tsx (2 hunks)
  • frontend/javascripts/dashboard/dataset_view.tsx (4 hunks)
  • frontend/javascripts/dashboard/explorative_annotations_view.tsx (4 hunks)
  • frontend/javascripts/libs/toast.tsx (1 hunks)
  • frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/experimental_inference_alert.tsx (1 hunks)
  • frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/job_credit_cost_information.tsx (1 hunks)
  • frontend/javascripts/viewer/view/action-bar/ai_job_modals/forms/align_sections_form.tsx (1 hunks)
  • frontend/javascripts/viewer/view/action-bar/ai_job_modals/forms/custom_ai_model_inference_form.tsx (1 hunks)
  • frontend/javascripts/viewer/view/action-bar/ai_job_modals/forms/mitochondria_segmentation_form.tsx (1 hunks)
  • frontend/javascripts/viewer/view/action-bar/ai_job_modals/forms/neuron_segmentation_form.tsx (1 hunks)
  • frontend/javascripts/viewer/view/action-bar/ai_job_modals/tabs/alignment_tab.tsx (1 hunks)
  • frontend/javascripts/viewer/view/action-bar/ai_job_modals/tabs/run_ai_model_tab.tsx (4 hunks)
  • frontend/javascripts/viewer/view/action-bar/ai_job_modals/tabs/train_ai_model_tab.tsx (1 hunks)
  • frontend/javascripts/viewer/view/action-bar/create_animation_modal.tsx (4 hunks)
  • frontend/javascripts/viewer/view/action-bar/dataset_rotation_popover_view.tsx (1 hunks)
  • frontend/javascripts/viewer/view/action-bar/download_modal_view.tsx (2 hunks)
  • frontend/javascripts/viewer/view/action-bar/merge_modal_view.tsx (1 hunks)
  • frontend/javascripts/viewer/view/action-bar/private_links_view.tsx (1 hunks)
  • frontend/javascripts/viewer/view/action-bar/share_modal_view.tsx (1 hunks)
  • frontend/javascripts/viewer/view/action-bar/tools/volume_specific_ui.tsx (4 hunks)
  • frontend/javascripts/viewer/view/action-bar/tracing_actions_view.tsx (2 hunks)
  • frontend/javascripts/viewer/view/action_bar_view.tsx (2 hunks)
  • frontend/javascripts/viewer/view/components/button_component.tsx (4 hunks)
  • frontend/javascripts/viewer/view/components/markdown_modal.tsx (1 hunks)
  • frontend/javascripts/viewer/view/help_modal.tsx (1 hunks)
  • frontend/javascripts/viewer/view/left-border-tabs/histogram_view.tsx (1 hunks)
  • frontend/javascripts/viewer/view/nml_upload_zone_container.tsx (1 hunks)
  • frontend/javascripts/viewer/view/right-border-tabs/connectome_tab/connectome_settings.tsx (1 hunks)
  • frontend/javascripts/viewer/view/right-border-tabs/connectome_tab/connectome_view.tsx (1 hunks)
  • frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segment_statistics_modal.tsx (1 hunks)
  • frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx (2 hunks)
  • frontend/javascripts/viewer/view/version_view.tsx (1 hunks)
  • frontend/stylesheets/antd_overwrites.less (13 hunks)
  • package.json (2 hunks)
💤 Files with no reviewable changes (1)
  • frontend/javascripts/admin/voxelytics/ai_model_list_view.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • frontend/javascripts/viewer/view/action-bar/ai_job_modals/tabs/run_ai_model_tab.tsx
  • frontend/javascripts/admin/voxelytics/task_list_view.tsx
  • frontend/javascripts/dashboard/dashboard_task_list_view.tsx
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-10-21T10:54:16.468Z
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 8961
File: frontend/javascripts/viewer/model/actions/annotation_actions.ts:80-82
Timestamp: 2025-10-21T10:54:16.468Z
Learning: In frontend/javascripts/viewer/model/actions/annotation_actions.ts, the ShowManyBucketUpdatesWarningAction is intentionally not included in the AnnotationActionTypes union because it's a UI-only action that doesn't modify the annotation state through reducers.

Applied to files:

  • frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/experimental_inference_alert.tsx
  • frontend/javascripts/viewer/view/nml_upload_zone_container.tsx
  • frontend/javascripts/viewer/view/action-bar/download_modal_view.tsx
  • frontend/javascripts/viewer/view/action-bar/private_links_view.tsx
  • frontend/javascripts/viewer/view/action_bar_view.tsx
  • frontend/javascripts/viewer/view/action-bar/share_modal_view.tsx
📚 Learning: 2025-08-14T14:12:03.293Z
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 8849
File: frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/collapsible_split_merger_evaluation_settings.tsx:39-51
Timestamp: 2025-08-14T14:12:03.293Z
Learning: Since Ant Design version 5.18, Form.Item components support the layout prop (layout="horizontal", layout="vertical", layout="inline"), allowing individual form items to override the parent Form's layout setting. This enables mixed layouts within a single form and was added as a new API feature in v5.18 according to the official changelog.

Applied to files:

  • frontend/javascripts/admin/dataset/composition_wizard/01_select_import_type.tsx
  • frontend/javascripts/viewer/view/action-bar/ai_job_modals/forms/mitochondria_segmentation_form.tsx
  • frontend/javascripts/viewer/view/action-bar/ai_job_modals/forms/align_sections_form.tsx
📚 Learning: 2025-08-14T14:12:03.293Z
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 8849
File: frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/collapsible_split_merger_evaluation_settings.tsx:39-51
Timestamp: 2025-08-14T14:12:03.293Z
Learning: Since Ant Design version 5.18, Form.Item components support the layout prop (layout="horizontal", layout="vertical", etc.), allowing individual form items to override the parent Form's layout setting. This is a newer API addition that provides more granular control over form item layouts.

Applied to files:

  • frontend/javascripts/admin/dataset/composition_wizard/01_select_import_type.tsx
  • frontend/javascripts/viewer/view/action-bar/ai_job_modals/forms/mitochondria_segmentation_form.tsx
📚 Learning: 2025-09-08T13:33:47.097Z
Learnt from: MichaelBuessemeyer
Repo: scalableminds/webknossos PR: 8824
File: frontend/javascripts/viewer/view/context_menu.tsx:1033-1039
Timestamp: 2025-09-08T13:33:47.097Z
Learning: In frontend/javascripts/viewer/view/context_menu.tsx, the segmentIdLabel intentionally shows the unmapped segment ID (maybeUnmappedSegmentId) in the "within Segment ${id}" text when proofreading is active, as this can be helpful for users. The mapped segment ID (segmentIdAtPosition) is only used as a fallback when the unmapped ID is not available.

Applied to files:

  • frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segment_statistics_modal.tsx
📚 Learning: 2025-09-04T10:01:56.727Z
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 8895
File: frontend/javascripts/viewer/view/action_bar_view.tsx:0-0
Timestamp: 2025-09-04T10:01:56.727Z
Learning: In frontend/javascripts/viewer/view/action_bar_view.tsx, knollengewaechs prefers not to use onKeyUpCapture for preventing modal close on modifier keys because: 1) holding ctrl while opening modal will still close on keyup, 2) normal case of opening modal then pressing ctrl doesn't cause issues with just onKeyDownCapture.

Applied to files:

  • frontend/javascripts/viewer/view/action-bar/tracing_actions_view.tsx
  • frontend/javascripts/viewer/view/help_modal.tsx
  • frontend/javascripts/viewer/view/action-bar/merge_modal_view.tsx
  • frontend/javascripts/viewer/view/action-bar/download_modal_view.tsx
  • frontend/javascripts/viewer/view/action-bar/private_links_view.tsx
  • frontend/javascripts/viewer/view/action-bar/share_modal_view.tsx
🧬 Code graph analysis (7)
frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segment_statistics_modal.tsx (1)
frontend/javascripts/libs/utils.ts (1)
  • pluralize (1171-1179)
frontend/javascripts/viewer/view/action-bar/tracing_actions_view.tsx (2)
frontend/javascripts/viewer/view/layouting/layout_persistence.ts (1)
  • addNewLayout (164-186)
frontend/javascripts/viewer/view/layouting/tracing_layout_view.tsx (1)
  • setAutoSaveLayouts (432-434)
frontend/javascripts/viewer/view/action-bar/tools/volume_specific_ui.tsx (1)
frontend/javascripts/components/fast_tooltip.tsx (1)
  • FastTooltip (54-123)
frontend/javascripts/admin/account/account_security_view.tsx (1)
frontend/javascripts/libs/toast.tsx (1)
  • messages (65-84)
frontend/javascripts/viewer/view/action-bar/share_modal_view.tsx (1)
frontend/javascripts/libs/toast.tsx (1)
  • message (228-247)
frontend/javascripts/components/pricing_enforcers.tsx (1)
frontend/javascripts/admin/organization/pricing_plan_utils.ts (1)
  • getFeatureNotAvailableInPlanMessage (93-115)
frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx (1)
frontend/javascripts/viewer/model/types/tree_types.ts (1)
  • Tree (61-75)
🔇 Additional comments (58)
frontend/javascripts/viewer/view/action_bar_view.tsx (2)

51-58: Alert now correctly uses title for Antd v6

Switching the main text prop from message to title matches the Antd v6 AlertProps API (where title is the content prop), so this aligns with the new version and should avoid prop-type/TS issues without changing behavior. (jsdocs.io)


301-310: AI job button spacing change is safe

Reducing marginLeft to 10 keeps behavior and accessibility intact (click handler, disabled state, tooltip all unchanged) and only adjusts horizontal spacing, which is fine as part of the visual tuning for the v6 upgrade.

frontend/javascripts/viewer/view/components/button_component.tsx (1)

3-4: LGTM!

Good use of the specific lodash/noop import for better tree-shaking, and the React import is correctly added for React.forwardRef.

frontend/stylesheets/antd_overwrites.less (6)

1-50: Whitespace-only changes in headings and layout sections appear safe.

Lines 1–32 and 33–50 contain primarily formatting adjustments (whitespace, blank lines) with no functional style changes. The blank line added at line 42 within the @media @smartphones block is a formatting normalization and should not affect CSS output.


52-131: Notification and animation styling: formatting changes only.

Lines 52–131 contain whitespace and formatting adjustments to notification error styling and the alert-wiggle keyframe animation. All actual CSS property values (colors, animation parameters) remain unchanged. These formatting adjustments are safe and should not affect runtime behavior.


179-209: Card, radio button, and menu styling: formatting adjustments only.

Lines 179–209 contain whitespace and formatting normalization for card, radio button wrapper, list, and menu styling. All CSS property values remain unchanged. The blank line additions and spacing adjustments are purely cosmetic and do not affect runtime behavior.


224-289: Link button, tree, and empty state selectors reformatted; no functional changes.

Lines 224–289 contain selector formatting normalization (removal of spaces around combinators) and blank line adjustments. The CSS specificity, inheritance behavior, and property values remain unchanged. These are purely stylistic improvements.


290-322: Action bar, dropdown, and radio button selectors reformatted; no functional changes.

Lines 290–322 contain selector formatting normalization and blank line adjustments for action bar, dropdown menu icons, messages, and disabled radio buttons. All CSS property values and specificity remain unchanged.


142-144: Selector formatting normalized; no functional changes.

The table cell padding selector at lines 142-144 is reformatted with compact combinators (.ant-table-small>.ant-table-content>... instead of spaced format). This is a CSS style normalization with no functional impact on specificity or element targeting.

The claim about a removed table overflow rule (.ant-table-scroll > .ant-table-body { overflow-x: auto !important; }) is incorrect. This rule does not exist in the current file, was never present in git history for antd_overwrites.less, and was not removed. The file was created fresh in commit 6748da0 as a formatting change.

Likely an incorrect or invalid review comment.

frontend/javascripts/viewer/view/action-bar/ai_job_modals/tabs/alignment_tab.tsx (1)

15-16: The Antd v6 prop migrations are correct:

  • Card variant="borderless" correctly replaces the deprecated bordered={false}
  • Space orientation="vertical" correctly replaces direction="vertical" with the same value preserved

Both changes follow the official Ant Design v6 API updates.

frontend/javascripts/viewer/view/action-bar/ai_job_modals/forms/custom_ai_model_inference_form.tsx (1)

109-109: Remove orientation prop; direction is the correct Ant Design Space component prop.

Ant Design's Space component uses direction as the prop name for vertical/horizontal layout, not orientation. The web search confirms the current stable API only recognizes direction, align, size, split, and wrap as Space props. Additionally, Ant Design v6 has not been released yet. The change from direction="vertical" to orientation="vertical" will cause the layout to fail since the orientation prop is not recognized by the Space component. Revert this line to use direction="vertical".

⛔ Skipped due to learnings
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 8849
File: frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/collapsible_split_merger_evaluation_settings.tsx:39-51
Timestamp: 2025-08-14T14:12:03.293Z
Learning: Since Ant Design version 5.18, Form.Item components support the layout prop (layout="horizontal", layout="vertical", layout="inline"), allowing individual form items to override the parent Form's layout setting. This enables mixed layouts within a single form and was added as a new API feature in v5.18 according to the official changelog.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 8849
File: frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/collapsible_split_merger_evaluation_settings.tsx:39-51
Timestamp: 2025-08-14T14:12:03.293Z
Learning: Since Ant Design version 5.18, Form.Item components support the layout prop (layout="horizontal", layout="vertical", etc.), allowing individual form items to override the parent Form's layout setting. This is a newer API addition that provides more granular control over form item layouts.
frontend/javascripts/viewer/view/action-bar/download_modal_view.tsx (2)

148-155: Consistent Alert API migration.

This change mirrors the previous Alert component update, correctly using title prop for Antd v6.


717-724: Verify the checkbox positioning visually.

The position adjustment from bottom: -62px to -38px likely compensates for spacing changes in Antd v6's Modal component. Please verify that the "Keep window open" checkbox is positioned correctly in the UI after this change.

frontend/javascripts/admin/dataset/dataset_upload_view.tsx (2)

693-696: LGTM! Good use of naming convention.

The underscore prefix on _allValues correctly indicates this parameter is intentionally unused. The function logic remains unchanged.


192-192: No issues found with the Space component prop rename.

The Space component in Ant Design v6 supports both the orientation and direction props, accepting the same values. The change from direction to orientation is valid and will work correctly in v6, though both props remain supported for backward compatibility.

frontend/javascripts/viewer/view/action-bar/private_links_view.tsx (1)

208-213: Array guard in ExpirationDate’s onChange is a sensible defensive fix

The early Array.isArray(date) return matches the broader Antd v6 DatePicker typing and safely ignores unexpected range-style values while preserving existing behavior for the single-date picker; just keep in mind that if this ever becomes a RangePicker, this handler will effectively no-op until it’s adapted to handle ranges explicitly.

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

24-24: LGTM! Space import aligns with v6 layout patterns.

The Space component is properly imported and used later in the file (lines 698-718) to provide consistent spacing for tag elements.


698-718: LGTM! Space wrapper improves tag layout consistency.

Wrapping the tags in <Space wrap> provides consistent horizontal spacing and allows tags to wrap to multiple lines when needed. This is a recommended pattern in Antd v6 for collections of inline elements.

frontend/javascripts/dashboard/dataset_view.tsx (3)

2-2: LGTM! Import updates align with Antd v6.

The addition of DownOutlined and switching MenuProps from rc-menu to antd are correct changes for the Antd v6 upgrade.

Also applies to: 22-22


498-498: LGTM! Alert prop correctly updated for Antd v6.

The change from message to title aligns with the Antd v6 API changes for the Alert component.


322-333: No action required. The code properly handles undefined organizationId: the checkDatasets function accepts string | undefined (line 30, dataset_collection_context.tsx), and passes it to triggerDatasetCheck which also accepts optional organizationId?: string (line 1350, rest_api.ts) with an explicit guard at line 1355 (if (organizationId)). The refactoring from Dropdown.Button to separate Button + Dropdown in Space.Compact correctly implements the Ant Design v6 pattern.

frontend/javascripts/admin/account/account_profile_view.tsx (1)

4-4: LGTM!

The Space import is correctly added to support the new Space.Compact wrapper used in the Theme selector.

frontend/javascripts/viewer/view/action-bar/tracing_actions_view.tsx (2)

12-12: LGTM: Flex import added for new layout structure.

The addition of Flex to the imports is appropriate for the consolidated layout actions group introduced below.


139-143: Remove redundant stopPropagation() calls in Button onClick handlers.

The parent Flex container already calls e.stopPropagation() on click events (line 133), making the nested e.stopPropagation() calls in each Button's onClick handler redundant. Remove them from lines 140, 150, 162, and 173.

Likely an incorrect or invalid review comment.

frontend/javascripts/viewer/view/version_view.tsx (1)

50-59: Alert usage migration looks good

Using the title prop for the info text keeps behavior and layout unchanged while aligning with the updated Alert API.

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

201-208: Info Alert migration is correct

Switching the info Alert to use the title prop is consistent with the new Alert API; user‑visible behavior remains the same.

frontend/javascripts/viewer/view/action-bar/ai_job_modals/tabs/train_ai_model_tab.tsx (1)

29-34: Train‑AI warning Alert change is safe

Using title for the experimental‑feature notice preserves the existing messaging and layout without behavior changes.

frontend/javascripts/viewer/view/action-bar/ai_job_modals/forms/mitochondria_segmentation_form.tsx (1)

58-69: Space orientation migration is correct

Replacing direction="vertical" with orientation="vertical" matches the updated Space API and keeps the vertical layout as before.

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

303-329: Visibility warning Alert migration is fine

Binding the computed warning string to the Alert’s title prop is a drop‑in change that preserves existing behavior.

frontend/javascripts/components/error_boundary.tsx (1)

57-62: ErrorBoundary Alert update preserves behavior

Using title={errorMessage} with description={<pre>{errorDescription}</pre>} keeps the error display semantics while matching the current Alert API.

frontend/javascripts/admin/task/task_list_view.tsx (1)

124-144: Manual‑assignment info Alert migration is safe

Using the title prop for the informational text in the assignment modal keeps the UX identical while matching the updated Alert API.

frontend/javascripts/viewer/view/action-bar/ai_job_modals/forms/neuron_segmentation_form.tsx (1)

132-132: LGTM! Correct API migration for Ant Design v6.

The Space component now uses orientation instead of direction in Ant Design v6. This change aligns with the official migration guide.

frontend/javascripts/admin/auth/change_email_view.tsx (1)

156-156: LGTM! Correct Alert API migration for Ant Design v6.

In Ant Design v6, Alert's message prop is deprecated and replaced by title. This migration is correct.

frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/experimental_inference_alert.tsx (1)

6-6: LGTM! Correct Alert API migration for Ant Design v6.

The Alert component's message prop is deprecated and replaced by title in v6. This change is correct.

frontend/javascripts/viewer/view/components/markdown_modal.tsx (1)

59-69: LGTM! Correct Alert API migration for Ant Design v6.

Alert's message prop is deprecated and replaced by title in v6. The JSX content is appropriately passed to the title prop.

frontend/javascripts/viewer/view/action-bar/ai_job_modals/forms/align_sections_form.tsx (1)

38-45: LGTM! Correct API migrations for Ant Design v6.

Both changes align with the official v6 migration guide:

  1. Space now uses orientation instead of direction
  2. Alert's message prop is deprecated and replaced by title
frontend/javascripts/admin/account/account_security_view.tsx (1)

137-137: LGTM! Correct Alert API migration for Ant Design v6.

Alert's message prop is deprecated and replaced by title in v6. This change is correct.

frontend/javascripts/admin/account/helpers/settings_card.tsx (1)

23-28: LGTM! Correct Popover API migration for Ant Design v6.

The change from overlayInnerStyle to styles.container aligns with Ant Design v6's semantic DOM styling pattern, where Popover allows customization of semantic DOM styles through classNames and styles objects. The container property targets the inner content wrapper.

frontend/javascripts/admin/user/user_list_view.tsx (1)

172-183: Alert header prop migration looks good

All three Alerts now pass header content via title and keep the rich body in description, matching the pattern used elsewhere in this PR. No behavioral issues from these changes as long as the pages are smoke-tested for visual regressions.

Please quickly verify in the UI that:

  • The “new inactive users”, “Invite more users”, and “maximum number of users” alerts still render as expected (icon + bold header + body text).

Also applies to: 196-210, 215-237

package.json (1)

124-140: Ant Design dependency bump is coherent with the v6 migration

Updating antd to ^6.0.1 together with @ant-design/icons and @ant-design/colors keeps the Ant Design stack in sync and matches the API changes used in the TSX files.

Please:

  • Make sure the full frontend test suite and screenshot/E2E tests are run against this exact dependency set.
  • Confirm there’s no need to pin antd more strictly than ^6.0.1 (e.g., if you want to avoid unexpected minor/patch changes).
frontend/javascripts/admin/project/project_create_view.tsx (1)

105-116: Select search config aligned with label-based options

Using showSearch={{ optionFilterProp: "label" }} for the Team and Owner selects matches the { label, value } options you pass and keeps the intended label-based filtering while conforming to the newer Select API.

Please verify in the UI that typing into these Selects still filters by the visible label (team name / user display string) as before.

Also applies to: 128-138

frontend/javascripts/admin/organization/organization_cards.tsx (1)

131-160: Plan alerts updated to use title for main copy

Both PlanExceededAlert and PlanAboutToExceedAlert now pass their primary text via title, with actions and conditional logic untouched. This keeps behavior the same while matching the new Alert API used elsewhere.

Please visually confirm:

  • Error/warning icons still appear.
  • The title text remains prominent, and the action buttons (“Extend Plan Now” / “Upgrade Now”) render correctly.

Also applies to: 169-188

frontend/javascripts/admin/task/task_search_form.tsx (1)

150-162: Task search Selects now consistently search by label

Updating the Task Type, Project, and User selects to showSearch={{ optionFilterProp: "label" }} matches their { label, value } options and should retain the same UX while aligning with the newer Select API.

Please:

  • Manually test a few searches for task types, projects, and users to ensure filtering still works as expected.
  • Check that clearing selections (allowClear) still behaves correctly with the new search config.

Also applies to: 169-181, 186-200

frontend/javascripts/dashboard/dataset/dataset_settings_view.tsx (1)

68-74: Dataset import status alerts migrated to title prop

For the “not imported yet”, “invalid datasource.json”, and “import complete” cases, the Alerts now render their headings through title while keeping descriptions and control flow identical. This should be a pure API-alignment change.

Please verify on a few datasets with:

  • Missing dataSource.json,
  • Invalid dataSource.json,
  • Successful imports,

that the alerts still appear with the correct icon, heading, and description.

Also applies to: 75-90, 96-101

frontend/javascripts/admin/task/task_create_form_view.tsx (1)

544-558: Task creation Selects migrated to label-based search configuration

Switching the Dataset, Task Type, Project, and Script selects to showSearch={{ optionFilterProp: "label" }} matches their { label, value } options and keeps search semantics clear, while aligning with the newer Select API.

Please:

  • Try searching in each dropdown (especially with long lists of datasets/projects/scripts) to confirm filtering remains correct and responsive.
  • Ensure that editing an existing task (where Selects may be disabled) still renders the chosen labels correctly.

Also applies to: 630-640, 719-729, 742-752

frontend/javascripts/admin/dataset/dataset_components.tsx (1)

25-45: Card variant and Datastore Select search config align with the new design system

  • CardContainer: Using variant="borderless" keeps the card visually borderless while matching the newer variant-based API, with no other layout changes.
  • DatastoreFormItem: showSearch={{ optionFilterProp: "label" }} fits the { label: datastore.name, value: datastore.url } options and should maintain the intended label-based search.

Please:

  • Check a few dataset settings/import screens to confirm the cards still look borderless as before.
  • Verify that the Datastore dropdown search filters by the visible datastore name.

Also applies to: 135-147

frontend/javascripts/viewer/view/action-bar/create_animation_modal.tsx (1)

398-415: Space migration to orientation matches AntD v6

Using orientation="vertical" instead of direction="vertical" lines up with the updated SpaceProps in AntD v6 (where direction is now deprecated in favor of orientation), so the vertical layout should remain intact without deprecation noise.

Please double‑check in your local build that these Space blocks still render the controls vertically as intended under your exact antd version.

Also applies to: 425-435, 440-462

frontend/javascripts/banners.tsx (2)

55-72: UpcomingMaintenanceBanner: Alert v6 props and close behavior look good

Using title={...} for the maintenance text and the object form of closable with an onClose handler matches the AntD v6 AlertProps API and lets you both persist the acknowledgement and immediately reset the navbar height when the banner is dismissed.

Please verify in your UI that closing this banner both hides it and restores --navbar-height as expected, especially before the next maintenance poll runs.


80-90: CurrentMaintenanceBanner: Alert.title migration is straightforward

Switching the content into the title prop is aligned with the v6 Alert API and keeps the banner non‑closable as before; behavior should be unchanged aside from the internal prop name.

Just confirm that styling/spacing of this banner matches the old version in your browser.

frontend/javascripts/viewer/view/action-bar/tools/volume_specific_ui.tsx (1)

10-20: VolumeInterpolationButton refactor preserves behavior and matches AntD v6 Dropdown/Menu

Importing Button from antd, keeping Space.Compact, and splitting the old Dropdown.Button into a dedicated execute button plus a dropdown trigger is a clean way to adapt to the v6 APIs while retaining the previous UX: the left button still runs interpolation with the current mode, and the right button opens the menu, whose onClick updates the mode and then triggers interpolation.

Using MenuProps for menu keeps the handler correctly typed, and wiring disabled={isDisabled} into both buttons ensures the control is fully inactive when interpolation is unavailable.

Please sanity‑check that:

  • Clicking the main icon button still interpolates with the current mode.
  • Choosing a mode from the dropdown both switches the mode and immediately runs interpolation.
  • The entire control is disabled when isDisabled is true, under your actual antd version.

Also applies to: 207-224, 230-243

frontend/javascripts/admin/dataset/composition_wizard/01_select_import_type.tsx (1)

30-30: LGTM! Correct Ant Design v6 API migration.

Space now uses orientation instead of direction in Ant Design v6. This change correctly aligns with the official migration guide.

frontend/javascripts/admin/team/team_list_view.tsx (1)

181-181: LGTM! Correct Alert API migration.

Alert's message prop is deprecated and replaced by title in Ant Design v6. This correctly follows the official migration path.

frontend/javascripts/admin/auth/authentication_modal.tsx (1)

52-52: LGTM! Consistent Alert migration.

This Alert prop change from message to title is consistent with the Ant Design v6 migration pattern applied throughout the PR.

frontend/javascripts/viewer/view/right-border-tabs/connectome_tab/connectome_view.tsx (1)

730-737: LGTM! Alert title migration with JSX content.

The Alert correctly migrates from message to title. The JSX content (including the clickable activation link) works identically with the new prop name.

frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segment_statistics_modal.tsx (1)

286-289: LGTM! Alert migration with dynamic content.

The Alert correctly uses title instead of message. The dynamic content with pluralize and coordinate information renders correctly with the new prop.

frontend/javascripts/components/pricing_enforcers.tsx (1)

229-233: LGTM! Alert migration in pricing enforcer.

The Alert correctly migrates to use title for rendering the feature availability message, maintaining the same functionality.

frontend/javascripts/admin/scripts/script_create_view.tsx (1)

101-101: LGTM! Select search configuration migration.

Ant Design v6 merges search-related props into showSearch as an object configuration. This change correctly consolidates showSearch and optionFilterProp into a single object prop.

frontend/javascripts/viewer/view/action-bar/dataset_rotation_popover_view.tsx (1)

86-86: LGTM! Button icon placement migration.

Button's iconPosition is deprecated and replaced by iconPlacement in Ant Design v6. This change correctly follows the official migration guide.

Comment on lines +45 to +50
showSearch={{
optionFilterProp: "label",
filterOption: (input, option) =>
// @ts-expect-error ts-migrate (2532) FIXME: Object is possibly 'undefined'.
option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0,
}}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

Ant Design v6 Select component showSearch API documentation

💡 Result:

The Select component's showSearch prop is documented in the Select API (shows a search input in single mode; boolean). See Ant Design Select API. [1]

Also see the v5→v6 migration notes on the Ant Design site for related changes when upgrading. [2]

Sources:
[1] Ant Design — Select component (API: showSearch). (3x.ant.design)
[2] Ant Design — From v5 to v6 migration notes. (ant.design)

Citations:


🏁 Script executed:

# Check if there are TypeScript definitions or type files in the repo
fd -e "d.ts" -e "types.ts" | grep -i "select\|antd" | head -20

Repository: scalableminds/webknossos

Length of output: 50


🏁 Script executed:

# Look for the actual usage context and type of option parameter
cat -n frontend/javascripts/admin/user/user_selection_component.tsx | head -60

Repository: scalableminds/webknossos

Length of output: 2164


🌐 Web query:

Ant Design v6 Select showSearch object configuration filterOption callback

💡 Result:

Short answer: In Ant Design Select (v6-compatible API) set showSearch (true) and provide filterOption as a function with signature (input: string, option) => boolean. The option parameter shape depends on how you provide options:

  • If you use the options prop (array of { value, label }), inspect option.label (or option?.label).
  • If you use ..., inspect option.props.children (or option?.props?.children).

Example (works with v4/5/6 API):

  • when using options prop:
    const filterOption = (input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase());

<Select
showSearch
optionFilterProp="children"
filterOption={filterOption}
options={[{ value: '1', label: 'Apple' }, { value: '2', label: 'Banana' }]}
/>

  • when using Option children:
    filterOption = (input, option) =>
    (option?.props?.children ?? '').toString().toLowerCase().includes(input.toLowerCase());
Apple Banana

Notes:

  • Use optional chaining (option?.label / option?.props?.children) to be safe.
  • You can also set optionFilterProp to change which option field is used for automatic filtering (e.g., 'children' or 'value').

Docs / references: [1][2].

References:
[1] Ant Design Select docs (examples showing filterOption signature and option props).
[2] Ant Design Select docs (example using options prop and option?.label).


🌐 Web query:

Ant Design v6 migration guide Select component API changes

💡 Result:

Here are the main Select-related API changes to watch for when migrating from Ant Design v5 → v6 (summary plus recommended replacements):

  • dropdownClassName → classNames.popup.root. [1]
  • popupClassName (old alias) → classNames.popup.root. [1]
  • dropdownStyle / popupStyle → styles.popup.root. [1]
  • dropdownRender → popupRender. [1]
  • onDropdownVisibleChange → onOpenChange (unified “open” naming). [1][2]
  • dropdownMatchSelectWidth → popupMatchSelectWidth. [1]
  • dropdownMatchSelectWidth behavior/name consolidated under popup* APIs. [1]
  • showArrow: no longer a dedicated prop (arrow hidden by default; use suffixIcon to control). [1]
  • bordered → variant (global/consistent naming across components). [1]
  • Structural Option children (e.g., <Select.Option />) are moving toward data-driven APIs in the roadmap—prefer passing options via the options prop for better future compatibility. [2]

Migration notes:

  • New names follow a unified “popup” / “open” / styles/classNames token pattern; update usages accordingly and prefer the styles/classNames shape (e.g., classNames.popup.root) instead of the old dropdown* props. [1]
  • If you rely on showArrow/bordered, replace with suffixIcon={...} or variant respectively. [1]
  • Test behavior around filtering and custom dropdown rendering after switching to popupRender and onOpenChange; existing handlers should be straightforward to rename but verify runtime behavior. [1][2]

Sources:

  • Deprecation / prop-mapping notes for Select (deprecated dropdown*/popup* → classNames/styles/popupRender/onOpenChange/popupMatchSelectWidth, bordered→variant, showArrow change). [1]
  • Ant Design v6 release announcement / migration guidance (unified open naming, v6 release notes). [2]

References:
[1] DeepWiki — Ant Design data-entry & selection components (deprecated API mapping).
[2] ant-design GitHub — “Ant Design 6.0 is Here!” release/announcement.


🏁 Script executed:

# Check the actual Ant Design version in the project
cat package.json | grep -A2 -B2 "antd"

Repository: scalableminds/webknossos

Length of output: 213


Remove the @ts-expect-error and use optional chaining for type safety.

The showSearch object syntax is valid for Ant Design v6, but the @ts-expect-error on line 48 suppresses a legitimate TypeScript warning. Replace it with optional chaining:

      showSearch={{
        optionFilterProp: "label",
        filterOption: (input, option) =>
-          // @ts-expect-error ts-migrate (2532) FIXME: Object is possibly 'undefined'.
-          option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0,
+          option?.label.toLowerCase().indexOf(input.toLowerCase()) >= 0,
      }}

This follows Ant Design v6 best practices and eliminates the type suppression.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In frontend/javascripts/admin/user/user_selection_component.tsx around lines 45
to 50, remove the inline @ts-expect-error and make the filterOption type-safe by
using optional chaining and a safe boolean fallback: access option?.label and
call toLowerCase on it only when present, compare against input.toLowerCase(),
and return false when label is undefined; update the expression accordingly and
delete the @ts-expect-error comment.

Comment on lines 30 to 35
type GetRef,
type MenuProps,
Modal,
Popover,
Select,
type Tree,
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Potential TypeScript error: typeof requires value import, not type-only import.

Line 35 imports Tree as a type-only import using the type keyword, but line 423 uses typeof Tree which requires Tree to be available as a value at runtime. TypeScript's typeof operator cannot be used with type-only imports.

Apply this diff to fix the import:

   Button,
   ConfigProvider,
   Divider,
   Empty,
   type GetRef,
   type MenuProps,
   Modal,
   Popover,
   Select,
-  type Tree,
+  Tree,
   type TreeProps,
 } from "antd";

Alternatively, if you want to avoid potential naming conflicts with the local Tree type from tree_types.ts, import with an alias:

   Button,
   ConfigProvider,
   Divider,
   Empty,
   type GetRef,
   type MenuProps,
   Modal,
   Popover,
   Select,
-  type Tree,
+  Tree as AntdTree,
   type TreeProps,
 } from "antd";

And then update line 423:

-  tree: React.RefObject<GetRef<typeof Tree>>;
+  tree: React.RefObject<GetRef<typeof AntdTree>>;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
type GetRef,
type MenuProps,
Modal,
Popover,
Select,
type Tree,
type GetRef,
type MenuProps,
Modal,
Popover,
Select,
Tree,

menu: null,
};
tree: React.RefObject<RcTree>;
tree: React.RefObject<GetRef<typeof Tree>>;
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

find frontend -name "*scrollable*" -o -name "*virtualized*" | grep -i tree

Repository: scalableminds/webknossos

Length of output: 150


🏁 Script executed:

fd -t f "scrollable.*tree" frontend

Repository: scalableminds/webknossos

Length of output: 150


🏁 Script executed:

rg -l "ScrollableVirtualizedTree" frontend --type tsx --type ts

Repository: scalableminds/webknossos

Length of output: 95


🏁 Script executed:

cat -n frontend/javascripts/viewer/view/right-border-tabs/scrollable_virtualized_tree.tsx | head -100

Repository: scalableminds/webknossos

Length of output: 3365


🏁 Script executed:

rg -A 5 "React.forwardRef|forwardRef" frontend/javascripts/viewer/view/right-border-tabs/scrollable_virtualized_tree.tsx

Repository: scalableminds/webknossos

Length of output: 820


🏁 Script executed:

head -50 frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx | grep -E "import|from"

Repository: scalableminds/webknossos

Length of output: 872


🏁 Script executed:

sed -n '1,50p' frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx | rg "Tree|GetRef"

Repository: scalableminds/webknossos

Length of output: 113


🏁 Script executed:

sed -n '1940,1950p' frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx

Repository: scalableminds/webknossos

Length of output: 673


Change ref type from React.RefObject to React.Ref for compatibility with ScrollableVirtualizedTree.

The ref at line 423 is typed as React.RefObject<GetRef<typeof Tree>>, but ScrollableVirtualizedTree's forwardRef signature expects React.Ref<GetRef<typeof AntdTree>>. Since React.RefObject is more restrictive than React.Ref (which includes callback refs), update the type to React.Ref<GetRef<typeof Tree>> to match the component's ref contract and avoid TypeScript compatibility issues when passing the ref at line 1945.

🤖 Prompt for AI Agents
In
frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx
around line 423, the ref is currently typed as React.RefObject<GetRef<typeof
Tree>> which is too restrictive for ScrollableVirtualizedTree's forwardRef;
change the declaration to React.Ref<GetRef<typeof Tree>> so it accepts callback
refs as well as object refs, and update any local usages that assume .current
(narrow to handle callback refs or cast where necessary) so TypeScript no longer
complains when passing this ref at line 1945.

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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6748da0 and 8e98842.

📒 Files selected for processing (1)
  • frontend/javascripts/admin/voxelytics/task_list_view.tsx (4 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T13:41:44.912Z
Learning: In Ant Design v6, the Alert component's `message` prop has been deprecated and replaced by `title`. When migrating from v5 to v6, Alert components should use `title` for the main content (and optionally `description` for additional details).
🧬 Code graph analysis (1)
frontend/javascripts/admin/voxelytics/task_list_view.tsx (1)
frontend/javascripts/libs/window.ts (1)
  • location (60-60)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-smoketest-push
  • GitHub Check: frontend-tests
🔇 Additional comments (4)
frontend/javascripts/admin/voxelytics/task_list_view.tsx (4)

5-5: LGTM! Import additions align with Antd v6 migration.

The new imports (DownOutlined, Flex, Space) are properly added to support the updated header layout and dropdown functionality.

Also applies to: 20-20, 25-25


352-356: LGTM! Notification API correctly migrated to Antd v6.

The error notification properly uses title and description props, which aligns with Antd v6's API changes. Based on learnings, the message prop was deprecated in favor of title.


709-716: LGTM! Space.Compact and Dropdown integration is well-structured.

The use of Space.Compact to group the "Collapse All" button with an overflow dropdown menu is a clean pattern that aligns with Antd v6 best practices.


690-700: Remove the nested root key under styles.popup.

The styles prop structure in Ant Design v6 maps keys directly to style objects. For the popup, use styles.popup with direct style properties, not styles.popup.root. The current nested root key will prevent the maxWidth from being applied to the popup.

Apply this diff:

               styles={{
                 root: {
                   maxWidth: 200,
                 },
                 popup: {
-                  root: {
-                    maxWidth: "90vw",
-                  },
+                  maxWidth: "90vw",
                 },
               }}

Likely an incorrect or invalid review comment.

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

♻️ Duplicate comments (1)
frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx (1)

30-38: Fix type-only Tree import when using typeof in ref typing

Line 425 uses GetRef<typeof Tree>, but Tree is imported with import type, so there is no value symbol for typeof to reference and TypeScript will complain. Import Tree as a value (optionally under an alias) and use that in the GetRef expression.

Apply this diff:

-import {
-  Button,
-  ConfigProvider,
-  Divider,
-  Empty,
-  type GetRef,
-  type MenuProps,
-  Modal,
-  Popover,
-  Select,
-  Space,
-  type Tree,
-  type TreeProps,
-  Typography,
-} from "antd";
+import {
+  Button,
+  ConfigProvider,
+  Divider,
+  Empty,
+  type GetRef,
+  type MenuProps,
+  Modal,
+  Popover,
+  Select,
+  Space,
+  Tree as AntdTree,
+  type TreeProps,
+  Typography,
+} from "antd";
@@
-  tree: React.RefObject<GetRef<typeof Tree>>;
+  tree: React.RefObject<GetRef<typeof AntdTree>>;

Afterward, please re-run tsc to verify there are no remaining typeof Tree usages tied to type-only imports in this file.

Also applies to: 425-425

🧹 Nitpick comments (2)
frontend/javascripts/dashboard/dataset_view.tsx (2)

2-2: Antd v6 imports and menu typing look good, with a small optional cleanup

Using DownOutlined and type MenuProps from antd is aligned with the v6 Dropdown/Menu patterns. If you want to avoid the deep ItemType import, you could instead type items via const refreshMenuItems: MenuProps["items"] = [...] and drop the ItemType import, but that’s purely cosmetic.

Also applies to: 22-22


316-327: New DatasetRefreshButton composition is sound; consider explicit click trigger for Dropdown

The split primary Refresh button plus adjacent Dropdown (with menu={{ onClick: () => context.checkDatasets(organizationId), items: refreshMenuItems }}) looks correct for Antd v6 and keeps behavior clear. One thing to double‑check: Dropdown now uses its default trigger (hover). If you want to preserve a “click the arrow to open menu” behavior similar to Dropdown.Button, you may want to add trigger={['click']} to the Dropdown.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8e98842 and bf9a63e.

📒 Files selected for processing (4)
  • frontend/javascripts/dashboard/dashboard_task_list_view.tsx (4 hunks)
  • frontend/javascripts/dashboard/dataset_view.tsx (6 hunks)
  • frontend/javascripts/dashboard/explorative_annotations_view.tsx (5 hunks)
  • frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx (7 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/javascripts/dashboard/explorative_annotations_view.tsx
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T14:12:26.474Z
Learning: For Ant Design v6 component API documentation and migration guidance, use https://ant.design/llms-full.txt as the authoritative source. This llms-full.txt file contains the official v6 component APIs, including deprecated props and their replacements.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T13:41:44.912Z
Learning: In Ant Design v6, the Alert component's `message` prop has been deprecated and replaced by `title`. When migrating from v5 to v6, Alert components should use `title` for the main content (and optionally `description` for additional details).
📚 Learning: 2025-09-08T13:33:47.097Z
Learnt from: MichaelBuessemeyer
Repo: scalableminds/webknossos PR: 8824
File: frontend/javascripts/viewer/view/context_menu.tsx:1033-1039
Timestamp: 2025-09-08T13:33:47.097Z
Learning: In frontend/javascripts/viewer/view/context_menu.tsx, the segmentIdLabel intentionally shows the unmapped segment ID (maybeUnmappedSegmentId) in the "within Segment ${id}" text when proofreading is active, as this can be helpful for users. The mapped segment ID (segmentIdAtPosition) is only used as a fallback when the unmapped ID is not available.

Applied to files:

  • frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx
📚 Learning: 2025-11-03T17:50:57.587Z
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 9025
File: frontend/javascripts/dashboard/advanced_dataset/dataset_table.tsx:10-10
Timestamp: 2025-11-03T17:50:57.587Z
Learning: In the webknossos codebase, both `import { Component } from "antd";` and `import { Component } from "antd/lib";` are valid import paths for antd components. Do not flag imports from "antd/lib" as errors.

Applied to files:

  • frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx
📚 Learning: 2025-02-05T20:16:45.712Z
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 8321
File: frontend/javascripts/components/slider.tsx:0-0
Timestamp: 2025-02-05T20:16:45.712Z
Learning: When tracking focus state that needs to be accessed by native event listeners (e.g., wheel events), use `useRef` instead of `useState` to ensure the event handlers always have access to the current value. This is because event listeners added via `addEventListener` would capture the initial state value if `useState` were used.

Applied to files:

  • frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx
📚 Learning: 2024-12-16T15:48:37.065Z
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 8266
File: frontend/javascripts/components/mag_selection.tsx:51-60
Timestamp: 2024-12-16T15:48:37.065Z
Learning: In the `MagSelection` component (`frontend/javascripts/components/mag_selection.tsx`), the selected magnification `value` will always be present in `allMags` because only existing values can be selected by the user.

Applied to files:

  • frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx
📚 Learning: 2025-12-04T13:41:44.912Z
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T13:41:44.912Z
Learning: In Ant Design v6, the Alert component's `message` prop has been deprecated and replaced by `title`. When migrating from v5 to v6, Alert components should use `title` for the main content (and optionally `description` for additional details).

Applied to files:

  • frontend/javascripts/dashboard/dataset_view.tsx
🧬 Code graph analysis (1)
frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx (2)
frontend/javascripts/viewer/model/types/tree_types.ts (1)
  • Tree (61-75)
frontend/javascripts/viewer/view/right-border-tabs/advanced_search_popover.tsx (1)
  • AdvancedSearchPopover (27-254)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build-smoketest-push
  • GitHub Check: frontend-tests
  • GitHub Check: backend-tests
🔇 Additional comments (8)
frontend/javascripts/dashboard/dataset_view.tsx (2)

241-265: Wrapping adminHeader actions in Space is a good layout modernization

Replacing the old pull-right + margins layout with <Space> keeps the actions grouped and simplifies spacing, and should play nicely with other Antd v6 Space‑based toolbars.


490-500: Alert migration to title/description matches the Antd v6 API

Switching NewJobsAlert to use title={newJobsHeader} with description={newJobsList} is the right v6 replacement for the old message prop and keeps the visual structure unchanged aside from v6 styling. Based on learnings about the Antd v6 Alert API.

frontend/javascripts/dashboard/dashboard_task_list_view.tsx (3)

239-275: Space orientation migration in renderActions matches AntD v6 API

Switching from the deprecated direction prop to orientation="vertical" on Space is aligned with the v6 API and should preserve the previous vertical stacking semantics with size={1}. (ant.design)

Please just double-check in the UI that the vertical spacing and alignment of the action links/buttons still look as intended, especially within the constrained column in the finished/unfinished task cards.


372-409: Card variant="borderless" is the correct replacement for bordered={false}

Using variant="borderless" on the placeholder Card is the recommended v6 way to express a borderless card and replaces the deprecated bordered prop one-to-one. (ant.design)

Visually confirm that the placeholder card still appears borderless and doesn’t pick up any unexpected default border styling under the new theme.


569-581: TopBar actions wrapped in Space—layout change looks fine, verify alignment

Wrapping “Get a New Task” and “Show {getFinishVerb()} Tasks Only” in <Space> is consistent with the v6 layout patterns and should give you a clean horizontal grouping. Based on learnings, AntD recommends Space/Flex for these control clusters. (ant.design)

Since the previous div used pull-right, please verify in the actual dashboard header that the portal content is still right‑aligned as desired; if not, you may need a small wrapper style or Flex alignment tweak around this Space.

frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx (3)

903-917: Ad‑hoc mesh settings tooltip & Select config look good

Wrapping the explanatory copy in a typography paragraph and disabling popupMatchSelectWidth on the Select keeps the UI readable without changing behavior.

If not done yet, quickly test this popover on narrow viewports to confirm the dropdown width still behaves as intended.


996-1056: Meshes header grouped with Space keeps behavior while simplifying layout

Using a Space container to align the mesh file Select, refresh, add, progress, and settings controls is a clean layout refactor; event handlers and logic are preserved.

Please sanity‑check the clickable regions for the reload and plus icons in the browser to ensure they still feel large enough and are easy to hit.


1862-1880: Search toolbar layout & icon usage remain consistent

The Space wrapper nicely aligns the search trigger and meshes header, and switching ButtonComponent to use its icon prop is consistent with typical button usage; no behavioral issues spotted.

Worth a quick UI pass to confirm the toolbar doesn’t wrap awkwardly at smaller panel widths.

hotzenklotz and others added 2 commits December 4, 2025 15:41
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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: 3

🧹 Nitpick comments (1)
frontend/javascripts/viewer/view/action-bar/tracing_actions_view.tsx (1)

124-178: Layout-actions group looks good; consider dropdown-close behavior and accessibility

The new layout-actions group with a Flex row of icon-only text Buttons is a nice consolidation and the move from a broad container handler to scoped onClick={(e) => { e.stopPropagation(); ... }} on each Button avoids the previous keyboard-event issues in the label.

Two follow-ups worth considering:

  1. Dropdown close behavior
    Because each handler calls e.stopPropagation(), these clicks will not trigger the Menu’s own onClick logic (including any automatic dropdown close). If the intended UX is to keep the menu open after actions like “Reset Layout” or “Save current layout”, this is perfect; otherwise, you may want to explicitly close the parent dropdown after certain actions.

  2. Accessible names for icon-only Buttons
    The Add / Reset / Auto-save toggle / Save controls are currently icon-only. For better screen-reader support, consider adding aria-label (or similar) to each Button, e.g. aria-label="Add layout", aria-label="Reset layout", etc., matching the Tooltip text. This keeps the UI visually compact while making the actions self-describing to assistive tech.

Based on learnings, this aligns with the project’s Antd v6 migration approach; the suggestions are primarily about UX and a11y polish.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bf9a63e and 3176e78.

📒 Files selected for processing (2)
  • frontend/javascripts/admin/voxelytics/task_list_view.tsx (4 hunks)
  • frontend/javascripts/viewer/view/action-bar/tracing_actions_view.tsx (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T14:12:26.474Z
Learning: For Ant Design v6 component API documentation and migration guidance, use https://ant.design/llms-full.txt as the authoritative source. This llms-full.txt file contains the official v6 component APIs, including deprecated props and their replacements.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T13:41:44.912Z
Learning: In Ant Design v6, the Alert component's `message` prop has been deprecated and replaced by `title`. When migrating from v5 to v6, Alert components should use `title` for the main content (and optionally `description` for additional details).
📚 Learning: 2025-09-04T10:01:56.727Z
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 8895
File: frontend/javascripts/viewer/view/action_bar_view.tsx:0-0
Timestamp: 2025-09-04T10:01:56.727Z
Learning: In frontend/javascripts/viewer/view/action_bar_view.tsx, knollengewaechs prefers not to use onKeyUpCapture for preventing modal close on modifier keys because: 1) holding ctrl while opening modal will still close on keyup, 2) normal case of opening modal then pressing ctrl doesn't cause issues with just onKeyDownCapture.

Applied to files:

  • frontend/javascripts/viewer/view/action-bar/tracing_actions_view.tsx
🧬 Code graph analysis (1)
frontend/javascripts/admin/voxelytics/task_list_view.tsx (1)
frontend/javascripts/libs/window.ts (1)
  • location (60-60)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: backend-tests
  • GitHub Check: build-smoketest-push
  • GitHub Check: frontend-tests
🔇 Additional comments (2)
frontend/javascripts/admin/voxelytics/task_list_view.tsx (1)

5-5: LGTM!

The new imports (DownOutlined, Flex, Space) are necessary for the Antd v6 layout refactoring and are correctly used throughout the file.

Also applies to: 20-20, 25-25

frontend/javascripts/viewer/view/action-bar/tracing_actions_view.tsx (1)

12-12: Import additions are consistent with usage

The added Button, Flex, Space, and Tooltip imports are all used below and look correct for this component; no changes needed here.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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: 1

♻️ Duplicate comments (1)
frontend/javascripts/admin/statistic/time_tracking_overview.tsx (1)

295-318: Critical issue from previous review remains unresolved: rowKey extracts object.

The rowKey="user" at line 297 still extracts the entire user object as the row key, which causes all rows to have identical "[object Object]" keys and breaks expand/collapse functionality in FixedExpandableTable.

As noted in the previous review, this should be changed to use a scalar key:

-          rowKey="user"
+          rowKey={(entry) => entry.user.id}
🧹 Nitpick comments (1)
frontend/javascripts/admin/statistic/project_progress_report_view.tsx (1)

74-91: Header refactor looks good; consider minor polish.

The migration to Flex/Space with Button-wrapped icons follows the Antd v6 pattern correctly. The logic and handlers are preserved as expected.

Two optional improvements:

  1. Line 77: The trailing space string " " after the FormattedDate conditional is unnecessary—the Space component already handles spacing between its children.

  2. Lines 78-89: The circular icon buttons lack aria-label attributes, which would help screen reader users understand their purpose.

Apply this diff to address both suggestions:

       <Space>
-        {updatedAt != null ? <FormattedDate timestamp={updatedAt} /> : null}{" "}
+        {updatedAt != null ? <FormattedDate timestamp={updatedAt} /> : null}
         <Button
           icon={<SettingOutlined />}
           shape="circle"
           variant="outlined"
           onClick={handleOpenSettings}
+          aria-label="Open settings"
         />
         <Button
           icon={<ReloadOutlined />}
           shape="circle"
           variant="outlined"
           onClick={handleReload}
+          aria-label="Reload data"
         />
       </Space>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 20be911 and fb82631.

📒 Files selected for processing (4)
  • frontend/javascripts/admin/job/job_list_view.tsx (0 hunks)
  • frontend/javascripts/admin/statistic/project_and_annotation_type_dropdown.tsx (2 hunks)
  • frontend/javascripts/admin/statistic/project_progress_report_view.tsx (2 hunks)
  • frontend/javascripts/admin/statistic/time_tracking_overview.tsx (3 hunks)
💤 Files with no reviewable changes (1)
  • frontend/javascripts/admin/job/job_list_view.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/javascripts/admin/statistic/project_and_annotation_type_dropdown.tsx
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T14:12:26.474Z
Learning: For Ant Design v6 component API documentation and migration guidance, use https://ant.design/llms-full.txt as the authoritative source. This llms-full.txt file contains the official v6 component APIs, including deprecated props and their replacements.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/admin/voxelytics/task_list_view.tsx:691-700
Timestamp: 2025-12-08T09:02:43.441Z
Learning: In Ant Design v6, Select (and similar components like AutoComplete, Cascader, TreeSelect) use a nested semantic DOM structure for styles and classNames. The correct pattern is `styles={{ popup: { root: { ... } } }}` or `classNames={{ popup: { root: "..." } }}`, NOT a flat structure. This is the official v6 API for targeting semantic parts of these components.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T13:41:44.912Z
Learning: In Ant Design v6, the Alert component's `message` prop has been deprecated and replaced by `title`. When migrating from v5 to v6, Alert components should use `title` for the main content (and optionally `description` for additional details).
🧬 Code graph analysis (2)
frontend/javascripts/admin/statistic/project_progress_report_view.tsx (1)
frontend/javascripts/components/formatted_date.tsx (1)
  • FormattedDate (19-42)
frontend/javascripts/admin/statistic/time_tracking_overview.tsx (1)
frontend/javascripts/libs/format_utils.ts (1)
  • formatMilliseconds (417-419)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build-smoketest-push
  • GitHub Check: backend-tests
  • GitHub Check: frontend-tests
🔇 Additional comments (1)
frontend/javascripts/admin/statistic/project_progress_report_view.tsx (1)

3-3: LGTM: Import updates support the layout refactor.

The addition of Button, Flex, and Space aligns with the Antd v6 migration pattern used throughout this PR.

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 (2)
frontend/javascripts/viewer/view/action-bar/save_actions.tsx (1)

4-4: Consistent use of Space.Compact for action groups; verify nested layout visually

Importing Space and wrapping the various action clusters (read-only, sandbox, and save/undo-redo) in Space.Compact is consistent with Antd’s compact-mode usage and should improve visual grouping without changing logic. Given the nesting (compact around UndoRedoActions, and again around UndoRedoActions + SandboxActions / SaveButton), please verify in the app that:

  • Button groups render with the expected spacing and border-radius (no double gaps between clusters).
  • Disabled/read-only states and hide-on-small-screen spans still behave as intended on small breakpoints.

If everything looks good in the main viewer scenarios, the changes are fine to keep as-is.

Also applies to: 44-65, 112-133, 157-161, 165-169

frontend/javascripts/viewer/view/action-bar/tracing_actions_view.tsx (1)

124-178: Improve i18n and accessibility for the new icon-only layout action buttons

The new layout-actions group is a nice consolidation and the event handling with e.stopPropagation() is appropriate in this menu context. Two follow-ups would make this more robust:

  1. i18n: Tooltip texts are hard-coded English strings while the rest of the menu already uses messages. Consider moving these to the message catalog for consistency.
  2. Accessibility: These are icon-only buttons. While the icons provide some label, adding explicit accessible names and reusing the same strings as the tooltips makes the intent clearer to screen readers.

Example refactor (using placeholder message keys you can adapt):

-            <Tooltip title="Add a new Layout">
+            <Tooltip title={messages["layouting.add_layout"]}>
               <Button
                 type="text"
                 icon={<PlusOutlined />}
+                aria-label={messages["layouting.add_layout"]}
                 onClick={(e) => {
                   e.stopPropagation();
                   addNewLayout();
                 }}
               />
             </Tooltip>
-            <Tooltip title="Reset Layout">
+            <Tooltip title={messages["layouting.reset_layout"]}>
               <Button
                 type="text"
                 icon={<RollbackOutlined />}
+                aria-label={messages["layouting.reset_layout"]}
                 onClick={(e) => {
                   e.stopPropagation();
                   onResetLayout();
                 }}
               />
             </Tooltip>
-            <Tooltip
-              title={`${autoSaveLayouts ? "Disable" : "Enable"} auto-saving of current layout`}
-            >
+            <Tooltip
+              title={
+                autoSaveLayouts
+                  ? messages["layouting.disable_auto_save"]
+                  : messages["layouting.enable_auto_save"]
+              }
+            >
               <Button
                 type="text"
                 icon={autoSaveLayouts ? <DisconnectOutlined /> : <LinkOutlined />}
+                aria-label={
+                  autoSaveLayouts
+                    ? messages["layouting.disable_auto_save"]
+                    : messages["layouting.enable_auto_save"]
+                }
                 onClick={(e) => {
                   e.stopPropagation();
                   setAutoSaveLayouts(!autoSaveLayouts);
                 }}
               />
             </Tooltip>
             {!autoSaveLayouts && (
-              <Tooltip title="Save current layout">
+              <Tooltip title={messages["layouting.save_current_layout"]}>
                 <Button
                   type="text"
                   icon={<SaveOutlined />}
+                  aria-label={messages["layouting.save_current_layout"]}
                   onClick={(e) => {
                     e.stopPropagation();
                     saveCurrentLayout();
                   }}
                 />
               </Tooltip>
             )}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 78dd0fa and 7c154cb.

📒 Files selected for processing (5)
  • frontend/javascripts/viewer/view/action-bar/save_actions.tsx (6 hunks)
  • frontend/javascripts/viewer/view/action-bar/tracing_actions_view.tsx (3 hunks)
  • frontend/javascripts/viewer/view/action-bar/undo_redo_actions.tsx (3 hunks)
  • frontend/javascripts/viewer/view/action-bar/view_dataset_actions_view.tsx (1 hunks)
  • frontend/stylesheets/trace_view/_tracing_view.less (15 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T14:12:26.474Z
Learning: For Ant Design v6 component API documentation and migration guidance, use https://ant.design/llms-full.txt as the authoritative source. This llms-full.txt file contains the official v6 component APIs, including deprecated props and their replacements.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/admin/voxelytics/task_list_view.tsx:691-700
Timestamp: 2025-12-08T09:02:43.441Z
Learning: In Ant Design v6, Select (and similar components like AutoComplete, Cascader, TreeSelect) use a nested semantic DOM structure for styles and classNames. The correct pattern is `styles={{ popup: { root: { ... } } }}` or `classNames={{ popup: { root: "..." } }}`, NOT a flat structure. This is the official v6 API for targeting semantic parts of these components.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T13:41:44.912Z
Learning: In Ant Design v6, the Alert component's `message` prop has been deprecated and replaced by `title`. When migrating from v5 to v6, Alert components should use `title` for the main content (and optionally `description` for additional details).
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 8849
File: frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/collapsible_split_merger_evaluation_settings.tsx:39-51
Timestamp: 2025-08-14T14:12:03.293Z
Learning: Since Ant Design version 5.18, Form.Item components support the layout prop (layout="horizontal", layout="vertical", etc.), allowing individual form items to override the parent Form's layout setting. This is a newer API addition that provides more granular control over form item layouts.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 8849
File: frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/collapsible_split_merger_evaluation_settings.tsx:39-51
Timestamp: 2025-08-14T14:12:03.293Z
Learning: Since Ant Design version 5.18, Form.Item components support the layout prop (layout="horizontal", layout="vertical", layout="inline"), allowing individual form items to override the parent Form's layout setting. This enables mixed layouts within a single form and was added as a new API feature in v5.18 according to the official changelog.
📚 Learning: 2025-10-21T10:54:16.468Z
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 8961
File: frontend/javascripts/viewer/model/actions/annotation_actions.ts:80-82
Timestamp: 2025-10-21T10:54:16.468Z
Learning: In frontend/javascripts/viewer/model/actions/annotation_actions.ts, the ShowManyBucketUpdatesWarningAction is intentionally not included in the AnnotationActionTypes union because it's a UI-only action that doesn't modify the annotation state through reducers.

Applied to files:

  • frontend/javascripts/viewer/view/action-bar/save_actions.tsx
  • frontend/javascripts/viewer/view/action-bar/tracing_actions_view.tsx
  • frontend/javascripts/viewer/view/action-bar/undo_redo_actions.tsx
📚 Learning: 2025-09-04T10:01:56.727Z
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 8895
File: frontend/javascripts/viewer/view/action_bar_view.tsx:0-0
Timestamp: 2025-09-04T10:01:56.727Z
Learning: In frontend/javascripts/viewer/view/action_bar_view.tsx, knollengewaechs prefers not to use onKeyUpCapture for preventing modal close on modifier keys because: 1) holding ctrl while opening modal will still close on keyup, 2) normal case of opening modal then pressing ctrl doesn't cause issues with just onKeyDownCapture.

Applied to files:

  • frontend/javascripts/viewer/view/action-bar/tracing_actions_view.tsx
  • frontend/javascripts/viewer/view/action-bar/undo_redo_actions.tsx
📚 Learning: 2025-12-08T09:02:43.441Z
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/admin/voxelytics/task_list_view.tsx:691-700
Timestamp: 2025-12-08T09:02:43.441Z
Learning: In Ant Design v6, Select (and similar components like AutoComplete, Cascader, TreeSelect) use a nested semantic DOM structure for styles and classNames. The correct pattern is `styles={{ popup: { root: { ... } } }}` or `classNames={{ popup: { root: "..." } }}`, NOT a flat structure. This is the official v6 API for targeting semantic parts of these components.

Applied to files:

  • frontend/stylesheets/trace_view/_tracing_view.less
🧬 Code graph analysis (1)
frontend/javascripts/viewer/view/action-bar/tracing_actions_view.tsx (2)
frontend/javascripts/viewer/view/layouting/layout_persistence.ts (1)
  • addNewLayout (164-186)
frontend/javascripts/viewer/view/layouting/tracing_layout_view.tsx (1)
  • setAutoSaveLayouts (435-437)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build-smoketest-push
  • GitHub Check: backend-tests
  • GitHub Check: frontend-tests
🔇 Additional comments (7)
frontend/javascripts/viewer/view/action-bar/view_dataset_actions_view.tsx (1)

99-115: Margin removal on outer wrapper looks fine; just double-check toolbar alignment

Dropping the hard-coded left margin on the outer <div> simplifies layout and fits the “less ad-hoc spacing” goal. This should be safe as long as the parent container now provides the desired spacing; a quick visual check of the action bar to confirm horizontal alignment with neighboring controls is enough here.

frontend/stylesheets/trace_view/_tracing_view.less (3)

380-380: CSS selector formatting change—no functional impact.

The space removal in .ant-select>.ant-select-selector (and similar changes at lines 72, 182, 256) is purely stylistic. CSS treats .ant-select > .ant-select-selector and .ant-select>.ant-select-selector identically, so specificity and selector behavior are unchanged. This is safe.


384-389: Verify upgrade banner button styling is intentional for Antd v6.

The additions of display: flex; align-items: center; to .upgrade-banner-button appear intentional for Antd v6 layout alignment. Ensure this styling does not conflict with any parent or sibling button styles and renders correctly across all supported browsers.


72-72: No action required—Alert selector structure is correct for Ant Design v6.

The nested selector pattern at lines 443–449 (.ant-alert-close-icon.anticon and .anticon-close) correctly targets the close button icon in Ant Design v6's Alert component. The child combinator spacing changes (lines 72, 256, 380) are purely stylistic with no functional impact.

frontend/javascripts/viewer/view/action-bar/undo_redo_actions.tsx (1)

1-1: Use of Space.Compact for grouped undo/redo buttons looks correct

Import and usage of Space.Compact match the Antd API for compact button groups; behavior and handlers are unchanged. Please just double-check in the viewer that the extra wrapper doesn’t interfere with any existing CSS targeting .undo-redo-button (spacing, alignment, or hover styles).

Also applies to: 20-21, 31-41

frontend/javascripts/viewer/view/action-bar/tracing_actions_view.tsx (2)

12-12: Import changes align with new layout-actions usage

Adding Button and Flex here matches their usage in the new layout actions group below; nothing else to adjust.


201-202: Placement of SaveActions and TaskCompletionActions looks good

Rendering <SaveActions /> and <TaskCompletionActions /> at the top of TracingActionsView is straightforward and consistent with the rest of the component; no issues spotted here.

@knollengewaechs
Copy link
Contributor

Testing went fine! I tested mostly in dark-mode and mostly on chromium and mozilla. The only thing that I dont remember being mentioned before is that the highlighting of buttons in annotation/DS view is not surrounding the whole button, only the outer margins (see slack).
I will have a look at the code tomorrow.

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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2bcc301 and ff16122.

📒 Files selected for processing (2)
  • frontend/javascripts/admin/task/task_search_form.tsx (5 hunks)
  • frontend/javascripts/viewer/view/action_bar_view.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/javascripts/viewer/view/action_bar_view.tsx
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T14:12:26.493Z
Learning: For Ant Design v6 component API documentation and migration guidance, use https://ant.design/llms-full.txt as the authoritative source. This llms-full.txt file contains the official v6 component APIs, including deprecated props and their replacements.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/admin/voxelytics/task_list_view.tsx:691-700
Timestamp: 2025-12-08T09:02:43.473Z
Learning: In Ant Design v6, Select (and similar components like AutoComplete, Cascader, TreeSelect) use a nested semantic DOM structure for styles and classNames. The correct pattern is `styles={{ popup: { root: { ... } } }}` or `classNames={{ popup: { root: "..." } }}`, NOT a flat structure. This is the official v6 API for targeting semantic parts of these components.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T13:41:44.919Z
Learning: In Ant Design v6, the Alert component's `message` prop has been deprecated and replaced by `title`. When migrating from v5 to v6, Alert components should use `title` for the main content (and optionally `description` for additional details).
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 8849
File: frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/collapsible_split_merger_evaluation_settings.tsx:39-51
Timestamp: 2025-08-14T14:12:03.293Z
Learning: Since Ant Design version 5.18, Form.Item components support the layout prop (layout="horizontal", layout="vertical", etc.), allowing individual form items to override the parent Form's layout setting. This is a newer API addition that provides more granular control over form item layouts.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 8849
File: frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/collapsible_split_merger_evaluation_settings.tsx:39-51
Timestamp: 2025-08-14T14:12:03.293Z
Learning: Since Ant Design version 5.18, Form.Item components support the layout prop (layout="horizontal", layout="vertical", layout="inline"), allowing individual form items to override the parent Form's layout setting. This enables mixed layouts within a single form and was added as a new API feature in v5.18 according to the official changelog.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build-smoketest-push
  • GitHub Check: backend-tests
  • GitHub Check: frontend-tests
🔇 Additional comments (2)
frontend/javascripts/admin/task/task_search_form.tsx (2)

4-4: LGTM!

The Flex component import is correctly added to support the new button layout.


206-240: The iconPlacement="end" prop is valid in Ant Design v6, but the Dropdown menu pattern may bypass form validation.

  1. iconPlacement="end" is correct: Ant Design v6 renamed iconPosition to iconPlacement, which accepts "start" | "end" for logical positioning. This is valid.

  2. Dropdown menu onClick bypasses form submission: The Dropdown menu handler calls handleSearchFormFinish(true) directly, while the normal Search button uses htmlType="submit" to trigger the Form's onFinish. This inconsistency means the random search may skip form validation. Consider ensuring both paths go through the same validation/submission flow.

onFormValueChange = (changedValues: UploadFormFieldTypes) => {
onFormValueChange = (
changedValues: Partial<UploadFormFieldTypes>,
_allValues: UploadFormFieldTypes,
Copy link
Contributor

Choose a reason for hiding this comment

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

why did you add _allValues as a parameter?

Copy link
Member Author

Choose a reason for hiding this comment

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

There is no reason. The LLM decide to do that. I can remove it.


const onValuesChange = useCallback(
(_changedValues: DatasetSettingsFormData, _allValues: DatasetSettingsFormData) => {
(_changedValues: Partial<DatasetSettingsFormData>, _allValues: DatasetSettingsFormData) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

as above; why cant there parameters be removed if they are not used?

Copy link
Contributor

@knollengewaechs knollengewaechs left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! The code looks great. Although coderabbit doesnt want to believe it :D
I only have one minor question and found two issues (highlighting and onClick behaviour of certain buttons).

Copy link
Contributor

@knollengewaechs knollengewaechs left a comment

Choose a reason for hiding this comment

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

looks good to me! 🎉

@hotzenklotz hotzenklotz enabled auto-merge (squash) December 17, 2025 07:59
@hotzenklotz hotzenklotz merged commit eed62c4 into master Dec 17, 2025
5 checks passed
@hotzenklotz hotzenklotz deleted the antd-v6 branch December 17, 2025 08:06
@hotzenklotz hotzenklotz mentioned this pull request Dec 17, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to Antd v6

3 participants