@@ -99,30 +99,34 @@ func (h *httpHandlers) handleRender(w http.ResponseWriter, r *http.Request) {
9999 startTime := time .Now ()
100100 update , err := h .processFrontendUpdate (& feUpdate )
101101 duration := time .Since (startTime )
102-
102+
103103 if err != nil {
104104 http .Error (w , fmt .Sprintf ("render error: %v" , err ), http .StatusInternalServerError )
105105 return
106106 }
107107 if update == nil {
108108 w .WriteHeader (http .StatusOK )
109- log .Printf ("render %4dms %4dk %s" , duration .Milliseconds (), 0 , feUpdate .Reason )
109+ log .Printf ("render %4s % 4dms %4dk %s" , "none " , duration .Milliseconds (), 0 , feUpdate .Reason )
110110 return
111111 }
112112
113113 w .Header ().Set ("Content-Type" , "application/json" )
114-
114+
115115 // Encode to bytes first to calculate size
116116 responseBytes , err := json .Marshal (update )
117117 if err != nil {
118118 log .Printf ("failed to encode response: %v" , err )
119119 http .Error (w , "failed to encode response" , http .StatusInternalServerError )
120120 return
121121 }
122-
122+
123123 updateSizeKB := len (responseBytes ) / 1024
124- log .Printf ("render %4dms %4dk %s" , duration .Milliseconds (), updateSizeKB , feUpdate .Reason )
125-
124+ renderType := "inc"
125+ if update .FullUpdate {
126+ renderType = "full"
127+ }
128+ log .Printf ("render %4s %4dms %4dk %s" , renderType , duration .Milliseconds (), updateSizeKB , feUpdate .Reason )
129+
126130 if _ , err := w .Write (responseBytes ); err != nil {
127131 log .Printf ("failed to write response: %v" , err )
128132 }
@@ -248,7 +252,7 @@ func (h *httpHandlers) handleConfigPost(w http.ResponseWriter, r *http.Request)
248252 }
249253
250254 w .Header ().Set ("Content-Type" , "application/json" )
251-
255+
252256 var response map [string ]any
253257 if len (failedKeys ) > 0 {
254258 response = map [string ]any {
@@ -259,9 +263,9 @@ func (h *httpHandlers) handleConfigPost(w http.ResponseWriter, r *http.Request)
259263 "success" : true ,
260264 }
261265 }
262-
266+
263267 w .WriteHeader (http .StatusOK )
264-
268+
265269 json .NewEncoder (w ).Encode (response )
266270}
267271
0 commit comments