refactor: remove unused bridge wrappers
This commit is contained in:
@@ -229,3 +229,8 @@ UI / 浏览器可见项必须有真实浏览器截图或结构化 smoke 证据
|
||||
- 修改:`rust/spikes/leptos-tiptap-spike/src/editor_runtime/block_menu_document.rs`。
|
||||
- 已验证:`cargo fmt --manifest-path rust/Cargo.toml --all --check`、`cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml`、wasm release build、`wasm-bindgen`、`MNOTE_WEB_SMOKE_BASE_URL=http://127.0.0.1:3002 NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task479-local-folder-markdown-resource-lifecycle-smoke.js`、`MNOTE_WEB_SMOKE_BASE_URL=http://127.0.0.1:3002 NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task489-block-menu-delete-undo-smoke.js`、`MNOTE_WEB_SMOKE_BASE_URL=http://127.0.0.1:3002 NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task488-local-attachment-link-delete-undo-smoke.js`。
|
||||
- 验证说明:复用已有 3001 长跑服务时 `task479` 连续两次卡在 missing 标记等待点;改用本批临时启动的干净 3002 服务复跑后通过,判定为长跑服务状态问题,不作为本批回归。
|
||||
- 2026-05-25:Batch AB 未派发 Reasonix worker;继续清理 5-29 中无调用的壳层 bridge wrapper。
|
||||
- CodeGraph / `rg` 结论:`runtime_mount_options`、`dispatch_ready_event`、`dispatch_selection_event`、`bridge_ready_payload`、`STANDALONE_ROOT_ID` 均无调用方;`set_runtime_mount_options`、`dispatch_ready_event_to_target`、`dispatch_selection_event_to_target` 仍有调用方,保留不动。
|
||||
- Codex 主控完成死链清理:删除上述无调用 wrapper / 常量,不改变真实 bridge dispatch 和 mount context 路径。
|
||||
- 修改:`rust/spikes/leptos-tiptap-spike/src/lib.rs`。
|
||||
- 已验证:`cargo fmt --manifest-path rust/Cargo.toml --all --check`、`cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml`、wasm release build、`wasm-bindgen`、`MNOTE_WEB_SMOKE_BASE_URL=http://127.0.0.1:3002 NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task489-block-menu-delete-undo-smoke.js`、`MNOTE_WEB_SMOKE_BASE_URL=http://127.0.0.1:3002 NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task488-local-attachment-link-delete-undo-smoke.js`、`MNOTE_WEB_SMOKE_BASE_URL=http://127.0.0.1:3002 NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task479-local-folder-markdown-resource-lifecycle-smoke.js`。
|
||||
|
||||
+6
-6
@@ -1270,7 +1270,7 @@ function __wbg_get_imports() {
|
||||
},
|
||||
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
||||
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 973, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
||||
const ret = makeClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__had771ddc65647798);
|
||||
const ret = makeClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hdac387fb9e511e9c);
|
||||
return ret;
|
||||
},
|
||||
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
||||
@@ -1285,7 +1285,7 @@ function __wbg_get_imports() {
|
||||
},
|
||||
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
||||
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("KeyboardEvent")], shim_idx: 892, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
||||
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hd90af689bc3e71bf);
|
||||
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hc2416b32e405336e);
|
||||
return ret;
|
||||
},
|
||||
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
||||
@@ -1359,8 +1359,8 @@ function wasm_bindgen__convert__closures_____invoke__h396914cf76a9e7a5(arg0, arg
|
||||
wasm.wasm_bindgen__convert__closures_____invoke__h396914cf76a9e7a5(arg0, arg1, arg2);
|
||||
}
|
||||
|
||||
function wasm_bindgen__convert__closures_____invoke__had771ddc65647798(arg0, arg1, arg2) {
|
||||
wasm.wasm_bindgen__convert__closures_____invoke__had771ddc65647798(arg0, arg1, arg2);
|
||||
function wasm_bindgen__convert__closures_____invoke__hdac387fb9e511e9c(arg0, arg1, arg2) {
|
||||
wasm.wasm_bindgen__convert__closures_____invoke__hdac387fb9e511e9c(arg0, arg1, arg2);
|
||||
}
|
||||
|
||||
function wasm_bindgen__convert__closures_____invoke__h0abd2b2fe4652e2a(arg0, arg1, arg2) {
|
||||
@@ -1371,8 +1371,8 @@ function wasm_bindgen__convert__closures_____invoke__h396914cf76a9e7a5_4(arg0, a
|
||||
wasm.wasm_bindgen__convert__closures_____invoke__h396914cf76a9e7a5_4(arg0, arg1, arg2);
|
||||
}
|
||||
|
||||
function wasm_bindgen__convert__closures_____invoke__hd90af689bc3e71bf(arg0, arg1, arg2) {
|
||||
wasm.wasm_bindgen__convert__closures_____invoke__hd90af689bc3e71bf(arg0, arg1, arg2);
|
||||
function wasm_bindgen__convert__closures_____invoke__hc2416b32e405336e(arg0, arg1, arg2) {
|
||||
wasm.wasm_bindgen__convert__closures_____invoke__hc2416b32e405336e(arg0, arg1, arg2);
|
||||
}
|
||||
|
||||
function wasm_bindgen__convert__closures_____invoke__h3a3182d847094e12(arg0, arg1, arg2) {
|
||||
|
||||
BIN
Binary file not shown.
@@ -83,7 +83,6 @@ const MINDMAP_SHELL_PANEL_EVENT: &str = "mnote:mindmap-shell:panel";
|
||||
const MINDMAP_SHELL_MINIMAP_EVENT: &str = "mnote:mindmap-shell:minimap";
|
||||
const MINDMAP_SHELL_ZOOM_EVENT: &str = "mnote:mindmap-shell:zoom";
|
||||
const MINDMAP_SHELL_TOOLBAR_OVERFLOW_EVENT: &str = "mnote:mindmap-shell:toolbar-overflow";
|
||||
const STANDALONE_ROOT_ID: &str = "mnote-leptos-tiptap-standalone-root";
|
||||
mod editor_runtime;
|
||||
|
||||
#[wasm_bindgen(inline_js = r#"
|
||||
@@ -3507,10 +3506,6 @@ fn set_runtime_mount_options(options: Option<RuntimeMountOptions>) {
|
||||
});
|
||||
}
|
||||
|
||||
fn runtime_mount_options() -> Option<RuntimeMountOptions> {
|
||||
RUNTIME_MOUNT_OPTIONS.with(|cell| cell.borrow().clone())
|
||||
}
|
||||
|
||||
fn runtime_editor_instance_id(mount_id: Option<u32>) -> String {
|
||||
mount_id
|
||||
.filter(|value| *value > 0)
|
||||
@@ -3670,10 +3665,6 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
fn dispatch_ready_event(payload: &ReadyPayload) {
|
||||
dispatch_runtime_event(READY_EVENT, payload);
|
||||
}
|
||||
|
||||
fn dispatch_ready_event_to_target(target: &EventTarget, payload: &ReadyPayload) {
|
||||
dispatch_custom_event_to_target(target, READY_EVENT, payload);
|
||||
}
|
||||
@@ -3702,10 +3693,6 @@ fn dispatch_status_event_to_target(target: &EventTarget, payload: &HostStatusPay
|
||||
dispatch_custom_event_to_target(target, STATUS_EVENT, payload);
|
||||
}
|
||||
|
||||
fn dispatch_selection_event(payload: &SelectionPayload) {
|
||||
dispatch_runtime_event(SELECTION_EVENT, payload);
|
||||
}
|
||||
|
||||
fn dispatch_selection_event_to_target(target: &EventTarget, payload: &SelectionPayload) {
|
||||
dispatch_custom_event_to_target(target, SELECTION_EVENT, payload);
|
||||
}
|
||||
@@ -5696,30 +5683,6 @@ fn apply_host_document_payload(
|
||||
}
|
||||
}
|
||||
|
||||
fn bridge_ready_payload() -> ReadyPayload {
|
||||
ReadyPayload {
|
||||
runtime_name: RUNTIME_NAME,
|
||||
selectors: BridgeSelectorsPayload {
|
||||
root: "[data-testid=\"mnote-leptos-tiptap-host\"]",
|
||||
stage: "[data-testid=\"mnote-leptos-tiptap-editor-stage\"]",
|
||||
editor: "[data-testid=\"mnote-leptos-tiptap-editor-root\"]",
|
||||
toolbar: "[data-testid=\"mnote-leptos-tiptap-toolbar\"]",
|
||||
slash_menu: "[data-testid=\"mnote-leptos-tiptap-slash-menu\"]",
|
||||
handle: "[data-testid=\"mnote-leptos-tiptap-handle\"]",
|
||||
},
|
||||
supported_commands: vec![
|
||||
"replaceContent",
|
||||
"setPageOptions",
|
||||
"setEditable",
|
||||
"undo",
|
||||
"redo",
|
||||
"focus",
|
||||
"requestCurrentBlockId",
|
||||
],
|
||||
supports_embedded_mode: true,
|
||||
}
|
||||
}
|
||||
|
||||
fn apply_text_color(editor: TiptapEditorHandle, color: &str) -> Result<&'static str, String> {
|
||||
editor
|
||||
.set_color(TiptapColorAttributes {
|
||||
|
||||
Reference in New Issue
Block a user