Radial Status: revert to the exact wrapper-size match, re-enable by default

This commit is contained in:
Ally Founder 2026-08-02 23:57:32 -04:00
parent 4ab8ed6880
commit e599fb2afc
4 changed files with 16 additions and 28 deletions

View file

@ -8,10 +8,10 @@ let unpatchAll: () => void = () => {};
export default {
onLoad: () => {
// Off by default - see the note in patches/ringPatch.ts. Confirmed on-device to corrupt
// member list rows and the profile status indicator, and to never match YouBar's own
// indicator at all - being re-diagnosed properly before this defaults back on.
storage.enabled ??= false;
// Re-enabled by default - see the note in patches/ringPatch.ts. The earlier corruption came
// from this repo's own broadened wrapper-size match, not upstream's original narrow one,
// which is confirmed working live on Revenge as-is.
storage.enabled ??= true;
storage.colors ??= {
online: "#23A55A",
idle: "#F0B232",

View file

@ -3,35 +3,25 @@ import { before } from "@vendetta/patcher";
import { storage } from "@vendetta/plugin";
/**
* Forked from AngelW0lf's Radial Status (BSD-3-Clause, see LICENSE). The upstream original matched
* one hardcoded wrapper size (exactly 32x32, borderRadius 16) - generalized here to any square,
* fully-circular wrapper (borderRadius === width / 2) instead, since avatar sizes differ across
* member lists, DM lists, and profile popouts, and the two structural checks right below (a `user`
* prop with a string id, a `status` prop) already confirm this is the right element regardless of
* its exact pixel size.
*
* Not independently re-verified against a live decompiled build the way the rest of this repo's
* fixes are - this is a straight-line adaptation of upstream's own (previously working, per its
* changelog) logic. Every assumption below is guarded, so a shape mismatch just means the ring
* doesn't draw for that avatar, not a crash.
* Forked from AngelW0lf's Radial Status (BSD-3-Clause, see LICENSE). This repo's own first attempt
* "generalized" upstream's exact wrapper-size check (32x32, borderRadius 16) to any square,
* fully-circular wrapper, on the theory that avatar sizes differ across contexts - that broadened
* match turned out to false-positive on unrelated Views (confirmed on-device: it visibly corrupted
* member list rows and the profile status indicator, and never matched YouBar's own indicator at
* all). The user was separately running upstream's own unmodified build live on Revenge with none
* of those problems, which means the narrow exact-size check was never the issue - reverted to it
* here instead of the broadened guess.
*/
export default function patchRing(): () => void {
if (!General?.View) return () => {};
return before("render", General.View, (args: any[]) => {
try {
// Off by default - the broadened circle match below turned out to false-positive on
// unrelated Views in the member list (confirmed by on-device testing: it visibly
// corrupted member list rows and the profile status indicator, and never matched
// YouBar's own indicator at all), so this no longer runs unless explicitly turned on
// while it's being properly re-diagnosed with live capture data.
if (!storage.enabled) return;
const [wrapper] = args;
if (!wrapper || !Array.isArray(wrapper.style)) return;
const circleIdx = wrapper.style.findIndex(
(s: any) => s && typeof s.width === "number" && s.width === s.height && s.borderRadius === s.width / 2
(s: any) => s && s.width === 32 && s.height === 32 && s.borderRadius === 16
);
if (circleIdx === -1) return;

View file

@ -36,14 +36,12 @@ export default function Settings() {
return (
<SettingsScaffold>
<NoteBox>
Off by default right now - the current matching logic was confirmed to corrupt member
list rows and the profile status indicator, and to miss YouBar's own indicator
entirely. Being properly re-diagnosed; only turn this on if you're helping test it.
Replaces the small presence dot on an avatar with a colored ring instead, per status
below. Leave a status blank to keep showing the normal dot for it.
</NoteBox>
<FormSection title="Enable">
<FormSwitchRow
label="Draw ring around avatars"
subLabel="Known broken right now - see the note above"
value={!!storage.enabled}
onValueChange={(v: boolean) => { storage.enabled = v; }}
/>

View file

@ -4,7 +4,7 @@
"status": "revived",
"accent": "#23A55A",
"tagline": "A colored ring around the avatar instead of a presence dot - similar to Platform Indicator, but for status.",
"note": "Fork of AngelW0lf's Radial Status (BSD-3-Clause, see LICENSE). Upstream had a phone-home mechanism - it fetched a remote blacklist on every load and could silently uninstall itself for specific user IDs the original author chose - dropped entirely here, no network requests at all. Upstream also matched one hardcoded wrapper size (32x32 only); generalized here to any fully-circular avatar wrapper, since avatar sizes differ across member lists, DM lists, and profile popouts. Upstream's settings screen had commented-out, non-functional size/thickness inputs and an unfinished joke placeholder button - both removed, with real working size and thickness controls in their place.",
"note": "Fork of AngelW0lf's Radial Status (BSD-3-Clause, see LICENSE). Upstream had a phone-home mechanism - it fetched a remote blacklist on every load and could silently uninstall itself for specific user IDs the original author chose - dropped entirely here, no network requests at all. An early revision of this fork also generalized upstream's exact wrapper-size match to any fully-circular avatar wrapper, on the theory that avatar sizes differ across contexts - that broadened match turned out to false-positive on unrelated elements (confirmed on-device: corrupted member list rows and the profile status indicator), while upstream's own narrow, exact-size check was confirmed working live on Revenge as-is. Reverted to that exact match. Upstream's settings screen had commented-out, non-functional size/thickness inputs and an unfinished joke placeholder button - both removed, with real working size and thickness controls in their place.",
"howItWorks": "Hides the small colored dot Discord shows on an avatar for online/idle/DND, and draws a colored ring around the whole avatar instead - similar in spirit to a platform indicator, but for presence status. Each status's color is configurable, along with the ring's size multiplier and thickness. A status left with no color configured just keeps showing the normal dot.",
"features": [
"Colored ring around the avatar instead of the small presence dot",