From 094f18d7362643d60d5784820d8236a07d7ca121 Mon Sep 17 00:00:00 2001 From: everestmcarthur <280397636+everestmcarthur@users.noreply.github.com> Date: Sun, 2 Aug 2026 10:48:00 -0400 Subject: [PATCH] ServerDrawer: give GuildsBar-slot fiber capture its own globals --- plugins/server-drawer/src/patches/hideGuildsBar.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/server-drawer/src/patches/hideGuildsBar.tsx b/plugins/server-drawer/src/patches/hideGuildsBar.tsx index 07ede99..61b0cbe 100644 --- a/plugins/server-drawer/src/patches/hideGuildsBar.tsx +++ b/plugins/server-drawer/src/patches/hideGuildsBar.tsx @@ -53,8 +53,15 @@ function captureFiberRef(instance: any) { guard++; } - (window as any).__keyInspectorFiberRoot = root; - (window as any).__keyInspectorFiberSelf = fiber; + // Dedicated globals, not window.__keyInspectorFiberRoot/__keyInspectorFiberSelf: Key + // Inspector's own Settings screen has its own capture View using those same names, and its + // ref re-fires every time that screen mounts - including just scrolling to the Eval console + // to paste the next script. Sharing the names meant navigating back to Settings silently + // overwrote this capture with one rooted in Settings' own (likely separate-modal) tree, + // which is exactly the failure this capture point exists to avoid. Confirmed live: a text + // dump meant to read GuildsBar's slot came back with Key Inspector's own UI strings instead. + (window as any).__serverDrawerFiberRoot = root; + (window as any).__serverDrawerFiberSelf = fiber; } catch { // Best-effort diagnostic capture - a failure here shouldn't affect GuildsBar staying hidden. }