Repository navigation
Drawings: a deferred drawing keeps its lines until it is updated (#4892) - #12449
Merged
bherbruck merged 1 commit intoNov 6, 2026
Merged
Conversation
…gency-labs#4892 U2) A drawing's views follow the model automatically, or, when deferred, only on drawing.update, which lets them draw from the model as it is now, for this session only. The next model change holds again, and a close drops the update, so a reopened deferred drawing waits. While it waits, its views show their last lines, out of date. drawing.set and drawing.inspect take and say `updates`, saved only when deferred (a drawing-format pending note). drawing.scene, its hit and line commands and drawing.export read what the page shows and list what is out of date; drawing.status says held. The ribbon's Update Drawing button stays planned as drawing.update.planned with its art awaiting review, as Export does; the command itself takes the existing update icon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
This was referenced Nov 6, 2026
This was referenced Nov 6, 2026
Merged
This was referenced Nov 7, 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.
A drawing can now wait for you before it draws a model change. Set
updates: deferredon it, and its views keep the lines they have untildrawing.update. Meanwhile every command that reads the sheet reads what the page shows, and lists what is out of date. A drawing that follows the model, the default, works as before.Part of #4892, into
drawings. It builds on #12423 (a view draws again only when what it shows changes), now indrawings. The sheet page and its ribbon are @Nathan-Dane's UI; the ribbon's Update button stays planned here, and nothing in the sheet page changes.Changes a default: no
Automatic stays the default, and only a deferred drawing is saved differently.
What it does
Drawing.updatesisautomatic(the default) ordeferred. It is saved only when deferred, with one pending format note.drawing.settakesupdates?(one undo step), anddrawing.inspectshows it.Cache::holds, decides it: a deferred drawing holds while the model has moved on from its last update.stepdraws nothing while held, anddrawing.statussaysheld. The hold is session state beside the scene cache, never saved.drawing.update: lets the open drawing draw from the model as it is now, until that moves on again. It changes no document, so it is not an undo step. On a drawing that follows the model it does nothing. Its label is in a pending locale file (drawing-update.json), with atests/kernel-cases/EXEMPTline (it makes no geometry).drawing.scene.lineand the export) go through one function,as_shown. For an automatic drawing, that is the same build as before. For a deferred one, it is the provider's lines, and the reply listsout_of_date(views and dimensions). So export draws what the page shows.settle, bounded by the views and dimensions on the sheet.drawing.update.planned, asdrawing.export.plannedis besidedrawing.export. A real command can't keep a pending artwork row, and wiring the button is the sheet page's step.Cost: an automatic drawing's commands do the same work as before. A held one reads the provider's cache and projects nothing.
Validation
Local, Windows,
--profile ci, on the tree ofdrawingsb4242e9:cargo check --all-targets);cargo xtask lists, i18n,kernel-cases --coverage, the format-pending check, icons and assets pass;-D warnings) and the wasm build pass;drawingsitself on this PC (chord_and_variable_fillets, fillet_fit_taper_closes_to_a_point, shell_tangent_chain…, and the like). None is in the drawing code;mainon this PC too;icon_auditpass.Tests first: with the hold switched off,
a_deferred_drawing_keeps_its_lines_until_it_is_updatedfails on "nothing is drawn before an update"; with it, all pass.a_deferred_drawing_keeps_its_lines_until_it_is_updated:drawing.status, the scene and the export list them, and nothing is projected;a_drawings_updates_are_automatic_or_deferred: the setting, its undo step, and its save (automatic isn't saved).updating_an_automatic_drawing_changes_nothing.Planted faults: 12, each caught, then a clean run that passes. They cover:
stepand inholds;out_of_dateandheldleft out;drawing.set, by inspect, or saved when automatic;Not covered on screen: nothing on screen can show the hold until the sheet page has its Update button. Instead, a CLI run (
solidcraft-cli run,--param-check strict), in two parts so the second opens the saved file:drawing.set {updates: deferred}, saved;drawing.status:held: true, waiting: 1, and the scene draws no view and lists it out of date;drawing.update: the view is drawn, nothing is out of date;drawing.update: drawn again,waiting: 0, not held.Nearby:
step's draw intobegin/finish:beginmust also return when held. Whichever lands second adds that one line.buildtoas_shown); its sketch scenes are its own groups.Drawing.updatesis a new field with a default. A fullDrawing { .. }literal in @armin0411's Drawing sheets: add manual centre marks and centre lines (#9419) #9421 and Drawing W20e: automatic centre marks for drawing views (#9462) #9463, @PaddleStroke's Drawing W39a: sheet sets and output scopes, as data (#9723) #9725 or @Gleinkaa's Drawing W29a: hole callouts (#7605) #7618 would needupdates: Updates::Automatic. Whichever lands second adds it.Screenshots of the behavior
None: see "Not covered on screen" above.
Integration status
One commit on
drawingsb4242e9. It builds on its own.