统一 Rust 与 TypeScript 格式化门禁

纳入 AGC Cargo workspace 的统一 rustfmt 检查与格式化入口

完成项目 TypeScript/Prettier 与 Rust 全量格式化

修复 Pingora expected executable 门禁的空白敏感误报

同步开发运维文档与 AGC skill pack 格式化忽略规则
This commit is contained in:
2026-09-01 16:26:20 +08:00
parent ae79d50b14
commit 071faa482c
1051 changed files with 28412 additions and 19834 deletions
+20 -15
View File
@@ -55,10 +55,7 @@ import {
import { QrScannerOverlay } from './QrScannerOverlay';
import { MOBILE_SHELL_HOST_VERSION } from './runtime';
import { MOBILE_SHELL_SAFE_AREA_EDGES } from './safeArea';
import {
buildMobileShellUrl,
resolveMobileShellBaseWebUrl,
} from './url';
import { buildMobileShellUrl, resolveMobileShellBaseWebUrl } from './url';
import { parseMobileWebViewHistoryStateMessage } from './webViewHistory';
import {
MOBILE_WEBVIEW_BEFORE_CONTENT_SCRIPT,
@@ -75,7 +72,10 @@ function buildHostBridgeMessageScript(message: unknown) {
)}, origin: window.location.origin, source: window })); true;`;
}
function logMobileHostEventFailure(label: HostBridgeEventName, _error: unknown) {
function logMobileHostEventFailure(
label: HostBridgeEventName,
_error: unknown,
) {
console.warn(`mobile host event failed for ${label}`);
}
@@ -138,7 +138,7 @@ export default function ShellApp() {
);
const urlOptions = useMemo(
() => ({
platform: Platform.OS === 'ios' ? 'ios' as const : 'android' as const,
platform: Platform.OS === 'ios' ? ('ios' as const) : ('android' as const),
hostVersion: MOBILE_SHELL_HOST_VERSION,
capabilities: resolveMobileHostCapabilities(),
}),
@@ -147,8 +147,9 @@ export default function ShellApp() {
const [webUrl, setWebUrl] = useState(() =>
buildMobileShellUrl(baseWebUrl, urlOptions, baseWebUrlOptions),
);
const [loadFailure, setLoadFailure] =
useState<MobileShellLoadFailure | null>(null);
const [loadFailure, setLoadFailure] = useState<MobileShellLoadFailure | null>(
null,
);
const allowedWebOrigin = useMemo(() => new URL(webUrl).origin, [webUrl]);
const reloadCurrentWebView = useCallback(() => {
webViewRef.current?.reload();
@@ -167,10 +168,7 @@ export default function ShellApp() {
};
}, []);
const injectHostBridgeMessage = useCallback(
(
message: unknown,
onError: (error: unknown) => void,
) => {
(message: unknown, onError: (error: unknown) => void) => {
if (!isShellMountedRef.current) {
return;
}
@@ -201,7 +199,10 @@ export default function ShellApp() {
);
const injectLifecycleEvent = useCallback(
(state: AppStateStatus) => {
injectHostBridgeEvent('app.lifecycle', lifecyclePayloadFromAppState(state));
injectHostBridgeEvent(
'app.lifecycle',
lifecyclePayloadFromAppState(state),
);
},
[injectHostBridgeEvent],
);
@@ -456,7 +457,9 @@ export default function ShellApp() {
webViewProcessFailureRef.current = nextFailureWindow;
console.warn(`mobile WebView process failed for ${label}`);
if (nextFailureWindow.count <= MOBILE_WEBVIEW_PROCESS_FAILURE_RELOAD_LIMIT) {
if (
nextFailureWindow.count <= MOBILE_WEBVIEW_PROCESS_FAILURE_RELOAD_LIMIT
) {
reloadCurrentWebView();
return;
}
@@ -500,7 +503,9 @@ export default function ShellApp() {
thirdPartyCookiesEnabled={false}
sharedCookiesEnabled={false}
webviewDebuggingEnabled={false}
injectedJavaScriptBeforeContentLoaded={MOBILE_WEBVIEW_BEFORE_CONTENT_SCRIPT}
injectedJavaScriptBeforeContentLoaded={
MOBILE_WEBVIEW_BEFORE_CONTENT_SCRIPT
}
onFileDownload={handleBlockedFileDownload}
onMessage={handleMessage}
onContentProcessDidTerminate={() => {