Submit

Back to the channels

#primate

  1. * phaleth joined #primate
  2. blue phaleth: hi
  3. phaleth hi blue
  4. blue so 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. blue if we remove the onHandle mechanism and the cookie, the mechanism is purely client side and you will likely see a flash
  6. blue I 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. phaleth ok, I will try that, but I think having the JS in the header is good enough to avoid flash
  8. blue JS in the header?
  9. phaleth in the head tag is what I mean
  10. phaleth script tag in the html head tag
  11. blue ah, right
  12. phaleth hmm, you are right, there is a flash on palemoon
  13. phaleth on epiphany it's flashing the same as current primate.run
  14. phaleth I think then it's better to dump local storage and always use cookie
  15. phaleth ok, so it's already broken after one of my previous changes
  16. * phaleth joined #primate
  17. blue the website is broken?
  18. phaleth sort of :D
  19. phaleth I got the fix
  20. phaleth now it does not flash even on epiphany
  21. phaleth blue: how long should the cookie persist? 30 days?
  22. phaleth I'll put in 9 days
  23. phaleth so it's a single digit
  24. blue sure
  25. phaleth ok, didn't manage to trim much of the fat, but at least now there is no background flash at all on epiphany
  26. blue that's great
  27. phaleth just little less than 0.5 kB of JS trimmed from the client bundle
  28. blue every byte counts
  29. blue we'll be doing the same for RP, anyway
  30. phaleth yup, that's why I try to do all this, cause I noticed you started working on repopack website
  31. phaleth anyway, thanks for the heads up on the flash
  32. blue yw
  33. phaleth the file naming is a bit incosistent
  34. blue where?
  35. phaleth I've just fixed the naming and already pushed
  36. phaleth so it's all good, btw I also got rid of extra requests to set the cookie
  37. blue ok
  38. blue how I test your PR, gh makes it so hard to switch to PR branches
  39. blue clanker is telling me to either install the gh cli tool (no go), or add your repository as remote
  40. phaleth you can hop onto the vps and deploy it there, I know that's like testing in production, but the changes are subtle
  41. blue yeah I wanted to test locally first
  42. phaleth then you can clone down my fork and checkout the branch
  43. blue mostly due to this line changing:
  44. blue <Icon name={$colorscheme === "dark" ? "sun" : "moon"} />
  45. blue of ot
  46. blue if it's not a store anymore, does it reliably change?
  47. phaleth yes, it's just a state now
  48. phaleth I've tested with librewolf, palemoon and epiphany
  49. blue ok I'll clone your fork, but damn I hate gh for making this so hard
  50. blue we gotta make this stuff easier with rp and item branches
  51. phaleth you can do it the git way, add a second origin and git fetch from that one
  52. phaleth then checkout the branch
  53. blue yeah I know, but this is dumb too. I don't want to add an origin for every contributor
  54. blue I seriously have no idea how this is supposed to scale
  55. phaleth it's overcomplicated, but that's how it is
  56. blue we can't accept that
  57. blue a 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. blue anyway, building the packages now
  59. blue so will test
  60. phaleth cool, do you have brave browser or something else chromium based?
  61. blue yes, I'm on brave
  62. phaleth nice
  63. blue man I hate pnpm
  64. blue primate/apps/website on master via  v26.1.0 pnpm install
  65. blue Scope: all 55 workspace projects
  66. blue primate/apps/website on master via  v26.1.0 npx primate
  67. blue Done in 447ms using pnpm v11.0.9
  68. blue Already up to date
  69. blue sh: line 1: primate: command not found
  70. blue seriously, pnpm is so bad
  71. blue and now I will delete the lock file and node_modules and run pnpm install and it will work
  72. phaleth try it from the root of the repo
  73. phaleth eh
  74. blue ya, already did, this is 100% pnpm being garbage
  75. phaleth you can do
  76. phaleth pnpm purge
  77. phaleth that will get rid of all node_modules in the whole repo
  78. blue yes but this is a freshly cloned repo
  79. blue this is really unacceptable
  80. blue ok, now it's working after deleting everything and running pnpm install again
  81. phaleth they are going to fix it with rust
  82. blue 100%
  83. phaleth will they succeed is the question
  84. blue looks great
  85. blue pr is in
  86. phaleth nice
  87. blue and we gotta move away from those PRs on RP. seriously
  88. blue they're killing me
  89. dreamreal why?
  90. dreamreal what about them is killing you
  91. blue I spent around 5 minutes on setting it up, and 10 seconds on testing the code
  92. blue that kind of overhead is 100% unacceptable
  93. dreamreal shoudl be a matter of git checkout, npm install (to update any dependencies), npm test
  94. dreamreal if that's not enough, someone's doing it wrong
  95. blue it's not, I'd need to add his origin to my git
  96. dreamreal that's... part of the checkout, no?
  97. dreamreal I guess I should have been more specific (or less): "get the changes"
  98. phaleth I think origin still needs to be added, just once for each contributor
  99. blue yes. and if I have 100 contributors, I need 100 origins, this is legit insane
  100. phaleth kinda like upstream also needs to be added when working on fork
  101. blue all I wanna do is `git checkout item/website-improvements`
  102. dreamreal if 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. blue and 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. blue both paths are dumb
  105. dreamreal at $work it offends the crap out of me to have my teammates say "CI/CD passed, let's test the code"
  106. blue but I don't want to run CI/CD. I want to test the code locally. CI/CD is assumed to have already prerun
  107. dreamreal has it?
  108. blue I 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. dreamreal yep
  110. dreamreal so identify what that means, and move towards it
  111. blue and 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. phaleth we 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. blue gh totally destroyed the idea of forks. instead of properly using branches, every little thing is a fork of the whole repo
  114. phaleth I think I can create a branch on primate repo, but only cause I'm collaborator
  115. blue the funny thing is that issues and pr branches are already internally the same thing on gh
  116. blue so 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. phaleth gitlab uses separate counters for those
  119. blue yeah, but github unifies them, which means it sees them as the same thing, which they are
  120. blue my ideal workflow is easy. protect master from direct pushes, and have issues create server branches which assigned contributors can freely push to
  121. blue collabrators can freely create issues and selfassign, externals can only take on approved work, or lobby for it first
  122. blue that 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. blue 1st rule of thumb: ask the maintainer if this is a good idea
  124. blue in 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. blue anyway, back to RP hacking
  126. * phaleth joined #primate
  127. blue phaleth: this hot reloading is kinda lit, I changed the font in the static dir, and it immediately picked it out
  128. blue I 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. blue picked it up*
  130. phaleth yeah, primate just picks up whatever is in static dir, does not care if it's used
  131. blue we do have a js/css filter iirc
  132. blue so the fonts wouldn't be picked up automatically
  133. phaleth yeah, I've added woff2 to that filter
  134. blue oh, that explains it then, look it me, pumping my chest
  135. phaleth I think that's why font file names are now getting the content hash, kinda strange but works
  136. blue yeah
  137. phaleth I break things by changing things
  138. phaleth but those are just side effects anyway
  139. blue ya
  140. phaleth blue: I'll remove the handlebars dependency from primate website to speed up builds, is that okay?
  141. blue phaleth: it's used for the rss, no?
  142. phaleth yeah, I've managed to replace it with TS
  143. phaleth I'll just open up a PR
  144. blue k
  145. phaleth the website redeployment method does not work, the read/write layer of the container gets wiped out after podman container restart
  146. blue damn
  147. phaleth more reasons to speed up the build overall, tsgo was a good decision
  148. blue ya
  149. phaleth I'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. phaleth sounds like a huge undertaking
  151. blue you could probably replace it with htmx
  152. phaleth yeah, or html
  153. blue html would be lit
  154. phaleth heh

Search posts