Skip to content

Drawing dimension status warnings and explicit repair UI (#15776) - #16310

Open
Benny1496 wants to merge 61 commits into
tangency-labs:mainfrom
Benny1496:feature/issue-15776-drawings-20261113
Open

Benny1496 wants to merge 61 commits into
tangency-labs:mainfrom
Benny1496:feature/issue-15776-drawings-20261113

Conversation

@Benny1496

@Benny1496 Benny1496 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Change

The Drawing workspace now highlights dimensions whose model references were lost, became ambiguous, or need attention after a model change. This is the UI part of #15776.

The attention card reads the existing drawing.status command and shows affected dimensions with their views and sheets.

Repair is never automatic. The user can choose an engine-provided replacement reference or a single selected model edge or face, review the choice, and explicitly confirm it. The status is refreshed afterward, and the repair can be undone in one step.

The changes are limited to the Drawing UI, translations, attribution, and related tests. Existing Drawing behavior is preserved; there are no geometry or kernel changes.

Changes a default: no

Validation

  • Test 252: Formatting, 167/167 targeted Drawing UI tests, official known-failing check and native GUI validation at 1280 × 720 and 1024 × 640 passed, including repair, confirmation and undo. Run.
  • Test 254: Git-only verification against pinned main 1e324fb83477b36148a0d80d24867590dba8ab68. All 12 product paths verified, including independent reconstruction of the two overlapping files. No builds or functional tests in this step. Run.
  • Official PR checks: Passed.
  • Official CI: In progress at the time of this update.

Screenshots of the behavior (when observable)

Native app screenshots from Test 252, all at 1280 × 720.

1. Drawing status — lost dimension

Drawing status warning

2. Repair dropdown — readable candidate names

Repair dropdown

3. Explicit repair confirmation

Repair confirmation

4. After repair — all current

Repaired dimension

Full Test 252 evidence artifact.

At 1024 × 640, the repair controls were accessible during the GUI test, although the expanded card occupies a substantial portion of the drawing area. Final placement remains open for UI review.

Integration status

Published PR head: ef1296bcb384de826e6ff02ba1cc2914d578face.
Verified product tree: d7147766458b95f296ea99677d928fcb916c1683.

The existing PR history and bherbruck's changes were preserved. The final product diff against the pinned integration base contains 12 paths, with no test workflow files or kernel changes. Review fixes include readable candidate labels, the approved ui.drawing_attention.* and ui.drawing_repair.* keys, and removal of the unused repair confirmation function.

CamWight previously confirmed his six review points were addressed. The PR remains open for Nathan's UI review and maintainer approval.

Summary by CodeRabbit

  • New Features
    • Added drawing status and attention summaries, including affected dimensions, their locations, reasons, and pending updates.
    • Added a guided repair flow for lost or ambiguous dimensions, with review and confirmation before changes are applied.
    • Added controls to create sheets and open drawing editors for views, dimensions, and parts lists.
  • Documentation
    • Added translations for drawing attention and dimension status messages in several languages.

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

The change adds drawing-status projection and refresh, an attention card, and a confirmed dimension-repair flow. The drawing workspace integrates these features and updates sheet and tool panels. New locale entries provide drawing-attention messages.

Changes: Drawing status and repair

Layer / File(s) Summary
Status projection and refresh
crates/ui-egui/src/drawing_dimension_status.rs, crates/ui-egui/src/drawing_status_controller.rs, crates/ui-egui/src/drawing_status_engine.rs, crates/ui-egui/src/lib.rs
The status projection identifies dimensions needing attention. A generation-aware controller filters inspection requests and rejects stale results. The engine bridge requests status and pending inspections.
Attention card and translations
crates/ui-egui/src/drawing_attention_card.rs, assets/locales/pending/drawing-attention-status.json, assets/locales/pending/drawing-dimension-attention.json, attribution/pending/drawing-attention-status.md
The card displays affected dimensions, locations, reasons, and status indicators. Locale assets add drawing-attention messages and dimension-attention labels.
Dimension repair selection and confirmation
crates/ui-egui/src/drawing_dimension_repair.rs, crates/ui-egui/src/drawing_repair_ui.rs
Repair preparation validates statuses, slots, and geometry picks. The UI supports inspection, candidate selection, review, and explicit confirmation before submission.
Workspace panels and sheet controls
crates/ui-egui/src/drawing_workspace.rs
Toolbar actions route to typed tools, editors, sheet settings, or an add-sheet form. Sheet visibility and panel layout behavior are updated.
Workspace status and repair integration
crates/ui-egui/src/drawing_workspace.rs
The browser displays drawing status and repair controls. The end-to-end test covers candidate review, explicit confirmation, repair, and undo.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: Moderate · up to 9c5e8

Repairing a dimension that references a chain point will fail with an engine slot error. A repair review can also survive a model change and apply a reference the user did not review. The new locale file lacks its attribution row, and Add sheet now opens a form instead of creating a sheet directly. Fix these before merging.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title names the drawing dimension status warnings and the explicit repair UI, which are the main changes in the changeset (status projection, attention card, and confirmed repair flow in crates/ui…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description follows the template's main sections (Change, Changes a default, Validation, Screenshots, Integration status) and gives substantive detail on the feature, the repair flow, validation r…
Existing Defaults Unchanged Passed The PR changes no existing UX default. Its changes are additive, so the check passes. Evidence, from the diff against the pinned integration base 1e324fb83477b36148a0d80d24867590dba8ab68: - **Diff s…
Full details: Title check

Explanation

The title names the drawing dimension status warnings and the explicit repair UI, which are the main changes in the changeset (status projection, attention card, and confirmed repair flow in crates/ui-egui). It is specific and concise. Minor concern: the title references #15776 as the issue number, which is acceptable.

Full details: Description check

Explanation

The description follows the template's main sections (Change, Changes a default, Validation, Screenshots, Integration status) and gives substantive detail on the feature, the repair flow, validation runs, and screenshots. It is mostly complete. Gaps remain: the title-like opening line is missing, the 'Changes a default' line is present but the template's 'yes/no' is used correctly, and the Change section does not name the user-facing location clearly for a newcomer. The Validation section cites test runs but gives limited expected-versus-measured detail for the UI behavior, and the 1024 x 640 result is described as open rather than verified. The Integration status section records commits and review state, which the template requests. Overall the description is mostly complete.

Full details: Existing Defaults Unchanged

Explanation

The PR changes no existing UX default. Its changes are additive, so the check passes. Evidence, from the diff against the pinned integration base 1e324fb83477b36148a0d80d24867590dba8ab68: - Diff scope: 12 paths. Only drawing_workspace.rs (216 insertions, 3 deletions) and drawing_workspace/browser.rs and drawing_sheet_page.rs touch existing UI code. The rest are new modules, a new locale file, and an attribution file. - Only removed lines: The three deletions rewrite the flow in drawing_workspace::show. The base returned early when the sheet page was shown, then called show_setup. The PR calls show_setup only when the sheet page is not shown, then calls the new show_attention_overlay. Both paths reach the same existing content, so no existing element is removed or moved. - Add sheet behaviour is unchanged: The base already opened the panels::AddSheet form from drawing.sheet.add (base line 278), the sheet settings "add" button (base line 480–481), and the sheet popup "add" item (base line 655–659). The PR adds no hunks on these paths. The CodeRabbit finding that the add actions "now open a form instead of creating a sheet" is refuted by the base code. - No preference or shortcut defaults changed: prefs/fields/design.rs, prefs/fields/shortcuts.rs, prefs/fields/layout.rs, keymap.rs, and the keyboard profiles are not in the PR diff against the pinned base. drawing_sheets_visibility, drawing_sheet_dock, and design_sub_tab_sheets keep their values. - New always-visible element (additive): show_attention_overlay draws a status button at the top centre of the drawing area whenever a drawing is open. It also runs from drawing_sheet_page::show_view. Before the change, this area showed no such element. This is a new default-visible element, not a change to an existing default. Expanding it covers part of the canvas, as the PR description says. The check passes purely additive changes, so this does not fail the check. Reviewers may still want to judge its placement. - Description flag: Changes a default: no agrees with the code. No UX default changed.

Finishing Touches

Generate unit tests (beta)

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

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

@github-actions github-actions Bot added the area:ui desktop/web front end, dialogs, viewport label Nov 13, 2026
@Benny1496 Benny1496 changed the title Feature/issue 15776 drawings 20261113 Drawing dimension status warnings and explicit repair UI (#15776) Nov 13, 2026
@Benny1496

Copy link
Copy Markdown
Contributor Author

Hi @CamWight and @Nathan-Dane,

I've opened draft PR #16310 for the drawing dimension status warnings and explicit repair UI in #15776.

Tests 138b through 143 have passed. I've also started Test 144 against the latest drawings branch to check integration with the recent upstream changes.

The PR is still a draft, as the manual GUI checks and screenshots are outstanding.

Just wanted to let you know it's available now. Feel free to take an early look if you have time. I'll update the PR once the integration test is finished.

Thanks,
Benny

@Benny1496
Benny1496 force-pushed the feature/issue-15776-drawings-20261113 branch from df3b37c to 090c73f Compare November 13, 2026 22:40
@Benny1496

Copy link
Copy Markdown
Contributor Author

Hi @CamWight and @Nathan-Dane,

A quick update on #16310: Test 144 passed against the newer upstream drawings base, including UI compilation, repair selection/confirmation and engine repair/undo regressions.

I've now updated the draft PR branch to that tested integration state and removed the temporary test workflow from the PR diff. It is currently up to date with drawings (0 commits behind), with only the eight intended UI source files changed.

The manual GUI flow and screenshots are still outstanding, so I'm keeping it as a draft. I'll check the official PR CI on the updated head as well.

Thanks,
Benny

@Benny1496

Copy link
Copy Markdown
Contributor Author

Progress update – Drawing dimension repair UI (#15776)

The earlier automated engine, status lifecycle, repair confirmation, and undo regression tests passed (through Test 144).

We have since been working on automated GUI acceptance testing for the full Repair → Review → Confirm → Undo flow.

Current findings:

  • Tests 151–153 confirmed that the Repair button is present in the UI, but the simulated click does not activate it.
  • Test 153 showed that the button was outside the visible clipping area.
  • Test 154 confirmed that repeated scroll attempts did not move the button into the visible area.
  • Test 155 stopped at an upstream merge conflict.
  • Test 155b resolved that merge conflict but exposed 11 compilation errors caused by incompatibilities between the older repair UI integration and the updated Drawing workspace.

The latest failures do not establish a defect in the underlying engine repair command. The full mouse-driven GUI acceptance test remains incomplete.

Next steps:

  1. Reconcile the repair UI with the updated Drawing workspace panel architecture (Drawing workspace: dock Sheets and tool options in the shared panel system (#17023) #17024 and Show the Drawing workspace core panel options (#16220) #16229).
  2. Review the placement of the status and repair controls against the Drawing UI design (Drawings: the Drawing workspace UI design, its decision log and boards #13159).
  3. Address the reported default-layout concern.
  4. Improve the GUI test to verify visible and actionable UI states before interacting.
  5. Repeat the complete repair, confirmation, and undo test.

The PR remains a draft while these integration and GUI validation issues are being resolved. No changes to the engine or geometry behavior are proposed as part of this update.

@Benny1496

Copy link
Copy Markdown
Contributor Author

Hi @CamWight, I've finished the Drawing UI integration for #15776 and pushed the updated implementation to this draft PR.

The dimension status and explicit repair flow are now integrated with the newer drawing panels. I also added a GUI acceptance test covering Repair → Review → Confirm → Undo.

I ran the integration and drawing-workspace regression checks on the fork. The final check (T162) used the current PR commit (0052c955) against upstream drawings (e638e82e): compilation succeeded and all six drawing-workspace tests passed, including the GUI repair flow.

Test run: https://github.com/Benny1496/solidcraft/actions/runs/43692600071

Could you take a look at the changes and check whether the implementation and UI behavior fit what you had in mind? I'd appreciate any feedback or adjustments you'd like me to make. I'll leave the PR in draft until you've had a chance to review it.

Thanks!

@CamWight CamWight left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @Benny1496, thanks for this, and sorry for the wait. The engine side is just what we had in mind. The status comes from drawing.status, it inspects only what needs attention and never guesses a sheet, and the repair waits for an explicit confirm and makes one undo step. The acceptance test on the real M2 plate through the visible buttons is great, so let's keep all of that.

Let's get it onto the latest drawings first. The branch carries older copies of drawing_workspace.rs and lib.rs (from before #16229), so it conflicts and mod panels; has no panels.rs. After a rebase, your own change there is about 140 lines.

For the UI, let's bring it in line with the rest of the Browser. Build the card from the UI kit's parts, put its words in a catalog in assets/locales/pending/, and show the dimension the way a user knows it (its text, the view's label, the sheet's name) instead of ids and JSON. The engine already says which reference is lost, so the repair can offer that slot rather than a typed field. The confirm should go through app.run, so it waits for a save in progress like every other command. @Nathan-Dane, the card's place and look in the Browser is yours. Would you like it as a section there, or somewhere else?

Happy to pair on any of it. I've put the smaller notes (mod order, fmt, a per-frame parse) on the lines below.

Comment thread crates/ui-egui/src/drawing_workspace.rs Outdated
ui.heading("Drawing status");
ui.label(format!("Status unavailable: {error}"));
});
} else if let Some(snapshot) = app.drawing_workspace.status_controller.snapshot() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This runs every frame, and snapshot() parses the status JSON again each time (from_status plus with_inspections). The expensive refresh already runs only when the revision or the drawing changes, which is just right. Let's parse once in refresh and keep the DrawingAttention, so snapshot() can hand back a reference.

let generation = controller.invalidate();
let status = session.execute("drawing.status", &json!({})).map_err(|error| error.to_string())?;
if !controller.accept_status(generation, status) {
return Err("Drawing status generation changed during refresh".to_owned());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

refresh invalidates and accepts in the same synchronous call, so I think the generation can't change in between and this branch can't happen. Shall we leave the generation and late-response handling out until something is async? If you'd rather keep it for later, a line in the doc comment saying why would help the next reader.


/// Projects one engine response; never guesses a dimension's sheet from its order.
/// Malformed entries are ignored rather than assigned fabricated identifiers.
pub fn from_status(status: &Value) -> DrawingAttention {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The keys match the engine's DrawingStatusResult, DimensionStatusResult and ViewStatusResult today (crates/engine/src/schema/drawing_scene.rs). If a field is renamed there, though, the card goes quiet and no test notices. Two ways that would work: add Deserialize to those three types and read them with serde_json::from_value, or keep this parse and add one test that runs drawing.status on a real drawing and checks that every dimension comes through. The first keeps the rule in one place.

Comment thread crates/ui-egui/src/lib.rs
pub(crate) mod display_lod;
pub mod drawing_jobs;
pub mod drawing_sheet_page;
pub mod drawing_attention_card;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Small one: cargo xtask lists wants the mod lines in sorted order, so in this group drawing_attention_card, drawing_dimension_repair and drawing_dimension_status (in that order) go before drawing_jobs, and drawing_repair_ui goes between drawing_jobs and drawing_sheet_page.

Comment thread crates/ui-egui/src/drawing_repair_ui.rs Outdated
ui.label("Confirm replacing this reference. This modifies the drawing and creates an undo step.");
if ui.button("Confirm repair").clicked() {
let status = snapshot.dimensions.iter().find(|d| d.id == id).map(|d| d.status.as_str()).unwrap_or("");
let candidate = state.candidates[state.candidate_index].clone();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The index is kept in range today, but AGENTS.md's "Never crash" asks for get() on input-driven indexes, so let's use state.candidates.get(state.candidate_index) with an early return.

Comment thread crates/ui-egui/src/drawing_workspace.rs Outdated
use super::*;
use crate::scenario::Harness;
#[test]
fn repair_lost_bore_through_visible_buttons_review_confirm_and_undo() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

cargo fmt will want to reindent this test (the fn sits at column 0, and the JSON lines are long). Also, AGENTS.md "Where tests go" asks for test names that say what they show rather than a ticket number, so the module could be called something like repair_through_the_browser instead of repair_gui_acceptance_t158.

@Benny1496

Copy link
Copy Markdown
Contributor Author

Hi @CamWight, thank you for the detailed review and the clear guidance. We're working through your points now, starting with bringing the branch up to date with drawings, then addressing the code and UI feedback while keeping the existing repair behavior and GUI acceptance test.

We'll also coordinate the card's placement with @Nathan-Dane rather than making that decision independently. Once the changes are implemented and tested, we'll update this PR and let you know as soon as possible so you can take another look.

Thanks again!

@CamWight

Copy link
Copy Markdown
Contributor

Thanks @Benny1496, this has come a long way. The repair now goes through app.run, the buttons are kit parts, and the test walks the real plate from Repair to Undo. That's the heart of it, and it's solid.

A few things would make it read as a finished part of the Drawing workspace:

  • The repair part still shows the encoded dimension id and the raw pick JSON in its buttons and lists. The card already maps names the way the Browser does (rows_with_names). Could the repair button, title and candidate list use the same names, with the candidate shown as what it is (for example "Edge 4 of Plate")?
  • drawing-attention-status.json isn't read anywhere; the code uses the ui.issue15776_* keys. Let's keep one catalog, named by area (ui.drawing_attention.*, ui.drawing_repair.*) rather than the issue number.
  • The card is drawn with plain egui (ui.group, egui::Frame::group, ui.heading), while the rest of the Drawing Browser uses the kit (ui_kit::text and Rows). Moving it onto the kit keeps it matching, and its state marks could then come from the icon masters instead of text glyphs.
  • For @bherbruck's point on picking: the sheet's Dimension tool picks through drawing_scene::line_at (drawing_workspace/dimension.rs). If the repair used that same pick, a replacement could be clicked on the sheet, which is D17/D21 too.
  • drawing_dimension_repair::confirm is only used by its test now. prepare plus app.run covers it.

On the card's place and its marks, @Nathan-Dane's answer on D07/D26 leads. Happy to pair on any of this.

@Benny1496

Copy link
Copy Markdown
Contributor Author

Hi CamWight,

Thanks for the detailed feedback and for offering to help.

I've started working through your suggestions on a separate development branch. The readable dimension names and repair candidates, the translation key changes, and the UI kit adjustments are now implemented there.

Test 230 is currently running to check those changes. I'm deliberately leaving PR #16310 unchanged until we've verified the new work.

For the attention card's placement and status icons, I'd prefer to wait for Nathan-Dane's guidance on D07/D26 before making further decisions.

I'd be glad to coordinate with you on picking replacement geometry directly on the drawing sheet once Nathan has weighed in, so we can avoid duplicating work.

Thanks again for your support!

@Benny1496

Copy link
Copy Markdown
Contributor Author

Hi CamWight,

A quick update on your latest review suggestions. We've implemented several improvements on a separate development branch:

  • Dimension references now use readable names rather than encoded internal IDs.
  • Replacement candidates are displayed as readable geometry descriptions (for example, "Edge 4 of Plate") instead of raw JSON.
  • Translation keys have been organized by area, and the unused locale file was removed.
  • The attention card has been adjusted to use UI-kit components.

We ran a dedicated GitHub Actions preflight for these changes. After fixing issues in formatting, test setup, and Rust compilation, Test 230 passed:
https://github.com/Benny1496/solidcraft/actions/runs/44735570728

The changes are available here:
https://github.com/Benny1496/solidcraft/tree/work/issue15776-ui-review-a-20261120

PR #16310 has not been updated. We'd like to wait for Nathan-Dane's guidance on D07/D26 before deciding on the attention card's placement, status icons, and direct replacement-geometry picking on the sheet.

Removing the now-unused drawing_dimension_repair::confirm helper is also still outstanding.

The successful run covers the automated preflight and targeted tests; it is not a new full visual GUI walkthrough of the revised interface.

I wanted to share the progress and test evidence now, without changing the PR branch. Thanks again for the helpful review and offer to coordinate!

@bherbruck

Copy link
Copy Markdown
Collaborator

Holding this until the 1280x720 screenshots and the drawing UI spec references I asked for are in; then Nate takes a look at the repair flow.

@bherbruck

Copy link
Copy Markdown
Collaborator

Not held any more. Two steps left:

  1. Bring the changes from your development branch into this PR (readable dimension names and repair candidates instead of encoded ids and raw pick JSON, the translation keys, the UI kit adjustments) so CamWight's review points are covered here.
  2. It conflicts with main in crates/ui-egui/src/drawing_workspace.rs. Please run git fetch upstream && git merge upstream/main, resolve that file, and push.

Nate has the UI look; he reviews the repair flow from the 1280x720 screenshots in the description.

@bherbruck bherbruck removed the status:decision Waiting on a maintainer group decision; don't merge or close label Nov 24, 2026
Co-authored-by: Benny1496 <163034806+Benny1496@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bherbruck

Copy link
Copy Markdown
Collaborator

I merged main into your branch (44102f7f34). The only conflict was the DrawingWorkspace struct in drawing_workspace.rs: main added per-view pages, page_view and per-sheet selection fields where you added the status fields, so I kept both sets, and your invalidate_status / refresh_status_if_needed are unchanged. It builds on current main; CI runs on the new head.

@bherbruck

Copy link
Copy Markdown
Collaborator

I merged main into your branch. The only red check was Format and repository checks, which failed on two quarantined tests whose dates had run out on main (renewed in #22368), not on anything in your change. CI runs again on the new head.

@bherbruck bherbruck added needs-ui-review Needs a look from whoever owns the UI's look and removed needs-ui-review Needs a look from whoever owns the UI's look labels Nov 26, 2026
@bherbruck

Copy link
Copy Markdown
Collaborator

Thanks for sticking with this. The head here (0f02cb00dc) is still the older code plus my main merges, so the review points from earlier aren't in yet. Your work/issue15776-ui-review-a-20261120 branch looks like it has that work; could you merge it into this PR's branch? What I still see here:

  • The replacement drop-down shows the raw pick JSON (state.candidates[index].to_string() in crates/ui-egui/src/drawing_repair_ui.rs). It should show a readable name, like "Edge 4 of Plate".
  • The translation keys are still ui.issue15776_*. Please name them by area (for example ui.drawing.repair.*) rather than by issue number.
  • drawing_dimension_repair::confirm is unused now; please drop it.

After that push, Nate reviews the look from the 1280x720 screenshots already in the description. Nothing else is needed from you.

@Benny1496

Benny1496 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @bherbruck, thanks for your support and for merging the changes from main into the PR branch.

I've now integrated the prepared review fixes locally on top of the current PR head. The repair candidates have readable names, the translation keys are named by area, and the unused confirm function has been removed.

Your changes have been preserved during the integration.

The targeted local regression tests are running now. Once the necessary checks pass, I'll update the PR so @Nathan-Dane can review the repair flow.

Thanks again for your patience and support!

@bherbruck

Copy link
Copy Markdown
Collaborator

Thanks, that sounds like exactly what's needed. Nothing has reached this PR's branch yet; the head is still 0f02cb00dc. Once your tests pass, please push it (pull first, since I merged main in). The push needs to bring:

  • readable candidate names in the replacement drop-down in crates/ui-egui/src/drawing_repair_ui.rs, not the raw pick JSON
  • the translation keys renamed to ui.drawing.repair.*
  • the unused drawing_dimension_repair::confirm removed

Then Nate reviews the look from the 1280x720 screenshots in the description.

@Benny1496

Benny1496 commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @bherbruck,

The targeted regression tests and native GUI checks at both 1280×720 and 1024×640 have now passed. The merge conflict has also been resolved without losing your changes.

Before pushing the changes to PR #16310, I have two quick questions:

  1. For the translation keys, I followed @CamWight's suggested ui.drawing_attention.* and ui.drawing_repair.* namespaces. Is that fine with you, or would you specifically prefer ui.drawing.repair.*?

  2. Are the successful test results so far sufficient for me to push the changes and leave the remaining CI validation to the official PR workflow?

Latest test results:
https://github.com/Benny1496/solidcraft/actions/runs/46177272812

The four earlier local GPU test failures were also reproduced without our changes, and all four subsequently passed on GitHub Actions with our patch applied:
https://github.com/Benny1496/solidcraft/actions/runs/46148826686

Once these two points are clarified, I'd like to update the PR and add the latest screenshots for Nathan's final UI review.

Thanks again for your help and patience!

@bherbruck

Copy link
Copy Markdown
Collaborator

@Benny1496 yes to both. ui.drawing_attention.* and ui.drawing_repair.* are fine. Main already names keys ui.drawing_<area>.* (for example ui.drawing_panel and ui.drawing_export), so they fit. Please push now. The PR's CI runs the rest. After that, 1280x720 screenshots of the attention warnings and the repair drop-down are all Nate needs for the look.

@Benny1496

Copy link
Copy Markdown
Contributor Author

@bherbruck Thanks for confirming the translation keys. The review fixes are now pushed (ef1296bcb384), with readable repair candidate labels and the unused confirmation function removed.

@Nathan-Dane I've updated the PR description with the requested 1280 × 720 screenshots of the attention warning and repair dropdown, plus the confirmation and repaired states. The targeted validation passed (167/167), and the native repair/undo flow was verified. The official PR checks are green; CI is still running.

The UI is ready for your review. Thanks!

@bherbruck bherbruck added the needs-ui-review Needs a look from whoever owns the UI's look label Nov 29, 2026
@bherbruck

bherbruck commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

Superseded below: #16310 (comment)


@Benny1496 where this stands: ef1296bcb3 merges cleanly and its checks are fine, so nothing is needed from you right now. It changes what people see, so it's waiting on a UI look from our side (the needs-ui-review label). I'll comment here if that look asks for anything; otherwise it goes into the queue once it's done.

@nullifyr

nullifyr commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Evidence from an independent replay of ef1296bcb384de826e6ff02ba1cc2914d578face on z97 (Ubuntu Linux, Rust 1.99.1).

I ran cargo build --profile ci -j 1 -p solidcraft and replayed the drawing_m2.json checkpoint plate in the resulting native app under Xvfb. The replay used the app’s control port for the fixture commands and pointer clicks for the status and repair controls.

  • Widening the plate with deferred updates left three views waiting. After updating and deleting Bore1, the status card showed Lost on Sheet 1 / Top View. Inspection retained the last good reading of 10 mm.
  • Adding Bore3 at the same location left the reference lost. I selected the replacement rim by its model point, then clicked Use selected geometry, Review repair, and Confirm repair. Inspection stayed lost through review. Confirmation restored Ø10.00 and the status card showed All current.
  • Undo restored the lost reference. Redo restored the replacement. After saving the design, closing its document, reopening from disk and updating the drawing, the same replacement reference still read Ø10.00.

cargo test --profile ci -j 1 -p solidcraft-ui-egui --lib drawing_ completed with 226 passed, 0 failed, 1 ignored. The PR’s visible-button repair, confirmation and undo test passed. The ignored test was picture_upload_timing.

The first Xvfb launch required libxkbcommon-x11. It ran after I supplied the runtime library in an isolated directory. I also corrected the replay script’s float tolerance and its assumption about the displayed dimension number.

1280 × 720 native captures

Lost reference

Confirmation before the repair

Repaired dimension

Repaired dimension after reopening the saved design

@Benny1496

Copy link
Copy Markdown
Contributor Author

Hi @nullifyr,

Thanks for taking the time to test my PR independently and for sharing the detailed results and screenshots. I'm particularly glad to see that the repaired reference is preserved after saving and reopening the design, and that the Drawing UI tests passed.

I really appreciate your help!

@Nathan-Dane

Copy link
Copy Markdown
Contributor

I read the description and looked at the images and it's not quite clear how and when this menu is opened.
I am not familiar with this kind of panel in the app either, so I think it should be moved to a standard type.

I can create a design for this. Could you explain how it is triggered so I can do this best? Thank you!

@Benny1496

Copy link
Copy Markdown
Contributor Author

Hi @Nathan-Dane,

Thanks for taking a look! I'd really appreciate your help with the design. I'm happy to move this to one of the standard panel types. The current overlay was mainly a way to make the status and repair workflow accessible in the Drawing workspace; its placement and appearance aren't meant to be final.

How the status panel is triggered

  • When a drawing is open, a small status button is shown at the top centre of the drawing area. It is collapsed by default, including when everything is up to date ("All current").
  • The status is refreshed automatically when the drawing/model changes, the drawing is reopened, an update completes, or an undo/redo changes the state. It uses the engine's existing drawing.status and, for affected dimensions, drawing.dimension.inspect.
  • If something needs attention, the button changes its label (for example, "1 need attention"). The panel does not automatically pop open. The user clicks the status button to expand or collapse it.
  • The expanded panel lists the affected dimensions across the open drawing, including their dimension name, sheet/view, status and reason. It also shows held updates, views waiting for an update, and other warnings where applicable. A dimension that merely needs an update is different from one whose reference is lost or ambiguous. The status should be understandable from text and symbols, not colour alone.

How the repair workflow is triggered

  1. Only a dimension with a Lost or Ambiguous reference offers a Repair action. Clicking that action opens the repair controls for that specific dimension within the current panel.
  2. The user chooses which reference to replace if the dimension has more than one reference slot. A single slot is selected automatically.
  3. The user can choose an engine-provided replacement candidate from the dropdown, or select exactly one edge or face in the model viewport and use Use selected geometry. This second route is important when the engine cannot offer a suitable candidate. Invalid or multiple selections and inspection failures need an understandable message.
  4. Review repair leads to a separate confirmation state. This is a review of the proposed reference replacement, not a geometry preview or an applied change. The user can change the choice or cancel without modifying the drawing.
  5. Only Confirm repair executes the repair command. The engine validates the chosen reference. On success, the status refreshes and the repair controls close. If there are no remaining warnings, the summary returns to "All current". A failed repair should show an error without claiming success. The successful repair is one undoable operation.

A concrete example

On the M2 checkpoint plate, the original hole has a Ø10 dimension. Deleting the hole makes its reference Lost, while the last valid measurement remains available. Creating another hole at the same location does not automatically reconnect it. The user opens the status panel, chooses Repair for that dimension, selects the replacement rim, reviews and confirms the repair. The dimension then reads Ø10.00 again. Undo restores the lost state, and redo restores the repaired reference.

For the design, I think the main things to preserve are a discoverable status indicator, a clear distinction between update warnings and repairable references, enough space for several affected dimensions, and the explicit confirmation step. It would also be useful if the repair controls didn't obscure too much of the drawing or prevent the user from selecting replacement model geometry. The current expanded overlay takes up quite a bit of space at smaller window sizes (for example, 1024 × 640).

I'm very open to your suggestions on placement, whether the details and repair controls belong in the same standard panel or separate ones, and how the selection/review flow should look. I'll be happy to adapt the implementation to your design.

Thanks again for your help!

@bherbruck

Copy link
Copy Markdown
Collaborator

@Benny1496 an update on where this stands, since Nate looked at it: he'd like the status and repair panel to be one of the app's standard panel types instead of the custom overlay, and offered to make the design for it. Your reply explaining how the panel is triggered is what he needed, so nothing is needed from you right now. Next step is Nate's design; once he posts it here, the change on your side is moving the panel onto that standard type, and then it goes to review.

This branch has not been deployed

No deployments
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) area:ui desktop/web front end, dialogs, viewport needs-ui-review Needs a look from whoever owns the UI's look

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants