mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-07 12:31:56 +00:00
739e442824ff318b052d4a49c570ef0eb90d3521
252 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
30f951ecf9 |
Navigation bridge: a device's own app moves the view (#6094)
A homemade 3D input device's driver app (MAKMOUSE) listens on a loopback port; with Preferences > Navigation > "Navigate with a device app on this computer" on (off by default), the desktop app connects, says hello and reads JSON lines: axis motion (orbit, pan or zoom by mode), zoom steps and standard views. The motion goes through navigation::device like a 3D mouse's, only in the focused window; a HID device the app names is left to it. Documented in docs/3d-mouse.md. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
66b872a749 |
Web app: open a design from a same-origin path (#6670)
?open= now also accepts an absolute path on the page's own origin, fetched with the page's scheme, so a self-hosted setup that serves SolidCraft and other tools under one origin can link a design on a LAN without a public HTTPS address. Absolute URLs keep the HTTPS-only rule (a URL on the page's own origin is also accepted), redirects must end on HTTPS or the same origin, and protocol-relative, dot-segment, backslash and control-character values are refused. |
||
|
|
d895fef354 |
Control channel: a pushed design.changed event for clients that subscribe (#6985) (#6986)
* claim: #6646 * Control channel: document.revision, a design revision and a document id (#6646) A program that follows the open design asks document.revision and exports only when the answer moves: document_id names the open design (kept through edits, saves and renames, another for each design started or opened, never shared between two tabs or two runs) and revision moves whenever the design, what is hidden or an uncaptured component position changes. It stays put on reads, selections and view changes, unlike the session's view revision. The revision is read lazily: the session remembers the design it last reported (held weakly, so Arc::make_mut can never change it in place and its address can't be reused) and takes a new number from one counter for the whole run when the design is another one. The control method answers at once, also while a slow command computes; engine.execute reaches the same command for scripts and MCP. * document.revision: hash the run's id prefix with the process's random keys A clock set before 1970 gave every run the prefix 0, so a restarted app could answer a new design with the id and revision of the old one. The docs no longer promise an answer at once: a screenshot waiting for an opened design to be meshed still holds the requests behind it. * document.revision: its label in the complete catalogs (ja, zh) * claim: #6985 * Control channel: control.subscribe and design.changed events (#6985) A connection that sends control.subscribe gets the active design's id and revision in the reply (as document.revision answers), then a {"event":"design.changed","params":{document_id, revision}} line whenever either changes, so a live link need not poll. The window publishes the design at the end of each frame's logic and drawing while a connection is subscribed (one atomic load otherwise). Each subscribed connection waits on that from a thread of its own and writes the latest after a 100 ms gap, so a burst of changes is one line. Replies and events share one lock per connection, each written whole (#6390). * control.subscribe: the reply before any event, a second one refused The events thread started before the subscribe reply was written, so a change right after the window's answer could reach the client before the reply that named the older revision. The subscription now starts holding the connection's line lock and writes the reply under it. A second control.subscribe on a subscribed connection is refused on the connection itself: its answer could arrive behind a newer event. When no thread or socket is left for the events, the reply says it did not subscribe instead of ok. * control.subscribe: a second one does not lose a finished late reply The already-subscribed answer came before the busy check, so a request that timed out and had finished since lost its reply: control.pending then said the app ended it without one. It now comes after the busy check and drops a finished late reply as every other request does. * control_server: declare the subscribe guard at the top of the loop Clear of the lines #6643 changes (its token check moves to where the declaration was). * control_server: the subscription's items beside serve Away from the lines next to send, where #6643 adds token_of. * control test: New on a blank design reuses its tab, so redo the box first --------- Co-authored-by: MateuszSychXpl <151755914+MateuszSychXpl@users.noreply.github.com> |
||
|
|
03bf992bc1 |
Keep linked components valid through Undo after Save As (#6860) (#6877)
* claim: #6860 * fix: preserve linked component targets across Save As history (#6860) |
||
|
|
c264c7a42a | Startup falls back from a Direct3D 12 that can't build the UI pipeline (#6648) (#6682) | ||
|
|
189b47c750 | Chamfer and Fillet refuse a point where several edges meet (#5173) (#5177) | ||
|
|
0c4eb458df |
macOS 3D mouse: unregister from the driver when the app ends, so the next launch gets the mouse (#6114) (#6115)
* claim: #6114 * macOS 3D mouse: unregister from the driver when the app ends, so the next launch gets the mouse (#6114) |
||
|
|
b3cbbe7bd5 |
CLI: reject incomplete and unsupported run/eval options (#6918) (#6919)
* claim: #6918 validate run and eval options * fix(cli): reject invalid run and eval options (#6918) |
||
|
|
36a60a70d9 | Graphics: 1x anti-aliasing where the multisampled view draws nothing (#5819, #5870) (#5832) | ||
|
|
0344a41dc4 | Open and insert a DXF outside a sketch (#2052) (#4635) | ||
|
|
492bba9242 |
Control channel: write each reply in one piece (#6389) (#6390)
* claim: #6389 * perf: write each control reply to the socket in one piece The control server wrote each reply with writeln!(out, "{reply}") on the unbuffered TcpStream. Formatting a serde_json::Value hands the writer every string, number and punctuation mark separately, so each became its own write system call. A reply of a few megabytes (component.list on a design with thousands of components) took about half a second to send. Every reply is now serialized to one buffer and written at once. Writing one large Value to a loopback TcpStream: 1.79 MB took 1,052 ms with writeln! and 4.9 ms with one write_all. The test counts the write calls for a 2000-component reply (one) and reads it back. |
||
|
|
b1da434458 | Graphics: choose the graphics card, honour WGPU_ADAPTER_NAME (#5986) (#6010) | ||
|
|
4cd9a4f4d4 |
Web app: open a design from a link, and an embed mode (#6252) (#6253)
* claim: #6252 * Open hosted designs in the web app and add an embed layout Fixes #6252. Fetch HTTPS design links with bounded reads and open them as unsaved copies. Keep model panels and joint controls in embeds without browser persistence, application chrome, or unload prompts. Add a full-app link and iframe docs. Cover query parsing, hostile URLs, size limits, and the compact layout. * Translate the linked-design messages into Japanese and Chinese |
||
|
|
093571cfe4 |
Connect AI apps at start-up, with a preference to turn it off (#6388)
At launch the app adds the solidcraft entry to each installed AI client off the window thread, names newly connected clients once, and refreshes a stale path. Settings > Assistant has "Make SolidCraft available to AI apps on this computer" (on by default); off removes the entries it added. Entries the user changed are left alone; automation runs never touch the files. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
16a5254e97 |
Fix macOS fullscreen application-bar interaction (#3643) (#3690)
* claim: #3643 * fix: keep macOS fullscreen application bar clickable (#3643) * test: load bundled fonts for fullscreen regression |
||
|
|
dfde1e032d |
mcp setup: add SolidCraft to the AI clients on this computer; plain mcp finds a late app (#6379)
solidcraft-cli mcp setup (alias install) and Help > Connect AI assistants edit each installed client's own configuration in place, with this program's absolute path: OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed and VS Code. Only the solidcraft entries change; a stale path is refreshed and an entry the user changed is left alone. Plain mcp keeps looking for the app while its headless session has no work, and says on every tool result that it is headless when the app was not found. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
cc1e654690 |
Warn when a design is open elsewhere or changed on disk (#5467) (#5468)
* claim: #5467 * Warn when a design is open elsewhere or changed on disk (#5467) The desktop app keeps a lock file next to each open design (.~<file>.lock: computer, user, version, opened and refreshed times), refreshes it every minute and removes it on close; a lock not refreshed for three minutes is stale and ignored. Opening a design that another SolidCraft has open asks: Open Read-Only, Open Anyway or Cancel. A read-only design saves only to another file. A design remembers its file's size and modification time when it is opened or saved. Save over a file another program or computer changed since asks: Save a Copy (the default), Overwrite or Cancel. Programmatic calls never ask: doc.open reports open_elsewhere and takes read_only, and file.save over a changed file returns an error until it is given overwrite: true. ui.documents answers both questions. |
||
|
|
138bb0261c |
Windows OpenGL: use the system title bar so the picture lines up with clicks (#2063) (#4403)
* claim: #2063 * Windows OpenGL: use the system title bar so the picture lines up with clicks (#2063) On Windows with only OpenGL to start, the window opens with the system title bar instead of using the application bar as its title bar. The window without OS decorations keeps its caption style while having no frame, and some OpenGL drivers (older Intel HD/UHD) show the picture a caption's height lower than the window, so clicks land above what they point at. Direct3D 12 and Vulkan keep the custom title bar. The choice is made before the window opens, from the backends wgpu starts, so the window never changes its frame while OpenGL draws into it. |
||
|
|
a150822d9b |
Put solidcraft-cli on PATH from the AppImage and the macOS app (#6347)
The AppImage writes a ~/.local/bin/solidcraft-cli launcher from its desktop-integration step (same opt-outs, never over a file it did not write). The macOS app links the CLI into /opt/homebrew/bin or /usr/local/bin at launch when one is writable, and Help > Install solidcraft-cli command does it with an administrator prompt otherwise. Snap and Flatpak are documented. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
765c5fd143 |
Pictures drawn off the window thread finish before the process exits (#6062) (#6063)
A Home picture still being drawn by the detached saved-thumbnail thread could be on the GPU as the process exited, and the process died with SIGSEGV inside the graphics driver. capture::close stops new pictures and waits for those in flight (the app calls it in on_exit), and dropping SolveApp waits for the Home picture threads it started. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
9ad96fb81b |
Home: keep a removed recent design removed (#4660) (#4718)
Removing a design from the Start page's recent list only changed memory, and on the web sync_recents() rebuilt the list from stored designs on each launch, adding it back. Track removed designs in a persisted 'forgotten' set that sync_recents honours; opening or saving a design, or deleting/renaming its file, clears it. |
||
|
|
05d43d3542 |
Windows: the taskbar button shows the mark when the first frames are slow (#6391)
The taskbar asks a window for its icon once, when the window appears. eframe sets the icon while the window is still hidden and shows it after the first frame; when that frame is slow (safe mode's software renderer) or startup kept the UI thread busy long enough for Windows to mark the window as not responding (building the viewport pipelines), the request isn't answered in time, the taskbar falls back to the window class's icon, and winit's class has none: the button showed Windows' generic icon for as long as the window was open. Give the class the exe's embedded icon (resource 1) before the window is shown. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2ff17c0fcb |
3D mouse: follow the device that moves, not the first one found (#3988) (#4339)
* claim: #3988 (3D mouse: follow the device that moves, not the first one found) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3D mouse: follow the device that moves, not the first one found (#3988) On Windows and macOS the reader opened the first 3D-mouse interface it could and read it until it failed. A 3Dconnexion Universal Receiver with nothing paired opens fine, has a valid layout and never fails, so it kept the reader for good. A SpaceMouse on a cable next to it was never read ("Not calibrated (hid 256f:c652)", every axis at zero). The reader now opens every candidate and follows the one in use. The first is followed from the start, as before. Another takes over once it shows use (an axis off zero or a button down) while the followed one has shown none for STALE_AFTER, so two devices moved together don't trade the reading. A candidate that fails is dropped; if it was the followed one the reading resets and the next is read. With one device the reader behaves as before, down to the 100 ms read timeout. Several take 10 ms turns, and reports queue in the system meanwhile. The selection is `follow()`, written against a small `ReportSource` trait, so it is tested with simulated devices on every platform: an idle receiver next to a SpaceMouse, two devices in use at once, and devices failing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3D mouse: a press that makes a device the one in use counts as a press Since #3825 a HID device's first button report after it connects is its baseline: a button down in it is held, not pressed. A device taking over from another one was connected at that moment, so the press that took over was swallowed. With an idle Universal Receiver found first, that is the first button press on the SpaceMouse. follow() now keeps the buttons each candidate last reported while another was read, and the reader hands them to the reading as the baseline when that candidate takes over. A device that reported no buttons before it took over keeps the held-not-pressed rule. 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> |
||
|
|
4cd1a51f48 |
Assistant: a request timeout per endpoint for slow models (#5009) (#5010)
* claim: #5009 * Assistant: a request timeout per endpoint for slow models (#5009) An OpenAI-compatible endpoint now stores how long one model request may take (request_timeout_s, 300 s by default, clamped to 30 s ..= 1 h). It is set in the Add agent dialog and in the endpoint's entry under Agents (a running conversation uses a change from its next request), through ui.agent_chat add_agent, and reported in the chat's state. A request that runs out of time says the limit and where to raise it instead of "timeout: global". The desktop HTTP cap goes from 900 s to an hour. The tool-call timeout stays 330 s: it covers SolidCraft's own tool work and the user's Allow, never the model. * Assistant settings: line up an endpoint's Request timeout with Permissions The label column of an agent's entry is wide enough for "Request timeout", so the label isn't cut and both rows share one column. |
||
|
|
b702ce8c7d |
fix: start the window on Intel Macs without wgpu's indirect-call validation (#3024) (#4808)
Co-authored-by: Nathalie Schönwetter <nathalie@cfw-ag.ch> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
0520910bfd |
Control: name the token file and spot a stale one when a call is unauthorized (#4664) (#4670)
* claim: #4664 * Control: name the token file and spot a stale one when a call is unauthorized (#4664) When the app refuses a token that the MCP client read from a token file, the error now names that file, when it was written and how long ago, without printing the token. The app also writes `<port>.pid` beside the token file (its process id and, on Linux, its start time) and removes both at exit; when that process has exited, the error says the token file is stale. The process check runs only after a refusal, and the token file itself stays one line, so existing clients keep working. Document force-quit leftovers and the MSIX AppData redirection. * Bench assistant: read the token out of the new ClientToken Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: bherbruck <brennen.herbruck@gmail.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
4f4b1fc2d2 | Sketch: select edge midpoints for horizontal and vertical constraints (#5159) | ||
|
|
9e6e0b8df1 |
Render workspace: complete experimental ribbon, resources and effects integration (#5493) (#5494)
* wip(render): reconcile completed material and image pipeline source with 0.20 (#5493) Source-only integration reference for staged review, not a merge-ready aggregate. Donor: 0xlillith/solidcraft@aea20b0115. Upstream: |
||
|
|
b7b25f9e2b |
Render workspace: first basic delivery to main (#6050)
* Normalize UI container violation paths across platforms (#5599) Report repository-relative paths with forward slashes so diagnostics and the existing nested-package regression assertions agree on Windows and Unix. Keep the container detection rules unchanged. Validation: official ui-containers gate and all seven focused xtask tests passed; rustfmt and diff checks passed. Only xtask/dependencies were compiled; no application build or heavy tests. (cherry picked from commit |
||
|
|
a633a67e63 |
Preferences: choose the window system on Linux (Wayland or X11) (#3083) (#3084)
* claim: #3083 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP: choose the window system on Linux in Preferences (#3083) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Preferences: a window system set over the control channel is saved for the next start again The merge kept main's check in ui.prefs, which only looked at the anti-aliasing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Preferences: the window system section drops the restart badge its note already states Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
5e0e7a4c6a |
CLI: --help on each subcommand prints its usage and exits 0 (#4538) (#4545)
* claim: #4538 * CLI: --help on each subcommand prints its usage and exits 0 (#4538) Every command now answers `--help` and `-h` with its own usage on stdout and exit 0, the way the top level has since #1828. Before, each subcommand answered differently: `fuzz --help` started a fuzz run with the default seeds and ran until it was stopped, `recipe --help` took the flag for a file name, and `snapshot`, `render`, `oracle`, `run`, `eval`, `script` and `crashes` answered with an error on stderr and exit 1. The help is read before the command runs, so `--help` never starts work: no fuzz run, no MCP server, no file read. `fuzz` also refuses an argument it doesn't take, as `snapshot` already did: a flag it doesn't know and a stray word are errors, not arguments to ignore while a hundred seeds run. The usage lives in one place now: each command's lines are a constant, and the top-level usage is composed from them, so the two cannot drift apart. The top-level usage is unchanged, byte for byte. # Conflicts: # apps/solidcraft-cli/src/main.rs |
||
|
|
612d9d08dd |
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> |
||
|
|
1f6a2d4daf |
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 |
||
|
|
6c6ffe4802 |
MCP: wait out long requests, honest batch outcomes, batch tool aliases (#2901)
Rebased onto main as one commit (was |
||
|
|
0dffb206b1 |
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> |
||
|
|
98c4f335e8 |
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> |
||
|
|
945e6261cc |
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>
|
||
|
|
fdde3f9da9 |
Add macOS native menu bar (#2361) (#4531)
* claim: #2361 Co-Authored-By: GitHub Copilot <noreply@github.com> * feat: add native macOS menu bar (#2361) Reuse document actions and unsaved quit handling in native application, File, Edit, Window and Help menus. Replace duplicate header controls only when native installation succeeds, preserving other platforms and the fallback UI. Co-Authored-By: GitHub Copilot <noreply@github.com> --------- Co-authored-by: GitHub Copilot <noreply@github.com> |
||
|
|
be87303683 |
Web: a trackpad swipe pans instead of zooming (#4116) (#4834)
* claim: #4116 * Web: a trackpad swipe pans instead of zooming (#4116) Browsers deliver trackpad swipes as wheel events without scroll phases, so the shared navigation treated every vertical swipe as a mouse-wheel zoom. The web raw-input hook now brackets point-mode swipes (small or horizontal deltas) with gesture start/end phases, ending after 100 ms idle or before line/page wheel or pinch input. Wheel notches and pinch still zoom, and camera input still goes through navigation::handle. |
||
|
|
e33c371e99 |
Model cache: thin the checkpoints of a design too big for its file instead of leaving the cache out (#3220) (#4882)
* claim: #3220 * Model cache: keep fewer states of a design too big for its file instead of none (#3220) A model cache over the container's budget keeps the final state, then the slowest features' states while the bodies they add fit (a body several states hold counts once), and is left out only when not even the final state fits. Opening evaluates just the features whose state the file left out, each from the state before it, so the model is whole afterwards. * Model cache: keep each encoded body apart, copy only what a cache stores Encoding a model too big for its file no longer copies every distinct body into one buffer before thinning: the payload is copied from the encodings once its size fits, so saving holds no more than before. * Model cache tests: canonical runs in the timeline fixture; rustfmt * Model cache: count the records a thinned cache keeps; always try the final state Thinning counted only the bodies, so a model of many copies of one part (records, not bodies, filling the room) shrank its budget to nothing and saved no cache although its final state fitted. The choice now counts the records of what it keeps, always keeps the final state, and says what it counted, so each retry keeps less and the final state alone is always tried. * docs: a thinned model cache counts its records and always tries the final state * Model cache test: the slowest feature's state holds bodies 16 to 23 * Model cache: thinned opens with fingerprints that read the state before a feature Since #3397 a feature's fingerprint reads where the bodies before it lie. After a state the file left out, adopt takes the saved fingerprint and the evaluation that works the state out checks it. A result evaluated ahead is never taken as one the file left out. The thinned round trips include the placed components' design, whose cut reads those placements. --------- Co-authored-by: MateuszSychXpl <151755914+MateuszSychXpl@users.noreply.github.com> |
||
|
|
dad28abecf |
solidcraft-cli bench-assistant: the standard Assistant model test (#4851) (#4930)
* claim: #4851 * solidcraft-cli bench-assistant: the standard Assistant model test Runs the eleven v1 tasks of #4851 against a desktop app that is already running with a control port. Each task starts a new design and a new chat with All permissions, runs only the prescribed setup, sends the prompt once and waits for the turn. The result is checked on the design (document.inspect with measurements): body count, volume within 1% (0.3% for the fillet), bounding-box size in any orientation, the lowest corner, the body name, live feature kinds, and changed or unchanged content; the volume question is checked on the reply. Failures get the issue's categories from the conversation's items. Prints a table, and writes the issue's comment template (--markdown) and the raw results with each conversation (--json). |
||
|
|
b31fddb98e |
OpenGL: the viewport scene renders 1x again, like the window (#5605)
#5187 gave the scene its own offscreen target with the app's sample count,
which skipped the OpenGL clamp to 1x from
|
||
|
|
5962f56f87 |
Viewport: reuse still pictures and draw scenes into a 1x window pass (#4820) (#5187)
* Viewport: show the picture it drew last when nothing changed (#4820) A frame redrew the whole scene whenever egui asked for a frame, even when the camera, scene, highlight and overlays were identical: pointer moves over empty space and UI animations over a still view paid for the full scene. The renderer now hashes everything the picture depends on (scene keys, camera, size, section, images, analysis, accessibility map, occlusion) and blits the last offscreen picture when the hash matches. The first still frame filters a supersampled picture down once and later frames copy it as it is. A frame with the same content costs a blit instead of a scene draw. Co-Authored-By: Claude Code <noreply@anthropic.com> * Viewport: draw the scene offscreen, into a 1x window pass (#4820) The scene keeps the app's depth, stencil and MSAA, but egui's window pass now has one sample and no depth. Whenever the two targets differ, the scene (product previews too) is drawn offscreen and blitted, so the UI pass no longer clears and resolves a multisampled window. Over 8 s of pointer moves on the 450E rotor head, the app's GPU intervals fell from 1325 ms to 1006 ms and egui_render from 892 ms to 509 ms; idle stays at 0%. A GPU test checks the split path's picture matches the direct one. Co-Authored-By: Claude Code <noreply@anthropic.com> * 3D mouse: a repeated report at rest asks for no frame (#4820) A device may repeat its latest report while the cap rests. Publishing it again asked egui for a frame although nothing changed. Only a report that changes the reading now asks for one; while the cap moves, the view asks for the next frame itself. Co-Authored-By: Claude Code <noreply@anthropic.com> --------- Co-authored-by: Claude Code <noreply@anthropic.com> |
||
|
|
17f0d6bc68 |
Format registry: one table of formats, extensions and options (#5215) (#5217)
* Add the format registry: one table of formats, extensions and options in crates/io. The hosts' Open-dialog filters and the web accept list derive from it, and registry tests pin it to the path predicates and the command docs. * Fix format-registry tests that compared FormatSpec without Eq. assert_eq on Option<&FormatSpec> does not compile; the none cases only need is_none, matching the other rows that compare ids. |
||
|
|
94279fe059 |
Web: Ctrl+Tab and Ctrl+Shift+Tab switch browser tabs again (#5227) (#5350)
* claim: #5227 * Web: leave Ctrl+Tab and Ctrl+Shift+Tab to the browser (#5227) eframe cancels the default action of every Tab keydown on its canvas (egui moves focus with Tab), so browsers that let a page cancel their shortcuts, such as Vivaldi, could not switch tabs while SolidCraft had the keyboard. A capture listener on the window now stops Ctrl+Tab and Ctrl+Shift+Tab before they reach the canvas, without cancelling them, so the browser acts on them as usual. Plain Tab and Shift+Tab still move between the app's fields. Desktop builds are unchanged. web-api-test checks it in headless Chrome: Ctrl+Tab and Ctrl+Shift+Tab keydowns are not cancelled, Tab still is. --------- Co-authored-by: MateuszSychXpl <151755914+MateuszSychXpl@users.noreply.github.com> |
||
|
|
92d3a2fde5 |
GPU: a lost device stops drawing instead of crashing (#4172) (#4229)
* claim: #4172 * GPU: a lost device stops drawing instead of crashing (#4172) After the driver resets the GPU (Windows TDR), the first queue write to meet the lost device panicked inside wgpu-core (PendingWrites::activate unwrapping DeviceError::Lost). Nothing watched the device for its loss. - egui-wgpu: RenderState::device_lost (DeviceLost) is set by the device's lost callback. The painter draws nothing on a lost device, and before a frame's uploads it submits nothing (DeviceLost::probe), so a loss the driver reports is found by that submission instead of the first write. - Pictures (thumbnails of saves, ui.render) watch the same flag: on a lost device the capturer refuses with GpuError::DeviceLost without touching it, and the picture comes from the CPU rasterizer. Headless capturers watch their own devices. - The app, seeing the loss, closes keeping unsaved changes for recovery (as a forced quit does) and starts again; the new start says what happened. A second loss within ten minutes starts on the software renderer. The loss is noted in the crash journal. |
||
|
|
6f5d0038ab |
3D mouse: find devices on Windows without asking every HID device for its strings (#2614) (#3653)
* claim: #2614 (3D mouse: find devices on Windows without asking every HID device for its strings) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3D mouse: find devices on Windows without asking every HID device for its strings (#2614) On Windows the 3D mouse reader rescanned every two seconds while no 3D mouse was plugged in, with hidapi's refresh_devices(). hidapi's Windows enumeration opens every HID interface and reads its serial number, manufacturer and product strings: on USB, three control requests to every keyboard, mouse and touchscreen, forever, on a machine without a 3D mouse. That fits the report of an idle machine whose USB keyboard drops off and returns and whose cursor jumps. Windows now asks Plug and Play which present HID interfaces are multi-axis controllers (hardware ID HID_DEVICE_UP:0001_U:0008), which sends nothing to any device, and opens only those with open_path(). hidapi's own discovery is turned off before the reader makes its one context, so making it touches no device either. macOS keeps hidapi's enumeration (IOKit's registry); Linux is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * AGENTS.md: list the Plug and Play scan among the files allowed unsafe code (#2614) 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> Co-authored-by: bherbruck <brennen.herbruck@gmail.com> |
||
|
|
4b23bb3a03 |
Implement compact workspace layout (#2029) (#4533)
* Vertical history strip: left of the browser, compact rows, hollow-circle marker, collapsed rail hover * Vertical history strip: seam handle to expand and collapse names, drag to resize with snap * Vertical history strip: no empty gap below the transport * Show the history seam arrow only on hover (#2028) * claim: #2021 * Redesign the Assistant chat panel with shared UI components * Show Assistant in the shared floating panel shell * Extend floating Assistant to viewport height and shift navigation * Dock Assistant before history and match docking preview bounds * Align Assistant top margin with floating shell cards * Extract a shared panel drag grip * Rebuild responsive history sizing and three-way docking * Share browser and History collapse hover styling * Show the History title as soon as its text fits * Animate stacked browser and History expansion and collapse * Make panel folding responsive and independent of frame delays * Let folding panel contents shrink continuously to header height * Use four explicit History transport actions in every layout * Resize the shared Browser and History column from either card * claim: shared compact-mode containers (#2029) * Centralize layout-aware UI containers and enforce their use * Keep docked Assistant at the outer edge beside tool sheets * Use shared surface policy for Assistant tool space * Let tool sheets drag over shell panels while avoiding Assistant * Update Parameters drag bounds assertion for shell overlap * Keep dragged tool sheets below ribbon and workspace selector * Enforce universal UI containers in mandatory repository checks * Remove legacy report windows and require shared window composition * Remove retired UI styling and require shared controls * claim: compact layout preference (#2029) --------- Co-authored-by: bherbruck <brennen.herbruck@gmail.com> |
||
|
|
c54b711345 |
CLI: --help prints usage to stdout and exits 0 (#1818) (#1828)
* claim: #1818 * claim: #1818 * fix(cli): --help, -h and help print usage to stdout and exit 0 (#1818) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: bherbruck <brennen.herbruck@gmail.com> |
||
|
|
f22a026c27 |
3D mouse: choose which motion drives each axis (#2782)
* 3D mouse calibration: find each axis from a guided recording (#1463) A recording of the cap at rest and moved along each axis both ways gives which raw axis is which, which way it runs, where it rests, how much it wanders at rest and how far it goes each way. Hands aren't exact: on our SpaceMouse Pro, sliding the cap right moved Ry further than X. So each raw axis is picked by the one-to-one assignment that best explains all six motions together, each raw axis scored against its own range so a wider one doesn't win through cross-talk. Each direction is scaled on its own, so a device that goes further one way still reaches full scale both ways; a direction under a twelfth of the furthest axis counts as not having responded. A small state machine walks the user through it and moves on by itself once the cap has been held out for 0.4 s in one go and let go. "Held out" is the least the solver accepts, twice an axis's own rest wander, so whatever the solver would accept can be recorded and a noisy axis doesn't hold up a quiet one. A calibration also carries a dead zone the user sets, a share of full deflection taken off the bottom of the travel, with full deflection still reading full scale. Serde support is behind an optional feature, so the crate still needs nothing by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3D mouse calibration in Preferences, saved per device (#1463) Preferences > Navigation gets a 3D mouse calibration row: whether the device being read is calibrated, Calibrate... and Forget calibration. The window asks for each motion in turn and saves what it found under the device (hid, web, spacenavd or 3dxware, with vendor and product ids), so switching devices or turning spacenavd on doesn't apply the wrong mapping. A calibration is saved for the device it started with, and ends if another one is read instead. navigate_frame puts the reading through the device's calibration before the driver mapping, so the per-axis Invert and speed and everything after them are unchanged. While the window is open the reading goes to it and the view stays put; it closes with Preferences. Restore Defaults on the Navigation page keeps calibrations, since they describe the device. The web app hands over the gamepad's readings as they are, so calibration sees where the cap rests; navigate_frame now leaves a reading inside the dead zone alone after calibration, so a cap resting just off zero still doesn't keep redrawing. Whether the cap is moving is asked of the calibrated reading there, in the web page's idle waker and in both wheel filters. Those run before the frame, so they keep the last frame's calibration with its device and use it only for that device. On the desktop, an axis with nothing fresh (timed out, or not reported since the device connected) reads as the device's calibrated rest, so a device resting off zero doesn't drift. A saved calibration that can't be read or used (a hand edit) is dropped on its own when the preferences load, with a log line. The window shows the device's raw readings live and has a dead zone slider, a share of full travel on top of the measured noise; it's saved with the calibration and adjustable in Preferences afterwards. New strings are in all 14 catalogs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3D mouse: choose which motion drives each axis (#1463) After calibrating, which motion of the cap should drive which view axis is partly a matter of taste: rolling and twisting swapped, say, or Y and Z. Each axis row in Preferences > Navigation now has a "driven by" choice next to Invert and speed. Picking a motion another axis uses swaps the two, so each motion always drives exactly one axis, and Reset axes puts them back. The choice applies after the device's calibration and before the driver mapping, so Invert and speed stay with the view axis rather than moving with the motion. It's a preference, not part of a device's calibration, and stays in force when recalibrating; the calibration window says so while one is set. A saved assignment that doesn't drive each axis once loads as the default. New strings are in all 14 catalogs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3D mouse: axis choice review follow-ups (#1463) - An axis's speed, like its Invert, stays with the view axis when a motion is reassigned; tested. - Calibrating records the device's own reading, before the axis choice, so a saved swap isn't baked into a new calibration and then applied twice; tested through a whole calibration. - A settings file without the axis choice, or with one of the wrong length, loads with the default and keeps every other setting; tested. - Each axis row says "driven by" in sight before its choice, which otherwise only explained itself on hover (no help on a touchscreen or the web). - "Reset axes" is now "Reset axis assignment", so it doesn't read as forgetting the calibration just below it; the "driven by" tip reads more clearly in English. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3D mouse: name axis rows by what they do, and motions without a device in mind (#1463) The axis rows and the "driven by" choices showed the same names, "Push left / right" and so on, which read as one thing mapped to itself, and they described a cap that springs back to centre, which a trackball or a knob that stays put isn't. Each row is now named for what it does to the view: Pan left / right, Zoom, Pan up / down, Orbit up / down, Orbit left / right or Roll, or Off. The name comes from the driver mapping navigation used last frame, so it stays right where the mapping swaps axes (object mode swaps the last two). Before navigation has run there's no mapping to read, and a row is named for its own motion instead of a guessed effect. The choices are the device's calibrated motions: Translation X / Y / Z and Rotation X / Y / Z, under a header row, and the calibration window names a motion that barely moved the same way. This renames #1814's existing rows, which had no translations; every new name is in all 14 catalogs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3D mouse: rows never fall back to a motion name (#1463) Without a driver mapping, a row was named for its own calibrated motion, which is also what its dropdown lists. It now takes the default mapping's view axis, so the two sides never share a name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3D mouse: grey out Invert and speed on rows the driver turns off (#1463) A row the driver profile turns off says so on hover, and its Invert and speed are greyed out, since they do nothing there. Its motion choice stays live so a motion can still be swapped out. The column header is shorter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3D mouse: unmapped rows say Axis 1-6, and the off-row tip explains the swap (#1463) Without a driver mapping, a row is now just "Axis n" rather than the default mapping's view axis, which would be a guess there. The tip on a row the driver turns off says that a motion swapped into it stops moving the view, and a test swaps one in and back out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3D mouse calibration: a device that stops short of rest after a release (#2778) Through spacenavd, a relative-axis device like the Space Navigator never reports its return to zero, so the reading stays at its last small report after every release. The wizard never saw the cap let go, and once calibrated, the stuck value crept the view. A reading that stays exactly the same, close to rest, now counts as let go, and where the cap settled after each step goes into the calibration: such a device rests at the middle of where it settled, with a dead zone out to the furthest of them. A device that comes back to rest calibrates as before. * 3D mouse calibration: a steady hold through spacenavd stays a hold (#2778) * 3D mouse calibration: stopping short of rest only counts from spacenavd and 3DxWare (#2778) Recentring on where the cap settled kept the rest stage's wander radius but not its offset, so a rest extreme could fall outside the dead zone; the radius now grows by how far the centre moved. A reading that stops changing close to rest only ends a step from a source that sends nothing at rest, so HID and web devices calibrate exactly as before. * 3D mouse calibration: settling off-centre counts on any device (#2778) A drifting stick settles off its rest after a release just as spacenavd's stuck reading does, but it keeps reporting, noisily. A step now ends once the reading stays steady, each raw axis within twice its rest wander (so exactly still from a silent source), close to rest, on any device. The dead zone takes that wander on top of the furthest settle point. * 3D mouse calibration: steadiness by the run's spread, settled on the step's own axis (#2778) An axis that read flat at rest may dither once off-centre, so steady readings may spread at least 2 units and a 50th of the furthest any step went. Steadiness is the spread of the whole run, not distance from its first reading. Close to rest is judged on the axis that set the step's peak, since a device's axes may have different ranges, and the settle point is the middle of the steady run. * 3D mouse calibration: readings close to rest never count as held (#2778) * 3D mouse calibration: the dead zone reaches every reading of each release (#2778) Saving one reading of each release and padding it by the rest wander could miss a reading seen in the same steady run. Each release now keeps the whole run, and the dead zone is centred on and reaches everything read at rest and after the releases. * 3D mouse calibration: settle for half a second before a step counts as let go (#2778) A hand held still close to rest is less likely to end a step early; a device that comes back to rest never waits for it. * 3D mouse calibration: show the dead zones as a game controller tester would (#2778) Once calibrated, the window, and Preferences under the Dead zone slider, show three pads: slide, press and twist, and tilt. Each has a circle for the full travel, the dead zone shaded inside it with each direction its own size and the user's dead zone on top, and a dot where the cap is now, lit once the view moves. * 3D mouse calibration: settle through cross-talk, per-axis steadiness floor (#2778) The axis that went furthest in a step needn't be the one asked for: cross-talk can move another raw axis further. A step now counts as let go once the furthest axis is at least halfway back and some axis that moved about as far is within a quarter of its own peak; a hand still holding the push keeps the furthest axis out. The steadiness floor follows each axis's own reach, and each stage's steadiness starts with its own readings. * 3D mouse calibration: steady readings may dither ±2 on any axis (#2778) * space-mouse: make the settle check's near band match the steadiness spread, test the 4-unit floor near() measured distance from the settled run's middle against the whole tolerance, so it accepted twice the band the steadiness check does. Use half. Add a short-range test where only the .max(4.0) floor lets a +-2 dither settle, and one where dither the spread check rejects is also not skipped as untouched. * space-mouse: settle on the middle of the steady run so a lopsided dither isnt movement near() allows half the steadiness spread around the settled point, but the point was the run mean. A dither that is mostly one value with an occasional far one (10, 10, 10, 14) is steady, yet the far reading sat 3 from the mean and started a hold in the next step. Use the middle of the run range instead. Adds a lopsided-dither test and a test pinning the documented cross-talk limit ([100,300] then [5,90] stays open). * Judge an untouched cap by the settled run's spread, not a rounded midpoint Rounding the midpoint to i16 could leave one end of an odd-width run more than half the tolerance away, so the cap read as touched while sitting at the end of the run it settled on. Keep the run itself and ask whether one more reading keeps its spread within tolerance. * space-mouse: pin the wider skip band of a narrow settled run and a single-reading settle * space-mouse: keep a step held while a lesser axis stays out as the larger one relaxes Settling needed one axis furthest and returned, and one axis about as far and settled, which a single relaxed cross-talk axis satisfied alone. Every axis that moved at least half as far as the furthest now has to be back by RETURNED_SHARE of its own peak too. * 3D mouse: the calibration tests run in a focused window, as the focus check now requires * 3D mouse: the axis tests run in a focused window, as the focus check now requires * 3D mouse: the calibrated-rest test runs in a focused window, as the focus check now requires * Settle a spacenavd reading that is nearly at rest (#3523) spacenavd sends a record only when the values change and nothing when the cap springs back, so the last small leftover of a release was held forever and the view kept drifting. A held reading now reads as rest once every axis is within 150 raw units of the device rest and no record has arrived for 0.5 s. A firmer push stays as long as it lasts, and so does a small value next to a large one. 150 is the smallest round number above the worst leftover in the issue (129 on one axis). * Choose which 3D mouse driver to read on Linux When both spacenavd and the device itself (hidraw) are there, Preferences now has a "3D mouse driver" choice: Automatic, spacenavd or Direct. Automatic is what it always was, spacenavd when it runs and the device otherwise, so nobody's setup changes. If the chosen one isn't available the other is read and the log says so once. Each driver keeps its own calibration, as before. To switch without a restart both reads now wake up when idle and look at the choice: spacenavd with a 250 ms read timeout, hidraw opened non-blocking and polled every 5 ms when it has nothing. A record that arrives is read as before, and one split across a timeout is kept. The reader also publishes which of the two exist, which is what shows the combo box; with only one it says which one is in use. * Build the 3D mouse row header from existing labels --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: bherbruck <brennen.herbruck@gmail.com> |