#๐Ÿ‘พ-core-development

1 messages ยท Page 139 of 1

junior olive
#

ill add that back

limber skiff
#

but you don't really need to take all my advices

junior olive
#
(?<==)\i=>{let{children.{20,100}decorationGridItem
limber skiff
#

I have a lot of bias in the way I write patches lmao

#

kinda like my own way

olive aurora
#

nookies is a regex automata irl

#

this is nookies

junior olive
#

@limber skiff the decorgridchurned is over 550 chars later

#

so erm

austere talon
#

nookies hates automata based regex

junior olive
#

ok decor now uses the new find, grouped patches, and has improved patches now

austere talon
#

we love backtracking

junior olive
#

i can probably do some destructuring that you implemented

#

lemme take a look

#

this totally could couldn't it

#

actually no it can't bc of the tostring thing

#

but i should move that to use the byCode filter

olive aurora
#

can we redos nookies

austere talon
junior olive
#

i did it

#

maybe

#

gonna test

#

oh LMAO IM A IDIOT

charred monolithBOT
#

Discord Account

troopical

What happens when the bug or crash occurs?

The bug completely looping crashes discord and vencord (both dev and normal build) on desktop versions (web version works fine).
The bug is caused by developer tools in advanced (not sure if this is a dev vencord only bug but once the bug happens, it's applied to discord unpatched, patched, etc.)
![Screenshot 2023-11-22 180801](https://github.com/Vendicated/Vencord/assets/91509070/8b6f5b3b-c4a4-4f35-99de-896ab05...

junior olive
#

@austere talon you love

const persistFilter = filters.byCode("zustand");
export const { persist }: typeof import("zustand/middleware") = findLazy(m => m.persist && persistFilter(m.persist));
#

is the destructuring nested

#

i assume i cant destructure this mf

austere talon
#

you can only destructure default yes

#

we only do it one level for sanity

junior olive
#

yea

#

no point switching it at all then tbh

#

HOWEVER

#

i can update that find i think

austere talon
#

yes you can just use findByCode

junior olive
#

no i can't

austere talon
#

you can

junior olive
#

unless it changed

austere talon
#

findComponentByCode I mean

junior olive
#

yea

#

im using that

#

well abt to try

livid heath
#

there's this annoying ass bug where my states just reset upon switching channels
i've tried getting the previous value and what not it just doesn't work

junior olive
#

hello typings my old friend

#

this is fine right

#

wait could i destructure the type.. no right

#

i don't think i can

austere talon
#

can

junior olive
#

fear

#

ill try

#

cant

#

or can and something else broke

#

yeah no i can't

austere talon
#

oh yeah you can't

#

cause it uses LazyComponent not proxyLazy

junior olive
#

i love how the fucking avatar decoration plugin is pushing the boundaries of the current vencord apis

austere talon
#

they're pretty different in how they function

junior olive
#

i think findComponentByCodeLazy doesn't work in this case

#

i need to use this w/o using lazycomponent

#

easy enough

#

it was not easy enough

#

NoopComponent fucks it up

#

i should just leave this as the proxylazy tbh

#

findLazy*

#

ah ok so this fucks up this whole file

#

im just gonna leave this one untouched

charred monolithBOT
livid heath
#

@lime stone do i put the reply ping before everyone or after

lime stone
#

ux advice

#

shouldn't it be right-aligned?

charred monolithBOT
livid heath
lime stone
#

wait, this is editing?

livid heath
#

yes

livid heath
#

eh this looks good enough to me

lime stone
#

you can't really change pings after an edit though, so what's the point

lime maple
#

Hi, so I am currently using BetterDiscord, but considering swapping to Vencord since it supports TypeScript and their TOS isn't wack. ๐Ÿ˜‚
Is there any API documentation? I went looking, but didn't find any.

livid heath
#

@lime stone :)

lime stone
#

why doesn't the ping toggle appear without a <@!>

#

also you can't really

#

it won't do anything

livid heath
lime stone
#

it won't actually notify the user when you edit with a ping

#

so i can't see a use-case

livid heath
#

it wont notify them, but the highlight is toggled

#

an option is better than no option imo

lime stone
#

it's bloat!

#

:(

#

my opinion is it's a feature which will mainly confuse users.

verbal pumice
livid heath
# lime stone it's bloat!

sounds like a valid reason
although in that case i prefer making another option to enable this feature

pine topaz
#

are we waiting on anything for my svg

charred monolithBOT
#

I try to screenshare on Hyprland, but everytime I do it gets on a infinite loading and I get this error on the terminal

`[68597:1122/113233.029446:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[68557:1122/113244.469201:ERROR:egl_dmabuf.cc(608)] Failed to record frame: Error creating EGLImage - EGL_BAD_MATCH
[68557:1122/113244.469235:ERROR:shared_screencast_stream.cc(940)] Dropping DMA-BUF modifier: 144115206334822913 and trying to reneg...

long stream
#

solution: don't use hyprland

#

shrimple as that

charred monolithBOT
limber skiff
austere talon
#

stop asking so much

limber skiff
#

@austere talon I was thinking of doing something to make webpack common components Noop for default to avoid react crashes, what do you think?

austere talon
#

meh

#

people should just use errorboundaries instead

limber skiff
#

kinda like I default to it here

austere talon
#

errorboundaries solve it too

limber skiff
#

o

#

I see

charred monolithBOT
dapper crest
#

is this

import lightStyleFixes from "./lightModeFixes.css?managed";
...
    start() {
        enableStyle(lightStyleFixes);
        ...
    },

    stop() {
        disableStyle(lightStyleFixes);
        ...
    }

what Ven meant by "make your css managed"

austere talon
#

yes

#

css you import is always active even if your plugin isn't enabled

#

if you make changes that affect discord itself you need to make it managed

#

just like that

dapper crest
#

thanks

dapper crest
#

LightClientTheme is ready for review again

#

honestly I really like light theme like this

oak hull
#

lightreader

dapper crest
charred monolithBOT
limber skiff
#

move the buttom to here

dapper crest
#

will do

#
...
    Edit QuickCSS
</Button>

{Vencord.PlainSettings.plugins.ClientTheme.enabled && (
    <Button
        onClick={() => openModalLazy(async () => modalProps => {
            return <PluginModal {...modalProps} plugin={Vencord.Plugins.plugins.ClientTheme} onRestartNeeded={() => { }} />;
        })}
        size={Button.Sizes.SMALL}
    >
        Edit ClientTheme
    </Button>
)}

is there anything absolutely wrong about the way I implemented this?

limber skiff
#

you can use Vencord.Settings instead of PlainSettings

dapper crest
limber skiff
#

also check the props for button component, I think you can make Reset Theme Color be red

pine topaz
#

\

junior olive
olive aurora
#

hexToLightness
contrast is a diff function since hsl isnt normalised: ```ts
function relLuminance(colour: number) {
const [r, g, b] = unpackRgb(colour)
.map((x) => x <= 0.03928 ? x / 12.92 : ((x + 0.055) / 1.055) ** 2.4);
return r * 0.2126 + g * 0.7152 + b * 0.0722;
};

junior olive
limber skiff
#

cuz ven prefers to use ErrorBoundary instead

olive aurora
junior olive
#

The code i'm running these finds through does not like proxies so

#

i'll give it another try i guess

#

it works

#

but it's kinda like if it ain't broke don't fix it?

limber skiff
#

why wouldnt the second work though

dapper crest
# junior olive you should make the red text stand out more somehow

@limber skiff what are your thoughts on just making the error section use the default discord background color to ensure it always has good contrast?
The problem with the current system is that having a variable background color screws with our ability to pick something that contrasts well

junior olive
#

i added destructuring this at the same time and confused the two

limber skiff
junior olive
#

but still i'm not sure if there's a point to switching to this new find in this case

limber skiff
#

there is

#

cuz it wraps with LazyComponent

austere talon
#

not really other than it being more compact

austere talon
#

doesn't even use

junior olive
#

yeah

limber skiff
#

oh lmao that's right

dapper crest
limber skiff
#

wait no

#

what are we talking about

#

the destructuring or findComponent...

junior olive
#

findcomponent

#

there isnt really any huge reason to use it in this case

limber skiff
#

arent you using the stickerpickerpreview component?

junior olive
#

not as a component

limber skiff
limber skiff
#

I see

junior olive
limber skiff
#

okay it doesnt matter then

dapper crest
junior olive
#

yea i like the default background bit

#

it works

limber skiff
#

so white in that case

#

maybe that will look better

#

I'm thinking of how to adding the color picker here

olive aurora
#

//@ts-explode

limber skiff
#

maybe a section like the "Color" one under the theme picker?

junior olive
#

yop do

#

leave it in setttings too tho

limber skiff
#

maybe we can even add it to Preview themes?

junior olive
#

users are stupid

limber skiff
#

๐Ÿค”

small flare
#

the eol eslint setting seems to be fucked in the vesktop source?

#

i would attach an image but its literally just an error at the end of every line

junior olive
#

looks fine

olive aurora
#

i said that func does it better

dapper crest
#

what

olive aurora
#

but still

#

thats what wcag contrast is

dapper crest
#

if you want to find good values for all the warnings using that function then go ahead and review it in

#

current system of looking at luminance works fine enough and I don't understand relLuminance well enough to get it implemented proper myself

inland fable
#

maybe (i dont know anything abt design

junior olive
#

99 commits
fear.

dapper crest
inland fable
#

ahk

#

looks good

olive aurora
#

also maybe good to let contrastWarning = false bc typescript is crying

inland fable
#

how do you make diff files

olive aurora
#

git diff

austere talon
#

issue on your end

austere talon
limber skiff
#

I can prob style the picker to be round lol

dapper crest
#

@olive aurora
Here is that diff with better values for warnings
You can add this to my pr, I wouldn't want to take credit

small flare
austere talon
#

issue on your end

#

your git or vscode changed it

small flare
#

mm

#

probably git

olive aurora
#

id have to open a PR

#

if you really want you can commit it with Co-authored-by: rini <rini@rinici.de> at the last line

wary void
charred monolithBOT
lunar gull
#

Quick Question, will Vencord Support @var like BetterDiscord is planning on implementing?

pine topaz
#

probably

#

vencord supports pretty much everything else BD does theme-wise, wouldnt make sense to suddenly not

lunar gull
#

Ok cool, thanks

charred monolithBOT
wary void
charred monolithBOT
#

Last commit was pretty big, as it added another generator

I switched to generating light mode fixing css because:

  1. Overriding white-500 screwed with font color rendering
  2. Manually writing overwrites for every single usage of white-500 for a background is not fun. (the generator makes 80 lines of css)
  3. Manually written overrides will break, and a major part of the plugin is to generate css so it doesn't break when discord changes/adds/removes stuff.

Also in this commit, lots of ...

dapper crest
#

What would be better words for "Swap Theme" here that would better imply the switch from light to dark/vise versa

crude raptor
#

depending on current theme, change the wording

#

if you're in light theme: "Change To Dark Theme"
if you're in dark theme: "Change To Light Theme"

#

also how does it handle the nitro themes

dapper crest
#

Nitro themes are just skins on top of dark/light mode

crude raptor
#

yeah i just checked i guess they're called "colours"

dapper crest
#

I will add an error when there is an active nitro theme

limber skiff
#

meh don't

charred monolithBOT
dapper crest
limber skiff
#

you said it yourself there are people that use kt without gradients

wary void
turbid hatch
#

yes, it's an answer to why we can't do it

#

COM is a fucking pain in the ass

wary void
#

the entire world is aware

turbid hatch
#

we'd have to write a bunch of VC++ or what have you

wary void
#

COM is the worst thing ever created

turbid hatch
#

and the alternative is to run powershell

wary void
#

.NET has simple apis for WMI where they deal with COM shit and you just write an sql query

turbid hatch
#

you can't use .NET to write a native module

#

the best you can do is VC++

dapper crest
turbid hatch
#

@topaz thistle have you worked with COM on windows before

charred monolithBOT
dapper crest
#

this whole time I have been trying to find a store that would give me the info I need but I don't know how and have been guessing ever since I saw fakenitro didn't have my answer

turbid hatch
#

actually you could probably do it in plain C++ compiled with MSVC

#

but it's still nightmarish

wary void
turbid hatch
#

bad

wary void
#

but better

turbid hatch
#

then we have to run a background process

dapper crest
turbid hatch
#

we might as well just make it a native

dapper crest
limber skiff
#

oh

#

I will have to check when I'm home

#

but I'm almost sure there is a proper place to know it without accessing the proto

#

maybe something with Gradient

dapper crest
#
const nitroThemeEnabled = findStore("UserSettingsProtoStore").settings.appearance.clientThemeSettings.backgroundGradientPresetId !== undefined

so not this

limber skiff
#

search for appearance.clientThemeSettings on the devtools

#

see where it's used

#

to maybe find the store for it

dapper crest
#

which part of the devtools?

limber skiff
#

ctrl shift F

#

to search in all source files

dapper crest
#

oh neat

limber skiff
#

only those?

dapper crest
#

yup

limber skiff
#

maybe search for backgroundGradientPresetId instead

#

that's gonna get you a lot of results though

dapper crest
#

yea

#

I'll figure it out from here probably, thanks

limber skiff
#

I'll help you when I get home if you still need

#

I will just reverse engineer the selector for gradient themes to see what it uses

frail skyBOT
#
Bad Patches

IgnoreActivities (had no effect):
ID: 52028
Match: /LISTENING.+?}\),(?<=(\i)\.push.+?)/

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?=!1===\i.\i\.hasRelevantUnread\(this\.record\))/

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/

ShowHiddenChannels (had no effect):
ID: 493334
Match: /(?<=getChannel\(\i\);return null!=(\i))(?=.{0,150}?hasRelevantUnread\(\i\))/

ShowHiddenChannels (had no effect):
ID: 120817
Match: /(?=&&\i\.\i\.hasRelevantUnread\((\i\.record)\))/

ShowHiddenChannels (had no effect):
ID: 268760
Match: /(?<=if\(null==(\i))(?=.{0,160}?hasRelevantUnread\(\i\))/g

ShowHiddenChannels (had no effect):
ID: 283848
Match: /(?=&&\i\.\i\.hasRelevantUnread\((\i)\))/

PinDMs (had no effect):
ID: 631316
Match: /===\i\.DMS&&0/

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Experiments (found no module):
ID: -
Match: ("showNewSearch")

ShowHiddenChannels (found no module):
ID: -
Match: .UNREAD_HIGHLIGHT

ShowHiddenChannels (found no module):
ID: -
Match: .UNREAD_HIGHLIGHT

TypingIndicator (found no module):
ID: -
Match: .UNREAD_HIGHLIGHT

Bad Starts

None

Discord Errors

None

#
Bad Patches

IgnoreActivities (had no effect):
ID: 52028
Match: /LISTENING.+?}\),(?<=(\i)\.push.+?)/

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?=!1===\i.\i\.hasRelevantUnread\(this\.record\))/

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/

ShowHiddenChannels (had no effect):
ID: 493334
Match: /(?<=getChannel\(\i\);return null!=(\i))(?=.{0,150}?hasRelevantUnread\(\i\))/

ShowHiddenChannels (had no effect):
ID: 120817
Match: /(?=&&\i\.\i\.hasRelevantUnread\((\i\.record)\))/

ShowHiddenChannels (had no effect):
ID: 268760
Match: /(?<=if\(null==(\i))(?=.{0,160}?hasRelevantUnread\(\i\))/g

ShowHiddenChannels (had no effect):
ID: 283848
Match: /(?=&&\i\.\i\.hasRelevantUnread\((\i)\))/

PinDMs (had no effect):
ID: 631316
Match: /===\i\.DMS&&0/

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Experiments (found no module):
ID: -
Match: ("showNewSearch")

ShowHiddenChannels (found no module):
ID: -
Match: .UNREAD_HIGHLIGHT

ShowHiddenChannels (found no module):
ID: -
Match: .UNREAD_HIGHLIGHT

TypingIndicator (found no module):
ID: -
Match: .UNREAD_HIGHLIGHT

Bad Starts

None

Discord Errors

None

dapper crest
#

Minified react is hell

dire thicket
#

imagine hideattachments but for things that aren't attachments

#

some moments i could really do with that

inland fable
#

elaborate

dire thicket
#

like

#

it hides the content of the message just like how hideattachments does it

#

but for the text content

inland fable
#

hm

#

whole message or only content

dire thicket
#

probs easily possible by slightly modifying hideattachments

dire thicket
#

there are some messages i just don't want to see

#

and this envisioned plugin could solve that

austere talon
#

uhh

#

i noticed an issue with your new find

dapper crest
#

who's new find?

austere talon
#

also this error sucks @limber skiff

austere talon
dapper crest
#

I don't grammar with apostrophes well

austere talon
#

why

#

you just have to think for a second

#

who's = who is

#

who is new find

dapper crest
#

not intuitive to me

austere talon
#

you mean whose

#

it's incredibly intuitive

austere talon
#

for some reason that find fails the first time you open a profile, but works the second time

#

seems like a race condition with lazy loaded code

dapper crest
#

I was thinking of it as
ven's = property/owned by ven
who's new find = who owns that find

charred monolithBOT
limber skiff
limber skiff
austere talon
#

im changing it again rn

#

xd

limber skiff
#

lol

#

I wish we could do something like null | undefined | any for find returns

#

that way people are forced to ?. or something when using them

austere talon
#

horror

limber skiff
#

wdym

#

it would be good

austere talon
#

i made consoleshortcuts put all webpack commons on the window

limber skiff
#

to avoid errors like "trying to access property banana of undefined"

limber skiff
#

pog

inland fable
#

vendetta has a plugin for that too i think

#

didn't notice vencord does too

charred monolithBOT
limber skiff
#

@austere talon what is there to remove from webpack? like the outdated stuff

#

mapMangled...?

austere talon
#

kinda still needed i think

#

well actually

#

let me see

#

i think no xd

#

rewriting everything that uses it rn

#

lol this is broken and noone noticed

#

noone uses that

#

i just removed it

limber skiff
#

lmao

austere talon
#

that module doesnt even have openUntrustedLink anymore

#

wait

#

the permission viewer context menu doesnt show

#

oh its in a diff place

#

ok seems to all be working

#

i killed mapMangledModule

limber skiff
#

๐Ÿ˜ญ it deserved more

austere talon
#

next we should remove nested webpack search

charred monolithBOT
grave mangoBOT
austere talon
#

guhh have to update this now (cause it's now ContextMenuApi.closeContextMenu)

limber skiff
#

๐Ÿ˜›

austere talon
#

its just slightly bad UX

#

but doesnt cause any actual issues

#

okay lets just see how bad it breaks if i just remove nested search

#

wait it all just works

#

yeah all works

#

but im scared theres smth i dont catch rn but causes issues later xd

#

way faster than before

spark pivot
#

I wonder if thatโ€™s the actual accuracy or floating point precision errors

#

Probably the latter

#

Cause javascript

austere talon
#

?

spark pivot
#

Notice how thereโ€™s like 10 digits of decimals

charred monolithBOT
austere talon
#

i just removed it with no changes

#

and everything seems to work

#

but please test for me as well

#

i turned on all plugins

#

and it all seems to work

#

omg this is horror

#

WHY IS EVERYONE IDLE

#

STOP BEING IDLE

#

@limber skiff you will finish your reporter change that tests webpack finds

#

WE NEED IT RN

limber skiff
#

I'M LEARNING HOW WEBPACK PATCHIING WORKS

#

LITERALLY ON DEBUGGER RN

austere talon
#

horror what are u doing

limber skiff
#

I wanna understand it

austere talon
#

its pretty simple

limber skiff
austere talon
#

i can explain it to you if you want

limber skiff
#

sure

austere talon
#

actually what exactly are you trying to understand

limber skiff
#

actually no need to

#

I'm almost finished reading the file

#

I'll tell if you if I have questions

#

love this though

austere talon
#

should test if that still is needed

#

legit when i wrote the code it kept crashing with cryptic errors and that try catch fixed it

#

HOW DOES THAT CODE FAIL

charred monolithBOT
austere talon
#

doesnt happen anymore

limber skiff
#

I noticed something

austere talon
#

we can probably remove it

austere talon
limber skiff
#

no module is arrow function anymore

#

lol

austere talon
#

we can probably remove the if statement cause it works even for arrows

limber skiff
#

neat

austere talon
#

yweah works

inland fable
#

what's the 0, for

limber skiff
#

is this what makes the patched code searcheable on the sources

austere talon
#

no but it gives them a good name

#

these names

#

otherwise they would be called VM23604 lol

inland fable
#

hi vee question

limber skiff
austere talon
#

actually yeah it doesnt seem to search unnamed files

limber skiff
#

how does this not make it appear on the search though

inland fable
#

i could find this out from the source code so sorry for asking; those modules you provide in the vencord api do you find them or do you like retrieve them the moment they're added to the webpack chunk

limber skiff
#

that makes sense

limber skiff
austere talon
limber skiff
#

but most ones specific to plugins are searched on first use

limber skiff
austere talon
#

did you test dev

limber skiff
#

nop

#

I'm still in debugger lol

#

wait why are we doing this in the patcher

#

we should do it when we change all replacements to array

austere talon
#

eh

#

why

#

thats more work

#

doing it there makes it so that its only done on demand

#

not for all of them

limber skiff
#

true

#

but it does happen more than once for "all" patches

austere talon
#

true

#

anyway

#

should we just merge into main now

limber skiff
#

wait werent we meant to remove this lmao

austere talon
#

i removed it latest commit

charred monolithBOT
austere talon
#

oh i didnt poush

limber skiff
#

oh

austere talon
#

how far from done is ur webpack find tester

limber skiff
#

๐Ÿ’€ I didnt start lmao

austere talon
#

horror

limber skiff
austere talon
#

i wanna test all finds first

#

to make sure none broke

#

i tested surface level and its all oki

#

but just to make sure

#

god this is such a large refactor

#

im worried many things will break somehow xd

limber skiff
#

are we sure no mod exports an object we need to search the props outside of .default?

#

cuz wouldnt that make byProps filter not work for them

austere talon
#

wdym

#

there shouldnt be any such case

#

cause you'd just findByProps that export name

limber skiff
#

right

austere talon
#

we already had to fix all filters that were now changed to named exports during rspack update (so basically all filters that relied on nested search)

#

cause the length check made all of them fail

#

anyway we should just finish the find tester

#

it should not be hard tbh

#

just monkey patch all webpack find methods to push into some array

#

then once all chunks are loaded force run all of them

limber skiff
#

oh I thought those were exported in a nested object

#

it's directly

austere talon
#

yeah

#

either directly or default

limber skiff
#

I was worried about them

#

makes sense

limber skiff
#

cuz like a lot of stuff is broken in main it needs an update soon

austere talon
#

yeahh

#

ill try rn

limber skiff
#

wtf

if exports is t.exports, why do we have to set exports to module.exports, it's literally it already?

#

damn nice zoom discord

#

there are 3 images btw

limber skiff
#

okay I understand how it works (webpack patching, not the curse above)

junior olive
#

webpack patching is a thing of all time

limber skiff
#

why do we do this?

#

nvm I got it

charred monolithBOT
limber skiff
#

lmao we are logging traces for non successfull finds

austere talon
#

yes

limber skiff
#

is that intentional

#

I was so confused how those finds were running before patching webpack

#

it's because waitFor executes them

austere talon
#

trace is unaware of how the function added

#

anyway

#

dont change webpack rn

#

im changing it

limber skiff
#

kk

austere talon
#

gonna do this

#

basically if IS_DEV, it will keep an array of all webpack proxies

limber skiff
#

o

austere talon
#

then we can just access an prop on all of them from tester to force run them

#

then check if there are errors

limber skiff
#

WHY IS THIS A THING

austere talon
#

hmmm but how to do it for components

limber skiff
#

javascript is insane

austere talon
austere talon
limber skiff
#

this is why find doesnt error when waitFor first runs it

#

cache is undefined

austere talon
limber skiff
#

so you can just run them

austere talon
#

hmm true

limber skiff
#

no need to access property or anything

#

and works for components

tame escarp
#

@austere talon i run the dev branch and just updated to your DISGUSTING webpack refactor and it.blew up my computer. i will be contacting your lawyers "vendicated" (if tnat is even your real name)

limber skiff
austere talon
#

uhh

#

will esbuild remove calls to a noop function

olive aurora
#

no

#

unless you mark it pure

limber skiff
#

rini is watching

tame escarp
#

rini is always watching day and night

olive aurora
#

the only case it inlines funcs is x => x (and sometimes just doesnt because fuck you)

austere talon
#

so bad

olive aurora
#

hop on terser when

austere talon
#

so ig just copy paste the same line of code into each func

olive aurora
#

oh

#

it only works with function x()

#

declarations

#

esbuild so dumb

#

@austere talon

austere talon
#

@limber skiff

limber skiff
#

๐Ÿ˜ฎ

#

love how many findByProps are used

austere talon
#

its kinda meh that we don't have a way to know where the find came from

#

unless we use stacktrace?

olive aurora
#

vencord logs your search history..

austere talon
#

IS_REPORTER

olive aurora
#

babel macros when

austere talon
limber skiff
#

I mean that's good

#

if it's easy to do

olive aurora
#

you will Error().stack

austere talon
#

but also its not that important to know where it comes from

#

can just search

limber skiff
#

yeah

olive aurora
#

Error().stack.split("\n")[2].match(/\(.+:(\d+):(\d+)\)/)

#

then use sourcemap

limber skiff
#

wait I just remembered where the heck is my money github sponsors

livid heath
#

stolen

limber skiff
#

bro why does the quality of my screenshots suck

#

what is discord doing to them

livid heath
#

@mortal fractal said something about the client jpegging them

limber skiff
#

they are killing the images quality

livid heath
charred monolithBOT
austere talon
#

i didnt test

#

running workflow now

limber skiff
#

we should test non lazy finds too

austere talon
#

well yeah but they'll already error

limber skiff
#

oh right

austere talon
#

and tbh i dont think we have amny

limber skiff
#

"Common" stuff too

#

mostly the waitFors

austere talon
#

truee

charred monolithBOT
austere talon
#

why tf is PoggerModeSettingsStore in commons

#

xd

limber skiff
#

trolleyzoom cuz 1 plugin uses it

austere talon
#

i think it didnt work

limber skiff
#

yeah

#

it's taking too long

austere talon
#

why doesnt it give u console log output

limber skiff
#

does it look like this for you

austere talon
#

yes

#

Got unexpected error %c[LoginQRSocket]
font-weight: bold;
color: purple;
Could not complete QR code login, trying to restart with a new QR code.

#

its stuck on login??

limber skiff
#

let me run it locally

austere talon
#

anyway

#

these failed

#

everything else works

limber skiff
#

wha

austere talon
#

and some of these are lazy loaded

limber skiff
#

the first work

#

it's the color picker

austere talon
limber skiff
#

yeah

austere talon
#

buildEmojiReactionColorsPlatformed is hiddenChannels

#

is that lazy loaded or just borked

limber skiff
#

let me check

#

might actually be broken

#

yeah broken

charred monolithBOT
limber skiff
limber skiff
austere talon
#

no

#

doesnt use that

limber skiff
#

that's the only error

austere talon
#

just urs

charred monolithBOT
austere talon
#

so weird

#

should we merge into main

#

ill merge main but not bump browser yet

limber skiff
#

yeah

austere talon
#

wait lemme test web

#

exploded

limber skiff
#

๐Ÿ’€

austere talon
#

in waitFor

#

Uncaught TypeError: kt is not a function or its return value is not iterable

limber skiff
#

did we even touch it

austere talon
#

esbuild fail?

#

its undefined

#

wait

#

esbuild moved it into a separate module???

limber skiff
#

๐Ÿคจ

austere talon
#

and doesnt properly initialise it

#

wait no it hoisted those funcs

#

it moved them out of the module

#

check this

#

the wrappers are hoisted and webpack find is inside some module

#

esbuild bug??

livid heath
#

take a break

limber skiff
#

wtf

livid heath
limber skiff
#

what does g( do

austere talon
#

esm stuff

#

unminified

charred monolithBOT
livid heath
#

and init_webpack is not called anywhere?

#

sounds like an esbuild bug

austere talon
#

oh i know why

limber skiff
#

lmao why does it move that stuff to another place

austere talon
#

circular import

limber skiff
#

oh

austere talon
#

SO DOGSHIT QUALITY SCREENSHOTS

#

KILL YOURSELF DISCORD

austere talon
limber skiff
#

we love circular imports

austere talon
#

or better yet move LazyComponent to a different file

limber skiff
#

lazyReact.ts

#

:)

austere talon
#

why did it only breka browser lol

#

not desktop

charred monolithBOT
limber skiff
#

made esbuild isnt minifying as hard

austere talon
#

I HATE CIRCULAR IMPORTS

#

oh wait

#

i should add back maybe

#

or not?

#

it will make it so that late waitFor wont resolve ever

limber skiff
#

yeah add it back

charred monolithBOT
austere talon
#

push to main?

charred monolithBOT
limber skiff
#

yeah

austere talon
#

its always nixos users with the scuffed systems

charred monolithBOT
austere talon
#

scary

limber skiff
#

ahhh shit

#

time to break vencord for thousand of users

#

now we wait for the complaints

#

idk how to write

austere talon
#

ok gn

limber skiff
#

nightt

#

lmao did you see this

austere talon
#

LMAO

#

i didnt

austere talon
#

wait she can't see that

mortal fractal
#

i cant see it

limber skiff
austere talon
#

ill just dismiss it

limber skiff
#

@mortal fractal btw have you found a way to stop this horrible image compression?

mortal fractal
#

havent looked yet

limber skiff
#

aight

livid heath
#

destructuring lazy is in main branch now right?

limber skiff
#

yeah

austere talon
livid heath
#

thanks blobcatcozy

mortal fractal
#

okay i am wrong about it being clientsided

livid heath
#

so it was indeed the proxy

mortal fractal
#

yeah its a really dead simple fix

#

once i can find where its being set

limber skiff
#

what is it

mortal fractal
#

format=webp param

#

it is media proxy related

livid heath
#

oh yeah i noticed that yesterday

limber skiff
#

oh it's that dumb thing

#

I saw that too

#

let me try to help you find where it's set

austere talon
#

btw nookies can u try to fix reporter

#

i think we're almost there

limber skiff
#

didnt know it was broken lol

charred monolithBOT
limber skiff
#

it's kinda late though

#

I can look at it tomorrow

austere talon
#

i mean

junior olive
#

how can i integrate my car into discord

austere talon
#

actually it might just be broken because i made it a dev build this release

#

it wasn't previously

#

and devbuilds throw on failed finds

#

so maybe it threw

#

we should stop using devbuild again and instead add a new define

#

i can do that tmrw

livid heath
#

patch src to remove format query param trolley

limber skiff
#

<@&1069716270695583934> .SUPPORTS_WEBP&&

livid heath
#

thats so dumb of them

limber skiff
#

wait

#

i pinged a role

#

fuck

livid heath
#

yeah

limber skiff
#

no idea how that happened but ok

livid heath
#

Vencord.Webpack.findByProps("SUPPORTS_WEBP").SUPPORTS_WEBP = false

limber skiff
#

no

livid heath
#

yeah that breaks gifs

limber skiff
#

it's one of those

livid heath
#

do not husk me ven, i dont like webp

limber skiff
#

omg this image quality

livid heath
junior olive
#

i wonder if avatar decos have webp versions on the cdn

limber skiff
livid heath
#

looking at getImageSrc rn

#
 return null != o && (c.format = o),
  (s !== n || a !== r) && (c.width = 0 | s,
  c.height = 0 | a),
  !i.isEmpty(c) && (u += "?" + l.stringify(c)), 

found it

limber skiff
#

yeah

#

but we shouldnt patch there

#

that's too deep

limber skiff
livid heath
#

it happens in getSrc yeah

#
proxyLazy(() => {
    for (const id in wreq.m) {
        const module = wreq.m[id].toString();
        if (module.includes(".replaceIcon") && module.includes(".AtIcon")) {
            return wreq(id as any).default;
        }
    }
})

please tell me there's a better way to do this

limber skiff
#

honestly we could just replace d.SUPPORTS_WEBP with false

livid heath
mortal fractal
#

id personally rather do it in getImageSrc

livid heath
#

i say we patch format to be null so it uses whatever format the image is

#

instead of forcing it it to be webp or png

mortal fractal
#

why does this break gif on hover wtf

livid heath
#

d.SUPPORTS_WEBP && (n || !e.isAnimated(this.props))
because .webp is used for animated (gifs count as animated)

#

wait

#

no

mortal fractal
#

guh why does gif on hover rely on it being webp instead of fucking using passthrough like apng does

#

discordddddddddddddddddd

livid heath
#

if my plugin depends on a store do i add that store to webpack common or in the plugin blobcatcozy

#

given that store isn't already in common

mortal fractal
#

what store

#

i personally say it depends on how commonly used it would actually be

livid heath
#

UploadAttachmentStore

#

rare usage

mortal fractal
#

does fakenitro not use it?

livid heath
#

quick search says no

#

omg that quality is so shit

mortal fractal
#

search all files and see if anything else uses it

junior olive
#

the moment they make their cdn not strip animation it's over

livid heath
#

no results except my plugin

mortal fractal
#

id say just ignore it being in common just cause its such a rarely used store

livid heath
livid heath
#

top notch quality

limber skiff
#
    {
        find: "getImageSrc:",
        replacement: {
            match: /(?<=ratio:\i=1,)format(?=:\i=null)/,
            replace: "_format"
        }
    }
limber skiff
austere talon
#

ofc

#

you rename the param

limber skiff
#

yop

livid heath
mortal fractal
austere talon
#

don't webpack search svgs

#

copy paste them

limber skiff
#

omg images look so good

limber skiff
mortal fractal
#

wtf

austere talon
#

are u sure

mortal fractal
#

oh wait

austere talon
#

wait

mortal fractal
#

i think discord's gif check is stupid enough that it just expects .gif at the end

livid heath
limber skiff
#

they work fine

austere talon
#

use one on the cdn

livid heath
#

cdn gif

limber skiff
#

I'm making the format null

#

this is what the format can be

#

webp or png

#

I dont see how that affects gifs

limber skiff
livid heath
junior olive
limber skiff
#

return d.SUPPORTS_WEBP && ((!animated || !autoPlay) || !e.isAnimated(this.props)) ? c = "webp" : (!animated || !autoPlay) && (c = "png"),

#

I would rather patch this place though

austere talon
livid heath
#

okay i'll copy paste

austere talon
#

and we had many issues in the past where svg searches broke

junior olive
#

sad

limber skiff
#
{
    find: "handleImageLoad=",
    replacement: {
        match: /(getSrc\(\i\){.+?format:)\i/,
        replace: "$1null"
    }
}
#

this works too

#

@austere talon should I?

livid heath
#

moar consistent UI

#

huh why is the color so off

topaz thistle
#

Did I get tagged somewhere?

charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
#

For me, it seemed like the service xdg-desktop-portal-wlr.service and xdg-desktop-portal.service were not starting by themselves. I had to enable them and then after configuring Sway as @MrShelbySann suggested, then it worked. I rebooted to see if the config was permanent and it seems like it was.

Yes, thatโ€™s exactly the issue I had.
I had to declare some environment variables to make mine stick on Wayfire, but now it works.
It took a lot of fiddling to find out why those 2 service...

charred monolithBOT
zenith elm
#

What happened to this? Did it get removed?
There is no discussion #1335 ๐Ÿ˜•

zenith elm
#

How come?

spark pivot
cunning canyon
#

what

zenith elm
#

Oh

charred monolithBOT
livid heath
#

is progress indicator necessary? there's UploadAttachmentStore which handles everything (except the progress event) so adding progress indicator would require mirroring (like 50~100 lines) the handlers of UploadAttachmentStore

charred monolithBOT
lime stone
#

but in this case it's obviously not

#

computers are dumb

charred monolithBOT
dapper crest
#

Why isn't this just 3 separate plugins?

Having them all together is kind of dumb imo

lime stone
#

why

#

oh, i guess most plugins have one purpose

dapper crest
#

I don't care for show media names or allowed mentions.

#

From the viewpoint of someone looking for cool plugins, I appreciate the name of a plugin being very self describing so I look at it

lime stone
#

could be toggles

#

but yeah you're probably right

dapper crest
lime stone
#

AllowedMentions/MentionControl, EditAttachments, ShowMediaNames lol

#

I don't like the pascal names, why are they not just spaced I can't remember

livid heath
#

but i felt grouping them was better since they have one purpose of making messages better

dapper crest
livid heath
austere talon
verbal pumice
#

i use nix btw

livid heath
olive aurora
austere talon
#

wtf

#

it's not

#

bash is actually good

fiery torrent
charred monolithBOT
fiery torrent
#

thank you PraygeA

charred monolithBOT
junior olive
#

@limber skiff heyy do you think you'd be able to review more of decor? I'd like to try and get it as refined as possible so we can get it merged quickly

limber skiff
#

uhh not rn

#

I will have to go soon and I will try to fix reporter rn

junior olive
#

alright no worries, and if you're willing to review it at any other point i would greatly appreciate it

charred monolithBOT
olive aurora
#

why do people come with the most niche setups and expect us to figure out what they messed up

limber skiff
#

@austere talon I found out when we force load all chunks not all actually get required

austere talon
#

oh do you mean the modules itself are not all required

limber skiff
#

yeah

austere talon
#

I mean that's fine, no?

limber skiff
#

that's why UserSettings finds are not being found in the reporter

austere talon
#

we patch them anyway

limber skiff
austere talon
#

ohh

limber skiff
#

let me show you why

austere talon
#

is this for webpack find testing

limber skiff
#

yeah

austere talon
#

ah ic

limber skiff
#

createPromise: ()=>n.el("420610").then(n.bind(n, "420610"))
el loads all these chunks "shared", "app", "64827", "73850", "15556", "86213", "57832", "62597", "56122", "48528", "75232", "29232", "98904", "495" and then requires 420610 itself later

however 420610 itself is not a chunk id, so when we call wreq.e with all the chunk ids 420610 is not required

#

however 420610 itself is not a chunk id, so when we call wreq.e with all the chunk ids 420610 is not required
as in it's not present in this mapping

#

we just need to wreq() all the keys on this mapping

#

but it's not exported ๐Ÿ’€

charred monolithBOT
limber skiff
#

I have to go now

#

I appreciate some input on how we should handle this

charred monolithBOT
topaz thistle
#

No

#

Why?

#

Sorry for my 10000000ms delayed response on that message lmao xd

frail skyBOT
#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Starts

None

Discord Errors

None

#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Starts

None

Discord Errors

None

austere talon
limber skiff
austere talon
#

it's like
loadChunks().then(() => require(420610))

limber skiff
#

yes I know

austere talon
#

then what's the question

limber skiff
#

but we can only know that using the non exported object or by looking at every .el() call on modules

#

as I said 420610: "some chunk url" doesn't exist

austere talon
limber skiff
#

createPromise: ()=>n.el("420610").then(n.bind(n, "420610"))
chunks it loads: "shared", "app", "64827", "73850", "15556", "86213", "57832", "62597", "56122", "48528", "75232", "29232", "98904", "495"

#

when you open the UserSettings that el() function call gets executed

#

discord loads all those chunks (shared, app. 64827, etc)

#

and then requires the entry point for the UserSettings which is 420610

#

in the current approach we force load every chunk and require the entry point of it using the map inside webpack.u, but that doesn't necessarily require all the modules of that chunk

for example it doesn't require 420610

austere talon
#

we can't really require all modules

#

it'll cause issues

#

many modules require on other modules being initialised

limber skiff
#

yes that is true

austere talon
#

or even can't be required outside of a specific context

limber skiff
#

but if we were able to access that non exported object we could call.el on every key

austere talon
#

are you sure it wouldn't cause issues

limber skiff
#

which would require pretty much all the code discord does use

austere talon
#

is it only the settings module that's causing issues

limber skiff
#

yeah, surprisingly enough only finds that depend on it are causing issues

limber skiff
austere talon
#

so it's only settings?

#

then why not just specifically require settings but nothing else

limber skiff
#

lol

austere talon
limber skiff
#

yeah

austere talon
#

we only use settings ui code cause it's safe to do so in our settings code

limber skiff
#

I'm thinking of manually fetching discord webpack entry point script and regex matching the object

austere talon
#

uhhh

#

can't we grab it somehow

#

im sure we can

limber skiff
#

we can't patch it cuz it's the webpack entry point

#

so idk another way than fetching

austere talon
#

not a problem

#

i mean fetching it is fine but also seems unnecessary

#

i will check in a bit

limber skiff
#

maybe getting the url using the dom

#

kk

austere talon
#

remember my hack to expose private webpack cache

#

something similar might work

limber skiff
#

yeah

#

hmmm

junior olive
limber skiff
#

it's not viable

#

I want to load everything