Show and clamp the max safe cutout depth in the bin editor - #8
Merged
Conversation
The backend clamps pocket depth to what the bin height allows, and the toolbar's depth field clamped silently to the same value, so a too-deep override looked accepted until the number changed on its own. The depth field now carries the limit: min/max on the input, a "max <n>" hint next to it, and the hint turns amber when a typed value was clamped. Applies to both the per-tool and the per-cutout override. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Typing a depth below 5mm raised it to the generator's minimum and lit the "max" hint amber, which points at the wrong limit. The hint now reacts only to a value cut down to the maximum. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds UI feedback in the bin editor so users can see the maximum safe pocket depth for the current bin height and automatically prevents (and visually flags) depth overrides that would exceed that cap, aligning with backend STL depth clamping behavior.
Changes:
- Show a “max {depth}” hint next to the cutout depth override field (tool and selected cutout), turning amber when an entered value is clamped to the max.
- Clamp per-tool / per-cutout depth overrides to
[5mm, maxCutoutDepth]in the toolbar input before committing. - Add frontend tests and user docs describing the max-depth hint and clamping behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| frontend/src/components/BinEditorToolbar.tsx | Adds min/max constraints, clamping logic, and a max-depth hint with a “clamped” visual state. |
| frontend/src/components/BinEditor.test.tsx | Adds coverage to verify the max-depth hint renders and that over/under inputs clamp as intended. |
| docs/usage/bin-layout.md | Documents the max-depth hint and clamping behavior in the bin editor. |
| docs/features.md | Updates feature list to include the max pocket depth hint and clamping behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1Richter
added a commit
that referenced
this pull request
Aug 4, 2026
Brings together every open self-host PR (#2-#16) on top of upstream 0.8.0+7: #2 fix/half-grid-cell-placement #10 feat/custom-bin-size-mm #3 feat/split-multi-part #11 feat/cutout-line #4 feat/preview-bed-size-grid #12 feat/dashboard-hide-project-bins #5 fix/split-parts-3mf-export #13 feat/persist-tracer-selection #6 feat/always-export-3mf #14 feat/tool-quantity-duplicates #7 ci/run-frontend-tests #15 feat/unload-idle-models #8 feat/bin-editor-cutout-depth-cap #16 fix/clamp-autosize-grid #9 feat/bin-editor-cutout-editing Verified: 401 backend tests, 189 frontend tests, ruff and tsc clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft PR opened for review. Branch:
feat/bin-editor-cutout-depth-cap.