I don’t think I’m going to add edit and delete support in this app because I think it was a horrible mistake to add those features to a client 🤣

⤋ Read More

Yeah, lol, fuck off. Tried to reproduce that hashing issue, thus playing around with Go a little bit. And what did I find?

$ tree ~/.config/go
/home/user/.config/go
└── telemetry
    ├── local
    │   ├── asm@devel-devel-linux-amd64-2026-07-14.v1.count
    │   ├── compile@devel-devel-linux-amd64-2026-07-14.v1.count
    │   ├── go@devel-devel-linux-amd64-2026-07-14.v1.count
    │   ├── link@devel-devel-linux-amd64-2026-07-14.v1.count
    │   ├── upload.token
    │   └── weekends
    └── upload

4 directories, 6 files

It collects and uploads “telemetry” now.

No.

(Don’t tell me how I can turn that off. Not interested. This is a compiler and it wants to track me, without asking for consent. That’s a no-go.)

⤋ Read More
In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

@david@daiwei.me It really is almost impossible to debug these hash issues. Only thing I can do is some trial-and-error, to see if I somehow end up at pmrf6ftxsdhr instead of ksou5aqw7w5a. So far, no luck. 😅

⤋ Read More
In-reply-to » 🥳 Finally! After nearly 4 years, yarnd v0.16.0 "Silver Sojourner" is out! 🚀 Twt Hash v2, SQLite FTS5 search, HTMX-powered UI, first-time setup wizard and literally hundreds of bug fixes 🐛

@prologic@twtxt.net seems to be working just fine mate! Thanks for your efforts and especially making the upgrade painless.

⤋ Read More
In-reply-to » Media had to clean a lot of gunk off the top of the van I have to wake up back from our holiday! 😱

I believe the tree that we stayed under was some kind of fig tree and on top of dropping little fig fruit and another little debris. I think we also got a bunch of butt poop and shit on top of the van’s roof. 🤣

⤋ Read More
In-reply-to » Since I keep missing #Caturday, I figured I'd change it up today with pics of our pibble, The Princess Peaches, framed by the light of the window.

@david@daiwei.me @GabesArcade@gabesarcade.com Thanks.

The cats don’t actually care much (since they’re cats), but Princess Peaches is prone to bouts of extreme jealously, and has been giving me the side-eye for sharing pictures of the cats rather than her.

I say the world needs both more princesses and more Peaches! 😄

⤋ Read More
In-reply-to » New in the Twtxt App 🥳 a Hosted feed backend — claim a nick, one tap, no account, no server, nothing to run. Your feed lives at https://twtpub.com/u/yournick and you're posting from the app straight away 🎉

@david@collantes.us heads up 👋 that verification code never reached you — outbound email was broken on my end (my mail relay was rejecting twtxt.net senders 🤦‍♂️). Fixed + deployed now 🥳 give the hosted feed another go, it’ll land this time 🤞

⤋ Read More
In-reply-to » @prologic I really like how these two apps pair-up. Seeing as I'm still tweaking TwtKpr, I'm considering adding support for the same APIs as twtd (so maybe it can be used as another backend for Twtxt.App). 🤔

@itsericwoodward@itsericwoodward.com Wrote it up 👌 Single-user twtd API is now documented (plain JSON, one bearer token) — posting, uploads, profile, followers + WebFinger: https://git.mills.io/yarnsocial/twtd/src/branch/main/API.md 🎉 Shout if anything’s unclear for TwtKpr 🙏

⤋ Read More
In-reply-to » New in the Twtxt App 🥳 a Hosted feed backend — claim a nick, one tap, no account, no server, nothing to run. Your feed lives at https://twtpub.com/u/yournick and you're posting from the app straight away 🎉

twtpub.com is just the default instance tho — it’s a multi-tenant twtd, AGPLv3. Run your own and I’ll list it in the app’s picker so folks choose where to land 🤗 keeps it decentralised + spreads the load. Docs → https://git.mills.io/yarnsocial/twtd

⤋ Read More
In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

Just depends, if I get overwhelmed and can’t keep up with demand, I’ll insist on a Gitea Issue(s) so I can organise the work.

⤋ Read More
In-reply-to » @kat omg i haven't been here in FOREVER i'm sorry yarn friends!!! i've had a lot going on including being extremely depressed :(

@kat@yarn.girlonthemoon.xyz let me know if mean old Bender can help on anything (especially if it is bending things [please let it be bending, let it be bending!]).

⤋ Read More
In-reply-to » Some further ideas/enhancements for Twtxt App ...

Agreed. One thing I’m not sure if I can do is reuse the native font-size / accessibility stuff. I’ll have to look into whether that’s exposed to PWA(s) at all. 🤔

⤋ Read More

Some further ideas/enhancements for Twtxt App

  • On the “Followers” tab, new followers should appear at the top I thnik.
  • On the Following/Followers, each feed should be clickable/tappable.
    • Maybe also tidy it up a bit, displaying the full raw Feed URI is messy.

⤋ Read More

Hurray, I can now press gg instead of g to go to the top in tt. Much better! :-) Other multi-key combinations are also easily possible now.

I should probably write a real article about this at some point, but here we go. The only downside with my new key binding system is that it breaks tview’s established pattern. You’ve got an InputHandler(), that is implemented using WrapInputHandler(…). It typically then directly implements the switching logic depending on the key press. Something like this:

func (w *Widget) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
    // WrapInputHandler allows for intercepting key events with SetInputCapture(…)
    // from the outside for customization. This handles the default key bindings.
    return t.WrapInputHandler(func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
        switch event.Key() {
        case tcell.KeyRune:
            if event.Modifiers() == tcell.ModNone {
                switch event.Rune() {
                case 'k':
                    w.scrollUp()
                    return // we already handled the event, stop processing

                case 'j':
                    w.scrollDown()
                    return
                }
            }
        }

        // We didn't handle the key event. Maybe the parent
        // widget knows what to do with it.
        if handler := w.parent.InputHandler(); handler != nil {
            handler(event, setFocus)
        }
    })
}

From the outside, you can intercept and either stop or continue the widget’s original key handling with a potentially rewritten key event using SetInputCapture(…):

w := NewWidget()
// customized or additional key bindings
w.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
    switch event.Key() {
    case tcell.KeyUp:
        // Rewrite the event, so the "cursor up" key is an alias
        // for the vim key binding "k", that is handled by the
        // wrapped input handler above. (I know, I know, this is a
        // completely unrealistic example, why would anyone use
        // cursor keys when there are vim key bindings available?!)
        return tcell.NewEventKey(tcell.KeyRune, 'k', tcell.ModNone)

    case tcell.KeyRune:
        if event.Modifiers() == tcell.ModNone {
            switch event.Rune() {
                case 'q':
                    app.Stop()
                    // we already handled the event, do not pass it
                    // to the wrapped input handler above
                    return nil

                case 'r':
                    toggleMessageReadStatus()
                    return nil
            }
        }
    }

    // we didn't handle the event, pass it to the wrapped
    // input handler above
    return event
}

Since they all expect a single key, I’ve noticed that using multiple dedicated KeyBindings of mine on these different levels kinda breaks multi-key handling with common prefixes. The outer-most KeyBinding captures the prefix, but it can’t transfer it to the inner one if not handled by the outer one. At least not without some more (potentially ugly) changes. So, I now have to work with just a single KeyBindings object for the entire widget chain (if it consists of multiple other widgets or the regular input handler and input capture are in the game). The outside needs to register all its key bind customizations or extensions at the same level that the original widget handles its default ones. Doable by exposing the widget’s KeyBindings instance, but not pretty. You always have to keep this in mind.

With the KeyBindings, it will look like that:

type Widget struct {
    parent tview.Primitive

    // make it available to children or the outside either by
    // direct field access or by providing a getter method
    KeyBindings *bind.KeyBindings
}

func NewWidget() *Widget {
    w := &Widget{KeyBindings: &bind.KeyBindings{}}
    w.KeyBindings. // default key bindings
        Bind0(bind.KeySequence('k', w.scrollUp).
        Bind0(bind.KeySequence('j', w.scrollDown)
    return w
}

func (w *Widget) InputHandler() InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
    return t.WrapInputHandler(func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
        // also note the missing support for focus transfer at the moment
        event = w.KeyBindings.Capture(event)
        if event == nil {
            return
        }

        if handler := w.parent.InputHandler(); handler != nil {
            handler(event, setFocus)
        }
    }
}

And then from the outside, or in a child widget:

w := NewWidget()
w.KeyBindings. // additional or customized key bindings
    Bind1(bind.KeySequence(tcell.KeyUp), func(*tcell.EventKey) *tcell.EventKey {
        return tcell.NewEventKey(tcell.KeyRune, 'k', tcell.ModNone)
    }).
    Bind0(bind.KeySequence('q'), app.Stop).
    Bind0(bind.KeySequence('r'), toggleMessageReadStatus)

When directly working with tview primitives that are not part of custom widget implementations, the following works well so far:

textView := tview.NewTextView().
    SetWordWrap(true).
    SetText("…")
    SetScrollable(true)
textView.SetInputCapture((&bind.KeyBindings{}).
    Bind0(bind.KeySequence('q'), app.Stop).
    Bind1(bind.KeySequence('g', 'g'), func(*tcell.EventKey) *tcell.EventKey {
        return tcell.NewEventKey(tcell.KeyHome, 0, tcell.ModNone)
    }).
    Capture)

I need to sleep on this some more.

Also, writing very long messages like this one is really not all that fun in tt’s editor. I should absolutely provide a way to shell out to vim.

(Took me about one and a half hours to compose, holy crap. But not only because of not using vim. Although, that might have saved me a quarter hour or so for sure. Proof-reading this message also uncovered quite a few bugs in my real documentation. So, that’s a big win!) Good night!

⤋ Read More