@@ -7,7 +7,7 @@ use serde_json::{Value, json};
77use tauri:: Runtime ;
88use url:: Url ;
99
10- use crate :: { RunTime :: ApplicationRunTime :: ApplicationRunTime , Track :: Effect :: MappedEffectType :: MappedEffect , dev_log} ;
10+ use crate :: { IPC :: SkyEmit :: LogSkyEmit , RunTime :: ApplicationRunTime :: ApplicationRunTime , Track :: Effect :: MappedEffectType :: MappedEffect , dev_log} ;
1111
1212pub fn CreateEffect < R : Runtime > (
1313 MethodName : & str ,
@@ -25,12 +25,18 @@ pub fn CreateEffect<R:Runtime>(
2525 | "webview.unregisterView"
2626 | "webview.registerCustomEditor"
2727 | "webview.unregisterCustomEditor" => {
28+ // Per-dispatch entry line - parity with TreeView.rs's
29+ // `tree-latency` log. Without this we cannot tell from
30+ // `Mountain.dev.log` whether Cocoon's
31+ // `MountainClient.sendRequest("webview.registerView", ...)`
32+ // even reached `DispatchSideCarRequest` - silent gRPC drops
33+ // look identical to "extension never called the shim".
34+ dev_log ! ( "ipc" , "[WebviewEffect] dispatch-enter method={}" , MethodName ) ;
2835 let Method = MethodName . to_string ( ) ;
2936 let effect =
3037 move |run_time : Arc < ApplicationRunTime > | -> Pin < Box < dyn Future < Output = Result < Value , String > > + Send > > {
3138 let Method = Method . clone ( ) ;
3239 Box :: pin ( async move {
33- use tauri:: Emitter ;
3440 let Handle = Parameters . get ( 0 ) . cloned ( ) . unwrap_or ( Value :: Null ) ;
3541 let Payload = json ! ( {
3642 "method" : Method ,
@@ -40,9 +46,18 @@ pub fn CreateEffect<R:Runtime>(
4046 let Suffix =
4147 Method . trim_start_matches ( "$webview:" ) . trim_start_matches ( "webview." ) ;
4248 let EventName = format ! ( "sky://webview/{}" , Suffix ) ;
43- if let Err ( Error ) =
44- run_time. Environment . ApplicationHandle . emit ( & EventName , & Payload )
45- {
49+ // `LogSkyEmit` wraps `.emit()` and tags every
50+ // success/failure under `[DEV:SKY-EMIT]`, so
51+ // the webview channel becomes visible in the
52+ // SkyEmit histogram alongside SCM and tree-view.
53+ // The bare `.emit()` was invisible, so a silent
54+ // listener-side drop in Sky was indistinguishable
55+ // from "Mountain never received the request".
56+ if let Err ( Error ) = LogSkyEmit (
57+ & run_time. Environment . ApplicationHandle ,
58+ & EventName ,
59+ & Payload ,
60+ ) {
4661 dev_log ! (
4762 "ipc" ,
4863 "warn: [WebviewEffect] emit {} failed: {}" ,
0 commit comments