Skip to content

Conversation

@philippotto
Copy link
Member

@philippotto philippotto commented Dec 17, 2025

URL of deployed dev instance (used for testing):

Steps to test:

  • test 3d floodfill in an empty annotation and see how long it takes too label everything in a bbox (with and without restriction)
  • test SAM with depth=50

TODOs:

  • confirm that new are limits ok?

(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

@philippotto philippotto self-assigned this Dec 17, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 17, 2025

📝 Walkthrough

Walkthrough

This pull request increases depth constraints across segmentation and flood-fill features. The maximum bbox depth for mask parameters increases from 16 to 50, while 3D flood-fill extents expand from [64, 64, 32] to [200, 200, 200] and AI quick-select prediction depth also increases to 50, enabling handling of larger volumetric selections.

Changes

Cohort / File(s) Summary
Depth and extent limit adjustments
app/controllers/DatasetController.scala, frontend/javascripts/viewer/constants.ts, frontend/javascripts/viewer/view/action-bar/quick_select_settings.tsx
Unified increase of segmentation depth constraints: bbox validation depth raised from 16→50, 3D flood-fill extent expanded from [64, 64, 32]→[200, 200, 200], and AI quick-select prediction depth incremented from 16→50

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • #8828: Modifies FLOOD_FILL_EXTENTS constant in frontend/javascripts/viewer/constants.ts with related depth/extent value adjustments.

Suggested labels

backend, frontend

Suggested reviewers

  • fm3
  • hotzenklotz

Poem

🐰 Deeper, wider, stronger still,
Flood and segment at our will,
Fifty layers now we hold,
Two-hundred voxels, brave and bold,
Limits lifted, vision clear! 🎨✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Increase floodfill and SAM depth limits' directly and clearly summarizes the main changes: increasing depth limits for both floodfill and SAM (Segment Anything Model) features.
Description check ✅ Passed The description is related to the changeset, providing a deployed test instance URL, explicit testing steps for the floodfill and SAM features being modified, and a TODO checklist relevant to the changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4dd772e and b1fcdfb.

📒 Files selected for processing (3)
  • app/controllers/DatasetController.scala
  • frontend/javascripts/viewer/constants.ts
  • frontend/javascripts/viewer/view/action-bar/quick_select_settings.tsx
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2024-11-22T17:18:43.411Z
Learnt from: dieknolle3333
Repo: scalableminds/webknossos PR: 8168
File: frontend/javascripts/oxalis/geometries/materials/plane_material_factory.ts:568-585
Timestamp: 2024-11-22T17:18:43.411Z
Learning: In the file `frontend/javascripts/oxalis/geometries/materials/plane_material_factory.ts`, the uniform name `allResolutions` should remain unchanged to maintain consistency with the shader code.

Applied to files:

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

Applied to files:

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

Applied to files:

  • frontend/javascripts/viewer/view/action-bar/quick_select_settings.tsx
📚 Learning: 2025-12-18T13:11:55.113Z
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9156
File: frontend/javascripts/dashboard/dataset/dataset_settings_data_tab.tsx:10-10
Timestamp: 2025-12-18T13:11:55.113Z
Learning: Guideline: When using Ant Design's Flex component in this repository, the align prop accepts standard CSS flexbox values such as 'flex-start', 'flex-end', 'center', 'baseline', and 'stretch'. These map directly to the CSS align-items property. Do not propose or implement changes to use 'end'/'start' for Ant Design Flex components; continue using the standard CSS values (e.g., 'flex-start' and 'flex-end') to ensure correct alignment behavior.

Applied to files:

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

Applied to files:

  • frontend/javascripts/viewer/view/action-bar/quick_select_settings.tsx
📚 Learning: 2025-05-12T13:07:29.637Z
Learnt from: frcroth
Repo: scalableminds/webknossos PR: 8609
File: app/models/dataset/Dataset.scala:753-775
Timestamp: 2025-05-12T13:07:29.637Z
Learning: In the `updateMags` method of DatasetMagsDAO (Scala), the code handles different dataset types distinctly:
1. Non-WKW datasets have `magsOpt` populated and use the first branch which includes axisOrder, channelIndex, and credentialId.
2. WKW datasets will have `wkwResolutionsOpt` populated and use the second branch which includes cubeLength.
3. The final branch is a fallback for legacy data.
This ensures appropriate fields are populated for each dataset type.

Applied to files:

  • app/controllers/DatasetController.scala
🧬 Code graph analysis (1)
app/controllers/DatasetController.scala (2)
util/src/main/scala/com/scalableminds/util/tools/Fox.scala (6)
  • Fox (28-228)
  • Fox (230-303)
  • fromBool (30-34)
  • s (234-238)
  • s (238-248)
  • s (248-257)
util/src/main/scala/com/scalableminds/util/geometry/Vec3Int.scala (1)
  • sorted (79-79)
🔇 Additional comments (3)
frontend/javascripts/viewer/view/action-bar/quick_select_settings.tsx (1)

19-21: LGTM! Frontend and backend depth limits are properly synchronized.

The constant and comment updates correctly align with the backend validation change in DatasetController.scala (line 546). The cross-references in both files ensure that future changes to one will prompt updates to the other.

app/controllers/DatasetController.scala (1)

544-546: LGTM! Backend validation properly synchronized with frontend.

The validation limit and error message correctly updated to 50, matching MAX_DEPTH_FOR_SAM in quick_select_settings.tsx. The comment cross-reference ensures maintainability.

Note: Based on the Vec3Int.sorted snippet, .sorted.x returns the smallest dimension after sorting, which appropriately validates the depth constraint.

frontend/javascripts/viewer/constants.ts (1)

339-339: Verify that the 61x flood fill extent increase was tested and performs acceptably.

The 3D flood fill extent has been intentionally increased from 131,072 voxels (64×64×32) to 8,000,000 voxels (200×200×200). While the change appears deliberate (confirmed by git history "bump FLOOD_FILL_EXTENTS to 200**3") and the codebase has performance instrumentation (performance.now() measurements) and integration tests for flood fill operations, confirm that:

  1. Performance tests for the 200×200×200 extent demonstrate acceptable latency and memory usage on typical client hardware
  2. The disabled voxel threshold (USE_FLOODFILL_VOXEL_THRESHOLD = false) is intentional and doesn't mask performance risks
  3. Typical flood fill operations don't exhaust available memory with the larger bounding box

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.

@philippotto philippotto marked this pull request as ready for review January 8, 2026 13:32
@philippotto philippotto requested a review from normanrz January 8, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants