Chat Logs

  1. bluephaleth: hi
  2. phalethhi blue
  3. 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
  4. blueif we remove the onHandle mechanism and the cookie, the mechanism is purely client side and you will likely see a flash
  5. 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
  6. phalethok, I will try that, but I think having the JS in the header is good enough to avoid flash
  7. blueJS in the header?
  8. phalethin the head tag is what I mean
  9. phalethscript tag in the html head tag
  10. blueah, right
  11. phalethhmm, you are right, there is a flash on palemoon
  12. phalethon epiphany it's flashing the same as current primate.run
  13. phalethI think then it's better to dump local storage and always use cookie
  14. phalethok, so it's already broken after one of my previous changes
  15. bluethe website is broken?
  16. phalethsort of :D
  17. phalethI got the fix
  18. phalethnow it does not flash even on epiphany
  19. phalethblue: how long should the cookie persist? 30 days?
  20. phalethI'll put in 9 days
  21. phalethso it's a single digit
  22. bluesure
  23. phalethok, didn't manage to trim much of the fat, but at least now there is no background flash at all on epiphany
  24. bluethat's great
  25. phalethjust little less than 0.5 kB of JS trimmed from the client bundle
  26. blueevery byte counts
  27. bluewe'll be doing the same for RP, anyway
  28. phalethyup, that's why I try to do all this, cause I noticed you started working on repopack website
  29. phalethanyway, thanks for the heads up on the flash
  30. blueyw
  31. phaleththe file naming is a bit incosistent
  32. bluewhere?
  33. phalethI've just fixed the naming and already pushed
  34. phalethso it's all good, btw I also got rid of extra requests to set the cookie
  35. blueok
  36. bluehow I test your PR, gh makes it so hard to switch to PR branches
  37. blueclanker is telling me to either install the gh cli tool (no go), or add your repository as remote
  38. phalethyou can hop onto the vps and deploy it there, I know that's like testing in production, but the changes are subtle
  39. blueyeah I wanted to test locally first
  40. phaleththen you can clone down my fork and checkout the branch
  41. bluemostly due to this line changing:
  42. blue <Icon name={$colorscheme === "dark" ? "sun" : "moon"} />
  43. blueof ot
  44. blueif it's not a store anymore, does it reliably change?
  45. phalethyes, it's just a state now
  46. phalethI've tested with librewolf, palemoon and epiphany
  47. blueok I'll clone your fork, but damn I hate gh for making this so hard
  48. bluewe gotta make this stuff easier with rp and item branches
  49. phalethyou can do it the git way, add a second origin and git fetch from that one
  50. phaleththen checkout the branch
  51. blueyeah I know, but this is dumb too. I don't want to add an origin for every contributor
  52. blueI seriously have no idea how this is supposed to scale
  53. phalethit's overcomplicated, but that's how it is
  54. bluewe can't accept that
  55. 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
  56. blueanyway, building the packages now
  57. blueso will test
  58. phalethcool, do you have brave browser or something else chromium based?
  59. blueyes, I'm on brave
  60. phalethnice
  61. blueman I hate pnpm
  62. blueprimate/apps/website on master via ๎œ˜ v26.1.0 pnpm install
  63. blueScope: all 55 workspace projects
  64. blueprimate/apps/website on master via ๎œ˜ v26.1.0 npx primate
  65. blueDone in 447ms using pnpm v11.0.9
  66. blueAlready up to date
  67. bluesh: line 1: primate: command not found
  68. blueseriously, pnpm is so bad
  69. blueand now I will delete the lock file and node_modules and run pnpm install and it will work
  70. phalethtry it from the root of the repo
  71. phaletheh
  72. blueya, already did, this is 100% pnpm being garbage
  73. phalethyou can do
  74. phalethpnpm purge
  75. phaleththat will get rid of all node_modules in the whole repo
  76. blueyes but this is a freshly cloned repo
  77. bluethis is really unacceptable
  78. blueok, now it's working after deleting everything and running pnpm install again
  79. phaleththey are going to fix it with rust
  80. blue100%
  81. phalethwill they succeed is the question
  82. bluelooks great
  83. bluepr is in
  84. phalethnice
  85. blueand we gotta move away from those PRs on RP. seriously
  86. bluethey're killing me
  87. dreamrealwhy?
  88. dreamrealwhat about them is killing you
  89. blueI spent around 5 minutes on setting it up, and 10 seconds on testing the code
  90. bluethat kind of overhead is 100% unacceptable
  91. dreamrealshoudl be a matter of git checkout, npm install (to update any dependencies), npm test
  92. dreamrealif that's not enough, someone's doing it wrong
  93. blueit's not, I'd need to add his origin to my git
  94. dreamrealthat's... part of the checkout, no?
  95. dreamrealI guess I should have been more specific (or less): "get the changes"
  96. phalethI think origin still needs to be added, just once for each contributor
  97. blueyes. and if I have 100 contributors, I need 100 origins, this is legit insane
  98. phalethkinda like upstream also needs to be added when working on fork
  99. blueall I wanna do is `git checkout item/website-improvements`
  100. 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"
  101. 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
  102. blueboth paths are dumb
  103. dreamrealat $work it offends the crap out of me to have my teammates say "CI/CD passed, let's test the code"
  104. bluebut I don't want to run CI/CD. I want to test the code locally. CI/CD is assumed to have already prerun
  105. dreamrealhas it?
  106. 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
  107. dreamrealyep
  108. dreamrealso identify what that means, and move towards it
  109. 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
  110. 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
  111. bluegh totally destroyed the idea of forks. instead of properly using branches, every little thing is a fork of the whole repo
  112. phalethI think I can create a branch on primate repo, but only cause I'm collaborator
  113. bluethe funny thing is that issues and pr branches are already internally the same thing on gh
  114. blueso they're doing exactly what I'm talking about, but for some reason they're not exposing it to the surface
  115. blue(issue numbering and pr numbering are shared, that's how I know)
  116. phalethgitlab uses separate counters for those
  117. blueyeah, but github unifies them, which means it sees them as the same thing, which they are
  118. bluemy ideal workflow is easy. protect master from direct pushes, and have issues create server branches which assigned contributors can freely push to
  119. bluecollabrators can freely create issues and selfassign, externals can only take on approved work, or lobby for it first
  120. 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"
  121. blue1st rule of thumb: ask the maintainer if this is a good idea
  122. 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
  123. blueanyway, back to RP hacking
  124. bluephaleth: this hot reloading is kinda lit, I changed the font in the static dir, and it immediately picked it out
  125. 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
  126. bluepicked it up*
  127. phalethyeah, primate just picks up whatever is in static dir, does not care if it's used
  128. bluewe do have a js/css filter iirc
  129. blueso the fonts wouldn't be picked up automatically
  130. phalethyeah, I've added woff2 to that filter
  131. blueoh, that explains it then, look it me, pumping my chest
  132. phalethI think that's why font file names are now getting the content hash, kinda strange but works
  133. blueyeah
  134. phalethI break things by changing things
  135. phalethbut those are just side effects anyway
  136. blueya
  137. phalethblue: I'll remove the handlebars dependency from primate website to speed up builds, is that okay?
  138. bluephaleth: it's used for the rss, no?
  139. phalethyeah, I've managed to replace it with TS
  140. phalethI'll just open up a PR
  141. bluek
  142. phaleththe website redeployment method does not work, the read/write layer of the container gets wiped out after podman container restart
  143. bluedamn
  144. phalethmore reasons to speed up the build overall, tsgo was a good decision
  145. blueya
  146. 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
  147. phalethsounds like a huge undertaking
  148. blueyou could probably replace it with htmx
  149. phalethyeah, or html
  150. bluehtml would be lit
  151. phalethheh