Ask me anything.

I also develop Tesseract UI

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

help-circle





  • but I send you a PM

    Oh, sorry. One of the new features in this dev branch is the ability to disable PMs and mentions. I’ve been running with those turned off. Seems like that feature is working lol.

    I turned DMs back on and found the message - will try to join here when I’m back on desktop. Dunno how active I can be right now, but I am eventually going to start on Piefed so would be nice to have a sounding board.

    Some of the devs are already working on shared logic/libraries between apps.

    Nice!



  • I believe you can, yeah, and I also think that “bootstraps” that instance to yours if it doesn’t already know about it. But in that case, the way I have the search written, it’ll “fall back” to regular search which also does resolveObject. That just takes longer.

    The ap_id check is just to short-circuit that behavior to avoid the lengthy, often unnecessary, search and quickly redirect you to your instance’s local copy.

    Have had that working for about a week now, and it’s pretty nice. Please do steal this feature lol.




  • 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.





  • I’ve got an indicator row between above the comment text and the username (shows things like “deleted by creator”, “banned from community”, etc"). I suppose that could indicate whether the item was altered by a user filter.

    But now I’m having second thoughts about this whole idea. Originally, I felt validated because I had kicked the idea around already, at least as a joke. But now I’m remembering YPTB, Fedi-drama, and similar communities exist and there are frequent flyers there who have nothing better to do than present things out of context and stir shit up and how this would be like giving them a loaded weapon.

    Lemme (re) think on this.


  • What it does now (well, in the dev version), is evaluate the whole comment for various rules you can set. Here, I added a keyword regex filter (words|phrases) and applied it to the “Lemmy Apps” group.

    This is how your comment shows up when it hit on those keywords:

    When content is filtered, I don’t even let it show the creator (because sometimes you just see a name and you know it’s gonna be something braindead lol).

    So I feel like that takes care of the “entire comment” portion of your idea (or at least that’s as far as I’d want to implement it). If the comment hit on any other policy rules, those would also show up in the list you see.

    For the replacement text, I’m taking WizardBeard’s advice (below) and would somehow visibly identify that the original text has been modified by a user preference. Not sure how, exactly, I would do that. Maybe strike-through the original text and insert the replacement string italicized, in a different/larger font, or something like that.

    Good morning Hello.

    What’s up? I am not a person worth talking to.

    The only complication would be that the indicator method, whatever it may be, has to be valid markdown and, thus, could theoretically be something the original person could have said.

    Filtering policy editor looks like this (this is scoped to a group, so the “Communities” tab at the top is hidden):



  • I think I could pretty easily shim that into the filter policies in Tesseract (that’s the big project for this upcoming release). I already have customizeable regex filter lists for keywords, but those only set the “filtered” flag if they’re detected and return the list of regex patterns that were matched.

    Since the filter policies can be either global or per community group, you could get pretty granular with it. I’ll look into it and see if it’s feasible to shim in.

    I jokingly thought about adding something like that already.

    Basically:

    (^Paywall(ed)?$) -> I'm going to contribute nothing to the discussion except whine that you didn't cater to my laziness and make my laziness everyone else's problem until someone else replies with an archive link I could have easily gotten myself

    I thought the feature was too absurd to flesh out, but if there’s interest, I’m open to adding it lol.


  • Good points.

    I don’t have a full plan yet (just the general idea of a plan), but when I start the journey to Piefed, it’ll probably be from the ground up or very close to that. I already need to update the codebase from Svelte 4 to Svelte 5 which is a pretty big job due to the fundamental and breaking changes between those two versions.

    The components that make up Tesseract (posts, comments, sidebars, everything) are also all heavily tied to Lemmy’s type definitions. To support Piefed, I’d have to de-couple the components in the code from Lemmy’s type def and add in an abstraction layer (both for future-proofing and to make it possible to support both if I wanted to).