blueso the point of my comment was that the current mechanism puts the colorscheme into a cookie. the reason for that is that on subsequent full page reloads, we read that cookie and can set the colour scheme in the HTML, so you don't get a weird flash
blueif we remove the onHandle mechanism and the cookie, the mechanism is purely client side and you will likely see a flash
blueI distinctly remember testing for this, so I'd be surprised if it suddenly worked without a cookie. but you'd need a full page reload
phalethok, I will try that, but I think having the JS in the header is good enough to avoid flash
blueJS in the header?
phalethin the head tag is what I mean
phalethscript tag in the html head tag
blueah, right
phalethhmm, you are right, there is a flash on palemoon
phalethon epiphany it's flashing the same as current primate.run
phalethI think then it's better to dump local storage and always use cookie
phalethok, so it's already broken after one of my previous changes
* phaleth joined #primate
bluethe website is broken?
phalethsort of :D
phalethI got the fix
phalethnow it does not flash even on epiphany
phalethblue: how long should the cookie persist? 30 days?
phalethI'll put in 9 days
phalethso it's a single digit
bluesure
phalethok, didn't manage to trim much of the fat, but at least now there is no background flash at all on epiphany
bluethat's great
phalethjust little less than 0.5 kB of JS trimmed from the client bundle
blueevery byte counts
bluewe'll be doing the same for RP, anyway
phalethyup, that's why I try to do all this, cause I noticed you started working on repopack website
phalethanyway, thanks for the heads up on the flash
blueyw
phaleththe file naming is a bit incosistent
bluewhere?
phalethI've just fixed the naming and already pushed
phalethso it's all good, btw I also got rid of extra requests to set the cookie
blueok
bluehow I test your PR, gh makes it so hard to switch to PR branches
blueclanker is telling me to either install the gh cli tool (no go), or add your repository as remote
phalethyou can hop onto the vps and deploy it there, I know that's like testing in production, but the changes are subtle
blueyeah I wanted to test locally first
phaleththen you can clone down my fork and checkout the branch
bluemostly due to this line changing:
blue <Icon name={$colorscheme === "dark" ? "sun" : "moon"} />
blueof ot
blueif it's not a store anymore, does it reliably change?
phalethyes, it's just a state now
phalethI've tested with librewolf, palemoon and epiphany
blueok I'll clone your fork, but damn I hate gh for making this so hard
bluewe gotta make this stuff easier with rp and item branches
phalethyou can do it the git way, add a second origin and git fetch from that one
phaleththen checkout the branch
blueyeah I know, but this is dumb too. I don't want to add an origin for every contributor
blueI seriously have no idea how this is supposed to scale
phalethit's overcomplicated, but that's how it is
bluewe can't accept that
bluea golden path is a contributor having a branch like item/1 or item/website-optimisations and then I can just do git switch and test
blueanyway, building the packages now
blueso will test
phalethcool, do you have brave browser or something else chromium based?
blueyes, I'm on brave
phalethnice
blueman I hate pnpm
blueprimate/apps/website on master via v26.1.0 pnpm install
blueScope: all 55 workspace projects
blueprimate/apps/website on master via v26.1.0 npx primate
blueDone in 447ms using pnpm v11.0.9
blueAlready up to date
bluesh: line 1: primate: command not found
blueseriously, pnpm is so bad
blueand now I will delete the lock file and node_modules and run pnpm install and it will work
phalethtry it from the root of the repo
phaletheh
blueya, already did, this is 100% pnpm being garbage
phalethyou can do
phalethpnpm purge
phaleththat will get rid of all node_modules in the whole repo
blueyes but this is a freshly cloned repo
bluethis is really unacceptable
blueok, now it's working after deleting everything and running pnpm install again
phaleththey are going to fix it with rust
blue100%
phalethwill they succeed is the question
bluelooks great
bluepr is in
phalethnice
blueand we gotta move away from those PRs on RP. seriously
bluethey're killing me
dreamrealwhy?
dreamrealwhat about them is killing you
blueI spent around 5 minutes on setting it up, and 10 seconds on testing the code
bluethat kind of overhead is 100% unacceptable
dreamrealshoudl be a matter of git checkout, npm install (to update any dependencies), npm test
dreamrealif that's not enough, someone's doing it wrong
blueit's not, I'd need to add his origin to my git
dreamrealthat's... part of the checkout, no?
dreamrealI guess I should have been more specific (or less): "get the changes"
phalethI think origin still needs to be added, just once for each contributor
blueyes. and if I have 100 contributors, I need 100 origins, this is legit insane
phalethkinda like upstream also needs to be added when working on fork
blueall I wanna do is `git checkout item/website-improvements`
dreamrealif only there was a CI/CD pipeline idea, you could run CI/CD and validate the code works without having to do a lot, then you could look at the tests and say "do they validate the change being represented? no? reject until they do, and until they pass"
blueand that means for gh I either need ot use their `gh` command line tool, which I'm not willing to, or I need to add `git remote add phaleth git@github.com:phaleth/primate` for every contributor
blueboth paths are dumb
dreamrealat $work it offends the crap out of me to have my teammates say "CI/CD passed, let's test the code"
bluebut I don't want to run CI/CD. I want to test the code locally. CI/CD is assumed to have already prerun
dreamrealhas it?
blueI don't have CI/CD, but that's not the point. the point is there should be an easy way for me to check out the contributor's branch, play around with code, look at it in the environment I'm best versed in, and push improvements upon it if necessary
dreamrealyep
dreamrealso identify what that means, and move towards it
blueand I don't *want* that to be on some rando's repo which he could delete tomorrow, because that's weird, I want it to be as a branch on my repo
phalethwe used to do CI/CD for primate, but it turned out to be too slow and sometimes there are build errors on master, which is alright, work is in progress
bluegh totally destroyed the idea of forks. instead of properly using branches, every little thing is a fork of the whole repo
phalethI think I can create a branch on primate repo, but only cause I'm collaborator
bluethe funny thing is that issues and pr branches are already internally the same thing on gh
blueso they're doing exactly what I'm talking about, but for some reason they're not exposing it to the surface
blue(issue numbering and pr numbering are shared, that's how I know)
phalethgitlab uses separate counters for those
blueyeah, but github unifies them, which means it sees them as the same thing, which they are
bluemy ideal workflow is easy. protect master from direct pushes, and have issues create server branches which assigned contributors can freely push to
bluecollabrators can freely create issues and selfassign, externals can only take on approved work, or lobby for it first
bluethat also prevents things like "why aren't you merging the PR I spent 2 weeks on without asking you if it was a good idea"
blue1st rule of thumb: ask the maintainer if this is a good idea
bluein this case, phaleth is a collaborator/maintainer so he'd have no problem creating and selfassigning an issue or just creating a dedicated longterm server branch
blueanyway, back to RP hacking
* phaleth joined #primate
bluephaleth: this hot reloading is kinda lit, I changed the font in the static dir, and it immediately picked it out
blueI can't tell you I know exactly why because I'm not importing the woff directly anyway, it is referenced in master.css but that isn't imported explicitly, I guess I have primate generate virtual imports for it
bluepicked it up*
phalethyeah, primate just picks up whatever is in static dir, does not care if it's used
bluewe do have a js/css filter iirc
blueso the fonts wouldn't be picked up automatically
phalethyeah, I've added woff2 to that filter
blueoh, that explains it then, look it me, pumping my chest
phalethI think that's why font file names are now getting the content hash, kinda strange but works
blueyeah
phalethI break things by changing things
phalethbut those are just side effects anyway
blueya
phalethblue: I'll remove the handlebars dependency from primate website to speed up builds, is that okay?
bluephaleth: it's used for the rss, no?
phalethyeah, I've managed to replace it with TS
phalethI'll just open up a PR
bluek
phaleththe website redeployment method does not work, the read/write layer of the container gets wiped out after podman container restart
bluedamn
phalethmore reasons to speed up the build overall, tsgo was a good decision
blueya
phalethI'm thinking about removing svelte from primate website, google says there is over 22 kBs of unused JS (gziped), but it seems like there is more