Lmao I guess I locked myself out by logging in too much while debugging, oops

Tweetbot to the rescue (and the previous post was made with my mastodon cross poster)

Spent all my evening debugging session issues that would only happen in a production environment so this calls for a celebration. First deploy on a prod environment that actually works lmao 🎉

Had to dig GitHub issues because `shrink-ray` is dead, its maintained fork requires old dependencies that don't build on macOS (seemingly), so I ended up `compress-next` which is a fork of `compression` w/ brotli compression github.com/Econify/compression

Network is shit but I got basic gif/video playback working and looking alright.

Media working inside of quote tweets and I didn't have to change any styles (yet) for it to look nice

Later this week I want to get tweet actions working somehow (minus reply) which also means I'll need to think about how to _not_ duplicate tweets in my Redux store whilst being able to have a different RT/liked state for each account/column. Should be fun 😅

Got (un)liking working with instant UI feedback while the network request happens. All the while without duplicating a whole tweet's worth of state to store that 😌

Found out about Lucide which is basically Feather Icons but with more icons so that'll be perfect for placeholder(?) icons lucide.dev/

I wanted to implement a mentions column tonight but then I remembered I had to juggle between API v1 and API v2 types and: yeah no I'm not doing this tonight 😩

I also wanted to try to mock some UI up and: urgh yeah I'll figure this out later lmao

Stuck between a rock (copying current TweetDeck's UI) and a hard place (making something similar but different) and I think I'll just improvise as I implement more stuff.

(That said if you have ideas and want to help on the UI side of things, hmu)

A few helpers and a refactor later, we got mentions column baby

I'm a bit bummed out because I wanted to use the API v2 endpoint for mentions but it returns V2 tweets which dont contain as much as what you get from 1.1 so I use the mentions 1.1 endpoint and lookup tweets on API v2 to grab more things AND THEN make my own representation

I could probably do the opposite but, uh, I did it that way for the home timeline and that's how Tweetbot does it AFAICT so I went for the easy route for now. It wouldn't be too tricky to change anyway.

Not pictured but before taking the screenshot I had an hilarious bug that only manifested now.. I was sorting the tweet IDs in such a way that mentions from 6 years ago were showing up, basically running `_.sortBy(t=>t,['desc']` where some of the ids were shorter than the others

which I obviously didn't notice until now because the home timeline of my test account has recent tweets, good thing I'm using that test account for that because I 100% wouldn't have seen that until much later otherwise lmao

I DIDN'T GET THE SORTING COMPLETELY RIGHT EITHER because sorting big-ass integers as strings didn't work as intended. Anyway, sorting them as floats works fine, phew.

I bit the bullet and used the API V2 likes endpoint as a base and then got hydrated V1 tweets to get full tweet objects (the opposite of what I do for mentions/home)

I had already made one for the character counter so, like, it's just the same component but animated *taps on forehead*

(And implicitely, column updates on the back-end but that's not as fun to show)

Starting to need to do weird things with my json schema validation (tagged unions) and...yeah no choosing ajv wasn't wise. It's neat but it's really slowing me down having to basically write my schemas twice 😵‍💫

Ended up going with `superstruct`. It's neat, a bit less verbose than io-ts and has better type inference in some places.

Native enums support is not there yet but can be worked around github.com/ianstormtaylor/supe


And now I'm tired and didn't end up doing the thing I wanted to which was union types shenanigans. Tomorrow... 🥲

Relatedly idk what i'll do re: open-sourcing the app because I do want to somehow monetize it but:
A) it feels weird to monetize and have the source open
B) I do like having the code open because BTD wouldn't have been where it is rn without contributors


(I'm not gonna do a crazy monetization scheme, don't worry)

I'd go the "open source it and let it be completely free and hope people donate/support" route but 8 years of BTD told me that people barely do that so idk

I was fine with not getting much because BTD didn't cost anything to run because, well but there _will_ be a cost for me to run Skyla so idk

Welp, I wanted to do my Enum-based union types stuff with superstruct and it falls apart because of the lack of support for native TS Enums.


Onto io-ts I go lol


Finally got to do it and having neat union types for columns 😌 (code cut down for the screenshot)

Like, the only useful Google hit for "validate express with io-ts" is a blogpost with a snippet of code I had to use as a base, wild that there isn't any packages for this.

I should make an actual bit of UI to like, add columns and such but I dont wanna do that tonight 😩

Also I was thinking the layout of the sidebar could be like this:

header button(??)
column list item1
column list item2
more buttons??

I'd need to figure out a collapsed state for it but,

It's annoying because I'm really used to TweetDeck's sidebar layout but I dont want to copy it exactly for obvious reasons 😬

Used the accounts mode switcher thingy as an excuse to make myself a hook to easily save user settings to the Redux state/server as easily as using `useState` 😎

I'll have to look into a better debouncing/request cancellation mechanism but that'll wait ~ later ~

I also put a system in place for dialogs/tooltips so I'll finally add a column picker, but probably tomorrow because today is Sunday and i want to be lazy

It looks ugly for now but! Column picker!!

(This also made me notice a bug in my HTTP request caching code so there's that)

I really need to either find someone willing to help me on the UI side or, hum, plan a bit more ahead and mock stuff up. I'm starting to hit the limits of "design in the browser as I go" 😅

Not shown: the dumb little UI to select a list I had to do and all the fetching necessary to not crash the app rendering at boot lmao

Had a bit of a headache trying to make it so 1Password doesn't think the text input was a password/username field. Turns out naming it with a name like `*search` fixes it 😩

User column! (I swear it's not just the home of the other account I have, I'm just too lazy to implement a user lookup thing tonight lol)

Like, I have the lookahead route done and everything I just dont want to build a UI for it just yet lmao

Bookmarks columns!

This one looked innocent until I remembered that the bookmarks endpoints are only available through OAuth2, meaning I had to suddenly support BOTH OAuth1 and OAuth2 🤡

@Eramdam youre making such quick headway on this holy shit

@Eramdam my curiosity is how hellish is it gonna be to add multi account support

@dogo I didnt show any of it because I need to build the UI for it but: not too hard since I've design the data model with this in mind

@dogo namely I need to think of a way to show connected accounts, how to add one, and how to specify a given account when creating a column

@Eramdam Oui c'est quoi la finalité attendue pour ce que tu es en train de construire ?

@Palingenae ok je dois être aux fraises parce que je suis pas sûr de comprendre la question?

@Eramdam Je dois l'être aussi car j'ai l'impression de pas pouvoir m'exprimer

Je vais attendre un peu

@Palingenae mais euh, en gros je fais un remplacement à TweetDeck* parce que ça va sûrement devenir payant dans le futur (et la nouvelle version va casser BTD anyway) donc je m'occupe 😅

(* j'veux essayer d'incorporer un support de Mastodon également)

Show newer
Show newer

@Eramdam holy shit this has come a long way in a very short space of time

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!