bpottle
github.com/bpottleActivity
I love the dickbutt addition but the dark mode thing kinda wrecked it, and honestly I'd vote for a revert of my own PR lol. That said, the links/terminal style MR was awesome, and I agree with @matthewmayer that any kind of straight revert is going to be not only boring but messy.
The latest blog entry sounds like https://github.com/skridlevsky/openchaos/pull/13 is legitimately on-deck to be merged without conflict, so FWIW I spun up a branch that I think will cleanly merge this one and that one afterward, if the Vercel stuff passes. For the record, I still think "rewrite" is an unfairly broad title for what that MR does, but I love it, let's go.
Yep, and for the record, I think the PR should absolutely be downvoted to hell in favor of others if that's the consensus. I wrote it because it was fun for me regardless, whether or not it makes it through doesn't really factor in. Once that PR for daily merges passes, overhauls like this are going to become wildly impractical.
Alright, here's your real Rust rewrite: https://github.com/skridlevsky/openchaos/pull/91
Rewrite it in Rust (for real)
Ported the site from Next.js to Rust using Axum. The GitHub API client logic was reimplemented in src/github.rs using reqwest for async HTTP and futures for parallel reaction fetching.
The Axum server (src/main.rs) exposes an /api/pulls endpoint that replaces the original Next.js API route. It handles CORS, serves static files, and returns PR data with voting tallies.
tokio, tower-http, reqwest, serde
The Next.js frontend remains intact (src/app/, src/components/) but can now call the Rust backend.
I pulled this branch down to see if I could "fix" it and was astonished it has as many upvotes as it does. They're all because of the title. There's no WASM, no Rust toolchain, zero Rust code at all as a matter of fact*. This is a branch that got halfway through a beer and remembered it had chores to do.
I think I'll start a new one.
*Ah, there's a binary and I do see the .rs I didn't before, dunno why it didn't scroll. Anyway, #91 works.
A couple passing thoughts:
- Paginating
getPRVotesrisks rate limiting if it generates a ton of requests, I've already bumped into it once today - Do negatives in vote count break sorting? Can we get negatives or is there a vote floor of 0? I haven't looked.