* Viewport: show reference geometry through bodies (Preferences, off by default) (#2697) A new Graphics preference, "Show reference geometry through bodies", draws inactive sketch contours, origin and construction planes and their axes over shaded bodies. It is off by default, so the viewport looks as before: reference geometry is depth-tested and a section leaves it whole (#1229); Create Sketch and dialogs picking a plane still draw the planes through the model. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * ui-egui tests: offscreen GPU tests start their devices one at a time (#3989) (#3990) * claim: #3989 * ui-egui tests: offscreen GPU tests start their devices one at a time Every offscreen test started a wgpu instance of its own, and starting one makes the Vulkan loader scan its drivers. With several test threads two tests doing that at once crashed the test process with SIGSEGV inside the loader (loader_icd_scan). offscreen_device now holds a process-wide lock while it starts the instance, adapter and device; each test keeps its own device and the rendering still runs side by side. * DXF: write and read a Bézier at its own degree (#5269) (#5281) * claim: #5269 * DXF: write and read a Bézier at its own degree (#5269) The DXF writer and reader held a spline's degree to 7, the value MAX_BEZIER_DEGREE had before #1642 raised it to 9. A G4 blend (one Bézier of degree 9) was written as a degree-7 SPLINE over its first 8 control points, so a flat pattern's cut-out stopped 4.444 mm short in the file. - seg_shape takes its limit from MAX_BEZIER_DEGREE: a Bézier is written whole, at its own degree. - read_dxf reads SPLINE degrees 1 to MAX_BEZIER_DEGREE, the degrees a sketch spline takes. - Tests: every Bézier degree 4 to 9, a degree-9 round trip, the reader's degrees, hostile SPLINE degrees and too few control points, the G4 cut-out exported and read back with its areas, and a degree-9 SPLINE with 2 to 10 points inserted into a sketch. Fixes #5269 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Renaming a plane keeps its projections, canvases and hidden state (#4353) (#4354) * claim: #4353 * Renaming a plane keeps its projections, canvases and hidden state (#4353) timeline.rename only renamed the feature in other features' references. A sketch's projection of a construction plane, a canvas placed on it and the hidden list keep it by name too, so they lost it: the sketch warned that the plane no longer exists, the canvas left the view and a hidden plane showed again. Document::rename_feature_keys renames it in sketch links and canvases, as rename_body_keys does for bodies; the selection follows in the command, and the hidden list in Session::refresh_from, so a hidden plane stays hidden through undo and redo too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Browser: add Rename and Delete to feature menus (#3839, #4343) (#4342) * claim: #3839 * fix(ui): add Rename and Delete to browser feature menus * Browser: a second click on a Document Settings entry closes its window (#4150) (#4152) * claim: #4150 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Browser: a second click on a Document Settings entry closes its window (#4150) Each entry under Document Settings only opened its window. A second click on Units closed the menu on the press (the row is outside it) and opened it again on the release; Precision left Preferences open; Parameters and Design Properties came back as a fresh copy. Now a click on an entry whose window is open closes it the way the window's own x does: - Units: context_menu::toggle_for with the row as the opener, the fix #1522 made for the workspace button's menu. A right-click still opens it at the pointer. - Precision: prefs::close(app, true), the Cancel/x path that puts back what changed since the window opened (now pub(crate)). - Parameters and Design Properties: the window is dropped, as its x does. A Parameters value typed but not applied yet is dropped with it, as today's second click already drops it. Fixes #4150 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Preserve expression-positioned sketch fillet corners (#4097) (#4106) * claim: #4097 * Sketch fillet keeps a corner placed by an expression (#4097) Filleting a corner whose position comes from parameter expressions deleted the point and its expressions, so the sketch gained two degrees of freedom and later parameter changes distorted the outline. keep_corner now also keeps fixed or expression-positioned points as virtual sharp corners. * Fix feature editor picks after upstream sketch resizing (#4083) (#4084) * claim: #4083 * Feature editors refill named edges and faces where they are now (#4083) After an upstream sketch change, Fillet, Chamfer, Shell and Draft evaluated correctly, but their editors refilled the originally clicked points and could then fail with "no edge at ...". Resolve the stored names through the document's naming helpers first, keep the resolved index, and map the pick into the displayed body's frame; the point lookup stays as the fallback. * ui-egui tests: clear the texture deltas of the frames they run (#4039) Nine tests dropped an egui frame's output with its texture delta still unapplied (the expression completion editor's frames, the slot preview's three, the browser's feature rows). epaint asserts against that in debug builds, so they failed under the dev profile and passed only where debug assertions are off. They clear the delta as the other tests do; one more hover test that dropped its output the same way does too. * Frames: profile library, members along frame sketch lines, and the Frame Member dialog (#4003) (#4004) * claim: #4003 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Frames: the profile library (#4003) The first slice of frames and weldments: the cross-sections structural members will be made of, each SolidCraft's own parametric definition built in code (no vendor or standard size tables are shipped). - solidcraft_doc::frame: bar, round bar, rectangular and round tube, angle, channel, I-beam and a generic T-slot extrusion as exact line/arc regions, with defaults worked out from the profile's size, refusals that name the dimension that does not fit, anchors and placement, and exact section properties (area, centroid, Ixx/Iyy/Ixy by Green's theorem). - frame.profile.list, frame.profile.properties (with mass per metre for a density) and frame.profile.insert (draws a profile into a sketch, locked by default, at a point, anchor and angle). - Tests against hand-computed values (rectangles, circles, composite rectangles by the parallel-axis theorem, fillet spandrels), hostile input, extrusion volume, undo; catalog entries in every locale; docs/frames.md; ROADMAP M15. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Frames: drop the built-in T-slot profile (#4003) Aluminium extrusions and other vendor sections come from the user's own sketch (drawn or inserted from the vendor's DXF), so the library keeps the plain steel shapes only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Frames: members along frame sketch lines (#4003) frame.member lays one body per straight line of a frame sketch (2D lines or 3D sketch lines), its cross-section square to the line from end to end: - profile: a built-in profile, or profile_sketch, a sketch whose material (nested loops alternating, so two circles make a tube) is the section in its own x and y around its origin; profiles picks override it. - anchor (origin, centre, centroid or a bounding-box corner or edge middle), angle (an angle expression, so a parameter), mirror. - Orientation: the profile's y as near world up as the line allows, x square to both; a vertical member's x is world X (frame::member_axes). - Members follow sketch and parameter edits, undo as one step, save and reopen (format: pending/frame-members.rs), and are named after the profile (Rect Tube 40x40x3, (2)…), numbering on past names already taken. Tests against hand-computed volumes and bounding boxes (rectangle, 3D tower lines, parameter edit, sketch tube profile and picks, anchor/angle/ mirror), refusals, undo/redo and reopen; walk fixtures and goldens; docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Frames: fixes from the adversarial review (#4003) - Default member lines are what was drawn: projected and other linked curves and 3D wires (a face sketch's edges) and lines of no length are left out. - A profile sketch's material starts from its drawn profiles, as solid.extrude's "all" does, so a section sketched on a face works; the even-odd test uses outlines and boxes worked out once, capped at 256. - Member names are pinned to their lines (`names`, by line id; `body_name` is the base): deleting or adding a line, or deleting another feature, no longer renames other members, and frame.member stores every name it gives. body.rename renames a member on its line (also for later member features); a copy whose body_names were set still names its members by position. - Built-in profile dimensions are expressions (ProfileSpec): they follow parameters, bare numbers take the design's units, and they are feature inputs. frame.profile.properties/insert read them the same way. - Default root/toe radii shrink to the room a thick section leaves; radii given are checked by name; a radius must be 0 or at least 0.01 mm; error messages report the wall or flange value given, not twice it. - A line within 1e-6 rad of vertical orients as vertical, so rounding never turns a post a quarter turn. - A 2D frame sketch in a differently placed component is mapped into the member's frame, and member features recompute when placements change. - Caps before lookups for a design's `lines`; a line listed twice is refused; a 3D wire that runs back on itself is not a line. Regression tests for each, from the review's scenarios. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Frames: the Frame Member dialog on the ribbon (#4003) - Frame Member (MODEL > Create) opens a dialog: the frame sketch's lines picked in the view (or All Lines), a built-in profile and its dimensions or a section picked in another sketch, anchor, angle, mirror and name, with a live preview. Edit Feature reopens it filled in. - Lines picked in the view keep their sketch (a SKETCH_LINES input picks ExternalSketchCurve): line ids are each sketch's own, so two 3D sketches both have a `w2`, and the members went on the newer sketch's lines. - timeline.redefine takes frame.member. Members keep their names through an edit unless it gives them a new body_name; frame.member takes `names`. - A member whose section is a whole profile sketch keeps it when edited (the dialog shows the sketch instead of picking every region, which would fill a tube's hole). - An original frame_member icon, open for review, on the ribbon, timeline and browser. - The angle profile is listed as L-Angle, and web and flange as Web/Flange thickness, so they translate apart from the existing Angle, Web and Flange; the dialog's labels are in en, ja and zh. en-GB no longer repeats the frame command labels it spells the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Rectangular and circular pattern: copies that miss the body are reported (#3042) (#3919) * claim: #3042 * Warn when cut pattern copies remove no material A rectangular or circular pattern whose copies miss the body succeeded silently and those copies did nothing. The pattern now reports how many of its cut copies removed no material, and keeps the copies that land. * Delete in a rolled-back history warns about the features after the marker (#3471) (#3698) * claim: #3471 * Delete in a rolled-back history warns about the features after the marker (#3471) With the timeline rolled back, the checks a delete runs first (the confirmation's "these features will fail", timeline.dependents and selection.delete's would_fail) compared models evaluated only up to the marker. Features after it, broken by the delete, were not listed, so their error marks turned up only once the timeline moved to the end. newly_broken_in_history evaluates both sides over the whole history when either has a marker (on copies; the model and document are unchanged) and is used by the delete's report and by timeline.dependents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * macOS: Fusion navigation preset does not support Shift + two-finger orbit (#3446) * Macos: keep touchpad/key modifiers true to fusion * fix: remove obsolete orbit snap reset from trackpad navigation Upstream removed ViewportState::orbit_snap. The new trackpad orbit path retained one reference, causing E0609 in the PR merge build. Validation: all seven trackpad tests pass; cargo check -p solidcraft-ui-egui --all-targets passes on the exact failing CI merge 66a2791b with this fix applied; rustfmt and diff checks pass. Co-Authored-By: GitHub Copilot <noreply@github.com> * fix: retain Fusion trackpad help in refactored preferences Preserve upstream's new preferences pages and apply the translated Fusion trackpad tooltip in prefs/navigation.rs. Validation: cargo build -p solidcraft passed. Tests and full CI were not run, as requested. Co-Authored-By: GitHub Copilot <noreply@github.com> * style: format Fusion trackpad preferences tooltip Apply rustfmt's required wrapping for the relocated tooltip. No behavior changes. Validation: cargo fmt --all -- --check and git diff --check passed. Co-Authored-By: GitHub Copilot <noreply@github.com> --------- Co-authored-by: GitHub Copilot <noreply@github.com> * 2-point circle takes a typed diameter (#3278) (#3335) * claim: #3278 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 2-point circle takes a typed diameter (#3278) After its first point the 2-point circle tool showed no value box, so the circle could only be sized with the cursor. It now shows a Diameter box, like the centre circle: the typed value puts the second point that far along the cursor's direction, and Enter draws the circle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Phanoob <phanoob@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Reorder design tabs by dragging them (#3187) (#3188) * claim: #3187 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Reorder design tabs by dragging them (#3187) A tab dragged along the strip follows the pointer while the others make room, and lands where it is released; Escape, or releasing down the window, leaves the order as it was. With the custom title bar a drag that starts mostly up or down (or on the only tab) still moves the window. The control channel's ui.documents gains a move action (from, to). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Phanoob <phanoob@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Renaming a body keeps the evaluated timeline, off the window thread (#2467) (#2468) * Renaming a body that later features change evaluates nothing (#2467) Model::rename_body now keeps the results when later features change the body (a pattern, a chamfer, a join). It still evaluates when a body of that name comes and goes or isn't the same body throughout, when a later body's name is worked out from it (X (2)), or when a message quotes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Rename box: rename off the window thread, and locked bodies follow a rename (#2467) The rename box commits body.rename through run_heavy, so a rename that still evaluates later features (one names the body in its targets) computes beside the window instead of freezing it. Locked bodies now follow a body.rename from anywhere (the rename box, the control channel, scripts), not only the rename box. --------- Co-authored-by: bherbruck <brennen.herbruck@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Toolbar: a constraint dragged out of the small box becomes a full button (#5254) (#5456) * claim: #5254 * Toolbar: a constraint dragged out of the small box becomes a full button (#5254) The Constrain panel's small box of constraint icons was a fixed list, so dragging one onto the full-size buttons saved a new order but it was still drawn in the box. The toolbar settings now remember, per tab, which box commands were moved out; those are drawn as full buttons, the box closes up, and dropping one back on a box icon returns it. Reset Toolbar restores the default box, and settings saved before this load unchanged. * Sketch offset keeps its source lines free to turn (#4464) (#4466) * claim: #4464 * Sketch offset keeps its source lines free to turn (#4464) An offset adds a Parallel between each source line and its offset line. Since offsets became associative, the offset's points are held during a solve, so each Parallel pinned its source line to the offset line's current direction: a closed chain lost its turning freedom (8 degrees of freedom became 6), and Horizontal or an angle edit on a source line was refused as conflicting. The solver and the constructive reading now leave out a Parallel that ties an offset line to the source it follows while the association lives; the association already keeps them parallel. After Break the stored Parallel drives again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Flat Pattern view draws perforations (#4440) (#4441) * claim: #4440 * Flat Pattern view: draw perforation holes (#4440) The flat view drew the outline, cut-outs, pockets and bend lines but not perforation fields, though the flat-pattern data and the DXF export list their holes. The view now reads the hole centres from the sheet through SheetBody::perforation_holes, caches them per model state and body, and draws them as circles in the cut-out style. Holes outside the viewport or smaller than one pixel are skipped, and the cache is capped at one million holes. * "Don't Save" looks like a button in the Save changes prompt (#4380) (#4400) * claim: #4380 * "Don't Save" looks like a button in the Save changes prompt (#4380) The prompt's third action used the kit's low-emphasis text style, so it didn't read as clickable and people thought Cancel was the only way out. Add an opt-in secondary_left style to the confirm footer (a framed secondary button from the theme tokens) and use it for Don't Save. * Save prompt test: clear each frame's texture delta once it is applied egui 0.36 panics when a TexturesDelta with unapplied deltas is dropped; the test kept only the last frame's output and dropped the earlier ones. * 3D mouse test: clear the frame's texture changes, so it passes in debug builds (#4382) each_frame_hands_the_view_its_motion_through_the_drivers_mapping dropped the output of a frame it ran (`let _ = ctx.run_ui(...)`). epaint panics in debug builds when a TexturesDelta is dropped with deltas left ("Dropped TexturesDelta with 1 unapplied deltas"), so the test failed under a plain `cargo test` on every platform while the ci profile passed. It now clears them, as the other UI tests do since #60. Co-authored-by: Tyler Chiriboga <18270301+Tyler-Chiriboga@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Spanish (es-ES): catch up with en.json (#4292) Co-authored-by: carlymx <24634598+carlymx@users.noreply.github.com> * Esc ends the navigation bar's Pan, Orbit and Zoom modes (#4226) (#4233) * claim: #4226 * Esc ends the navigation bar's Pan, Orbit and Zoom modes (#4226) The nav bar toggled a mode on, but nothing cleared it on Esc, so a left drag kept panning, orbiting or zooming. Esc now ends an active nav mode first; the next Esc reaches the tool or dialog as before. * Keep long Select Other labels inside the popup (#4209) (#4225) * claim: #4209 * fix(ui): bound Select Other labels and expose full names (#4209) * Deleting an inserted file removes its components, placements and joints (#4100) (#4113) * claim: #4100 * Deleting an inserted file removes its components, placements and joints (#4100) A STEP or mesh file inserted into a design makes a component tree. Deleting its feature left that tree behind: the components, their occurrences, the rigid joints that hold them and the bodies' component assignments. A later body that took an imported body's name was then placed in the stale component. Document::remove_component_tree removes a component subtree and everything that refers to it: the features made inside it, its occurrences, the joints on them with their motion links, joint origins, contact set members, motion study keys and exploded moves, body component and offset entries, standard part and link records, and configuration columns. Deleting an inserted file's feature and component.delete both use it; component.delete now also removes joints left pointing at a deleted occurrence. The body transfer refusal moves with it, unchanged. * Only an inserted file's feature takes its component tree when deleted Mark the feature a STEP, IGES or mesh insert makes (`inserted`), and remove the component tree on delete only for those and for a linked design's feature. Deleting a copied component's independent base deletes just that feature, as before. Older designs get the mark as they open (pending format change), except copied components' independent bases. * Rigid joint saved with the wrong occurrence when two occurrences share a component (#3857) (#3939) * claim: #3857 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Joint dialog: a body of a further instance picks that occurrence, not the component's first (#3857) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> * Cancel Sketch: leave a sketch without keeping its changes (#3838) (#3938) * claim: #3838 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SBN24y2TcqRcm2zn8Gkj27 * Cancel Sketch: leave a sketch without keeping its changes (#3838) sketch.cancel (Cancel Sketch, ribbon Exit group and the sketch's right-click menu) puts the design back as it was when the open sketch was created or opened for editing: a new sketch is removed with its dimension parameters, an edited one returns to how it was. It is one undo step, so Undo goes back into the sketch. The session remembers the design and the undo history at the point a sketch is entered. Cancel uses that only while the history still runs through it (the same steps before, every step since taken in this sketch); otherwise it refuses and points to Undo, so a stale entry can never throw away later work. The icon is the approved close glyph in the sketch accent (alias sketch_cancel); ja and zh carry the new label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SBN24y2TcqRcm2zn8Gkj27 --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * 3MF import: name a Bambu Studio project's bodies after its objects (#3858) (#3859) * claim: #3858 (3MF import: names from a Bambu Studio project) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3MF import: name a Bambu Studio project's bodies after its objects (#3858) Bambu Studio leaves the name off the root model's objects and keeps it in Metadata/model_settings.config (<config><object id="N"><metadata key="name">), so every object of a project came in as Mesh1, Mesh2, ... A build item whose root object has no name of its own now takes the object's name from those settings. A name in the model still comes first, and part names, other settings and objects of other model parts are left alone. The settings are read only when a body needs a name, within what the model parts left of the 1 GB budget. Settings that can't be read (malformed, nested too deeply, too large) never fail the import: the bodies keep the generic names, with a warning saying why. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Tyler Chiriboga <18270301+Tyler-Chiriboga@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Viewport: right-click keeps a multi-selection of faces and edges (#3733) (#3788) * claim: #3733 * Viewport: right-click keeps a multi-selection of faces and edges (#3733) --------- Co-authored-by: AhmetV <344941595+ahmetv10@users.noreply.github.com> * Parameter import and image pickers offer their own file types (#3216) (#3314) * claim: #3216 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Parameter import and canvas image pickers offer their file types (#3216) Both opened the picker with no file type of their own, so it listed only designs, CAD files and meshes (and All files). macOS lets you pick only the types a filter names: CSV parameters, and PNG or JPEG images for a canvas, were greyed out. They now ask for csv/json and png/jpg/jpeg, which the picker lists first (#1801). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Phanoob <phanoob@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Return to the originating tab after finishing a sketch (#3250) (#3264) * claim: #3250 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Return to the originating toolbar tab after finishing a sketch (#3250) A sketch started from SHEET METAL or PLASTIC always ended on the SOLID tab. Remember the tab that was active when the sketch began (UiState::sketch_return_tab, not saved) and go back to it when the sketch ends. Falls back to SOLID when that is not one of the normal toolbar tabs. A sketch started from SOLID behaves as before. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Test: no one-element loop in the return-tab test (clippy single_element_loop) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> * STEP import: let a cancelled import release the import slot (#3171) (#3189) * claim: #3171 * Release cancelled file import slots (#3171) * Dragging a part along its joint no longer highlights what's under the pointer (#5137) (#5140) * claim: #5137 * Dragging a part along its joint no longer highlights what's under the pointer (#5137) The viewport's hover pick was skipped during a box selection and camera moves, but not while a jointed part was dragged, so faces and edges under the pointer lit up on every frame of the drag. The pick now waits until the joint drag ends. * Browser: a body picked in the viewport is opened to and scrolled to (#3005) (#3081) * claim: #3005 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Browser: a body picked in the viewport is shown in the Browser (#3005) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Merge main; viewport::select takes a toggle flag now Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Phanoob <phanoob@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Line tool snaps a diameter through the circle centre (#4326) (#4327) A line drawn across a circle only snapped its end onto the curve, so a diameter could miss the centre at any angle. Near the centre the line now locks onto the radial line: on the rim it stays on the circle and the centre is kept on the line, and on the centre point the end lands there. * Flatpak: find the host's fonts for CJK text and the font list (#5124) (#5127) * claim: #5124 * Flatpak: find the host's fonts for CJK text and the font list (#5124) Inside the Flatpak sandbox the host's fonts are mounted at /run/host/fonts and /run/host/user-fonts, which no font search looked at. Japanese and Chinese text fell back to boxes, and the font list missed the host's families. - Search both folders for the CJK and Chinese fallbacks and for the installed-font list. - The CJK fallback reads SOLIDCRAFT_FONT_DIRS (a path list, as the font list already does), with CRAFT_FONTS_DIR kept as a fallback. * Crash reports: keep component.activate in the journal (#5079) (#5121) * claim: #5079 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Crash journal keeps component.activate (#5079) Activating a component changes only the session's active component and occurrence path, not the design, so the journal dropped the command and a crash report's replay built later parts under the previously active component. The journal now also keeps a command that changes either. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Control channel and MCP on by default, with a setting to turn it off (#5561) The app opens its localhost control channel on port 27878 (or the next free one) unless Preferences > Assistant turns it off; --control and SOLIDCRAFT_CONTROL_PORT still win. A current.port discovery file lets solidcraft-cli mcp find the running app with no arguments. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> * Tests: moving an occurrence recomputes only the cuts and joins it touches (#4965) (#4982) * claim: #4965 * Joins and cuts follow only the placements they depend on (#4965) Tests that turning a joint between parts cuts no hole again, and that a tool cutting another part cuts again when that part moves relative to it, while an unrelated part moving keeps the result. Booleans and Combine now hash only the placements of the bodies they take as inputs, relative to the frame that evaluates them (#3397), so these pin that behaviour for joins and cuts with named targets across parts. * fix(ui): preview shortcut chords and wait for complete modifier input (#1810) Keep physical modifier events out of the ordinary-key slot, preview held keys immediately, and confirm after release and a one-second settling interval. Preserve legacy control-channel modifier behavior while allowing explicit physical Control/Command input. Add regression coverage, a UI scenario, localized guidance and documentation. Fixes #1809. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> * Move: scope box selection to the active component (#4459) (#4527) * claim: #4459 * fix: scope Move box selection to active component (#4459) * Delete removes a selected construction axis (#4692) (#4695) * claim: #4692 * Delete removes a selected construction axis (#4692) Delete on a construction axis skipped it with "the origin axes can't be deleted". It now deletes the construction axis feature, like construction planes; the origin axes X, Y and Z are still refused. * Agent chat: end the agent's process group where `kill` is busybox' (#4587) (#4588) * claim: #4587 * Agent chat: end the agent's process group with the system call (#4587) The group was signalled with a `kill` program: `kill -s TERM -- -<pgid>`. That works with procps' `kill` and with BSD's, but busybox' `kill` takes no `--`: it prints its usage, exits 1 and signals nothing. The agent's helpers (the CLI an adapter wraps, the MCP servers it starts) then stay alive after the agent is ended. The group is signalled with the system call instead, so no `kill` program and no shell are needed and the behaviour is the same everywhere. `nix` (MIT) is already in the tree through zip, and only on Unix: the browser build does not take it. The two tests that cover this now pass where they failed before: `agent_chat::process::tests::dropping_the_process_ends_its_group` and `agent_chat::process::tests::stopping_the_agent_leaves_no_helpers_running`. * Extrude: picking a face, vertex or parallel plane off the profile switches the extent to To Object (#2855) * Extrude: picking a face, vertex or parallel plane off the profile turns the extent to To Object With profiles picked, a face off their plane (or curved), a vertex off it, or a construction plane parallel to it is taken as the To Object target instead of another profile: the extent switches without the Extent Type choice, and the distance shows how far the target is. Coplanar faces still join the profiles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Extrude: automatic To Object is a Preferences setting, off by default Preferences > Design > "Extrude to a picked target" (`extrude_auto_to_object`, default false) turns the automatic To Object on. Off, picks in the Extrude dialog only add profiles and the distance is not synced to a target, as before this change. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: bherbruck <brennen.herbruck@gmail.com> * Regenerate THIRD-PARTY-LICENSES.txt and docs/features.md [skip ci] * FreeCAD/Rhino import: decode caps with room for detailed parts (#1783) (#3209) * claim: #1783 * FreeCAD/Rhino import: decode caps with room for detailed parts (#1783) cadmpeg decoded FreeCAD and Rhino files under its service profile, whose million collection items and 2.56e8 work units a detailed part (a sprocket, a threaded rod, a part with a few hundred faces) runs past: the import was refused with "resource limit on CollectionItems: BudgetExceeded". Allow 8 million items and 2e9 work units, half of cadmpeg's desktop profile; the input-size cap stays SolidCraft's STEP limit and every other cap stays at the service profile's. decoding_is_capped checks the two raised caps (and that they stay below the desktop profile's) and that every other cap is still the service one. Fixes #1783 * A spherical shell revolves into a solid with a void, and cuts and joins with hollow tools work (#451) (#4182) * Assembly: ground the first part; drag free joint chains (#2804) (#2805) * assembly(feat): ground first parts and drag free joint chains Ground the first top-level part when it is created and let face dragging reposition free occurrences or any member of a floating joint chain in one undo step. Preserve exact repeated-placement frames, joint values, modifier selection and Escape cancellation. Keep the accumulated fixture, viewport layout and documentation integration fixes from the existing PR. Signed-off-by: Karl Von Richter<karl@embeint.com> * assembly(fix): update movable fixtures for first-part grounding Accept the documented grounded override in component creation, explicitly free movement fixtures, and keep linked clipboard pastes movable even in an empty document. Cover first and reused linked pastes, default insertion grounding, and single-step undo in the existing link tests. Signed-off-by: Karl Von Richter<karl@embeint.com> * assembly(test): keep the motion-cost crank free Unground the first component in the document-level joint-face measurement fixture so its motion samples can rotate after first-part grounding. Preserve the rotation and shared-measurement assertions that caught the Linux CI failure. Signed-off-by: Karl Von Richter<karl@embeint.com> * assembly(test): free the frame placement fixture Create the frame-member placement fixture ungrounded before moving it above its root sketch. Keep its world-space member assertions while respecting first-part grounding in the frame tests added on main. Signed-off-by: Karl Von Richter<karl@embeint.com> --------- Signed-off-by: Karl Von Richter<karl@embeint.com> * UI: integrate theme radii, borders, palettes and viewport refresh (#5045) (#5046) * claim: #4922 * UI: let themes own corner radii * UI: use four-point panel and window radii in SolidCraft 95 * UI: align the 95 radius assertion with four-point panels * claim: #4953 * UI: let themes own structural and control borders * UI: single Blueprint outlines and dotted secondary rules * UI: separate container outlines and add theme-owned 95 bevels * claim: #5007 * UI: apply theme palettes to icons, workspace tabs and Gruvbox settings * claim: #5045 * Viewport: invalidate cached geometry colours when the theme palette changes * UI: preserve legacy theme logo colours with the borderless mark * Section Analysis: OK with no plane picked turns the section off (#2410) (#2411) While a section is on, Section Analysis opened with no plane picked now says "No plane picked: OK turns the section off." and OK runs inspect.section {"clear": true}. With no section on, OK with no plane still asks for a plane. Fixes #2410. * Regenerate THIRD-PARTY-LICENSES.txt and docs/features.md [skip ci] * Close Change Parameters with Escape (#3372) (#3399) * claim: #3372 * Fix Escape cancellation in Change Parameters Consume Escape before parameter editors can commit pending text on focus loss, while preserving autocomplete and shortcut capture priority. Add 11 UI regressions covering draft cancellation, preview cleanup, document and history preservation, and reopening saved values. * Preserve construction references when axes and points are renamed (#4419) (#4449) * claim: #4419 * fix: preserve renamed construction references (#4419) * Browser: route body picks into open command dialogs (#2560) (#4371) * claim: #2560 * fix(ui): route Browser body picks into active dialogs * Fix midpoint picks in sketch dimensions (#4872) Retain MID snaps across both picks and materialize reusable midpoint constraints for point-to-line and point-to-point dimensions. Let midpoint pairs choose horizontal or vertical spans with pointer placement before entering a value. Cover projected model edges, overlapping geometry, helper reuse, undo/cancel/reopen, and existing angular and line-circle workflows. * Sketch slots: provide typed dimension inputs for every variant (#2423) (#4318) * claim: #2423 * fix(sketch): add typed dimensions to every slot tool (#2423) * Version 0.21.0 on main (released from rc.2's code) (#5774) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * docs(mcp): Windows setup for Claude Desktop (#3794) * docs(mcp): Windows setup for Claude Desktop (paths, two servers, Store config file) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(mcp): say the Store build can keep the config elsewhere, not that the other path fails Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Regenerate THIRD-PARTY-LICENSES.txt and docs/features.md [skip ci] * MCP: wait out long requests, honest batch outcomes, batch tool aliases (#2901) Rebased onto main as one commit (was 120d26f7, df488f9a, db9d1073 plus merges of main). - A request the app reports as still running (#1618) is waited for on the same connection through `control.pending`; past the wait the error says it was not cancelled and will still apply (or only write its file), later calls are not sent behind it, and the new read-only `pending` tool returns its result once it lands. - A failed batch says what really happened: `rolled_back` only when the design is back where the batch started (as #3288 / #3242 on main: the app's `rolled_back` is believed; for an older app, every completed step undone; only a rollback asked for is reported as one), plus `applied`, `not_run` and `failed.still_running`. - A batch step may name a tool (set_parameter, list_commands, describe_command, execute, measure, inspect_design, undo, redo, export, save, open, new_design, crash_reports); screenshot, body_topology, batch and pending are refused before anything is sent. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * 3D mouse: driver choice, guided calibration, button mapping and a picture of the device (#1463) (#3825) * Add a small test boat to steer around with the 3D mouse A little hull in its own camera, drawn by the UI itself and not the CAD viewport, so a 3D mouse can be tried out without opening a design. It brings the model (generated by assets/models/make_test_boat.py) and the tests for how the camera moves it. Nothing uses it yet; Preferences picks it up with the rest of the 3D mouse work. * UI kit: keep a choice row from flipping with the scrollbar A choice row picks segments or a dropdown by whether its labels fit. A page scrollbar that comes and goes narrows the row by its own width, so the row could flip back and forth between the two on a page that sits right at the edge. It is now judged on the whole row and through a small helper, fits_steadily, that only changes its answer once the miss is wider than the scrollbar. Also tests for that, for typed numbers in a slider's value box, and a test hook to put up the issue-report input barrier by hand. * 3D mouse: device model, guided calibration, buttons and a picture The 3D mouse becomes a device we know something about instead of six raw numbers. The reader picks between spacenavd and the direct hidraw driver, falls back from one to the other, and says so when it can't open the device. Guided calibration asks whether the device is a spring cap or a trackball, adds a touch step, and uses a settle filter so a ball let go of stops reading as motion. Buttons get jobs (keys, held modifiers, commands), saved per device, with defaults for the SpaceMouse Pro. Preferences gets a picture of the device that moves as it does, next to the test boat, and the same picture can sit in the 3D view at Left Viewport, Right Viewport or Left Window, above the floating History card like the legend and readouts. These ride together because the crate's calibration types, the Preferences page, the Linux reader and the button hook all use each other. * 3D mouse: offer to calibrate an uncalibrated device When a 3D mouse shows up that has not been calibrated, a card in the 3D view offers to calibrate it, to swap drivers when the other one would work better, to close, or to never ask again. It is made once per device, goes away after 30 seconds in view, and gives way to a status or computing toast instead of stacking on it. The card is the shared toast, which now takes buttons: they group by purpose, wrap inside the card at narrow widths, and do nothing while an issue report holds CAD input. The picture of the device in the 3D view keeps clear of the card. * 3D mouse: translations and attribution The 3D mouse strings (ui.3d_mouse_*, the calibration steps and the offer card) in every shipped language, the Japanese catalog note, and the credit for the test boat model in ATTRIBUTION.md. This is last because the code before it only looks keys up: it builds and runs without these, falling back to English until they land. * 3D mouse: draw its preferences with the settings kit like the rest of Navigation The 3D mouse section was a folded header with its own layout. It now uses the same kit as the sections above it: a settings_section card, settings_form rows with the shared label column, dividers between the device, axes, picture and buttons groups, Text::Hint for the helper lines, and settings_control_width for the dropdowns. The section is open like every other one (the header still folds it), so the device badge on the folded header is gone; the calibration row already names the device. Every setting, string and key is unchanged. Tests that unfolded the section no longer click it, and the hint lines are looked up as hints instead of notes. * 3D mouse: show each axis's live tilt in Preferences, like main's axis rows Each view axis row is main's axis row again: a meter that follows the tilt of the motion driving it, with the dead zone marked, next to Invert, Speed and the "driven by" menu. The meter reads the calibrated travel when the device has a calibration and the raw reading over full scale when it does not, and asks for a frame whenever the reading changes. The helpers are back as they are on main, and the calibration state is a badge by the enable toggle. * 3D mouse: line its preferences up with the rest of Navigation - The two checkboxes sit side by side in the same two-column grid as Wheel and trackpad. - Row labels stop repeating "3D mouse" and use sentence case: Calibration, Driver, Restore defaults, Reset view, Left viewport, Right viewport, Left window. - Hints line up under the control column instead of the left edge. - The six view axes are named Pan X, Pan Y, Zoom, Orbit X, Orbit Y and Roll so they fit the name column. - Buttons are a divider and rows in a form like the other groups, without the bold sub-heading. - The driver, dead zone, axes, picture and buttons sit behind a collapsed Advanced section, since most people never touch them. * 3D mouse: tidy the Advanced test for clippy * Timeline: suppressing a feature keeps later features' body names (#4302) (#4311) * claim: #4302 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Timeline: suppressing a feature keeps later features' body names (#4302) Bodies numbered by the counter (`BodyN`) take the next free number on every recompute, so suppressing a feature that made one moved every later counted body down one (`Body2` became `Body1`) and broke what named it, such as a Move of `Body2`. timeline.suppress now stores the current names of later features' counted bodies in their `body_names` first, as body.rename already does for a renamed counted body (#1109). Engine only: no evaluation or design-format change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Timeline: a body made while a feature is suppressed keeps its name (#4302) Suppressing a feature freed its counted name (`Body1`), so a body made meanwhile took it and became `Body3` once the feature was back. Suppress now also stores the suppressed feature's own counted names, and the evaluator adds the names stored on earlier suppressed features to the state's `reserved_body_names` (the names a rename freed, #4957), which the `BodyN` counter passes by. They are taken from the design before each feature is computed and are part of the state digest, so a cached result is only reused when they match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * cadmpeg 0.6.3: FreeCAD and Rhino import in the browser too (#4482) cadmpeg 0.6.3 is pure Rust (ruzstd instead of the zstd C library, zip 9), so solidcraft-io depends on it on every target and the wasm build reads .FCStd and .3dm files like the desktop app. The browser's file pickers offer them. 0.6.3 replaces DecodeOptions::container_only with a decode depth; ask for Geometry, what its STEP writer reads. zip 8 leaves the tree, and with it the three cargo-deny advisory exceptions kept for it. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Pattern dialogs: Quantity fields get up/down step arrows (#4260) (#4264) A new kit control, `ui_kit::count_field` / `count_row`, is an expression field for a whole-number count with stacked step arrows at its right edge. An arrow steps the evaluated count by one within the field's limits: a plain number is replaced, an expression keeps its parameters and gains or adjusts a trailing `+ n`. The text changes as typing changes it, so the live preview follows. Used by the Quantity rows of the sketch Rectangular (1-500, both directions together at most 500) and Circular (2-500) patterns, and the solid Rectangular, Circular and Path patterns (1-1000). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Regenerate THIRD-PARTY-LICENSES.txt and docs/features.md [skip ci] * Join: say so when the joined piece doesn't touch the body (#4434) (#4436) * claim: #4434 * Join: say so when the joined piece doesn't touch the body (#4434) A Join (extrude, revolve, sweep, loft, pipe, coil, primitives, thicken, boundary fill, surface network) whose material meets none of its targets still joins it to the first target as a separate piece. The result stays as it was; the feature now warns: "the joined piece doesn't touch `Body1`, so `Body1` is now in 2 separate pieces (New Body makes it a body of its own)". History marks it and the command reply carries it. The check compares pieces (outer shells, not voids) of the bodies the feature changed or absorbed before and after it, so it holds for the batched multi-profile path too, stays quiet for a join that bridges pieces or closes a cavity, and leaves Combine (which joins the bodies it is given) alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Hole: snap to face and round-edge centres, drag placed holes, section in the dialog (#2171) (#2912) Placing a Single hole put it exactly where the click landed, with nothing to line it up by and no way to move it but taking it out and picking again; the dialog was a list of size fields. - Preferences › Design › Create Hole has two settings, both off by default, so a new installation places holes as before: - Snap to face and edge centres (`hole_snaps`): the planar face under the cursor offers its middle and the centres of its round edges (a boss, a rounded corner, a hole already there) as marks; a pick near one, or on or beside such an edge, takes that centre and the mark is named. Sketch points on the face still come first; Alt or Ctrl held places it where clicked. - Move holes by clicking or dragging (`hole_moves`): each placed hole has a handle that drags it (snapping when snaps are on) and takes it out when clicked, and a pick elsewhere on its face moves it there. Edit Feature shows the handle too, so a hole can be moved later (#1047). - The Hole dialog draws a section of the hole as its options make it, with each size in a field beside the dimension it sets; a hovered or focused field lights its dimension. The layout is a new kit element, `ui_kit::figure_rows` (a caller-painted figure beside captioned fields). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Hole: place a Single hole by distances from reference edges (#37) (#2931) A Single hole can take up to two straight edges of its face as references, each with the distance of the hole's centre from that edge's line, measured in the face's plane. `solid.hole` takes them as `references: [{edge, distance}]`; the edges are found again by their persistent names, else their points, so the hole follows them when the part changes, and each distance is a parameter. A bad reference (no edge there, a curved edge, one square to the face, parallel edges, a negative distance, a centre off the face) is refused. In the Hole dialog, Reference 1 and 2 follow the face, each with its Distance row; the canvas shows each distance as a dimension from its edge to the hole, with a box just past the edge to type it in. Picking an edge measures its distance (and its box takes the keyboard), typing one moves the hole, and moving the hole measures them again. Edit Feature picks the edges again with their distances. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --------- Signed-off-by: Karl Von Richter<karl@embeint.com> Co-authored-by: Frank <58932224+plexi32@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: raykholo <raykholo@users.noreply.github.com> Co-authored-by: CamWight <91156642+CamWight@users.noreply.github.com> Co-authored-by: SS-EN <84559909+SS-EN@users.noreply.github.com> Co-authored-by: Colin Faulkingham <colin.faulkingham@gmail.com> Co-authored-by: Karl Von Richter <karl@von-richter.net> Co-authored-by: HiroKenEz <59478073+HiroKenEz@users.noreply.github.com> Co-authored-by: Peppe Bergqvist <p@bergqvi.st> Co-authored-by: GitHub Copilot <noreply@github.com> Co-authored-by: phanoob <lesur.Stephane@wanadoo.fr> Co-authored-by: Phanoob <phanoob@gmail.com> Co-authored-by: Kai Evans <nemshilov@gmail.com> Co-authored-by: bherbruck <brennen.herbruck@gmail.com> Co-authored-by: Tyler Chiriboga <tylerchiriboga.apps@gmail.com> Co-authored-by: Tyler Chiriboga <18270301+Tyler-Chiriboga@users.noreply.github.com> Co-authored-by: CaRLymx <carlymx@gmail.com> Co-authored-by: carlymx <24634598+carlymx@users.noreply.github.com> Co-authored-by: Loohi <78334654+Loohi@users.noreply.github.com> Co-authored-by: leValdemar19 <valdemarnord@hotmail.com> Co-authored-by: AhmetV <mihendiz10@gmail.com> Co-authored-by: AhmetV <344941595+ahmetv10@users.noreply.github.com> Co-authored-by: rlartot <94693724+rlartot@users.noreply.github.com> Co-authored-by: Christian Svensson <blue@cmd.nu> Co-authored-by: Thodoris Tsagkogeorgas <thodoristsagko@gmail.com> Co-authored-by: ahmetalpcelik <80778880+ahmetalpcelik@users.noreply.github.com> Co-authored-by: ealitt <ealitt@gmail.com> Co-authored-by: Homero Thompson <vdirienzo@gmail.com> Co-authored-by: Diogo Soares Rodrigues <dsrodrigues20@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Artem Sushchev <Suschev.Artem+github@gmail.com> Co-authored-by: Nathan Dane <nathandane.dev@gmail.com> Co-authored-by: Kai Evans <hi@kaievans.co> Co-authored-by: Victor Santos Oliveira <56417388+Vittuu@users.noreply.github.com> Co-authored-by: cronos <crono2250@users.noreply.github.com> Co-authored-by: rbousigues88 <rbousigues@gmail.com> Co-authored-by: The Nomad <nomad@positron3d.com> Co-authored-by: Jackson Oursland <jacob.oursland@gmail.com> Co-authored-by: Jacques <59315319+Jacquesvdberg92@users.noreply.github.com>
46 KiB
SolidCraft UI kit
crates/ui-egui/src/ui_kit/ contains the tokenised controls used by feature dialogs,
preferences, manager cards, prompts, context menus and the sketch palette. Import through
crate::ui_kit::{...}. Most controls are crate-visible; the container API is public so platform apps use the same hosts.
Composition and rules
-
Every outer host uses
ui_kit::Containerwith a semanticSurface. The shell publishes the layout once per frame;Container::floating()andframe()own adaptive placement policy and chrome.Panel,Window,ConfirmandMenucompose it. Raw egui hosts and outer shadows are rejected recursively, including platform apps. The mandatorycargo xtask ui-containersgate runs in fast CI and scans new crates/apps automatically, including macro bodies and alias chains. See the container audit and migration inventory. -
Colours, typography, dimensions and spacing come from
theme::Tokens. -
Sliders only via
ui_kit::slider;Slideroptions change behaviour, never appearance. Raw sliders and duplicate track/thumb painters are forbidden in the UI and apps. -
scope(ui, add)supplies form styling.row(ui, label, add)aligns labels and controls atcontrol_height(28 pt). Wide manager rows use a 104 pt label basis with a 10 pt gutter, derived from the compact 70 pt basis and spacing tokens. Compact rows retain their 8 pt gutter. Labels widen from the appropriate basis to at most 1.6 times that width and never exceed half the row. -
expr_row,hint_row,text_rowandchoice_rowcomposerowwith the existing expression, hinted expression, plain text and dropdown controls. They preserve row order, labels, focus IDs and completion; callers keep Enter/change ownership and explicit dropdown IDs.count_rowcomposesrowwithcount_fieldfor pattern quantities. -
Panelowns bounded windows, feature/palette composition, scrolling bodies, pinned actions, compute status and keyboard routing.wide()uses three card widths.feature_frameandpalette_frameretain docked/floating surfaces.FeatureOptions::apply_labeladds Apply;Panel::actionssupplies custom labels. -
Windowcomposes the shared Panel frame with a 40 pt icon/title/close header, padded content and optional 48 pt footer.show_with_leftpins a left action beside the right-aligned buttons.show_pagesaccepts declarativeWindowPageentries (icon, i18n label key, optional group heading, stable handle, scroll policy and draw callback). Its 188 pt soft page list has 32 pt icon/label rows, selected tint/ink and a divider. Preferences has nine grouped pages; legacy control-channel page names remain aliases.page_rowsopts into a taller body while preserving viewport bounds.actions,anchor/placed,cards,fieldsandkeep_open_on_escaperetain existing window behavior. Empty action labels omit the footer. -
Confirmis an input-blocking modal using the same card frame and footer controls. It shows a 36 pt icon disc in warning, danger or info tone, a title, caller-supplied message and optional monospacedetail, above a 52 pt footer. Glyphs use the construction ramp for warning, the shared shaded danger treatment for danger, and base blue for info; the disc keeps its tint.actions(primary, cancel, left_ghost)places the optional third action at the left. Danger usesform_errorwith a contrast-selected on-colour; other primaries use blue. Enter invokes the selected answer (primary by default) when valid; Esc cancels. It retains close, answer and message scenario handles. The oldPromptelement is removed. -
Callers supply data and enabled state, then dispatch existing commands. Editors leave their established completion, Enter, Tab and commit ownership unchanged.
-
Every text input uses the kit's shared
text_inputpolicy: symmetric horizontalform_inset, zero vertical margin and centred galley alignment. Font metrics therefore centre both mono and proportional text within the allocated field, including invalid and attached Library fields, without per-caller offsets. Canvas placement editors retain their native line-height plusspace_4hit target so nearby sketch picks are not intercepted; alignment stays shared. -
Scenario handles and accessible labels are API. Consolidated options preserve the former geometry, wrapping, native metadata and publication keys.
Preference compositions use settings_heading, shared disclosure settings_section headings and
settings_pair for responsive controls beside one specimen. option_card supplies the
shared illustrated radio control. settings_form and settings_block_hint define aligned label grids; theme_rail keeps the import tile fixed beside a scrollbar-free scrolling row. PreferenceFigure owns theme swatches, orbit pivots,
quality, anti-aliasing, contact shading and up-axis figures. layout_preview follows the
four workspace choices without opening another viewport. Scale, palette, autosave, mouse
and live-axis specimens share tokens and the gallery; live bars show actual calibrated
input and introduce no repaint timer.
Elements
Module names below describe implementation locations, not caller import paths.
Every inline element/variant has one entry in the light/dark gallery::ELEMENTS
table. Panel/Window/Confirm compositions also have dedicated geometry and interaction tests.
| Module / element | Use and options | Main tokens |
|---|---|---|
assistant: assistant_header, assistant_controls, assistant_badge, assistant_bubble, assistant_prose, assistant_tool_frame/row/detail/status, AssistantToolState, assistant_approval/actions, assistant_composer/footer, assistant_input, assistant_send, assistant_empty, assistant_banner, AssistantTone |
Shared Assistant presentation: 40 pt header, 22 pt state pill, right-aligned user messages limited to 86% width, unboxed assistant prose, bordered tool groups and command detail, tinted approval heading, rounded focused composer with one unframed growing editor and pinned footer, centred setup copy and semantic notices. Closures preserve existing permission choices, protocol routing, queue actions and scenario handles. | form_header_height/close_size, font_label/small/body, dialog_body/footer/rule, control_fill/border/radius, form_ink/dim/primary/success/error, accent_soft/selected_ink, warning, radii and spacing |
history: HistoryChip, HistoryStyle, history_drop_bar, history_marker, HistorySeam, history_seam |
One painter family for bottom chips, 38 pt vertical icon chips and single-line 26 pt name rows (the browser's shared TREE_ROW_HEIGHT). Selected items use the active tab tint/ink/border; all variants retain multi-tone feature artwork using one shared kind-to-accent rule (Sketch green, Surface orange, Mesh yellow, Form purple, solids base blue); rolled-back items have 42% opacity. Error/warning badges, suppression strikes, horizontal/vertical drop bars and rollback line/hollow circle are shared. No connector lines. |
control_height, space_2/3/4/6/8/10/12/14/16/24, radii, typography, TabAccent, timeline_item, control_border, text/dim, form_error/fill |
search: CommandSearch, MenuItem::search_row |
Ribbon search composition: one persistent ribbon editor expands from 28 to 40 pt and to 520 pt wide with its right edge anchored, magnifier and S/Esc keycap, 38 pt two-line menu row with 26 pt icon tile, accent bold substring, path, shortcut/kind keycap, counts, JSON detail box and footer. The ordinary 30 pt menu row cannot fit a second line; this variant keeps its enabled/selected states and scenario IDs. Ranking and dispatch stay with the caller. | form_card_width × 2 − space_8 (520 pt), control_height, space_2/3/4/6/8/10/12/14/16/24, radius_xl/control_radius, control_fill, dialog_body/footer/rule/border, form_ink/dim/primary/error/error_fill/success/success_fill, selected_ink, accent_soft, typography |
menu: Menu, MenuItem |
Shared popup, 30 pt rows, 28 pt icon column, clipped labels, right-aligned mono shortcuts, submenu chevrons, checked/unchecked and document swatches, inert 40% disabled rows and danger ink; headings and separators; ribbon drag/pin targets retained | dialog_body/border/rule, radius_xl, control_height/radius, form_ink/dim/primary/error, accent_soft, typography and spacing |
radial: radial_menu |
Eight rounded annular sectors, parallel 4 pt gaps, 9 pt circular corner joins, tab-accent artwork and hover, centre label/key; existing hold/flick/release dispatch | dialog_body/border, form_ink/dim, TabAccent, icon palette, font/spacing tokens |
panel: Window, WindowPage |
Shared card frame, header, optional page list, bounded content and footer with a left action | form_header/footer_height, form_card_width, form_label_width, control_height, dialog_footer/rule, selected_bg/ink, spacing |
confirm: Confirm, Tone |
Modal warning/danger/info, title/message, mono detail and ghost/cancel/primary actions | warning, form_error/fill, accent_soft, form_primary, on_accent, tab_on_fill_dark, font_subtitle, spacing |
metrics: row_height, table_row_height, header_height |
Shared control/header heights | control_height, space_8, form_header_height |
layout: scope, row |
Form styling and aligned label/control columns | form_label_width, form_gap_y, control_*, font_label, dialog_label, space_4/8 |
caption |
Dim caption aligned beneath a control | font_small, text_dim, label-column tokens |
figure_rows, FigureSlot |
A caller-painted figure in the label column beside a stack of captioned expression fields (the Hole dialog's section); the caller gets each field's rect and hover/focus state to draw leaders and light the part it sizes. Fields keep their dialog:<label> handles; the block publishes dialog:figure:<id> and its picture dialog:figure_picture:<id> |
control_height, form_label_width, font_small, form_dim, space_2/4, label gap |
section, section_count, divider |
Persisted small-caps disclosure with chevron, optional count badge and trailing hairline; full-width rule | control_height, dialog_rule, font_caption, tracking, spacing |
list_row |
Picked item with a remove target | control_height, font_label, icon/spacing tokens |
text, Text |
Hint, note, report, inline or cell text; see variants below | font_small/label, text/dim/error, control_height, space_4 |
text_lines |
Virtualized read-only licence/report lines, horizontal overflow | font_small, text, control_height |
fields: field, hint_field, focused_field |
Expression editors, optional empty hint or retained focus; returns accepted Enter | control_height/fill, form_inset, font_label |
count_field, Count |
Expression editor for a whole-number count (a pattern's quantity) with up/down step arrows at its right edge. Count gives the limits and the evaluator (the design's parameters); an arrow steps the evaluated count by one within them, replacing a plain number or adjusting an expression's trailing + n, and is dimmed when it can't step. Handles dialog:<row> up / down; returns accepted Enter |
field tokens, control_border, control_radius, selected_bg, form_ink/dim, space_4 |
text_field, focused_text_field |
Plain name editor, optionally retaining focus | field tokens |
multiline_text_field |
Three-line plain-text row with stable focus ID | field/row tokens |
password_field |
Stable secret editor; excludes the secret from scenario/accessibility metadata | field tokens |
message_field |
Growing message editor; owner retains scroll and Enter routing | field tokens |
cell_editor, bounded_cell_editor, search_field, library_cell |
Stable-ID inline/search editors; bounded variant caps Unicode characters; library_cell attaches a Library dropdown inside the editor border |
field tokens, text/error |
text_area |
Bounded multiline JSON/data editor | field tokens |
dropdown, dropdown_menu |
Indexed choices or caller-supplied menu controls | control_height, text_dim, form tokens |
searchable_dropdown, SearchOption |
Filtered choices, custom-value action and pending message | dropdown tokens |
selection_field, Selection |
Selection chip with explicit active and filled state |
selected_bg/ink, accent, control_*, form_inset, space_8/24 |
value_pair |
Paired captions/expressions; optional independent field names | row/field tokens, space_8 |
fraction_field, scalar_field |
Locale-aware bounded dimensionless values; scalar fields fill their control column | form control/font tokens |
number_field |
Integer/decimal field with caller range, drag speed and suffix | form control/font tokens |
length_field, angle_field |
Length in design units, angle in degrees | form control/font tokens |
slider + Slider options |
One token-painted track/thumb over native slider/value interaction; optional step, caller formatting, whole-step manipulation and hidden value editor | control_height, space_24/8/4/2, form control/font tokens |
placement_field |
Stable focus ID; drawing tool owns Enter/Tab validation and completion | control_fill, font_body, text, control_height, spacing |
color_field, color_popover |
Opaque document RGB swatch and kit popover; global U8/F segments, copy, gamma-byte or linear RGB fields, painter-drawn HSV square/hue and current strip; outside click dismisses | control_*, form_*, border, on_accent, space_* |
choice: segmented, Segments |
Equal text choices; states supplies mixed selection, compact clips instead of falling back to a dropdown, primary uses accent/on-accent for the selected segment |
control_*, selected_bg/ink, font_label, space_4/8 |
segmented_icons, IconSegment |
Equal icon choices and mixed states | segment tokens, icon palette |
checkbox, checkbox_indeterminate, checkbox_row, checkbox_grid, options |
One box/tick painter for inline, mixed, full-row, grid and menu choices | space_14/3/2, radius_sm, control_fill/border, form_primary/ink, hover, on_accent |
text_emphasis |
Bold/italic with translated accessible names | form control/font tokens |
tool_choices, ToolChoice, toggle_icon |
Wrapped command modes or independent icon toggles | sketch mode/icon tokens, accent |
list_picker |
Selectable row with caller identity and native checked state | control_height, form selection tokens |
popup_list, PopupOption |
Focus-neutral suggestions; owner retains keyboard routing | space_2, form_label_width, control_height, form tokens |
color_swatch, swatch_grid, color_thumbnail |
30 pt draggable samples, 6 pt grid step gap, selected outer ring and checker pattern under transparent colours; caller payloads retained; local-library thumbnails use 16 pt | control_height/radius, border, form_primary, control_fill, space_2/6/8 |
assistant_entry, AssistantEntryState |
Application-bar chat icon with quiet, ready, busy, auth, stopped and approval count marks; caller owns state and target | app_bar, agent_ok/busy, warning/error, font_badge |
actions: button, Button |
Secondary action: Normal, Small, or Enabled(bool) |
native sizing, form font/control tokens |
primary_button |
Accent action outside a footer | accent, on_accent, form tokens |
icon_button_at |
Icon action inside a supplied rectangle | form_icon_inset, text/dim, icon palette |
button_pair, PairButton |
Equal secondary actions, optional icons and selected state | form_button_height, control/selection/icon tokens |
footer, Footer, Action |
OK/Cancel with optional Apply, compute status or selected action | form_footer/button_height, dialog_footer/rule, control_*, accent, spacing |
keyboard |
Esc cancels, unowned Enter submits when valid | none |
action_menu, command_menu_button |
Nested dense action menu or ribbon overflow action retaining its icon, shortcut and enabled state | form control/font tokens, space_16, icon palette |
table: table, table_custom, Column, Table::headers, Table::row, TableRow::cell, Table::add_prompt |
Left-aligned headers/cells, horizontal overflow, selected/hover rows and empty state. table_custom supplies header actions through headers. Column::flex shares remaining width by weight, freezing columns at their control minimums before redistributing the remaining space; Column::icon_only hides the heading while retaining its automation identity. add_prompt is the final slim dashed line and requests a regular draft row from its owner; Column::new(label, width) uses label-column multiples, min_content_width(points) reserves measured control content; ContentWidth::name measures strong configuration names |
label-column tokens, control_height, dialog_rule/footer, selected_bg, spacing |
removable_header, plus_header, bin_button, active_pill |
Hover-only column removal, anchored Add Column menu with insertion brackets, icon-only immediate deletion and active-row status. Bins preserve dialog:button:Actions:Delete and :×; header removal preserves dialog:button:LABEL:×. |
control_*, form_*, selected_bg, spacing |
compact_button, summary_row |
Borderless stars and chevrons with enabled/selected states; named two-line rule summary beside an enable checkbox and compact actions. | form_close_size, control_*, form_*, typography and spacing |
label_actions |
Clipped row name beside compact actions | control_height, form font/spacing tokens |
status: status_header, StatusHeader |
Supplied icon/name/status and constraint meter | font_label, text/dim, accent, sketch/header tokens |
progress |
Clamped determinate progress | space_3/6, dialog_rule, accent |
History contents are selected from measured panel width. A 56 pt thin strip shows icons
and four vertical transport controls: beginning, back, forward and end. The minimum named
width is 130 pt; it adds horizontal transport and the same six-dot window grip as Assistant.
When the remaining header space fits its measured text, History appears between grip
and transport. No names-mode flag
or command selects these layouts. The seam snaps between 56 and 130 pt; widths from 130
through 624 pt remain continuous and persist as timeline_left_width.
Drag the grip or title to dock along the bottom, at the full-height left edge, or beneath
the browser. Either card's right edge resizes their shared width. This position divides
available column height equally. Folding either card leaves its header visible and gives the remainder to
the other. If both are folded, their headers sit together at the top of the column.
Expansion and collapse share a smooth cubic transition capped at 120 ms, respecting
the interface’s instant-animation setting. Their collapse controls share the same active-tab blue hover tint. Browser resizing also resizes History.
The view.history_layout command validates width, docking and collapse requests without
altering the design or opening dialogs. Floating mode preserves viewport projection.
The seam handle overlays the strip's right edge without taking layout space. Its grip is
visible at rest; the arrow appears only on hover. Click, double-click the edge, or use
Enter/Space on the focused handle to resize between thin and minimum named widths. Drag
freely above the named minimum; resizing draws no dotted guide or name label. Header/title dragging
and the edge width gesture are separate from feature/folder and rollback dragging.
The rollback marker is 12 pt high.
Its 2 pt line uses the active tab fill and ends in a 10 pt hollow circle with a 2 pt accent
border and the card/panel surface inside. The circle overlaps the line end by 1 pt. The bottom
strip uses the same painter, rotated. Folder selection, range selection, context menus,
sketch-pattern children, drag reordering and command JSON retain their existing behavior and handles.
history_icons, history_names, history_marker and the history_seam_rest/hover/drag states
have light/dark gallery references. The CPU
board test captures both strip widths with expanded and collapsed browsers
(SOLIDCRAFT_HISTORY_EVIDENCE).
text(ui, text, options) supports the existing text behaviors and the new error band:
| Option | Layout and scenario publication |
|---|---|
Text::Hint(key) |
Wrapping 12 pt hint; rect and handle dialog:hint:KEY |
Text::Note(key), Text::MonoNote(key) |
Wrapping small dim text (optional monospace) with vertical padding; rect dialog:note:KEY |
Text::Error(key) |
Wrapping full-width error band with tinted background and padding; retains dialog:report:KEY |
Text::Report(key, error) |
Native wrapping label, optional error colour; rect/handle dialog:report:KEY |
Text::Heading(key) |
Semibold body heading; retains dialog:report:KEY |
Text::NameCell(strong) |
Medium/semibold clipped clickable name; retains dialog:cell:TEXT |
Text::MonoCell, Text::Value(key, error) |
Monospace unit/value cells; clipped to one row with full tooltips. Value/error cells retain dialog:report:KEY. |
Text::Inline |
Native truncated label; rect/handle dialog:inline:TEXT |
Text::Cell |
Fixed-height clipped clickable cell with tooltip; rect/handle dialog:cell:TEXT |
Examples:
segmented(ui, &mut mode, &["One", "Two"], Segments::default());
selection_field(ui, "Select", Selection { active: true, filled: false });
value_pair(ui, "Position", [&mut x, &mut y], ["X", "Y"], Some(["Distance X", "Distance Y"]));
button(ui, "Add", Button::Enabled(valid));
footer(ui, "OK", "Cancel", valid, Footer { apply: Some("Apply"), ..Default::default() });
text(ui, report, Text::Report("validation", invalid));
Icon surfaces that explicitly choose a palette ramp use icons::paint_accented.
None selects base blue, while unknown names retain the icon's semantic accent.
Only active roles change: ink/line outlines, passive faces, guides and knockouts keep
normal artwork colours. Existing icon painters retain their semantic-accent behaviour.
Danger menu items and danger confirmation glyphs both use icons::paint_danger.
It additionally maps passive-1/2/3 faces to constraint active-1/2/3, retaining the
shading steps, ink outlines, handle and transparent slat details. The cache distinguishes
this whole-glyph treatment from ordinary accent selection and monochrome ink masks.
Radial icons follow the active tab (Sketch, Surface, Mesh, Form; other tabs use base blue)
in both normal and hovered sectors; the hovered background retains its tab tint.
Extending and checking the kit
Add one implementation, document its tokens/options here, re-export it through
mod.rs, and add one table entry in gallery::ELEMENTS. Keep implementation-only
helpers private. Add interaction tests when the element introduces an action.
The gallery checks geometry, label alignment, handles and effective paint bounds in
both themes. Field/footer/panel tests retain focus, completion and action coverage.
ui_kit_guard_tests scans every UI feature module recursively, rejects raw control constructors
and methods (including aliases), and rejects removed legacy helpers. The raw-control
allowance table is empty and guarded against additions. Standard colour/font guards,
Clippy, wasm, i18n, assets, icons and layers still apply.
See remaining coverage boundaries for specialised surfaces that remain outside the kit and why.
Popup presentation and draft rows
Panel and Window use 28 pt controls, a 40 pt title band (14 pt semibold title,
19 pt command icon and 26 pt close/fold targets), and a 48 pt footer with
28 pt actions. Table rows are control_height + space_8 (36 pt), independent
of control height. Bodies use 12 pt insets. Width limits and scroll boundaries
remain owned by Panel/Window/Confirm. Titles retain the supplied case.
The form_ink, form_dim, form_primary, form_error and form_error_fill
colour keys match the approved light cards. Dark values follow existing text,
accent and error palette roles; every role is exported by theme files and measured
by the colour-vision checks. Invalid fields include both error text and a tinted
surface. Long variable-height lists can use Window::placed with a top-left pivot to
keep their painted controls and scenario targets aligned as they grow.
Completion lists use the approved 230 pt minimum width (derived from card and
spacing tokens), show kind labels on the right, selected details beneath
the list, and the existing keyboard hint.
Parameters and Configuration Table use this one table grid, including Favorites
and each model group. The grid has space_8 horizontal insets within the row
highlight, shared by headers and cells, plus space_8 column gaps. Flexible widths
are measured inside the scroll viewport and rounded by cumulative column edges;
fitting content does not acquire a horizontal scrollbar from independent rounding
or inherited scroll margins. Explicit minimum widths still allow genuine overflow.
The viewport and measured content width publish dialog:table:TABLE:viewport and
dialog:table:TABLE:content_width for geometry checks. Hover uses the clipped row
rectangle, including interactive children, while preserving child click ownership.
Their add prompts publish dialog:table:TABLE:add, use control_height - space_4
height, a dashed control_radius outline and a pointing-hand cursor.
Clicking creates a regular unsaved row, focuses its name and exposes the existing
field controls and bin. Enter or valid focus loss commits through the existing
commands; abandoning a nameless row drops it. Configuration Enter with an empty
name retains ConfigurationN naming and copies the active row. Parameter validity
is published as param:new:valid; invalid expressions cannot commit on focus loss.
The natural scrolling body height is published as dialog:body:content_height,
so geometry tests distinguish content size from the viewport cap.
After a successful parameter add, a fresh empty draft retains Name focus for
continuous keyboard entry; leaving that empty row drops it.
Parameter draft fields retain param:new:name/unit/expression/comment.
Configuration drafts publish config:new:name; existing config:cell:ROW:COLUMN,
activation, rule and preview handles remain. The header plus retains
dialog:menu:Add Column, including the existing menu nesting. The old separate
Add forms and column-removal band have been removed.
Crash Reports uses report_list (bordered bounded scroll), report_header (kind,
count pill and mono UTC time), path_chip (clipped mono path and adjacent action),
empty_box (dashed empty state), and icon_label_button (secondary icon/text,
optional danger ink). These use dialog_rule/footer, control_*, form_*,
font_label/small and spacing tokens. The report header retains the combined-title
cell alias; bins retain the previous Delete handle. Report actions remain immediate.
list_frame supplies the same border to virtualised library rows.
The list frame owns its border and horizontal padding; the report viewport adds
no inherited scroll margin. Report list measurements publish
dialog:list:KEY:viewport and dialog:list:KEY:content_width. Reports use vertical
scrolling; the horizontal rule beneath each report remains a divider.
Appearance uses a 340 pt card derived from card/label/spacing tokens, with the
104 pt label basis where space permits, 10 pt body gaps, and a count on In This Design.
Colour popovers retain dialog:color:ROW and add color:format:U8/F,
color:copy, color:channel:R/G/B, color:sv, color:hue, color:current
and the color:popover rectangle. Format changes update egui's global numeric
colour presentation without changing RGB. Linear fields edit linear RGB, not
normalised gamma bytes. HSV state preserves hue at zero saturation/value and
sub-byte precision during drags. Gradient colours are document colour data;
all interface chrome uses existing paired light/dark tokens.
Sliders only via ui_kit::slider, everywhere in crates/ui-egui/src and apps.
The element owns its form styling even when called from a viewport menu.
Slider options select behaviour, never appearance: range and values remain in caller
units, step preserves stepping, format preserves suffixes/display mapping,
integer rounds manipulation and show_value: false hides the editor. Disabled
sliders use ui.add_enabled_ui; tooltips attach to the returned response. Preferences
UI scale still applies only after the pointer is released. There are no alternative
slider helpers, raw egui::Slider callers, or custom track/thumb painters outside
the kit. The source guard scans both trees without an allowance table; the gallery
covers continuous, percent/stepped, integer/no-editor and disabled states in both themes.
Numeric fields use the existing kit scalar_field, length_field, angle_field
or number_field rather than constructing a raw egui::DragValue at a caller.
Parameters retains its bounded header drag offset while the manager is open,
including frames without a regular feature dialog. The shared Panel bound reserves
header and footer space at the bottom edge. Import and both export actions use
icon_label_button with the existing import/export arrow icons and unchanged
command routing and scenario identities. The gallery includes all three actions.
The Add Column target is form_close_size - space_4 (22 pt) square: idle paint is
only form_dim ink; hover adds the selected accent fill and insertion guides.
HSV gradients use a rounded mesh silhouette sampled along control_radius arcs;
the current-colour strip uses the same rounded radius. Render tests sample all
four corner pixels and opaque interiors of all three surfaces at 1× and 2× in
both themes.
Checkboxes only via ui_kit::checkbox, everywhere in crates/ui-egui/src and
apps. checkbox_row, checkbox_grid and menu checkbox rows share its single
box painter and paint_check_glyph path. The box is space_14 square with
radius_sm corners, a control_border outline and control_fill background.
Checked/mixed boxes use form_primary and on_accent; hover uses hover and
an accent border, focus adds a space_2 outset ring, and disabled controls inherit
egui's disabled opacity. Geometry never depends on caller font or native icon size.
checkbox_indeterminate represents a mixed selection with a bar and activates to
checked. Space/Enter, accessible checked state, tooltips and scenario handles are
retained. Exclusive choices use existing kit segments/dropdowns/list pickers;
there are no radio controls. The recursive guard rejects native checkbox/radio
constructors (including aliases), raw toggle methods and duplicate check glyph
painters across both trees without allowances. Offscreen checks compare actual
box and tick geometry/pixels across form, grid, palette and menu call sites at
1×/2× in both themes.
Disclosure chevrons point down when open (content visible) and right when
closed (content hidden). Only ui_kit::disclosure draws them, using the original
chevron / chevron_right SVGs at form_section_icon_size, without animation
(as in kit section headers). Sections, nested groups, Browser trees, card headers,
window folds and the Assistant strip all follow this rule. Keep existing scenario
handles, including dialog:collapse, and translated Collapse/Expand tooltips.
Dropdown arrows always point down; submenu arrows point right. Playback, reorder,
window management and overflow controls are not disclosures. The source guard scans
UI, apps and compiled asset glyphs without caller allowances; render tests inspect
the actual icon textures used by sections, card folds and window folds.
Per-tab accent tokens
TabAccent::for_tab supplies three independent theme colours: color (fill) for
pills, active-tool borders and the history marker; ink for small text and selected
rows; soft for tinted selection/tool backgrounds. These are palette entries, not
blends. Browser rows and selected ribbon labels use ink directly.
| Tab id | Fill token | Ink token | Soft token |
|---|---|---|---|
MODEL / default |
accent |
selected_ink |
accent_soft |
SKETCH |
sketch_accent |
sketch_ink |
sketch_soft |
SURFACE |
surface_fill |
surface_ink |
surface_soft |
MESH |
mesh_fill |
mesh_ink |
mesh_soft |
FORM |
form_fill |
form_tab_ink |
form_soft |
SHEET METAL |
sheet_fill |
sheet_ink |
sheet_soft |
RENDER |
render_fill |
render_ink |
render_soft |
form_tab_ink is separate from the existing form_ink used for form controls.
Sketch reuses its existing fill in both themes. Surface and Form fills match their
existing accents in light mode but need independent dark values; Mesh and Render
fills also differ from their existing mesh_accent and render_accent values.
All existing tokens, including Model's fill, ink and tint, retain their values.
The Model/default mapping preserves its existing appearance rather than adopting
the proposed Model colours from the board.
The new palette entries (fill / ink / soft) are:
| Tab | Light | Dark |
|---|---|---|
| Sketch | #057F45 / #057F45 / #EDF7F1 |
#128D45 / #46BE78 / #1F3B2B |
| Surface | #A45000 / #A45000 / #FBEBD8 |
#B26A14 / #E0914A / #45331E |
| Mesh | #E0B200 / #8A6D00 / #FFF8DC |
#C6A800 / #D4B726 / #41391A |
| Form | #7349CD / #7349CD / #EEE8FA |
#8A6FCC / #B39BEE / #372F4F |
| Sheet Metal | #1E6F96 / #1E6F96 / #E1F0F7 |
#2A7FA8 / #4FB3D9 / #1F3A47 |
| Render | #A8326E / #A8326E / #F8E6EF |
#C8588F / #E074AE / #402336 |
Each key is supported by solidcraft-theme/1 import/export, including
tab_on_fill_dark (#000000 in both themes). TabAccent::on_fill uses on_accent
(white in the built-in palettes) when it reaches 4.5:1, otherwise that dark ink.
The fallback is black because the board's dark ink does not reach 4.5:1 on several
of the approved fills. It only styles tab pills; global primary actions still use
on_accent. Built-in palette tests require WCAG contrast of at least 4.5:1 for
ink on the card and panel, ink on soft, and pill text on fill in both themes.
Only Mesh separates ink from fill in the light theme.
Context menu adapters retain item IDs, enabled logic and command parameters. Menu
owns popup elevation (10 pt corners, 1 pt border), headings, separators, adjacent
submenus and bounded arrow navigation. Enter opens a submenu or chooses its row;
Right opens, Left returns, and Esc dismisses the menu. Appearance includes document
swatches and Remove override through appearance.assign; its original action still
opens the full editor. Workspace retains its descriptive cards and scenario handles
on the shared surface. Ribbon rows reuse MenuItem::paint while owning drag, focus
and pin interactions. History context menus and ribbon overflow use kit popup chrome.
Rename uses the shared caption, field policy and Cancel/OK actions with its stable
editor ID. No additional translation keys or colour roles are needed.
The menu gallery includes normal, hovered, open, disabled, checked/unchecked,
swatch and danger rows, a submenu and rename. Radial geometry tests measure the
actual side endpoints at both radii and sample all four rounded corners. Optional
CPU-rendered menu evidence can be produced without a window with
SOLIDCRAFT_MENU_EVIDENCE=/tmp/menus cargo test -p solidcraft-ui-egui --lib menu_board_in_both_themes.
Desktop interaction and visual acceptance still require a reviewer capture.
Command search uses the ribbon field itself (sc_sbox_text); ribbon:search,
shortcut:search and palette:search all identify that same field. Opening gives
it the accent focus ring, cursor and Esc keycap. The field and the attached results
sheet unfold in 120 ms with egui cubic ease-out, capped by egui's animation time
so instant settings remain instant. Esc, click away and command dispatch reverse
the animation. Only the visible sheet height participates in layout and hit testing;
result content is clipped while unfolding. The sheet's ribbon:search_popup /
palette:outer handles exclude the field. Its footer (ribbon:search_footer)
fills the bottom strip edge to edge, with rounded bottom corners and a 1 pt top
rule. Ranking, command mode and keyboard routing remain with the caller.
Generate CPU-rendered evidence of all five search states and the actual ribbon's
closed/opening/open/closing transition in both themes with
SOLIDCRAFT_SEARCH_EVIDENCE=/tmp/search cargo test -p solidcraft-ui-egui --lib command_search.
Compact workspace composition
Container::gap and Container::frame supply the layout policy for every adaptive
surface. Compact has no gaps or shadows between edge-bound panels; floating uses
the shared card spacing and frame. Panel bounds draggable compact sheets to the workspace. The shared frame rounds
all corners away from the right dock and only the left corners while right-docked;
the footer inherits that frame's bottom corners. Both layouts retain drag offsets. Browser uses the same content renderer and width in both modes,
with a square, flush ribbon join in Compact. Non-workspace surfaces keep their roles.
DockEdges declares touching edges. The container measures content-hugging cards
before rounding their exposed corners, and aligns touching outlines onto a single
border strip without changing logical panel allocations. The application bar has
an independent surface role.
The saved Prefs::layout is changed through view.layout; ui.set may still make a
transient automation override.
File/start presentation
FileView owns File surfaces and controls. It accepts translated strings, existing
icon ids and cached thumbnail textures; callers retain commands, document state,
persistence, thumbnail jobs and recovery decisions.
page,contentandrailown the page background, responsive insets and full-height rail fill/clip.navigationalso supports the narrow navigation menu. Callers supply layout rectangles, scrolling and entry order.nav_rowaccepts a stable id, label, shortcut, selection and enabled state.back_toaccepts a translated{name}template, paints the document name semibold and reuses the mirrored chevron and outlined keycap.separatorsupplies grouped rules. Disabled rows cannot activate.title,subtitle,detailandsectionown typography.sectionaccepts a token-based heading/body gap:space_12for New,space_10for Recent/Samples. Callers retain semantic section order and the largerfile_section_gap.gridprovides responsive columns with 14 pt gutters and no trailing row gap.action_tilesupplies an 84 pt card with 44 pt original artwork and vertically centered label/subtitle.tile_min_widthinforms responsive columns.recent_listowns the rounded border and zero row gap.recent_rowaccepts aRecentRow, paints internal separators, medium names and workspace dots, and retains title/path at narrow widths. Callers handle unavailable-file actions.sample_grid(ui, id, &[SampleCard])measures each row's tallest content and stretches cards to equal bottoms without clipping descriptions. Responses stay in sample order, with stable{id}:{index}ids. Artwork inputs remain unchanged.recovery_banneracceptsRecoveryMessagesegments for a bold title, normal message, monospace filename and normal suffix. Actions align right or wrap below at narrow widths. Discard is optional for summaries; the return value is(recover_response, optional_discard_response).recovery_reviewuses the same geometry with per-design Discard. Callers provide truthful metadata.
The exported file_* colour tokens provide readable light/dark foreground and
background pairs, including File-specific secondary text. Thumbnails retain the
neutral file_image_tint; icon and text colours do not change their pixels.
Spacing, dimensions, fonts and radii come from theme::Tokens.
Gallery and geometry tests cover these components. To capture the actual File
view using public temporary fixtures, set SOLIDCRAFT_FILE_EVIDENCE to an output
directory and run file_view_application_evidence_in_both_themes_and_widths with
--ignored. It produces desktop and 420 pt narrow PNGs in both themes.
button_at(ui, id, rect, label, Button::Primary/Normal) places the same shared
native button used by button inside a bounded, centred layout. It preserves
stable identity, enabled state and exact caller-owned geometry. Recovery actions
use this component rather than custom button painters. The recovery well renders
the existing restore artwork through its construction accent ramp.
Theme corner radii
Theme files may override radius_sm, radius_md, radius_lg, radius_xl,
control_radius and sketch_mode_radius in an optional radii object (integer
UI points, 0–32). Missing entries retain the base palette's shape. Light and dark
variants of a family should use identical values. Import/export and preferences
retain these overrides; colour vision modes leave them alone.
Use Tokens for decorative UI corners, including hover, selection, focus,
image thumbnails, popups and nested surfaces. Small legacy accents derive their
radius from the small token so the default appearance stays unchanged. Expanded
outlines use Tokens::outset_radius so square corners stay square. Container
continues to own outer surface chrome and square dock contacts. Functional
geometry (circles, model selection boxes, plot clipping, manipulator handles
and the artwork inside icons) retains its own shape.
Theme border hierarchy
Three structural levels distinguish outer chrome, major section rules and minor dividers. Separate solid container and control roles keep enclosing boxes independent of divider patterns.
| Role | UI audit / assignment |
|---|---|
| Primary | Ribbon/workspace cards, Browser/History, feature and palette sheets, system windows, menus/popups, navigation/status surfaces |
| Secondary | Ribbon tab/content rule, Browser/History heading rule, feature/window header and footer, Preferences page/navigation division, disclosure section rules, Assistant header/composer division, File navigation sections |
| Tertiary | Ribbon category dividers, menu groups, report/table rows, neutral History items, File cards/thumbnails, ordinary inherited egui separators |
| Container | Settings previews, information cards, list/detail wells, Assistant content cards, shortcut keycaps |
| Control | Neutral fields, buttons, checkboxes, segmented choices and search inputs |
Focus, selection, active commands, errors, recovery warnings and status keep their existing semantic strokes. Icon artwork, example mouse diagrams, plots, model edges, manipulator geometry and the compass are content; structural border roles do not recolour them.
solidcraft-theme/1 optionally accepts borders. Each role has a width (finite 0–4
logical UI points; zero hides the stroke) and a color (#rrggbb or #rrggbbaa).
primary_inset also requires gap (finite 0–12 points of clear distance inside the
primary border). This companion is painted inside panel/ribbon/window/menu chrome,
without extra input targets or layout space; tiny surfaces omit it. Compact contacts
remain square and collapse adjoining primary strokes. Other ornament, such as the
circular compass and native widget-owned tooltip content, does not acquire an inset.
"borders": {
"primary": {"width": 1, "color": "#ffffff"},
"secondary": {"width": 1, "color": "#e5efff", "pattern": "dotted"},
"tertiary": {"width": 1, "color": "#102748"},
"container": {"width": 1, "color": "#a8c8ed"},
"control": {"width": 1, "color": "#a8c8ed"}
}
Those are Blueprint's settings: a single primary outline and dotted secondary rules. Secondary roles optionally accept pattern: solid (default) or dotted; this pattern follows horizontal/vertical section rules. Container outlines remain solid, as do the other roles. Themes without border settings retain their previous appearance.
SolidCraft 95 uses silver surfaces and directional two-band bevels: light top/left
edges and dark bottom/right edges for raised panels and buttons, reversed for
recessed fields and pressed buttons. Inputs use the field colour independently
of the neutral button face. Disabled controls fade their bevel; focus, selection
and validation keep their semantic indicators. Solid grey rules divide sections.
Optional borders.bevel enables this shared container/control treatment. It accepts
width (finite, greater than 0 and at most 2 points per band), highlight, light,
shadow and dark_shadow (hex colours). Missing bevel settings preserve flat
rendering exactly. The bands paint inside existing rounded or square geometry
without changing hit targets or allocation. Ghost controls remain borderless.
Missing roles preserve each surface's existing width and colour, including overrides in
colors; exporting keeps omitted roles absent so reimport cannot flatten those legacy
surface differences. Dark/Light and the Gruvbox families share border geometry.
Imports and direct preference updates reject unknown roles/settings, invalid colours,
non-finite/out-of-range numbers and missing required settings. Invalid hand-edited saved
border settings safely fall back to legacy styling. The optional field requires no format
version change. There is no general border editor in Preferences; theme file import/export
and the existing preference/control workflow own this extension.
Theme icon and tab colours
Theme files optionally supply icon_palette SVG roles and semantic ramps. The
shared renderer snapshots that palette into the icon look and cache identity;
callers continue to request semantic icon IDs and surface-specific monochrome ink.
See the shipped-theme colour audit for the schema,
workspace assignments, accessibility rules and intentionally monochrome themes.