SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Wave 262/509: CI: develop runs like main; SMLib is fetched after the Rust cache is restored (and 3 more)
jyvikoe7aadf8f40a5
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 3f2e509095..bb9ba34b1b 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -54,7 +54,8 @@ on:# The merge queue: each queued group runs the full suite before it lands on main.merge_group:push:- branches: [main]+ # develop: the SMLib kernel's trunk until it merges into main (its PRs land there).+ branches: [main, develop]schedule:- cron: "17 6 * * *"workflow_dispatch:@@ -182,12 +183,12 @@ jobs:if [ "${tested:-0}" -gt 0 ]; thenecho "The merge queue already tested $PUSH_SHA: repository checks only."elif tested=$(curl -fsS -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github+json" \- "https://api.github.com/repos/$REPO/actions/workflows/ci.yml/runs?event=push&branch=main&status=success&per_page=1" \+ "https://api.github.com/repos/$REPO/actions/workflows/ci.yml/runs?event=push&branch=$GITHUB_REF_NAME&status=success&per_page=1" \| grep -o '"head_sha": *"[0-9a-f]*"' | head -n 1 | grep -o '[0-9a-f]\{40\}') \&& [ -n "$tested" ] && git merge-base --is-ancestor "$tested" "$PUSH_SHA" \&& git diff --no-renames --name-only -z "$tested" "$PUSH_SHA" > "$RUNNER_TEMP/ci-paths" \&& select_packages "$RUNNER_TEMP/ci-paths" && [ "$full" != true ] && [ -z "$packages" ]; then- # Nothing a build reads changed since the last push to main whose run passed (the+ # Nothing a build reads changed since the last push to this branch whose run passed (the# push before may never have run: a newer push cancels a waiting one).echo "$tested..$PUSH_SHA changes no code: repository checks only."else@@ -306,7 +307,7 @@ jobs:- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: repo-checks- save-if: ${{ github.ref == 'refs/heads/main' }}+ save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}- name: Formatrun: cargo fmt --all -- --check- name: Asset attribution@@ -350,13 +351,13 @@ jobs:- name: Size parallel compiles to the job's memoryrun: scripts/ci/build-jobs.sh- uses: dtolnay/rust-toolchain@stable- - name: Fetch SMLib (crates/smlib/SMLIB_REV)- shell: bash- run: scripts/fetch-smlib.sh- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: quick-compile- save-if: ${{ github.ref == 'refs/heads/main' }}+ save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}+ - name: Fetch SMLib (crates/smlib/SMLIB_REV)+ shell: bash+ run: scripts/fetch-smlib.sh- name: Cargo checkrun: cargo check --workspace --all-targets --locked@@ -371,14 +372,14 @@ jobs:- uses: dtolnay/rust-toolchain@stablewith:components: clippy- - name: Fetch SMLib (crates/smlib/SMLIB_REV)- shell: bash- run: scripts/fetch-smlib.sh# Main saves the cache; every other run restores it, read-only.- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: native-clippy- save-if: ${{ github.ref == 'refs/heads/main' }}+ save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}+ - name: Fetch SMLib (crates/smlib/SMLIB_REV)+ shell: bash+ run: scripts/fetch-smlib.sh- name: Clippyenv:FULL: ${{ needs.changes.outputs.full }}@@ -408,9 +409,6 @@ jobs:- name: Size parallel compiles to the job's memoryrun: scripts/ci/build-jobs.sh- uses: dtolnay/rust-toolchain@stable- - name: Fetch SMLib (crates/smlib/SMLIB_REV)- shell: bash- run: scripts/fetch-smlib.sh# sccache lives on a Blacksmith sticky disk (an ext4 volume cloned from the last snapshot,# no 10 GB limit and no download). Only main commits it; pull requests, the merge queue and# forks mount a clone and never write back, so nothing they build can reach main's cache.@@ -424,7 +422,10 @@ jobs:- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: native-tests- save-if: ${{ github.ref == 'refs/heads/main' }}+ save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}+ - name: Fetch SMLib (crates/smlib/SMLIB_REV)+ shell: bash+ run: scripts/fetch-smlib.sh- name: Set up compiler cacheuses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11with:@@ -481,9 +482,6 @@ jobs:- name: Size parallel compiles to the job's memoryrun: scripts/ci/build-jobs.sh- uses: dtolnay/rust-toolchain@stable- - name: Fetch SMLib (crates/smlib/SMLIB_REV)- shell: bash- run: scripts/fetch-smlib.sh# sccache lives on a Blacksmith sticky disk (an ext4 volume cloned from the last snapshot,# no 10 GB limit and no download). Only main commits it; pull requests, the merge queue and# forks mount a clone and never write back, so nothing they build can reach main's cache.@@ -498,7 +496,10 @@ jobs:- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: native-tests- save-if: ${{ github.ref == 'refs/heads/main' }}+ save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}+ - name: Fetch SMLib (crates/smlib/SMLIB_REV)+ shell: bash+ run: scripts/fetch-smlib.sh- name: Set up compiler cacheuses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11with:@@ -625,7 +626,7 @@ jobs:- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: native-gpu- save-if: ${{ github.ref == 'refs/heads/main' && matrix.shard == 1 }}+ save-if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') && matrix.shard == 1 }}- name: Set up compiler cacheuses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11with:@@ -761,9 +762,6 @@ jobs:- name: Size parallel compiles to the job's memoryrun: scripts/ci/build-jobs.sh- uses: dtolnay/rust-toolchain@stable- - name: Fetch SMLib (crates/smlib/SMLIB_REV)- shell: bash- run: scripts/fetch-smlib.sh# sccache lives on a Blacksmith sticky disk (an ext4 volume cloned from the last snapshot,# no 10 GB limit and no download). Only main commits it; pull requests, the merge queue and# forks mount a clone and never write back, so nothing they build can reach main's cache.@@ -778,7 +776,10 @@ jobs:- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: doc-tests- save-if: ${{ github.ref == 'refs/heads/main' }}+ save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}+ - name: Fetch SMLib (crates/smlib/SMLIB_REV)+ shell: bash+ run: scripts/fetch-smlib.sh- name: Set up compiler cacheuses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11with:@@ -822,9 +823,6 @@ jobs:- name: Size parallel compiles to the job's memoryrun: scripts/ci/build-jobs.sh- uses: dtolnay/rust-toolchain@stable- - name: Fetch SMLib (crates/smlib/SMLIB_REV)- shell: bash- run: scripts/fetch-smlib.sh# sccache lives on a Blacksmith sticky disk (an ext4 volume cloned from the last snapshot,# no 10 GB limit and no download). Only main commits it; pull requests, the merge queue and# forks mount a clone and never write back, so nothing they build can reach main's cache.@@ -839,7 +837,10 @@ jobs:- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: oracle- save-if: ${{ github.ref == 'refs/heads/main' }}+ save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}+ - name: Fetch SMLib (crates/smlib/SMLIB_REV)+ shell: bash+ run: scripts/fetch-smlib.sh- name: Set up compiler cacheuses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11with:@@ -878,7 +879,7 @@ jobs:- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: windows-fxc- save-if: ${{ github.ref == 'refs/heads/main' }}+ save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}# One test at a time: WARP's shader JIT crashes now and then (a null read in# d3d10warp.dll's JIT optimizer, about 1 run in 60) when several devices compile compute# pipelines at once, which the parallel tests do. Minidumps showed it in WARP itself, not@@ -899,13 +900,13 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1- uses: dtolnay/rust-toolchain@stable- - name: Fetch SMLib (crates/smlib/SMLIB_REV)- shell: bash- run: scripts/fetch-smlib.sh- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: windows-startup- save-if: ${{ github.ref == 'refs/heads/main' }}+ save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}+ - name: Fetch SMLib (crates/smlib/SMLIB_REV)+ shell: bash+ run: scripts/fetch-smlib.sh- name: Backend order and probing on Windowsrun: cargo test -p solidcraft --profile ci --locked -- startup::tests native_crash::tests native_frame::tests- name: Build the app@@ -1023,13 +1024,13 @@ jobs:- uses: dtolnay/rust-toolchain@stablewith:targets: wasm32-unknown-unknown- - name: Fetch SMLib (crates/smlib/SMLIB_REV)- shell: bash- run: scripts/fetch-smlib.sh wasm32-unknown-unknown- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: wasm- save-if: ${{ github.ref == 'refs/heads/main' }}+ save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}+ - name: Fetch SMLib (crates/smlib/SMLIB_REV)+ shell: bash+ run: scripts/fetch-smlib.sh wasm32-unknown-unknown- run: cargo xtask wasmriscv64-gates:@@ -1048,13 +1049,13 @@ jobs:- uses: dtolnay/rust-toolchain@stablewith:targets: riscv64gc-unknown-linux-gnu- - name: Fetch SMLib (crates/smlib/SMLIB_REV)- shell: bash- run: scripts/fetch-smlib.sh riscv64gc-unknown-linux-gnu- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: riscv64- save-if: ${{ github.ref == 'refs/heads/main' }}+ save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}+ - name: Fetch SMLib (crates/smlib/SMLIB_REV)+ shell: bash+ run: scripts/fetch-smlib.sh riscv64gc-unknown-linux-gnu- name: Install cross-compilation dependenciesrun: |# Ubuntu's regular archive serves amd64; RISC-V packages live in ports.diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.ymlindex b0301021d5..cf1c396915 100644--- a/.github/workflows/docker.yml+++ b/.github/workflows/docker.yml@@ -49,13 +49,13 @@ jobs:- uses: dtolnay/rust-toolchain@stablewith:targets: wasm32-unknown-unknown- - name: Fetch SMLib (crates/smlib/SMLIB_REV)- shell: bash- run: scripts/fetch-smlib.sh wasm32-unknown-unknown- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: docker-websave-if: ${{ github.ref == 'refs/heads/main' }}+ - name: Fetch SMLib (crates/smlib/SMLIB_REV)+ shell: bash+ run: scripts/fetch-smlib.sh wasm32-unknown-unknown- name: Install trunkrun: |mkdir -p "$HOME/.local/bin"diff --git a/.github/workflows/generated.yml b/.github/workflows/generated.ymlindex dba2a22ae0..abe627d32b 100644--- a/.github/workflows/generated.yml+++ b/.github/workflows/generated.yml@@ -45,12 +45,12 @@ jobs:# main goes through the merge queue; this deploy key may push past it.ssh-key: ${{ secrets.GENERATED_FILES_DEPLOY_KEY }}- uses: dtolnay/rust-toolchain@stable- - name: Fetch SMLib (crates/smlib/SMLIB_REV)- shell: bash- run: scripts/fetch-smlib.sh- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: generated-files+ - name: Fetch SMLib (crates/smlib/SMLIB_REV)+ shell: bash+ run: scripts/fetch-smlib.sh- name: THIRD-PARTY-LICENSES.txtrun: cargo xtask licences- name: docs/features.mddiff --git a/.github/workflows/pages.yml b/.github/workflows/pages.ymlindex 2b6d519e62..ea87218cd3 100644--- a/.github/workflows/pages.yml+++ b/.github/workflows/pages.yml@@ -40,10 +40,10 @@ jobs:- uses: dtolnay/rust-toolchain@stablewith:targets: wasm32-unknown-unknown+ - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2- name: Fetch SMLib (crates/smlib/SMLIB_REV)shell: bashrun: scripts/fetch-smlib.sh wasm32-unknown-unknown- - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2- name: Install mdbook and trunkrun: |mkdir -p "$HOME/.local/bin"diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 372e8691fd..ec8a136354 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -101,12 +101,12 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1- uses: dtolnay/rust-toolchain@stable- - name: Fetch SMLib (crates/smlib/SMLIB_REV)- shell: bash- run: scripts/fetch-smlib.sh- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: release-icons+ - name: Fetch SMLib (crates/smlib/SMLIB_REV)+ shell: bash+ run: scripts/fetch-smlib.sh- run: cargo build --release --locked -p solidcraft-cli- run: |. packaging/env.sh@@ -143,12 +143,12 @@ jobs:"https://github.com/goreleaser/nfpm/releases/download/v${NFPM_VERSION}/nfpm_${NFPM_VERSION}_${{ matrix.deb }}.deb"sudo dpkg -i "$RUNNER_TEMP/nfpm.deb"- uses: dtolnay/rust-toolchain@stable- - name: Fetch SMLib (crates/smlib/SMLIB_REV)- shell: bash- run: scripts/fetch-smlib.sh- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: release-linux-${{ matrix.arch }}+ - name: Fetch SMLib (crates/smlib/SMLIB_REV)+ shell: bash+ run: scripts/fetch-smlib.sh- name: Build and package (AppImage, deb, rpm, tar.gz)run: packaging/linux/package.sh- name: Check the packages@@ -331,12 +331,12 @@ jobs:- uses: dtolnay/rust-toolchain@stablewith:targets: ${{ matrix.target }}- - name: Fetch SMLib (crates/smlib/SMLIB_REV)- shell: bash- run: scripts/fetch-smlib.sh ${{ matrix.target }}- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: release-macos-${{ matrix.arch }}+ - name: Fetch SMLib (crates/smlib/SMLIB_REV)+ shell: bash+ run: scripts/fetch-smlib.sh ${{ matrix.target }}- name: Buildrun: packaging/macos/package.sh --build-only ${{ matrix.target }}# Not named release-*: the release job collects every release-* artifact as an asset.@@ -432,12 +432,12 @@ jobs:- uses: dtolnay/rust-toolchain@stablewith:targets: ${{ matrix.target }}- - name: Fetch SMLib (crates/smlib/SMLIB_REV)- shell: bash- run: scripts/fetch-smlib.sh ${{ matrix.target }}- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: release-windows-${{ matrix.arch }}+ - name: Fetch SMLib (crates/smlib/SMLIB_REV)+ shell: bash+ run: scripts/fetch-smlib.sh ${{ matrix.target }}- name: Install WiXshell: pwshrun: |@@ -566,12 +566,12 @@ jobs:- uses: dtolnay/rust-toolchain@stablewith:targets: wasm32-unknown-unknown- - name: Fetch SMLib (crates/smlib/SMLIB_REV)- shell: bash- run: scripts/fetch-smlib.sh wasm32-unknown-unknown- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2with:key: release-web+ - name: Fetch SMLib (crates/smlib/SMLIB_REV)+ shell: bash+ run: scripts/fetch-smlib.sh wasm32-unknown-unknown- name: Install trunkrun: |curl -fsSL "https://github.com/trunk-rs/trunk/releases/download/v${TRUNK_VERSION}/trunk-x86_64-unknown-linux-gnu.tar.gz" \diff --git a/assets/locales/ar.json b/assets/locales/ar.jsonindex 5d86559de9..90fd375db8 100644--- a/assets/locales/ar.json+++ b/assets/locales/ar.json@@ -2254,10 +2254,7 @@"the parts library is not available": "مكتبة القطع غير متاحة","thread.automatic_size": "حجم تلقائي","thread.designation": "التسمية",- "thread.direction": "اتجاه السن اللولبي","thread.iso_metric": "متري ISO",- "thread.left_hand": "يساري",- "thread.right_hand": "يميني","thread.select_size": "اختر الحجم","timeline.delete_after_marker_one": "حذف ميزة واحدة بعد مؤشر السجل","timeline.delete_after_marker_other": "حذف {count} ميزات بعد مؤشر السجل",diff --git a/assets/locales/he.json b/assets/locales/he.jsonindex 0e34143739..74f2c088e1 100644--- a/assets/locales/he.json+++ b/assets/locales/he.json@@ -2254,10 +2254,7 @@"the parts library is not available": "ספריית החלקים אינה זמינה","thread.automatic_size": "גודל אוטומטי","thread.designation": "סימון",- "thread.direction": "כיוון ההברגה","thread.iso_metric": "ISO מטרי",- "thread.left_hand": "שמאלית",- "thread.right_hand": "ימנית","thread.select_size": "בחירת גודל","timeline.delete_after_marker_one": "מחיקת פיצ'ר אחד אחרי סמן ציר הזמן","timeline.delete_after_marker_other": "מחיקת {count} פיצ'רים אחרי סמן ציר הזמן",diff --git a/assets/locales/pending/thread-dialog-labels.json b/assets/locales/pending/thread-dialog-labels.jsonnew file mode 100644index 0000000000..2895ef09a2--- /dev/null+++ b/assets/locales/pending/thread-dialog-labels.json@@ -0,0 +1,42 @@+{+ "en": {+ "thread.fits_the_face": "fits the face, e.g. {example}",+ "ui.chamfer_angle": "Chamfer Angle",+ "ui.chamfer_depth": "Chamfer Depth",+ "ui.ends": "Ends",+ "ui.extent": "Extent",+ "ui.iso_4753": "ISO 4753"+ },+ "ar": {+ "thread.fits_the_face": "يناسب الوجه، مثلاً {example}",+ "ui.chamfer_angle": "زاوية الشطف",+ "ui.chamfer_depth": "عمق الشطف",+ "ui.ends": "الطرفان",+ "ui.extent": "الامتداد",+ "ui.iso_4753": "ISO 4753"+ },+ "he": {+ "thread.fits_the_face": "מתאים לפאה, למשל {example}",+ "ui.chamfer_angle": "זווית פאזה",+ "ui.chamfer_depth": "עומק פאזה",+ "ui.ends": "קצוות",+ "ui.extent": "גבול",+ "ui.iso_4753": "ISO 4753"+ },+ "ja": {+ "thread.fits_the_face": "面に合うサイズ。例: {example}",+ "ui.chamfer_angle": "面取り角度",+ "ui.chamfer_depth": "面取り深さ",+ "ui.ends": "端部",+ "ui.extent": "範囲",+ "ui.iso_4753": "ISO 4753"+ },+ "zh": {+ "thread.fits_the_face": "适合该面,例如 {example}",+ "ui.chamfer_angle": "倒角角度",+ "ui.chamfer_depth": "倒角深度",+ "ui.ends": "端部",+ "ui.extent": "范围",+ "ui.iso_4753": "ISO 4753"+ }+}diff --git a/crates/doc/src/lib.rs b/crates/doc/src/lib.rsindex 5b40e55b07..aa98c13ddb 100644--- a/crates/doc/src/lib.rs+++ b/crates/doc/src/lib.rs@@ -70,8 +70,8 @@ pub mod text_params;pub mod thread_forms;pub use assembly::{- IDENTITY, MAX_PLACEMENT_DEPTH, MAX_PLACEMENTS, Mat, Occurrence, WorldNames, apply_point, apply_vector, is_identity, is_placement,- map_point_expr, mat_inverse, mat_mul, rigid,+ IDENTITY, MAX_PLACEMENT_DEPTH, MAX_PLACEMENTS, Mat, Occurrence, WorldNames, apply_point, apply_vector, is_identity, is_placement, map_point_expr,+ mat_inverse, mat_mul, rigid,};pub use document::*;pub use eval::KeptResults;diff --git a/crates/engine/src/thread_tests.rs b/crates/engine/src/thread_tests.rsindex 9430239485..6183fea7ee 100644--- a/crates/engine/src/thread_tests.rs+++ b/crates/engine/src/thread_tests.rs@@ -720,9 +720,7 @@ fn a_format_39_left_hand_thread_and_tapped_hole_open_left_handed() {run(&mut s, "solid.hole", json!({"position": [20, 30, 12], "thread": "M6", "depth": 8, "hand": "left"}));run(&mut s, "solid.cylinder", json!({"radius": 5, "height": 9, "base": [80, 0, 0], "body_name": "Shaft", "operation": "new"}));run(&mut s, "solid.thread", json!({"face": [85, 0, 4.5], "designation": "M10", "hand": "left"}));- let hands = |s: &Session| -> Vec<solidcraft_doc::thread_forms::ThreadHand> {- s.model.state().threads.iter().map(|t| t.hand).collect()- };+ let hands = |s: &Session| -> Vec<solidcraft_doc::thread_forms::ThreadHand> { s.model.state().threads.iter().map(|t| t.hand).collect() };let left = solidcraft_doc::thread_forms::ThreadHand::Left;assert_eq!(hands(&s), [left, left]);// What format 39 wrote: the direction as `handedness`, no pending changes.diff --git a/crates/ui-egui/src/dialogs_thread.rs b/crates/ui-egui/src/dialogs_thread.rsindex 3b40db7d2f..dd93112432 100644--- a/crates/ui-egui/src/dialogs_thread.rs+++ b/crates/ui-egui/src/dialogs_thread.rs@@ -374,7 +374,7 @@ pub(crate) fn rows(if !f.sizes().is_empty() {size_rows(ui, f, designation, suggested);}- let hint = format!("{}{}", tr("fits the face, e.g. "), example(f));+ let hint = crate::i18n::format("thread.fits_the_face", &[("example", &example(f))]);let (submitted, changed) = text_row(ui, "Designation", designation, &hint);enter |= submitted;if let Some(at) = crate::scenario::handle_at("dialog:Designation") {@@ -405,8 +405,8 @@ pub(crate) fn rows(enter |= ease_rows(ui, "Ease Out", "thread_ease_out", &mut o.ease_out);pick(ui, "Tip", "thread_tip", &mut o.tip, TIPS);if o.tip == ThreadTip::Chamfer {- enter |= hint_row(ui, "Chamfer Angle", &mut o.chamfer_angle, tr("ISO 4753"));- enter |= hint_row(ui, "Chamfer Depth", &mut o.chamfer_depth, tr("ISO 4753"));+ enter |= hint_row(ui, "Chamfer Angle", &mut o.chamfer_angle, tr("ui.iso_4753"));+ enter |= hint_row(ui, "Chamfer Depth", &mut o.chamfer_depth, tr("ui.iso_4753"));}});(enter, reset)diff --git a/crates/ui-egui/src/hole_presets.rs b/crates/ui-egui/src/hole_presets.rsindex 284695c508..dea428ac5d 100644--- a/crates/ui-egui/src/hole_presets.rs+++ b/crates/ui-egui/src/hole_presets.rs@@ -266,8 +266,11 @@ impl Preset {opts.thread.clone_from(&self.thread);opts.custom_thread = None;opts.thread_full_depth = self.thread_options.full_length;- opts.hand =- if self.thread_options.handedness == "left" { solidcraft_engine::doc::thread_forms::ThreadHand::Left } else { solidcraft_engine::doc::thread_forms::ThreadHand::Right };+ opts.hand = if self.thread_options.handedness == "left" {+ solidcraft_engine::doc::thread_forms::ThreadHand::Left+ } else {+ solidcraft_engine::doc::thread_forms::ThreadHand::Right+ };opts.thread_depth = self.thread_options.depth.clone().unwrap_or_else(|| crate::dialogs::HoleOpts::default().thread_depth);// Existing placement picks stay with this dialog. To Object stores its mode only:// recalling it always asks for a fresh destination in the current design.diff --git a/crates/ui-egui/src/i18n.rs b/crates/ui-egui/src/i18n.rsindex 146e15efa9..166c9ca62e 100644--- a/crates/ui-egui/src/i18n.rs+++ b/crates/ui-egui/src/i18n.rs@@ -326,7 +326,8 @@ mod tests {let pending: BTreeMap<String, Messages> = serde_json::from_str(&std::fs::read_to_string(entry.path()).unwrap()).unwrap();for (locale, messages) in pending {for (id, text) in messages {- assert_eq!(Locale::for_language(&locale).text(&id), text, "{locale}: {id}");+ // Right-to-left catalogs keep their messages in display order.+ assert_eq!(Locale::for_language(&locale).text(&id), crate::bidi::visual_template(&text), "{locale}: {id}");}}}