From a2e33e8e00a99b95dc29d67a819cb0897eda5756 Mon Sep 17 00:00:00 2001
From: dayu <506228475@qq.com>
Date: Thu, 22 Oct 2026 00:20:11 +0800
Subject: [PATCH] Keep remote submitted editors in sync with host reset and
undo; prepare final build13
---
README.md | 2 +-
RECOVERY.md | 2 +-
Templates/大鱼人像美化/VALIDATION.json | 12 ++---
beatygril/beatygril/Plugin/Info.plist | 2 +-
beatygril/beatygril/Plugin/PGInspectorView.m | 11 +++--
.../beatygril/Wrapper Application/Info.plist | 2 +-
docs/analysis/面板交互连接修复.md | 2 +
docs/verification/v1.1.2/automated-tests.json | 6 +--
docs/verification/v1.1.2/inspector-asan.txt | 2 +-
docs/verification/v1.1.2/interim-build12.json | 44 +++++++++++++++++++
docs/验证记录.md | 2 +-
tests/inspector_tests.m | 12 ++++-
12 files changed, 80 insertions(+), 19 deletions(-)
create mode 100644 docs/verification/v1.1.2/interim-build12.json
diff --git a/README.md b/README.md
index 213886e..bd867e6 100644
--- a/README.md
+++ b/README.md
@@ -49,4 +49,4 @@ xcodebuild -project beatygril/beatygril.xcodeproj -scheme 'Wrapper Application'
面板改为先在真实视图的宿主 action 内取得读写接口,修复控件一直禁用的问题。短脸改用76点下半脸闭合区域和鼻梁位移轴,下颌骨改为六组相邻轮廓半径的局部位移,移除旧脸框近似场;详见[分析](docs/analysis/短脸与下颌骨分析.md)。其余五项脸型仍保留近似实现,不能将局部算法恢复视为全部效果逐像素一致。
-1549项回归通过,含335项宿主适配、98项OSC和155项面板ASan检查;28种控制/原点组合均核验实际解剖位置,改变原点标签时逐字节一致。额外真实帧ASan专项886项通过,含重复基础用例。合并版签名公证及Motion/FCP原生验收进行中。
+1551项回归通过,含335项宿主适配、98项OSC和157项面板ASan检查;28种控制/原点组合均核验实际解剖位置,改变原点标签时逐字节一致。额外真实帧ASan专项886项通过,含重复基础用例。合并版签名公证及Motion/FCP原生验收进行中。
diff --git a/RECOVERY.md b/RECOVERY.md
index bc873cd..aa6b57c 100644
--- a/RECOVERY.md
+++ b/RECOVERY.md
@@ -77,4 +77,4 @@ FCP模板从 `Templates/大鱼人像美化/` 恢复,将 `.moef` 和 `Drop Zone
## 1.1.2 合并修复准备
-版本1.1.2(12)合并面板action上下文修复和76点短脸/下颌骨局部场。构建/恢复依赖、正式路径、签名公证入口保持不变;自动检查1549项及额外886项真实帧ASan专项通过。原生验收使用build/native-112独立Motion副本,用户素材、截图和完整AX数据不随源码上传。用户已明确授权接手Motion/FCP进行测试;先前不操作界面的偏好已被本次授权更新。
+版本1.1.2(13)合并面板action上下文修复和76点短脸/下颌骨局部场。构建/恢复依赖、正式路径、签名公证入口保持不变;自动检查1551项及额外886项真实帧ASan专项通过。原生验收使用build/native-112独立Motion副本,用户素材、截图和完整AX数据不随源码上传。用户已明确授权接手Motion/FCP进行测试;先前不操作界面的偏好已被本次授权更新。
diff --git a/Templates/大鱼人像美化/VALIDATION.json b/Templates/大鱼人像美化/VALIDATION.json
index 1eb3b98..0da1a26 100644
--- a/Templates/大鱼人像美化/VALIDATION.json
+++ b/Templates/大鱼人像美化/VALIDATION.json
@@ -156,14 +156,14 @@
},
"automatedInspectorValidation": {
"scope": "offscreen AppKit inspector, real production controller and mocked host callbacks; no Motion/FCP UI",
- "fullChecks": 1549,
+ "fullChecks": 1551,
"counts": {
"beauty": 49,
"face": 116,
"thinChinJawShort": 796,
"hostAdapterASan": 335,
"oscASan": 98,
- "inspectorASan": 155
+ "inspectorASan": 157
},
"nativeVisualQA": "pending user",
"manualAnalysisUI": "removed; legacy IDs hidden and buttons disabled",
@@ -189,21 +189,21 @@
},
"installation": {
"version": "1.1.2",
- "build": "12",
+ "build": "13",
"status": "pending",
"previousInstalledVersion": "1.1.1 (interim)"
},
"shortJawValidation": {
"version": "1.1.2",
- "build": "12",
- "total": 1549,
+ "build": "13",
+ "total": 1551,
"counts": {
"beauty": 49,
"face": 116,
"thinChinJawShort": 796,
"hostAdapterASan": 335,
"oscASan": 98,
- "inspectorASan": 155
+ "inspectorASan": 157
},
"allPassed": true,
"extraRealFramesASan": {
diff --git a/beatygril/beatygril/Plugin/Info.plist b/beatygril/beatygril/Plugin/Info.plist
index 199ccb2..6324b55 100644
--- a/beatygril/beatygril/Plugin/Info.plist
+++ b/beatygril/beatygril/Plugin/Info.plist
@@ -19,7 +19,7 @@
CFBundleShortVersionString
1.1.2
CFBundleVersion
- 12
+ 13
NSHumanReadableCopyright
PlugInKit
diff --git a/beatygril/beatygril/Plugin/PGInspectorView.m b/beatygril/beatygril/Plugin/PGInspectorView.m
index 7a43a82..c402e5d 100644
--- a/beatygril/beatygril/Plugin/PGInspectorView.m
+++ b/beatygril/beatygril/Plugin/PGInspectorView.m
@@ -233,7 +233,7 @@ static PGInspectorGlyphButton *PGUIButton(NSString *glyph, NSColor *accent, id t
_label.alphaValue=master&&enabled?1:.5;_eye.state=enabled?NSControlStateValueOn:NSControlStateValueOff;_eye.enabled=available&&master;
_reset.enabled=available;_reset.state=fabs(value-[_descriptor[@"default"]doubleValue])>.000001?NSControlStateValueOn:NSControlStateValueOff;
_slider.enabled=available&&master&&enabled;_slider.doubleValue=value;
- _valueField.enabled=available&&master&&enabled;if(!_valueField.currentEditor)_valueField.stringValue=PGFormattedValue(_descriptor,value);
+ _valueField.enabled=available&&master&&enabled;if(!_valueField.currentEditor || !_numberHasUnsubmittedEdit)_valueField.stringValue=PGFormattedValue(_descriptor,value);
_toggle.enabled=available&&master&&enabled;_toggle.state=value>.5?NSControlStateValueOn:NSControlStateValueOff;
UInt32 identifierForHint=[_descriptor[@"id"]unsignedIntValue];
_hint.stringValue=identifierForHint==PGFastMulti?(value>.5?@"多人":@"单人"):identifierForHint==PGTrackBoxes?(value>.5?@"预览中":@"隐藏"):(value>.5?@"开启":@"关闭");
@@ -264,7 +264,12 @@ static PGInspectorGlyphButton *PGUIButton(NSString *glyph, NSColor *accent, id t
[_inspector writeValue:value parameter:[_descriptor[@"id"]unsignedIntValue]];
}else NSBeep();
_valueField.stringValue=PGFormattedValue(_descriptor,[_inspector.controller.state valueForParameter:[_descriptor[@"id"]unsignedIntValue]]);
- if(sender==_valueField && _valueField.currentEditor)[_valueField.window makeFirstResponder:nil];
+ if(sender==_valueField) {
+ [_valueField.window makeFirstResponder:nil];
+ // A remote inspector can retain its field editor after the host has
+ // consumed Return. End the already-submitted edit at the control too.
+ [_valueField abortEditing];
+ }
}
- (void)controlTextDidChange:(NSNotification *)notification { (void)notification;_numberHasUnsubmittedEdit=YES; }
- (void)controlTextDidEndEditing:(NSNotification *)notification {
@@ -343,7 +348,7 @@ static PGInspectorGlyphButton *PGUIButton(NSString *glyph, NSColor *accent, id t
}
_status.stringValue=_controller.statusMessage.length?_controller.statusMessage:@"自动跟随 · 无需手动分析";_status.toolTip=_status.stringValue;
}
-- (BOOL)hasActiveTextEditor { for(PGInspectorCard *card in _cards)for(PGInspectorRow *row in card.rows)if(row.valueField.currentEditor)return YES;return NO; }
+- (BOOL)hasActiveTextEditor { for(PGInspectorCard *card in _cards)for(PGInspectorRow *row in card.rows)if(row.valueField.currentEditor && row.numberHasUnsubmittedEdit)return YES;return NO; }
- (void)refreshFromHost { if(_interactionDepth || [self hasActiveTextEditor])return;[_controller refresh];[self reloadControls]; }
- (void)hostParameterChanged { if(_interactionDepth || [self hasActiveTextEditor])return;[_controller documentDidChange];[self reloadControls]; }
- (void)writeValue:(double)value parameter:(UInt32)identifier { [_controller setValue:value forParameter:identifier];[self reloadControls]; }
diff --git a/beatygril/beatygril/Wrapper Application/Info.plist b/beatygril/beatygril/Wrapper Application/Info.plist
index cc0f471..9e3fa30 100644
--- a/beatygril/beatygril/Wrapper Application/Info.plist
+++ b/beatygril/beatygril/Wrapper Application/Info.plist
@@ -19,7 +19,7 @@
CFBundleShortVersionString
1.1.2
CFBundleVersion
- 12
+ 13
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
NSHumanReadableCopyright
diff --git a/docs/analysis/面板交互连接修复.md b/docs/analysis/面板交互连接修复.md
index 8b38172..1fb0b1b 100644
--- a/docs/analysis/面板交互连接修复.md
+++ b/docs/analysis/面板交互连接修复.md
@@ -21,3 +21,5 @@ Mouse/keyboard自动化尝试中有焦点落回时间线及参数在非本次操
用户另报滑杆只在松手后更新:旧view层在mouseDown之前beginInteraction,整个NSSlider tracking loop结束才endInteraction,虽然continuous为YES,宿主可直到endAction才发布预览。现在gesture depth只阻止定时刷新覆盖拖动显示,每个有效slider action由controller单独开启/结束宿主上下文,仍先在真实NSView sender的action内取得API,完整自定义状态和隐藏镜像一起提交。没有新增手动分析或强制刷新按钮。
在仅于endAction发布预览的模拟宿主中,三个中间步进旧版3项失败,新版155项检查器ASan全部通过,含无变化去重、action配对、每步可读的完整渲染设置。宿主是否合并快速更新以及实际显示帧率由其调度和设备性能决定;不保证每一个鼠标事件均在屏幕独立显示一帧。新版原生复验另记。
+
+远程编辑器补充:Motion build12中数值提交后的重置已经改变实际slider/输出,但仍保留字段编辑器并显示旧文本。最终改为对已提交编辑调用abortEditing,并仅在存在尚未提交的真实输入时阻止宿主刷新/保留文本;单纯残留焦点不再遮蔽撤销或重置。新增两个真实离屏编辑器用例确认无改动焦点可刷新、尚未提交输入仍受保护;检查器ASan现157项通过。
diff --git a/docs/verification/v1.1.2/automated-tests.json b/docs/verification/v1.1.2/automated-tests.json
index 5ce0221..8166726 100644
--- a/docs/verification/v1.1.2/automated-tests.json
+++ b/docs/verification/v1.1.2/automated-tests.json
@@ -1,14 +1,14 @@
{
"version": "1.1.2",
- "build": "12",
- "total": 1549,
+ "build": "13",
+ "total": 1551,
"counts": {
"beauty": 49,
"face": 116,
"thinChinJawShort": 796,
"hostAdapterASan": 335,
"oscASan": 98,
- "inspectorASan": 155
+ "inspectorASan": 157
},
"allPassed": true,
"extraRealFramesASan": {
diff --git a/docs/verification/v1.1.2/inspector-asan.txt b/docs/verification/v1.1.2/inspector-asan.txt
index 3820763..89813b6 100644
--- a/docs/verification/v1.1.2/inspector-asan.txt
+++ b/docs/verification/v1.1.2/inspector-asan.txt
@@ -1 +1 @@
-Inspector: 155 checks, 0 failures
+Inspector: 157 checks, 0 failures
diff --git a/docs/verification/v1.1.2/interim-build12.json b/docs/verification/v1.1.2/interim-build12.json
new file mode 100644
index 0000000..4025d0e
--- /dev/null
+++ b/docs/verification/v1.1.2/interim-build12.json
@@ -0,0 +1,44 @@
+{
+ "status": "failed",
+ "bundleIdentifier": "com.dayu.beatygril",
+ "installationPath": "/Library/Plug-Ins/FxPlug/beatygril.app",
+ "options": {
+ "waitForHosts": true,
+ "userTests": false
+ },
+ "nativeEffectQA": {
+ "status": "pending_operator",
+ "performedByScript": false
+ },
+ "source": {
+ "commit": "3f075922cbdd7b80b9609cb0640bc2591ad3240b",
+ "trackedWorktreeChanges": []
+ },
+ "updatedAt": "2026-10-21T16:18:39.997054+00:00",
+ "version": "1.1.2",
+ "build": "12",
+ "stagingSignature": "Executable=/private/tmp/paintfcp-build-20261021/Build/Products/Release/beatygril.app/Contents/MacOS/beatygril\nIdentifier=com.dayu.beatygril\nFormat=app bundle with Mach-O universal (x86_64 arm64)\nCodeDirectory v=20500 size=478 flags=0x10000(runtime) hashes=4+7 location=embedded\nHash type=sha256 size=32\nCandidateCDHash sha256=c50126c3762c66d9fcdc3890d3393ede57f75958\nCandidateCDHashFull sha256=c50126c3762c66d9fcdc3890d3393ede57f75958be276e1a4a83e1c11ed239b3\nHash choices=sha256\nCMSDigest=c50126c3762c66d9fcdc3890d3393ede57f75958be276e1a4a83e1c11ed239b3\nCMSDigestType=2\nCDHash=c50126c3762c66d9fcdc3890d3393ede57f75958\nSignature size=8969\nAuthority=Developer ID Application: zhong luo (B3W25FX5H5)\nAuthority=Developer ID Certification Authority\nAuthority=Apple Root CA\nTimestamp=Oct 22, 2026 at 00:14:13\nInfo.plist entries=22\nTeamIdentifier=B3W25FX5H5\nRuntime Version=27.0.0\nSealed Resources version=2 rules=13 files=4\nInternal requirements count=1 size=180\nTotal signatures=1\nChosen signature=1\n",
+ "notarization": {
+ "message": "Processing complete",
+ "status": "Accepted",
+ "id": "dbe3476f-c9d3-419d-9041-5180a37568dd"
+ },
+ "signingVerified": true,
+ "stapleValidated": true,
+ "stagingPluginUnregistered": true,
+ "runningHosts": [],
+ "installedSignature": "Executable=/Library/Plug-Ins/FxPlug/beatygril.app/Contents/MacOS/beatygril\nIdentifier=com.dayu.beatygril\nFormat=app bundle with Mach-O universal (x86_64 arm64)\nCodeDirectory v=20500 size=478 flags=0x10000(runtime) hashes=4+7 location=embedded\nHash type=sha256 size=32\nCandidateCDHash sha256=c50126c3762c66d9fcdc3890d3393ede57f75958\nCandidateCDHashFull sha256=c50126c3762c66d9fcdc3890d3393ede57f75958be276e1a4a83e1c11ed239b3\nHash choices=sha256\nCMSDigest=c50126c3762c66d9fcdc3890d3393ede57f75958be276e1a4a83e1c11ed239b3\nCMSDigestType=2\nCDHash=c50126c3762c66d9fcdc3890d3393ede57f75958\nSignature size=8969\nAuthority=Developer ID Application: zhong luo (B3W25FX5H5)\nAuthority=Developer ID Certification Authority\nAuthority=Apple Root CA\nTimestamp=Oct 22, 2026 at 00:14:13\nNotarization Ticket=stapled\nInfo.plist entries=22\nTeamIdentifier=B3W25FX5H5\nRuntime Version=27.0.0\nSealed Resources version=2 rules=13 files=4\nInternal requirements count=1 size=180\nTotal signatures=1\nChosen signature=1\n",
+ "installedSignatureVerified": true,
+ "installedStapleValidated": true,
+ "gatekeeperAccepted": true,
+ "pluginDiscovery": {
+ "bundleIdentifier": "com.dayu.beatygril.fxplug",
+ "formalPath": "/Library/Plug-Ins/FxPlug/beatygril.app/Contents/PlugIns/beatygril XPC Service.pluginkit",
+ "output": " com.dayu.beatygril.fxplug(1.1)\t51B2D2BF-2C90-41AA-BC26-50CFC1F824A9\t2026-10-21 16:14:42 +0000\t/Library/Plug-Ins/FxPlug/beatygril.app/Contents/PlugIns/beatygril XPC Service.pluginkit\n (1 plug-in)\n"
+ },
+ "failure": {
+ "type": "KeyboardInterrupt",
+ "message": ""
+ },
+ "interimReason": "Geometry loads and reset changes slider; remote text editor remains focused and shows stale submitted text. Final dirty-aware refresh/abortEditing refinement pending build13."
+}
diff --git a/docs/验证记录.md b/docs/验证记录.md
index 28e548f..2e61dcf 100644
--- a/docs/验证记录.md
+++ b/docs/验证记录.md
@@ -116,4 +116,4 @@ Motion:独立普通视频项目,源PTS0、1920×1080/25fps/10秒,媒体通
替换短脸和下颌骨的旧脸框近似,恢复目标76点的11边下半脸区域与六组局部采样,沿用单次图像重采样和图像/四张蒙版共用坐标场。四项已恢复控制缺完整76点时安全直通,其余五项和全链组合仍有近似边界。分析报告、CPU证据和AIR摘要见analysis/短脸与下颌骨分析.md。
-1549项全部通过:49美化、116人脸、796瘦脸/下巴/短脸/下颌骨、335宿主适配ASan、98 OSC ASan、155检查器ASan。宿主独立物理行序用例扩展到短脸正负与下颌骨,28种控制/原点组合响应在预期下半脸,瞳孔区差异为0,坐标标签切换逐字节一致;独立upright参考最大差2/255,均差<0.005/255。额外真实正面/侧脸ASan专项886项通过,含重复基础用例,不相加。已核对生产源码与冻结摘要一致。合并版尚待正式构建和原生验收。
+1551项全部通过:49美化、116人脸、796瘦脸/下巴/短脸/下颌骨、335宿主适配ASan、98 OSC ASan、157检查器ASan。宿主独立物理行序用例扩展到短脸正负与下颌骨,28种控制/原点组合响应在预期下半脸,瞳孔区差异为0,坐标标签切换逐字节一致;独立upright参考最大差2/255,均差<0.005/255。额外真实正面/侧脸ASan专项886项通过,含重复基础用例,不相加。已核对生产源码与冻结摘要一致。合并版尚待正式构建和原生验收。
diff --git a/tests/inspector_tests.m b/tests/inspector_tests.m
index 3f7cc26..d402572 100644
--- a/tests/inspector_tests.m
+++ b/tests/inspector_tests.m
@@ -178,7 +178,17 @@ static void ViewInteractionTests(void) {
window.releasedWhenClosed=NO;window.contentView=view;
[number selectText:nil];
Check(number.currentEditor!=nil,@"offscreen AppKit window supplies a real field editor for Return handling");
- number.stringValue=@"0.25";Fire(number);
+ changed=[s.values mutableCopy];changed[@(PGChin)]=@.7;
+ api.values[@(PGInspectorPanel)]=[PGInspectorState stateWithValues:changed disabledParameters:s.disabledParameters hasEdits:YES];
+ [view hostParameterChanged];
+ Check(Near([view.controller.state valueForParameter:PGChin],.7) && Near(number.doubleValue,.7),@"a focused but unmodified editor cannot hide a host undo or reset");
+ number.stringValue=@"0.25";
+ [number.delegate controlTextDidChange:[NSNotification notificationWithName:NSControlTextDidChangeNotification object:number]];
+ changed[@(PGChin)]=@.8;
+ api.values[@(PGInspectorPanel)]=[PGInspectorState stateWithValues:changed disabledParameters:s.disabledParameters hasEdits:YES];
+ [view hostParameterChanged];
+ Check(Near(number.doubleValue,.25),@"host refresh preserves genuinely unsubmitted typing");
+ Fire(number);
Check(number.currentEditor==nil && Near([(PGInspectorState *)api.values[@(PGInspectorPanel)] valueForParameter:PGChin],.25),@"Return commits once and releases the actual AppKit editor before host commands");
[window close];
NSButton *preview=(NSButton *)FindControl(view,NSButton.class,@"人脸框预览");preview.state=NSControlStateValueOn;Fire(preview);s=api.values[@(PGInspectorPanel)];Check([s valueForParameter:PGTrackBoxes]==1,@"preview switch events change the automatic face box setting");