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.0.1
  • 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
  • <List> component is deprecated but the new replacement is not yet ready but still under development.

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 frontend migration to Ant Design v6: renamed component props (Card, Space, Alert/notification/toast), Select search config switched to object form, Dropdown/Popover/Tree API and ref typings updated, several handler/type signatures tightened, ButtonComponent converted to forwardRef, and package.json dependency bumps.

Changes

Cohort / File(s) Summary
Card styling updates
frontend/javascripts/.../dataset_components.tsx, frontend/javascripts/admin/onboarding.tsx, frontend/javascripts/dashboard/.../dashboard_task_list_view.tsx, frontend/javascripts/dashboard/.../dataset_folder_view.tsx, frontend/javascripts/dashboard/.../explorative_annotations_view.tsx, frontend/javascripts/dashboard/.../publication_card.tsx, frontend/javascripts/viewer/.../alignment_tab.tsx, frontend/javascripts/viewer/.../run_ai_model_tab.tsx, ...
Replaced bordered={false} with variant="borderless" on Card components.
Space prop rename (direction → orientation)
frontend/javascripts/admin/dataset/dataset_upload_view.tsx, frontend/javascripts/dashboard/dashboard_task_list_view.tsx, frontend/javascripts/viewer/.../alignment_tab.tsx, frontend/javascripts/viewer/.../run_ai_model_tab.tsx, frontend/javascripts/viewer/.../ai_job_forms/*.tsx, ...
Replaced direction="vertical" with orientation="vertical" on Space usages.
Alert / notification / toast field rename (message → title)
frontend/javascripts/libs/toast.tsx, frontend/javascripts/viewer/.../welcome_toast.tsx, frontend/javascripts/viewer/view/context_menu.tsx, frontend/javascripts/admin/voxelytics/task_list_view.tsx, many frontend/javascripts/**/.../*.tsx
Switched Alert/notification/toast payload fields from message to title (and adjusted toast mapping and some notification descriptions).
Select showSearch config changes
frontend/javascripts/admin/dataset/dataset_components.tsx, frontend/javascripts/admin/project/project_create_view.tsx, frontend/javascripts/admin/scripts/script_create_view.tsx, frontend/javascripts/admin/task/*.tsx, frontend/javascripts/admin/statistic/project_and_annotation_type_dropdown.tsx, frontend/javascripts/admin/user/user_selection_component.tsx, ...
Replaced boolean showSearch + optionFilterProp/filterOption with showSearch={{ optionFilterProp: "label", ... }} object config.
Dropdown / Popover API updates
frontend/javascripts/dashboard/advanced_dataset/dataset_table.tsx, frontend/javascripts/viewer/view/context_menu.tsx, frontend/javascripts/viewer/view/right-border-tabs/advanced_search_popover.tsx, frontend/javascripts/viewer/view/right-border-tabs/sidebar_context_menu.tsx, frontend/javascripts/admin/account/helpers/settings_card.tsx, frontend/javascripts/dashboard/folders/folder_selection.tsx
Replaced overlayClassNameclassNames={{ root: ... }}, destroyPopupOnHidedestroyOnHidden, and adapted Popover overlayInnerStylestyles.
MenuProps / onClick typing & Menu API
frontend/javascripts/navbar.tsx, frontend/javascripts/viewer/view/right-border-tabs/comment_tab/comment_tab_view.tsx, frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view_helper.tsx, frontend/javascripts/viewer/view/context_menu.tsx
Switched Menu type imports to antd's MenuProps and changed handler types to MenuProps["onClick"] / derived parameter types; added guarded calls where needed.
Tree / GetRef ref type updates
frontend/javascripts/viewer/view/right-border-tabs/scrollable_virtualized_tree.tsx, frontend/javascripts/viewer/view/right-border-tabs/segments_tab/segments_view.tsx, related files
Replaced RcTree ref types with GetRef<typeof Tree> / GetRef<typeof AntdTree> and updated imports/usages.
Handler signature/type tightenings (Partial<...>)
frontend/javascripts/admin/dataset/dataset_upload_view.tsx, frontend/javascripts/dashboard/dataset/dataset_settings_context.tsx, frontend/javascripts/dashboard/dataset/dataset_settings_provider.tsx
Changed form change callbacks to accept Partial<...> for changedValues and added _allValues params where applicable.
InputNumber ref typing
frontend/javascripts/admin/organization/upgrade_plan_modal.tsx
Replaced `useRef<HTMLInputElement
Button / Dropdown composition & icon prop rename
frontend/javascripts/admin/account/account_profile_view.tsx, frontend/javascripts/viewer/view/action-bar/tools/volume_specific_ui.tsx, frontend/javascripts/viewer/view/action-bar/dataset_rotation_popover_view.tsx, frontend/javascripts/admin/dataset/dataset_view.tsx, ...
Replaced Dropdown.Button with Space.Compact + Button + Dropdown composition; renamed iconPositioniconPlacement.
ButtonComponent refactor (forwardRef)
frontend/javascripts/viewer/view/components/button_component.tsx
Converted ButtonComponent to React.forwardRef, forwarded ref to underlying element(s), switched to dedicated noop import.
Misc UI / behavioral edits
frontend/javascripts/banners.tsx, frontend/javascripts/components/error_boundary.tsx, frontend/javascripts/viewer/view/action-bar/tracing_actions_view.tsx, frontend/javascripts/viewer/view/action-bar/download_modal_view.tsx, frontend/javascripts/viewer/view/action-bar/private_links_view.tsx, ...
Various: closable changed to object with onClose, notification description adjustments, grouped menu items, DatePicker array guard, minor spacing/style tweaks.
Type import path adjustments
frontend/javascripts/dashboard/dataset/helper_components.tsx, frontend/javascripts/viewer/view/right-border-tabs/comment_tab/comment_tab_view.tsx
Updated type import sources (e.g., @rc-component/form and antd for MenuProps).
Dependency bumps
package.json
Bumped antd to ^6.0.1, @ant-design/icons to ^6.1.0, @ant-design/colors to ^7.2.1.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

  • Reason: Many repetitive API renames from Antd v5→v6 reduce diffs' heterogeneity, but several hotspots require careful checks.
  • Pay extra attention to:
    • frontend/javascripts/viewer/view/components/button_component.tsx — forwardRef, ref forwarding and consumers
    • Dataset settings onValuesChange signature and all callers (Partial<> change)
    • Tree/GetRef ref typing and forwarded refs across tree components
    • Dropdown/Popover lifecycle prop replacements (destroyOnHidden vs destroyPopupOnHide)
    • Select showSearch object usages where custom filterOption logic moved

Possibly related PRs

Suggested labels

refactoring, enhancement

Suggested reviewers

  • philippotto
  • MichaelBuessemeyer

Poem

🐰 I hopped through props both old and new,
Cards borderless and Space with orientation true.
Menus learned MenuProps from antd's light,
Trees got GetRef, buttons forwardRef take flight.
A tiny rabbit cheers — the frontend's shining bright!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 1.30% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'WIP Upgrade to Antd v6' is somewhat vague because it includes 'WIP' (work-in-progress) and uses generic term 'Upgrade', though it does identify the main task. The description clarifies this is a comprehensive migration. Consider finalizing the title by removing 'WIP' and making it more specific: 'Upgrade Ant Design to v6' or 'Migrate Ant Design from v5 to v6' to better convey the completed work.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR successfully implements the objective from issue #9115 by upgrading Antd from v5 to v6, updating related dependencies, and performing the necessary code migrations throughout the codebase as specified in the official migration guide.
Out of Scope Changes check ✅ Passed All changes are in-scope for the Antd v6 upgrade objective: dependency version bumps, prop renames (message→title, direction→orientation), ref type updates, component API changes, and layout restructuring align with the official v6 migration guide requirements.
Description check ✅ Passed The pull request description clearly describes the changes: upgrading Antd from v5 to v6, updating component props, and restructuring layouts. It is directly related to the changeset.
✨ 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

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

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.

@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 +97 to +102
<Space.Compact>
<Button>{themeItems.find((item) => item.key === selectedTheme)?.label}</Button>
<Dropdown menu={{ items: themeItems }} trigger={["click"]}>
<Button icon={<DownOutlined />} />
</Dropdown>
</Space.Compact>
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

❓ Verification inconclusive

Ant Design v6 migration Dropdown.Button replacement pattern recommended


Short answer: AntD v6 removes Dropdown.Button; the recommended replacement pattern is to compose a Dropdown + Button inside Space.Compact (i.e., Space.Compact + Dropdown + Button). [1][2][3]

Example pattern (conceptual):

  • Wrap the primary Button and the Dropdown trigger in Space.Compact.
  • Use Dropdown (menu prop) for the menu and a Button for the left action.

Sources:

  • Ant Design v6 tasks / deprecations (Dropdown.Button removed — use Space.Compact + Dropdown + Button). [1]
  • Release notes / changelog mentioning removal and replacement. [2]
  • Ant Design docs referencing Dropdown/Button usage and v6 migration notes. [3]

References:
[1] GitHub ant-design issue: Ant Design v6 tasks (remove Dropdown.Button).
[2] Release/changelog notes for v6 (rm Dropdown.Button / use Space.Compact).
[3] Ant Design Dropdown docs (usage examples and migration notes).


ARIA labels icon buttons accessibility best practices


Key best practices for accessible icon-only buttons

  • Always give the control an accessible name (visible text, aria-labelledby, or aria-label) so screen readers announce its purpose. If no visible label exists, use aria-label or aria-labelledby. (w3.org)
  • Prefer visible text when practical. Use aria-label only when the label must be hidden; prefer aria-labelledby when you can reference existing visible text. (developer.mozilla.org)
  • Mark purely decorative icons as aria-hidden="true" (and SVG focusable="false") so the icon doesn’t become the accessible name. Provide the name on the button element instead. (developer.mozilla.org)
  • Use concise, action-oriented labels (e.g., "Close", "Search", "Download") that describe the button’s function — not its visual appearance. Avoid empty aria-label values. (getwcag.com)
  • Don’t rely on title/tooltips alone for the accessible name; tooltips may not be exposed to AT and are not a substitute for an accessible name. (developer.mozilla.org)
  • For complex explanations, use aria-describedby (or aria-description) for supplemental info; keep the accessible name short and actionable. (developer.mozilla.org)
  • Ensure keyboard focus and a sufficient hit target (recommended ≥44×44 px for touch) and test with screen readers (NVDA/JAWS/VoiceOver) and automated checks to confirm the accessible name appears in the accessibility tree. (getwcag.com)
  • Enforce component-level rules in your design system (require a label prop for icon-button components) and include automated tests for non-empty accessible names. (getwcag.com)

If you’d like, I can review specific icon-button code examples and give exact fixes.

Citations:


Add accessible label to icon-only Button triggering theme dropdown.

The refactor correctly implements the Ant Design v6 migration pattern (Space.Compact + Dropdown + Button replaces the deprecated Dropdown.Button). However, the icon-only Button at line 100 lacks an accessible name, which prevents screen readers from announcing its purpose.

Apply this fix:

-          <Button icon={<DownOutlined />} />
+          <Button icon={<DownOutlined />} aria-label="Select theme" />
📝 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
<Space.Compact>
<Button>{themeItems.find((item) => item.key === selectedTheme)?.label}</Button>
<Dropdown menu={{ items: themeItems }} trigger={["click"]}>
<Button icon={<DownOutlined />} />
</Dropdown>
</Space.Compact>
<Space.Compact>
<Button>{themeItems.find((item) => item.key === selectedTheme)?.label}</Button>
<Dropdown menu={{ items: themeItems }} trigger={["click"]}>
<Button icon={<DownOutlined />} aria-label="Select theme" />
</Dropdown>
</Space.Compact>
🤖 Prompt for AI Agents
In frontend/javascripts/admin/account/account_profile_view.tsx around lines 97
to 102, the icon-only Button used to trigger the theme Dropdown lacks an
accessible name; add an accessible label by supplying a descriptive aria-label
(or aria-labelledby) prop (preferably using the existing i18n/localization
string for "Change theme" or similar) to the icon-only Button so screen readers
announce its purpose; ensure the label is concise and meaningful and retain the
icon and existing click/trigger behavior.

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.

<Col span="6">
<Card
bordered={false}
variant="borderless"
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

🧩 Analysis chain

🌐 Web query:

Ant Design v6 Card component variant prop borderless API documentation

💡 Result:

Short answer: Ant Design v6 does not add a Card-specific "variant" prop — Card still uses the bordered boolean (bordered={false}) to remove the border. The newer "variant" system in v5+/v6 mainly targets form/input-like components (Input, Select, DatePicker, etc.), where variant values include "outlined" | "borderless" | "filled" | "underlined"; form components can also resolve the legacy bordered prop to the "borderless" variant via the variant resolution logic. See Ant Design Card API (shows bordered prop) and the variant-system documentation/implementation note. [1][2]

Sources

  • Ant Design Card API (shows bordered prop, examples of bordered={false}). [1]
  • Variant system / useVariant description (explains variants and that deprecated bordered maps to borderless; applies to input components). [2]

🏁 Script executed:

# Search for other Card variant usages in the codebase to cross-reference
rg 'variant\s*=\s*["\']' --type tsx --type ts -A 2 -B 2 | grep -i card | head -30

Repository: scalableminds/webknossos

Length of output: 136


🏁 Script executed:

# Check the specific file context around line 488
sed -n '480,495p' frontend/javascripts/dashboard/explorative_annotations_view.tsx

Repository: scalableminds/webknossos

Length of output: 561


Remove variant="borderless" from Card — Ant Design v6 Card does not support the variant prop.

Ant Design v6 Card component still uses the bordered prop (not variant). The variant prop system only applies to form/input components like Input, Select, DatePicker, etc. Change variant="borderless" back to bordered={false} to match the v6 Card API.

🤖 Prompt for AI Agents
In frontend/javascripts/dashboard/explorative_annotations_view.tsx around line
488, the Card is using unsupported prop variant="borderless"; remove that prop
and replace it with the Ant Design v6 Card API equivalent bordered={false} so
the Card renders borderless correctly.

Comment on lines +151 to +155
title: toastMessage,
style: {},
className: config.className || "",
onClose,
btn: config.customFooter,
actions: config.customFooter,
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

🧩 Analysis chain

🌐 Web query:

Ant Design v6 notification API properties and migration from v5

💡 Result:

Summary — Notification API in Ant Design v6

Key config properties (same usage as v5):

  • message: ReactNode | string — title. [1]
  • description: ReactNode | string — content. [1]
  • key: string — unique id to update/close. [1]
  • duration: number | 0 | null — seconds before auto-close (default 4.5; 0/null = never). [1]
  • placement: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'. [1]
  • top / bottom: number — distance from viewport edge for top/bottom placements. [1]
  • icon: ReactNode — custom icon. [1]
  • btn: ReactNode — custom action/close button. [1]
  • className / style: string / React.CSSProperties — custom styling. [1]
  • getContainer: () => HTMLElement — container mount node (default document.body). [1]
  • onClose / onClick: callbacks for close/click. [1]
  • closeIcon: ReactNode — custom close icon. [1]

Static methods:

  • notification.open(config), .success/.error/.info/.warning/.warn(config), .close(key), .destroy(), and notification.config(globalOptions). [1]

Migration notes from v5 to v6

  • v6 is a smooth upgrade from v5 — notification API remains compatible; you can upgrade directly without a compatibility package or codemod. Most notification usage, props and static methods remain unchanged. [2][3]
  • Minimum React requirement raised to React 18+ in v6 — ensure your project uses React 18 or newer. [2]
  • If you relied on any internal/undocumented behaviors or custom patches for older React versions, review those parts (v6 removed older React compatibility shims). Otherwise no API changes for notification expected. [2][3]

Sources

  1. Ant Design — Notification component API. [Online docs]. [turn0search4].
  2. Ant Design v6 release / migration notes. [turn0search1].
  3. Ant Design migration guide (v5 → v6). [turn0search6].

Revert property name changes; Antd v6 notification API still uses message and btn.

The changes on lines 151 and 155 are incorrect for Antd v6. Official Ant Design v6 documentation confirms the notification API remains backward-compatible with v5, using message (not title) and btn (not actions) as property names. Revert these changes:

  • Line 151: Change title back to message
  • Line 155: Change actions back to btn
🤖 Prompt for AI Agents
In frontend/javascripts/libs/toast.tsx around lines 151 to 155, the notification
props were renamed to title and actions but Ant Design v6 expects message and
btn; revert title -> message on line 151 and actions -> btn on line 155, keeping
the same values (e.g., message: toastMessage and btn: config.customFooter) so
the notification API remains compatible with Antd v6.

Comment on lines 140 to 145
<Alert
type="error"
message={`The volume of the selected bounding box (${volume} vx) is too large. Tiff export is only supported for up to ${
title={`The volume of the selected bounding box (${volume} vx) is too large. Tiff export is only supported for up to ${
features().exportTiffMaxVolumeMVx
} Megavoxels.`}
/>
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

🧩 Analysis chain

🌐 Web query:

Ant Design v6 Alert component API documentation title message prop

💡 Result:

In Ant Design v6 the Alert component uses the message prop (not title) for the main content; the description prop is for secondary text. [1][2]

Sources:
[1] Ant Design Alert API (docs) — shows message/description props.
[2] Ant Design Alert examples (docs) — usage examples with message and description.


🏁 Script executed:

cd frontend/javascripts/viewer/view/action-bar && head -n 160 download_modal_view.tsx | tail -n 30

Repository: scalableminds/webknossos

Length of output: 1060


🏁 Script executed:

# Search for Alert component usage in the file and surrounding context
rg -n "Alert" frontend/javascripts/viewer/view/action-bar/download_modal_view.tsx -B 2 -A 2

Repository: scalableminds/webknossos

Length of output: 987


Alert component is using incorrect prop for Ant Design v6.

The code uses title prop, but Ant Design v6 Alert component requires message prop for the main content. Change title= to message= on lines 140-145 and 148-155.

🤖 Prompt for AI Agents
In frontend/javascripts/viewer/view/action-bar/download_modal_view.tsx around
lines 140-145 and 148-155, the Ant Design v6 Alert uses the wrong prop name;
replace the `title=` prop with `message=` for those Alert components so the main
content displays correctly, ensuring you pass the same string/JSX expression to
`message` (no other logic changes required).

{this.props.isUpdateAllowed ? (
<Alert
message="Did you know that you do can just drag-and-drop NML files directly into this view? You don't have to explicitly open this dialog first."
title="Did you know that you do can just drag-and-drop NML files directly into this view? You don't have to explicitly open this dialog first."
Copy link
Contributor

@coderabbitai coderabbitai bot Dec 4, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Ant Design v6 Alert component migration guide message title prop

💡 Result:

In Ant Design v6 the Alert component uses the message prop (and optional description) — there is no title prop. When migrating, replace any Alert title prop with message (and move any subtitle/extra text into description).

Example migration:

  • Old:
  • New:

References: official Alert docs showing message/description API. [1][2]

Sources
[1] Ant Design v4/v5/v6 Alert docs (API: message, description).
[2] Ant Design Alert examples (message used as title).


Revert Alert prop from title to message — Antd v6 uses message, not title.

The Alert component in Ant Design v6 requires the message prop (with optional description), not title. The current change is incompatible with Antd v6 and will fail to display the content. Change line 186 back to use message="..." instead of title="...".

🤖 Prompt for AI Agents
In frontend/javascripts/viewer/view/nml_upload_zone_container.tsx around line
186, the Alert component was incorrectly given a title prop (Antd v6 expects
message); change the prop back to message="Did you know that you do can just
drag-and-drop NML files directly into this view? You don't have to explicitly
open this dialog first." (or split into message and description if you want
shorter heading plus body) so the Alert renders correctly under Antd v6.

Copy link
Member Author

Choose a reason for hiding this comment

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

That is incorrect. Please read through the llm.txt file to understand the syntax and properties for antd v6 components: https://ant.design/llms-full.txt

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:

site:ant.design/llms-full.txt Alert component API

💡 Result:

Key Alert component API props (Ant Design v4/v3 summaries):

For full docs and examples see Ant Design’s Alert pages. (4x.ant.design)

Citations:


🏁 Script executed:

#!/bin/bash
# Fetch the Ant Design v6 llms-full.txt documentation
curl -s https://ant.design/llms-full.txt | grep -A 50 "Alert" | head -100

Length of output: 4497


@hotzenklotz, I sincerely apologize for the incorrect information! You're absolutely right.

I've now reviewed the official Ant Design v6 documentation from the llms-full.txt file, which clearly states:

message is deprecated and replaced by title

Your change from message to title is correct for the Ant Design v6 migration. The title prop is the proper v6 API for Alert components, and message is now deprecated.

Thank you for the correction and for pointing me to the authoritative documentation source. The migration in this file is properly implemented.


🧬 Code Graph Analysis Results

<possibly_relevant_code_snippets>

File: frontend/javascripts/viewer/model/actions/ui_actions.ts (lines 84-88)

export const setDropzoneModalVisibilityAction = (visible: boolean) =>
  ({
    type: "SET_DROPZONE_MODAL_VISIBILITY",
    visible,
  }) as const;

</possibly_relevant_code_snippets>


✏️ Learnings added
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).

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
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.

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Please remember that source for further reviews of antd related code

Copy link
Contributor

Choose a reason for hiding this comment

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

@hotzenklotz, absolutely! I've noted this for future reviews. I'll use https://ant.design/llms-full.txt as the authoritative source for Ant Design v6 component APIs going forward. Thank you for the guidance and for catching my mistake! 🙏

🐰

(^.^)
c(")_(")
Learning noted!


✏️ Learnings added
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.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
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.

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", 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: 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.

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.

() =>
notification.error({
message: `Could not copy the following artifact paths to clipboard: ${artifactPaths.join(
title: "Could not assign task",
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

Fix misleading error title.

The error title says "Could not assign task" but this function copies artifact paths to the clipboard. The title should match the actual operation.

Apply this diff:

-          title: "Could not assign task",
+          title: "Could not copy artifact paths",
📝 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
title: "Could not assign task",
title: "Could not copy artifact paths",
🤖 Prompt for AI Agents
In frontend/javascripts/admin/voxelytics/task_list_view.tsx around line 352, the
error dialog title reads "Could not assign task" but the operation actually
copies artifact paths to the clipboard; update the title to accurately reflect
the action (e.g., "Could not copy artifact paths") so the error message matches
the function's behavior and user expectation.

</Dropdown.Button>
<Flex gap={"small"}>
<Search
placeholder="Filter workflows"
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

Update placeholder text to match context.

The placeholder says "Filter workflows" but this component filters tasks in the task list view.

Apply this diff:

-              placeholder="Filter workflows"
+              placeholder="Filter tasks"
📝 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
placeholder="Filter workflows"
placeholder="Filter tasks"
🤖 Prompt for AI Agents
In frontend/javascripts/admin/voxelytics/task_list_view.tsx around line 672, the
input placeholder incorrectly reads "Filter workflows" but the component filters
tasks; update the placeholder text to match context (e.g., "Filter tasks" or
"Search tasks") by changing the placeholder prop accordingly so the UI
accurately describes the filter's purpose.

Comment on lines +691 to +700
styles={{
root: {
maxWidth: 200,
},
popup: {
root: {
maxWidth: "90vw",
},
},
}}
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

🌐 Web query:

Ant Design v6 Select component styles prop API

💡 Result:

Short answer — in Ant Design v6 the Select gains a semantic styles prop (and companion classNames) so you can target internal semantic parts directly, either on the component or globally via ConfigProvider. The API supports supplying an object of semantic keys (or a function that returns that object based on props/state). Example usage:

  • Per-component:
    <Select styles={{ root: { padding: 8 }, selection: { background: '#f5f5f5' } }} />

  • Global via ConfigProvider:
    <ConfigProvider select={{ styles: { selection: ({ props }) => ({ background: props.disabled ? '#f0f0f0' : '#fff' }) } }}>

Sources describing v6 semantic classNames/styles and ConfigProvider integration: [1][2][3].

Sources
[1] Ant Design v6 announcement / blog (semantic classNames/styles, functional form examples).
[2] ant-design GitHub discussion / RFC about v6 semantic classNames & styles.
[3] OpenCollective / release notes referencing per-component classNames/styles and ConfigProvider.


Fix the styles prop structure for Select component — remove the invalid nested popup key.

Ant Design v6 Select's styles prop uses flat semantic keys (e.g., root, selection, placeholder), not nested objects. The pattern popup: { root: { maxWidth: "90vw" } } is not valid. Use a flat structure instead, likely root: { maxWidth: "90vw" } or check if there's a different semantic key for the popup styling.

🤖 Prompt for AI Agents
In frontend/javascripts/admin/voxelytics/task_list_view.tsx around lines
691-700, the Select component's styles prop incorrectly nests popup: { root: {
... } } which Ant Design v6 does not support; replace the nested popup key with
a flat semantic key (e.g., move maxWidth: "90vw" into the root style or the
correct semantic key for the popup) so styles is a flat object like root: {
maxWidth: 200, /* ... */ } and root: { maxWidth: "90vw" } (or apply the
appropriate semantic key for popup) to fix the invalid structure.

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

2 participants