fix(merge): 落实合并后的契约与目录对齐
- 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)
This commit is contained in:
1 parent
0ac0fbd391
commit
3ff3df1626
3 files changed
+13
-13
No files matched your search
@@ -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 / 签名"
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -141,6 +141,7 @@ export const LLM_LABELS = [
|
||||
['minimax', 'minimax'],
|
||||
['stepfun', 'stepfun'],
|
||||
['opencode', 'opencode'],
|
||||
['tencentTokenHub', 'tencentTokenHub'],
|
||||
['custom', 'customChatCompletions'],
|
||||
['custom_responses', 'customResponses'],
|
||||
['custom_messages', 'customMessages'],
|
||||
|
||||
Reference in new issue
Block a user