Repository navigation
feat(gui): surface helical circuit count + bind the divisibility mismatch (#145) - #291
Merged
Merged
Conversation
…atch Addresses the "circuit-mismatch clarity" half of #145. The helical layer editor already had per-field tooltips and computed the circuit count internally, but only showed it inside a transient warning when planning was about to fail — so users couldn't see where the planner's "circuit count not divisible by patternNumber" number came from. - Add `getHelicalGeometry()` (structured circuit count + divisibility), mirroring the Python `compute_helical_kinematics`, and render an always-on readout (`≈ N circuits per layer · the pattern number must divide this evenly`) under the editor. - Bind the divisibility mismatch to the Pattern Number field as an inline error (suppressed when the field already has its own validation error). - Slim `getHelicalGeometryHint` to the skip-index routing warning (the circuit relationship now lives in the readout); move its tests to `getHelicalGeometry`. - Document the circumferential circuit-count derivation + pattern constraints (divisibility / coprimality / lock alignment) with a worked example in planner-math.md — previously only the axial pass count was documented, never the circuit count the validation actually uses. GUI gate green: tsc, svelte-check, 322 vitest, stylelint (+ css-vars). Closes #145.
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.
Addresses the circuit-mismatch clarity + pattern-docs halves of #145.
The gap
The helical editor already had per-field tooltips and computed the circuit count internally — but only surfaced it inside a transient warning right before planning failed, so users couldn't see where the planner's
circuit count not divisible by patternNumbernumber came from. Andplanner-math.mdonly documented the axial pass count (length/(w·cos α)), never the circumferential circuit count (π·d·cos(α)/w) that the validation actually uses.Changes
≈ N circuits per layer · the pattern number must divide this evenly(warning-styled when it doesn't), via a newgetHelicalGeometry()that mirrors the Pythoncompute_helical_kinematics.getHelicalGeometryHintto just the skip-index routing warning; moved its circuit tests togetHelicalGeometry.Scope note
This is the explainability/docs slice. Not included (deferred): binding the backend
LayerValidationErrorstrings (esp. the detailed lock-degrees Condition 1/2 messages) to specific UI fields — that needs validation-plumbing work and is a reasonable follow-up. The client-side circuit clarity here is computed from the same formula, so it surfaces proactively without it.GUI gate green: tsc, svelte-check, 322 vitest, stylelint + css-vars. Closes #145.