Skip to content

Edit Hole: keep one face selected after changing placement (#10692) - #16989

Merged
bherbruck merged 2 commits into
tangency-labs:mainfrom
cfaulkingham:codex/fix-10692-hole-placement
Nov 15, 2026
Merged

bherbruck merged 2 commits into
tangency-labs:mainfrom
cfaulkingham:codex/fix-10692-hole-placement

Conversation

@cfaulkingham

@cfaulkingham cfaulkingham commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Change

Edit Hole now replaces the selected face after switching Placement from Single to Multiple and back to Single.
Previously, this switch allowed two selected faces, while preview and OK silently used the first face.
The rebuilt Face input now keeps the editor's one-face limit.
This completes the placement-switching case left after #10797.

Fixes #10692

Changes a default: no

Validation

  • The extended regression failed before the fix: two selected faces instead of one.
  • All 18 hole_place_ui_tests pass, including the regression and existing tests for creating holes on multiple faces.
  • The rebuilt native app passes the reproduction twice: one selected face and saved position [10, 15, 20].
  • cargo build --profile ci -p solidcraft passes.
  • cargo xtask ci completed before the implementation commit, on upstream 2a99051c7 plus this patch.
  • Formatting, repository checks, workspace Clippy, and the WebAssembly check passed.
  • The full run had 19 failing tests across nine groups, detailed below. All 18 hole-placement tests passed again.
  • Rebased without conflicts onto upstream 6fa9e1132. All 18 hole-placement tests and formatting pass on commit 0bb5fdac3.

The regression uses the Placement dropdown, face picks, and OK.
It checks the retained face, feature identity, and saved position.

Full-suite failures and prior evidence
Test group Failures Prior evidence
Kernel STEP export bytes 1 Same test reported on main in #12870
Kernel boolean scale invariance 1 Same test reported on main in #12870
Kernel library 7 Six names in tests/KNOWN_FAILING_TESTS; concave chord/G2 failure not baseline-verified
Smlib library 1 Known-failing list; identical failure in #15650
CLI naming corpus 1 Known-failing list; additional seed 158/185/73 errors not separately baseline-verified
CLI action matrix 1 Listed lid shell failure: issue-616-lid-ribs, Lid/F8:-x, face.shell
GPU thin lens 1 Identical Metal mismatch values in #13425
UI blur benchmark 1 Same failure reproduced on an unmodified base in #16421 and on main in #16609
Engine library 5 All five exact names in tests/KNOWN_FAILING_TESTS

The kernel, smlib, CLI, GPU, and engine dependency graphs exclude the changed UI crate.
The blur fixture never opens Hole, so it cannot execute the changed placement code.
No failing test source, fixture, dependency, or lockfile changed in this patch.
A fresh clean-base full run was not performed.

The baseline-unverified kernel test is blend::tests::concave_chord_and_g2_rounds_run_on_past_where_their_face_turns_into_a_round.

An isolated retry of gpu::tests::blur_steady_frame_benchmark passed.

Screenshots

Use the two boxes and Hole1 from the issue.
Edit Hole1 and switch Single → Multiple → Single.
Activate Face for each pick, then pick Base followed by Top.

Before: the dialog shows two selected faces, and the hole remains on Base at [30, 15, 10].

Before: two selected faces, but the hole preview remains on Base

After: only Top remains selected, and preview and OK place the hole on Top at [10, 15, 20].

After: one selected face and the hole preview on Top

Summary by CodeRabbit

  • Bug Fixes
    • When editing a hole and switching its placement mode from Multiple to Single, face selection now follows single-select behavior. The last-picked face is used for the placement, and accepting the dialog updates the existing hole.
  • Tests
    • Added regression coverage for switching between placement modes, selecting faces, and accepting the edit.

@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

When an edited Hole dialog switches to Single placement, its face input now uses single-selection mode. A regression test covers switching Single → Multiple → Single, picking two faces, and accepting the edit. It verifies that one placement remains at the last-picked face and the original feature updates.

Changes: Edited Hole placement selection

Layer / File(s) Summary
Single-placement selection and regression coverage
crates/ui-egui/src/dialogs.rs, crates/ui-egui/src/hole_place_ui_tests.rs
The dialog configures the face input for single selection when an edited Hole switches to Single placement. The test checks that two face picks leave one placement at the last-picked face and that accepting updates the original feature.

Estimated code review effort: 2 (Simple) | ~8 minutes

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 0bb5f

Editing a hole in Single placement now keeps only the most recently picked face, including after switching through Multiple placement. The change is small and covered by a regression test, so there is no remaining merge risk.

Architecture risk: Low · up to 0bb5f

The change affects 1 system.

Changed systems: crates

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — crates (service) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in crates/ui-egui/src/dialogs.rs: When switching an edited Hole dialog to Single placement, the newly created face input is set to non-multi; other placement switches retain the input’s default selection mode.
  • observed — Modified behavior in crates/ui-egui/src/hole_place_ui_tests.rs: Adds a test that reopens a hole for editing, switches placement modes Single → Multiple → Single, and picks two faces. It asserts the editor retains one placement at the last-picked face and that accepting the dialog updates the original feature at that location.
Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title names the main change: after switching Placement from Single to Multiple and back, the Edit Hole dialog keeps one face selected. The raw summary and objectives both describe this behavior, a…
Description check Passed The description follows the repository template closely. It covers the change in plain terms and names the problem and resulting behavior with a linked issue (#10692). It states the 'Changes a default…
Linked Issues check Passed [#10692] The issue requires that, when editing a Single-placement hole, a new face pick either replaces the old face and moves the hole, or the dialog explains the restriction. The PR adds a branch in…
Out of Scope Changes check Passed The reviewed diff for crates/ui-egui/src/dialogs.rs changes only the placement_row branch that handles Multiple to Single switching during an edit. The test file adds one regression test for that path…
Existing Defaults Unchanged Passed The check fails only if the PR changes a UX default that users already rely on, or if the description says "Changes a default: no" while such a default changes. Evidence: - The PR changes two files: c…
Full details: Title check

Explanation

The title names the main change: after switching Placement from Single to Multiple and back, the Edit Hole dialog keeps one face selected. The raw summary and objectives both describe this behavior, and the title is specific and concise. It is 67 characters, within a typical length, and it names the feature and the issue reference.

Full details: Description check

Explanation

The description follows the repository template closely. It covers the change in plain terms and names the problem and resulting behavior with a linked issue (#10692). It states the 'Changes a default: no' line. It has a detailed Validation section with commands, test counts, and rebase status. It includes before/after screenshots of the behavior, which the template requires for observable UI changes. The 'Change' section does not explain what Edit Hole is or who it is for, which the template asks for, but this is a minor gap for an existing feature. The integration status section is partly covered: it records the upstream commit and rebase result, but does not state the PR status checked before handoff. The 'Test change' line is not required because the kernel is not touched. Overall the description is mostly complete.

Full details: Linked Issues check

Explanation

[#10692] The issue requires that, when editing a Single-placement hole, a new face pick either replaces the old face and moves the hole, or the dialog explains the restriction. The PR adds a branch in placement_row (crates/ui-egui/src/dialogs.rs, +6 lines). When Placement switches from Multiple to Single during an edit, the first face input is set to multi = false. The Face input therefore keeps one face, so OK applies the single face the user picked. The added regression in crates/ui-egui/src/hole_place_ui_tests.rs checks one retained face, feature identity, and saved position. The author reports that all 18 hole_place_ui_tests pass. I did not run the tests. The issue's exact reproduction starts in Single mode without a switch. The PR description says the initial Single case was handled by #10797, which is already in the base. I did not verify that base behavior in this review. The PR fixes the switch case that the issue reproduces through its Single to Multiple to Single path.

Full details: Out of Scope Changes check

Explanation

The reviewed diff for crates/ui-egui/src/dialogs.rs changes only the placement_row branch that handles Multiple to Single switching during an edit. The test file adds one regression test for that path. Both changes relate directly to #10692. No unrelated kernel, dependency, fixture, or lockfile change appears in the provided summary. The PR description states that no failing test source, fixture, dependency, or lockfile changed.

Full details: Existing Defaults Unchanged

Explanation

The check fails only if the PR changes a UX default that users already rely on, or if the description says "Changes a default: no" while such a default changes. Evidence: - The PR changes two files: crates/ui-egui/src/dialogs.rs (+6 lines) and crates/ui-egui/src/hole_place_ui_tests.rs (+19 lines, tests only). - The dialogs.rs hunk is in placement_row. It runs only when the Placement choice changes. When an existing Hole is edited, switching from Multiple to Single now sets the first input (Face) to multi = false. Before the fix, that input stayed multi-select. - The paths that open a dialog are unchanged. A new Hole dialog uses hole_defaults(s) with single_hole_inputs() (dialogs.rs:1102). The edit path builds its inputs at dialogs.rs:4723-4724, and the PR does not touch either path. - The changed behavior is a fix for the bug in #10692. After Single → Multiple → Single, the Face input kept two faces. The new behavior keeps one face, matching the Single placement mode. This is not a change to a default setting, preference, shortcut, command default, or layout. - The test-file change is additive. - The description's "Changes a default: no" matches the code. No UX default changes. Caveat: the Face input still starts multi-select when a Single Hole is first opened for edit (line 4724). The PR does not change that. Its effect is limited to the toggle path. Kernel and geometry results are out of scope for this check. The PR does not change them.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 6fa9e11 and 0bb5fda.

Files selected for processing: 2

  • crates/ui-egui/src/dialogs.rs
  • crates/ui-egui/src/hole_place_ui_tests.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@cfaulkingham
cfaulkingham force-pushed the codex/fix-10692-hole-placement branch from 4845259 to 0bb5fda Compare November 14, 2026 23:19
@cfaulkingham
cfaulkingham marked this pull request as ready for review November 14, 2026 23:19
@bherbruck bherbruck added ready to merge reviewed, every ask addressed; merge once CI is green approved-for-ci Reviewed: run the full PR CI (build, tests, goldens, Clippy) labels Nov 14, 2026
@bherbruck
bherbruck enabled auto-merge November 14, 2026 23:52
@bherbruck
bherbruck added this pull request to the merge queue Nov 15, 2026
Merged via the queue into tangency-labs:main with commit c60cb4e Nov 15, 2026
113 of 114 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-for-ci Reviewed: run the full PR CI (build, tests, goldens, Clippy) ready to merge reviewed, every ask addressed; merge once CI is green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edit Hole: a second face pick shows "2 selected", but OK uses only the first

2 participants