From 3ff3df1626fa14c7a93860b560e0fcb43df45741 Mon Sep 17 00:00:00 2001 From: sim Date: Thu, 10 Sep 2026 16:54:34 +0800 Subject: [PATCH] =?UTF-8?q?fix(merge):=20=E8=90=BD=E5=AE=9E=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E5=90=8E=E7=9A=84=E5=A5=91=E7=BA=A6=E4=B8=8E=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - build-mac.sh 移除 hdiutil DMG 兜底:bundle contract 测试显式禁止手搓 DMG 绕过签名/公证链路;DMG 缺失即失败(保留 qwen3-asr-rs 剪枝与 BUILD_START_TS 新鲜度校验) - 红绿灯 y=26 契约:tao 几何下视觉顶距≈y-14,x==y 并不相等(实测左 21.5px) - 胶囊几何契约同步 typeless 206×57(原 460×128 的 1/5 面积) - LLM_LABELS 补 tencentTokenHub 静态目录项(ASR_LABELS 已含 tencent-cloud) --- openless-all/app/scripts/build-mac.sh | 17 +++++++---------- .../app/scripts/windows-ui-config.test.mjs | 8 +++++--- .../app/src/pages/settings/ProvidersSection.tsx | 1 + 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/openless-all/app/scripts/build-mac.sh b/openless-all/app/scripts/build-mac.sh index aff48f35..cb2d0de7 100755 --- a/openless-all/app/scripts/build-mac.sh +++ b/openless-all/app/scripts/build-mac.sh @@ -63,8 +63,9 @@ esac if [ -n "${TAURI_SIGNING_PRIVATE_KEY:-}" ] || [ -n "${TAURI_SIGNING_PRIVATE_KEY_PATH:-}" ]; then TAURI_BUILD_ARGS+=(--config '{"bundle":{"createUpdaterArtifacts":true}}') fi -# bundle_dmg(AppleScript)在 Xcode beta 上可能失败;.app 已生成时继续,由下方兜底补 DMG。 -npm run tauri -- "${TAURI_BUILD_ARGS[@]}" || echo "⚠ tauri build 退出码非零(可能仅 DMG 打包失败),继续校验" +# bundle_dmg(AppleScript)在 Xcode beta 上可能退出非零;.app 与 DMG 是否真实 +# 产出交给下方的新鲜度/存在性校验判定,不在这一步盲 abort。 +npm run tauri -- "${TAURI_BUILD_ARGS[@]}" || echo "⚠ tauri build 退出码非零,继续校验产物" APP_VERSION="$(node -p "require('./package.json').version")" DMG_PATH="$DMG_DIR/OpenLess_${APP_VERSION}_${MAC_BUNDLE_ARCH}.dmg" @@ -75,15 +76,11 @@ if [ ! -d "$APP" ] || [ "$(stat -f %m "$APP/Contents/MacOS/openless")" -lt "$BUI echo "✗ $APP 缺失或不是本次构建的产物(打包未完成),中止" exit 1 fi - -# DMG 兜底:OpenLess.app + /Applications 替身(拖拽安装)。 +# DMG 一律由 Tauri 生成(带签名/公证链路);手搓 hdiutil DMG 会绕过这些步骤, +# bundle contract 测试显式禁止。缺失即失败,不兜底。 if [ ! -f "$DMG_PATH" ]; then - echo "⚠ Tauri 未生成 DMG,使用 hdiutil 兜底(含 Applications 替身)" - DMG_STAGE="$(mktemp -d "${TMPDIR:-/tmp}/openless-dmg-stage.XXXXXX")" - cp -R "$APP" "$DMG_STAGE/OpenLess.app" - ln -s /Applications "$DMG_STAGE/Applications" - hdiutil create -volname "OpenLess" -srcfolder "$DMG_STAGE" -ov -format UDZO "$DMG_PATH" > /dev/null - rm -rf "$DMG_STAGE" + echo "✗ 未找到本次构建的 DMG:$DMG_PATH(tauri build 未完成打包)" + exit 1 fi echo "▶ 校验 Info.plist / 签名" diff --git a/openless-all/app/scripts/windows-ui-config.test.mjs b/openless-all/app/scripts/windows-ui-config.test.mjs index 9e6bdb3e..c99585d5 100644 --- a/openless-all/app/scripts/windows-ui-config.test.mjs +++ b/openless-all/app/scripts/windows-ui-config.test.mjs @@ -117,7 +117,9 @@ assertMatch( 'macOS drag region should reserve the native traffic-light area', ); assertEqual(mainWindow.trafficLightPosition.x, 16, 'traffic lights should have a 16px left inset'); -assertEqual(mainWindow.trafficLightPosition.y, 16, 'traffic lights should have an equal top inset'); +// tao 的 inset_traffic_lights 里 y 只缩放标题栏容器(斜率 1),视觉顶距 ≈ y-14; +// 左 16 时实测左距 21.5px,y=26 才让顶距与之相等(x==y 反而不等)。 +assertEqual(mainWindow.trafficLightPosition.y, 26, 'traffic lights should have an equal visual top inset'); assertEqual(mainWindow.width, 1300, 'main window should use the reviewed default width'); assertEqual(mainWindow.height, 835, 'main window should use the reviewed default height'); assertEqual(mainWindow.resizable, true, 'users should still be able to resize the main window'); @@ -230,8 +232,8 @@ if (!/const badgeBottom = Math\.round\(metrics\.height \* 0\.73\);/.test(capsule assertMatch( libRs, - /fn capsule_window_bounds_for_style\(style: types::CapsuleStyle\)[\s\S]*?width: 460\.0,[\s\S]*?types::CapsuleStyle::Siri => 180\.0,[\s\S]*?types::CapsuleStyle::Classic => 100\.0,[\s\S]*?types::CapsuleStyle::Typeless => 128\.0,[\s\S]*?bottom_inset: 0\.0,/, - 'native capsule bounds should match the frontend dimensions for all three styles', + /fn capsule_window_bounds_for_style\(style: types::CapsuleStyle\)[\s\S]*?types::CapsuleStyle::Typeless => 206\.0,[\s\S]*?CapsuleStyle::Siri \| types::CapsuleStyle::Classic => 460\.0,[\s\S]*?types::CapsuleStyle::Siri => 180\.0,[\s\S]*?types::CapsuleStyle::Classic => 100\.0,[\s\S]*?types::CapsuleStyle::Typeless => 57\.0,[\s\S]*?bottom_inset: 0\.0,/, + 'native capsule bounds should match the frontend dimensions (typeless = 1/5 area of the original 460x128)', ); assertMatch( diff --git a/openless-all/app/src/pages/settings/ProvidersSection.tsx b/openless-all/app/src/pages/settings/ProvidersSection.tsx index cf4be8ec..b28bc7df 100644 --- a/openless-all/app/src/pages/settings/ProvidersSection.tsx +++ b/openless-all/app/src/pages/settings/ProvidersSection.tsx @@ -141,6 +141,7 @@ export const LLM_LABELS = [ ['minimax', 'minimax'], ['stepfun', 'stepfun'], ['opencode', 'opencode'], + ['tencentTokenHub', 'tencentTokenHub'], ['custom', 'customChatCompletions'], ['custom_responses', 'customResponses'], ['custom_messages', 'customMessages'],