Chat Logs

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