Ask me anything.

I also develop Tesseract UI

  • 24 Posts
  • 231 Comments
Joined 2 years ago
cake
Cake day: March 17th, 2024

help-circle

  • I think you would be better served by checking for the Link header

    Can’t really do that, client-side, in a browser application. CORS is a perpetual cockblock (though I understand why it is), and I’d rather not make an internal API endpoint to do the lookup.

    The application polls Lemmy’s getFederatedInstances API endpoint at startup, so it has a list of every activity pub server your instance knows about. That’s the first and primary check for the URL that’s being searched.

    The second check is just to rule out non activity pub URLs that point to a federated instance (e…g. https://lemmy.world/modlog, https://lemm.world/pictrs/image/blah.webp, etc).

    Goal isn’t to “catch 'em all” but to catch the most used ones. If there’s one I don’t account for, either by omission or because the federated platform didn’t exist when I made the patterns, then it will just fall back to a regular search which also includes trying to resolve it as a federated URL (which is the current behavior in all prior versions).

    The goal is just to simply short-circuit the search behavior if the query is a known ap_id URL in order to avoid a lengthy search process and quickly redirect you to your instance’s local copy.




  • I’m making an “omnisearch” box.

    Paste in an AP_ID into the search field, and it auto-resolves it and redirects you to your instance’s local copy (which is very fast) instead of going through the whole search process (which is slow). To prevent false positives, I’m matching the various ap_id formats and only doing the resolution on those; anything else gets passed to search.

    Anything else that falls through the cracks just gets passed to search as usual (which also does a resolveObject lookup).

    It’s to make life easier.




  • Thanks. I’ve largely been active here for development/testing purposes lately, but agreed. That’s also why I’ve put so much effort into expanding and making a very powerful/granular filtering system in this release. Right now, I can filter entire instances, entire platforms (e.g. Mastodon), people/instances/platforms in specific communities, filter users/communities by regex pattern, etc. Makes it nice to filter people out of specific communities without blocking them entirely.

    Eh, I know I made a big stink about it (which I stand by lol), but technically Dubvee’s still online since I need it for developing/testing the admin and mod capabilities. It’s mothballed but still able to be brought back if I ever choose to and get some more admins on board.












  • I’ve had better luck with webp as far as minimizing size while preserving acceptable quality.

    Not sure what other apps do this (they really, really should!), but Tesseract can optionally pre-convert a pasted/uploaded image to webp with a user-selectable quality profile. When I ran an instance, I had a very low (250 KB) upload limit on images, and the pre-conversion made it a non-issue for all but the largest images.

    That also works to strip out metadata, though I believe pict-rs (Lemmy’s image “subsystem”) will also strip out metadata (don’t quote me on this and do correct me if I’m wrong).

    Edit: Also, whoever runs linkage.ds8.zone has Anubis setup wrong. The /api path should not be behind Anubis.



  • There’s a few more things I want to add to the media browser if I have time:

    1. [Work in Progress] Add “Search” button in the media item viewer action list. Will search for any posts or comments that use that image URL. This will help you both avoid deleting media for active content as well as finding a post/comment you made with that image (if you want to see the context).
    2. Add image to favorites. Basically there will be a second tab you can show that’s just images you’ve favorited. These can be quick reference ones, such as reaction memes.
    3. Add option to insert the image using the custom emoji syntax. This would basically let you create your own custom emojis.

    Update: All 3 of these have been added.