Repository navigation
Drawings WE2: a new Drawing Status command says which views and dimensions are current, out of date or failed, and why (#4894) - #11352
Merged
Conversation
CamWight
marked this pull request as ready for review
November 2, 2026 21:25
CamWight
marked this pull request as draft
November 2, 2026 21:27
CamWight
marked this pull request as ready for review
November 2, 2026 21:44
CamWight
force-pushed
the
drawing-status-4894
branch
from
November 3, 2026 05:52
371495d to
53ec0b7
Compare
…WE2) drawing.status says each view's status (current, out of date, placeholder or failed, with why) from what the sheet page last drew, and each dimension's in the words inspect uses, reading each body once for the call. Nothing is drawn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CamWight
force-pushed
the
drawing-status-4894
branch
from
November 3, 2026 09:35
53ec0b7 to
477fcaf
Compare
This was referenced Nov 3, 2026
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.
This PR is for drawings: the paper sheets that show a design's views with dimensions and balloons. It adds a Drawing Status command (
drawing.status) for scripts, agents and the drawing page. Until now nothing could say whether a view's lines are up to date, or why a view shows no lines. The new command says, for each view, whether it is current, out of date, a placeholder or failed. For a placeholder or a failed view, it also gives the reason. It does the same for each dimension. The command only reads: it draws nothing and changes nothing in the design.Part of #4894 (WE2), into
drawings: where a drawing stands: drawing.status in one read. One commit ondrawingseb0b427, now that #11047 and #11350 have merged.Changes a default: no
What it does
drawing.statussays, for the drawing open, each view's status and its sheet:current,out_of_date(not drawn yet, or drawn from another model or with other settings than it hasnow),
placeholderorfailed, with why for the last two.currentmeans drawn, from themodel and with the settings the view has now. A view that drew but didn't fit its sheet's scene
is
failed, as that scene left it, while that scene is still its sheet's: the same sheet, thesame views on it, none drawn again since.
drawing.scenereuses a scene by the same rule(
Cache::inputs). Balloons aren't listed;drawing.balloon.inspectreads each one.waitingcounts the views out of date. Each dimension's status uses the words
drawing.inspectuses,reading each body once for the call. It reads what the sheet page last drew: nothing is drawn
and nothing changes.
The new command has input and output schemas (
DrawingStatusResult) and isn't on theribbon. The planned
drawing.checkentry indrawing_ui.rs(DRAWING REVIEW, CHANGES) isits planned home; this PR leaves that entry as it is, so @Nathan-Dane's page can point it
at
drawing.status. No planned entry is added or replaced. Nothing incrates/geom/orcrates/ui-egui/changes.Pictures
Nothing new shows on screen at this commit: the command has no button yet. The real-program
check below reads the replies instead.
Tests
status_says_which_views_are_out_of_datestatus_says_why_a_view_has_no_linesstatus_takes_what_the_last_scene_left_out_until_a_view_draws_againstatus_says_where_each_dimension_standsstatus_takes_a_scene_only_for_its_sheet_as_it_is: a view the scene left out, moved to another sheet, and a view left on the sheet when the other goes, each read their own drawing againPlanted faults: 12 faults planted in the new code: each status word, each reason, the sheet,
waiting, a scene that is no longer its sheet's, a dimension's word, and for the shared rule, a sheet's views or a view's serial left out of the comparison and a drawn view readingdrawn. Each was caught by a test above, and each file was put back after. An earlier run missed three (a view that didn't fit, an old scene trusted, the sheet's id), which the third test and a sheet check in the second now cover.What no test reaches
steps the sheet provider yet (
drawing_scene::stephas no caller outside the tests; the sheetpage will call it on its tick), so in the app every view reads
out_of_dateandwaitingcounts them all, which is what the provider holds. The tests step the provider by hand for
the other states.
Validation
Updated 3 Nov (head
477fcaf97), ondrawingseb0b427 after #11047 and #11350 merged; it also merges cleanly withdrawingsas it is now (112e0a3). A review of the code found that a view moved off the sheet whose scene left it out kept that scene'sfailedand its advice ("put it on another sheet"): the status trusted the last scene on its serial alone. It now trusts it only while it is still its sheet's scene, by the same checkdrawing.sceneuses, with the test above written first (it failed before the fix).Status::reasonnow gives a view's reason for bothdrawing.sceneanddrawing.status, and the params doc says whatcurrentmeans and where balloons are read. On this head: fmt, clippy with-D warnings(geom, doc, engine, all targets), the engine's drawing (199) and command (55) tests,lists,layersandi18n --checkpass, and all 12 planted faults are caught (clean run passes). The lines below are from before this update.killed_mid_save_the_old_file_survives(9 s),pattern_of_512_hole_cuts_finishes_in_reasonable_time(138 s) andmany_faces_are_classified_quickly(0.06 s). They test saving, patterns and the preview, not drawings. The GPU library's test binary stopped inside the graphics driver (0xC0000005), as it does on this PC. No rendering code changes here.cargo xtask i18n --checkand the app build pass.drawing.statusgave each view's status and sheet, andwaitingcounted the views out of date. The dimension readok. The reply was the same after a move to another sheet, its Undo and a model change. As said above, every view readsout_of_dateat this base, because nothing in the app draws the sheet yet. The reply didn't change the design. The app wrote no crash reports.Rules checked
drawing.status.assets/locales/pending/drawing-status.json, with en, ar, de, he, ja, ko, vi and zh;cargo xtask i18n --checkpasses.Integration status
Based on
drawingseb0b427, and merges cleanly with 112e0a3. Waits for nothing. It conflicts with three open drafts, #10987, #10926 and #10469; whichever lands second rebases.Refs #4894, #860