From 37be0e24186f12e512b7bd1dbc4068a3431c164d Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Wed, 21 Oct 2026 20:20:08 +0800 Subject: [PATCH] =?UTF-8?q?chore(trace):=20=E5=9C=A8=20ReduxToModelGateway?= =?UTF-8?q?.dispatch=20=E6=89=93=E7=82=B9=E5=8A=A8=E4=BD=9C=20toString?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit yt.uar 是全包唯一的真实 dispatch 入口;动作类 toString 形如 SetFragsCount(fragsCount=3),据此反推动作名/字段名/字段值类型(action_trace.json)。打点只在镜像副本里,落地走 /__dump__/action_trace.json。 --- .../play/static/js/unpacked/module_10849.js | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/3dtank.com/play/static/js/unpacked/module_10849.js b/3dtank.com/play/static/js/unpacked/module_10849.js index add8e88..771ef15 100644 --- a/3dtank.com/play/static/js/unpacked/module_10849.js +++ b/3dtank.com/play/static/js/unpacked/module_10849.js @@ -563,6 +563,33 @@ null == i || (R(i, L) ? i : $()).c3(n); }), (p(yt).uar = function (t) { + // [Hornet 调试] 动作全量打点:这是唯一的 dispatch 入口(ReduxToModelGateway.dispatch)。 + // 动作类的 toString 形如 "SetFragsCount(fragsCount=3)",直接记原文就能反推 + // 「动作名 + 字段名 + 字段值」,再据此定字段类型(与 TankState 那次同一套路)。 + try { + if (typeof window !== "undefined") { + var T0 = (window.__HornetActionTrace__ = window.__HornetActionTrace__ || { + rows: [], timer: 0, + push: function (Row) { + if (this.rows.length >= 40000) return; + this.rows.push(Row); + if (!this.timer) { + var Me = this; + this.timer = setTimeout(function () { + Me.timer = 0; + try { + fetch("/__dump__/action_trace.json", { + method: "POST", + body: JSON.stringify({ at: new Date().toISOString(), count: Me.rows.length, trace: Me.rows }), + }); + } catch (E2) {} + }, 1500); + } + }, + }); + T0.push({ s: String(t) }); + } + } catch (E4) {} var n, i; this.xar_1( new I(