Skip to content

Releases: asimons04/tesseract

1.4.30

06 Feb 02:09
Compare
Choose a tag to compare

1.4.30

Bugfixes

  • "Moderator View" listing type was broken

  • Better truncation of modal titles

  • Tightened regex pattern to filter out links that are similar to user/community links.

  • The comment button on posts in the feed did not respect the "Open posts in new tab" setting.

  • Flairs should now detect if there are spaces before or after them in the post title. e.g. Check this out [Video] wouldn't have rendered [Video] as a flair since there was a space after.

  • Works better with Lemmy's stupid federated image proxy URLs; updated image/video/audio detection functions to account for that stupidity

  • Tesseract's (less stupidly implemented) image proxy can now handle more weird CDN formats if it has to un-proxy a thumbnail URL from Lemmy's stupid federated proxy URL

  • Custom emoji's weren't respecting aspect ratio

  • Nested list items were broken; added a regex to detect those and not trim those lines during pre-processing

  • If no spoiler title was provided, the default fallback "Spoiler" wasn't being applied

  • Re-ordered post type detection scripts so posts with embed_video_url aren't erroneously rendered as image posts (e.g. Imgur...somtimes)

  • Field for alt text shows up in post form if API is 0.19.4 or higher (was previously set for 0.19.5 as the minimum)

  • Don't attempt to mark dummy/preview post as read

  • Previewing content in modals is now properly contained when maximized (videos, embeds, etc)

  • Iframe link previews (previewing a link that allows access via iFrame) are now screen height (well, 80% to account for the modal wrapper/button bar).

    • Since Wikipedia doesn't provide useful metadata, those always open as iframe, even on mobile where the iframe button is removed. These now render much better since they're nearly full height instead of relative to the screen width.

Minor Changes

Posts

  • On 0.19.4 or higher, you can now upload a custom thumbnail on posts

  • Post embed descriptions tweaked a bit

    • Link metdata title is truncated unless the description is expanded
    • Description text area is now a scrollable div when expanded (max 20vh) rather than expanding in full
    • Simplifed logic that truncates the non-expanded text
    • The whole embed description is collapsible
  • Badges that are clickable now have visual indicators on hover

  • "Old" and "Controversial" comment sort options now available

  • Too many minor tweaks to name individually (consequence of re-writing the post renderers)

  • You will now be prompted before navigating away if you have post or post edit in progress.

Audio / Video Player

  • Post images, audio, and videos now have a background with a blur effect
  • Volume setting is now saved and re-used on subsequent videos and audio posts

Feed

  • Moved listing type and sort selectors out of sub-navbar and into feed component

    • Similar to where they are in user profiles
    • Makes state management in the main feed much less clunky since it's not having to watch and sync 3 potential ways to set those
  • When expanding a post body in the feed, it only expands to a maximum of 50% of the viewport height and scrolls. Prevents opening a huge wall of text which requires a lot of scrolling in the feed to collapse again. This can be disabled in Quick Settings -> Scroll Post Body in Feed" or Settings -> Feed -> Scroll Post Body in Feed`

  • Scrollable area in the feed now includes the margins

  • Got rid of the feed margin container and just limit the width of the posts directly; width is toggleable with the same "Expand Margins" button and emulates the old behavior. Posts are slightly narrower now, but they're more consistent when resizing the window and less likely to need to expand the margins in odd, small width displays.

  • New view option: Wide Card (Card View + No Margins)

  • Moved the listing type and sort direction dropdown menus out of the sub-navbar and into the feed.

All Media is Now Click to Play

It's much more memory/network-efficient, most people don't seem to have embeds always enabled anyway, it doesn't work with Invidious/Piped, and some media has to be click-to-play (Loops, Dailymotion) for various reasons/limitations.

Making all media click-to-play has also greatly simplified the render logic.

The non click-to-play logic has been removed as well as the settings for handling those options.

Settings

  • Removed 'enable embeds in feed' and 'enable embeds in post' options since all media is now click to play
  • Move some options into "Advanced" section
  • Toggling infinite scroll will now clear any snapshots in the cache and reload the feed from the API (needed to sync the page cursors back up)
  • New option to show custom emojis as large (like Lemmy UI) or emoji-sized. Default is disabled / regular emoji sized

New Features

Modals Can Now Close When Pressing 'Back'

This has been something I've wanted for a long time now, and it's finally here.

When a modal is active, you can now close it by navigating back: clicking the browser's back button, using the mobile OS 'back' button, gesture-swipe back, back key on mouse, etc. Anything that tells the browser to "go back" will close the modal. This also includes the zoomable images.

Support for Some Tidal Embeds

Links to Tidal albums, tracks, and playlists should now embed as interactive playlists. As with other embeddable media, you don't need to use any kind of special share link; just the link from the browser tab.

When clicking a Tidal link in the comments (or choosing 'Preview' from the post action menu on a Tidal post), the link preview modal will also show the album or playlist as an embed.

Posts Can Now Load in Modals

By default, posts open to the post page same as they always have. In addition to optionally opening them in a new tab, you can now load them in a modal.

The setting is in Quick Settings -> Open Posts in Modal or Settings -> Feed -> Open Posts in Modals

This is nice if you want to open posts and read/respond in the comments without leaving the feed.

Additionally, on comment items in the inbox and user profiles, there is a button to jump to the comment thread in a modal. Very useful for getting context without leaving your current spot.

Report items also have this ability in order to easily get context before making a mod decision on an item. It will even bring up the whole comment thread in the modal if the reported item is a comment.

Behavior Overview

  • When viewing a post in a modal, clicking the title will take you to its /post/ page (even if it's a remote post)

  • The modal does not automatically resolve foreign post/comment links to your home instance. It first loads it remotely, and there is a button to load it on your home instance. This could be automatic, however:

    • It may be an item your instance doesn't know about
    • The referenced item's creator may be banned on your instance
    • The referenced item may be on an instance yours doesn't federate with
    • You may want to see the full context from the post's home instance
    • If someone links to a comment, it avoids having to double-resolve the post and that particular comment. It also provides context by having the whole comment chain rather than just the comment in isolation (e.g. if your instance doesn't have record of it yet).
  • If you click into another post from within the modal (e.g. cilcking a crosspost item or another linked post), it will keep a history and back/forward arrows will appear in the top-right of the modal title bar. Use these like you would a browser's back/forward buttons to return to previous entries. Note, though, that these are not bound to the browser's history, so hitting "back" in the browser will close the modal.

  • Even with the "Open posts in modals" option disabled, cilcking the badge-ified post/comment links will open those in a modal. Useful for referencing what was linked without leaving your current position.

  • The post/comment badge buttons are also regular links. Right-clicking and choosing "Copy Link" or "Open in New Tab" work as you would expect. Middle-clicking also will open them in a new tab.

Limited Server Side Rendering (SSR) to Support Metadata Fetching

A bug was submitted that when posting a link that resolves to a Tesseract resource (e.g. https://tesseract.dubvee.org/post/lemmy.world/123456), the metadata would be the generic Tesseract info rather than the metadata for the content. I had been content to leave it at that (Photon and Alexandrite both behave the same way), but I figured I'd give it one more go.

Tesseract is fully client-side rendered, and I'm not a huge fan of SSR in general. That said, sometimes SSR is useful (like for providing metadata to non-browsers), but every "correct" way I've tried to implement partial SSR has met with failure.

What ended up working, and working quite well, is less SSR and more heavy use of server-side hooks to redirect non-browser user agents to an internal API route that returns a bit-banged, minimal HTML document with the meta tags populated for post, comment, user, community, and site details.

Which is fun because it, like Tesseract's other internal API endpoints, runs on top of my home made Express-like router framework that runs inside the SvelteKit server hooks.

It's not pretty (though it is elegant), but it works. At some point, I'm going to be basically re-writing the whole application in either Svelte 5 or React (haven't decided yet), and I may explore a more SSR-oriented design at that phase (or not).

Metadata is Generated for the Following:
I have metadata generating for:

  • /post/[instance]/[post_id]
  • /post/[post_id]
  • /comment/[comment_id]
  • /u/[username]
  • /u/[username@instance]
  • /c/[community_name]
  • `/c/[community_name@instanc...
Read more

1.4.29

13 Jan 22:46
Compare
Choose a tag to compare

1.4.29

Bugfixes

  • Tweaked font sizing a bit so that H3/H4 heading differences are more pronounced.

  • Added meta header to instruct Dark Reader to ignore the app. It's got automatic and manual toggle for dark mode (system preference or manual toggle), and DR doesn't render it correctly when it's enabled.

  • Code spans inline with ! and @ community/user links cause the user/community links to not render

  • Opening outside links in the same tab and returning back was causing lifecycle issues

    • Outside links now always open in new tab, "open links in new tab" option has been removed (open posts is new tab is still available though).
  • Collapsing/Expanding the sidebars no longer collapse/expand inbox/report/application items to the default state

  • Add route at /registration_applications to redirect to /admin/applications so the link in the "{User} has applied to join {instance}" emails from the API work if Tesseract is replacing Lemmy-UI.

  • When updating community info/settings, any cached getCommunity response is updated.

  • Custom emojis are no longer treated the same as regular markdown images. Now display inline at 24x24 px.

New Features/Enhancements

Favicon Uses the Instances's Icon

Favicon uses the instance's site icon rather than the static Tesseract logo. Automatically changes if you switch instances and falls back to the Tesseract logo if no site icon is available.

Login Error Message Handling

Now has cleaner error messages if there is an error during login:

  • Invalid username/password
  • Invalid / expired / missing TOTP token
  • Modals with additional info for non-standard login errors (registration pending/denied, banned)

Registration Application Deny Reason Now Shown During Login

If a user whose registration application was denied attempts to log in, instead of a generic toast error message, a modal will pop up informing them that their application was denied along with the reason provided.

The reason is rendered as markdown, so if you include links for appeals, follow-ups, etc, those will be actionable.

Registration Pending Indicator During Login

If a user tries to log in while their registration application is pending, instead of a small toast error, a modal will pop up with a more detailed and user-friendly explanation.

Banned Indicator During Login

If someone has been banned from the instance, instead of a generic login failed toast, a modal will pop up with a more detailed explanation.

The modal will also try to fetch that user's details from the modlog to display whether the ban is temporary or permanent, the reason, and, if temporary, the expiration date.

Admins Can Now Set Application Rejection Preset Reason

In Settings -> Moderation, admins will see a new section called "Registration Application Deny Template". This allows you to pre-set a reason for registration application denials that can be one-clicked into the deny reason on the Applications page.


1.4.28

09 Jan 18:07
Compare
Choose a tag to compare

1.4.28

Bugfixes

  • [Bug] Default moderation template had a missing piece (community) and didn't really make sense.
  • [Bug] Don't poll notifications from Notification system time handler if no active profile. The poll function didn't actually run, but no reason to call it if no profile
  • [Bug/Annoyance] When highlighting text in the markdown editor and using the toolbar buttons (e.g. highlight a word and click "bold"), the text area would annoyingly scroll to the bottom. No longer does it do that.
  • [Bug] Usernames in direct message headers was improperly truncating

Minor Changes

  • [Settings] Moved inbox/notification related settings to new section in /settings page.
  • [Notifications] Notification poll interval is now configurable
  • [Infrastructure] Removed unused settings key for notificaiton rate
  • [Infrastructure] Can now specify section URL param on /settings page to open the specific panel (useful for linking to a settings section; yet to be implemented elsewhere)
  • [Direct Messages] Updated the message header to be more email-like

Vote Viewer Now Available to Mods

If connected to an instance running API 0.19.4 or higher, the vote viewer is now available to mods for items in their communities. I had always planned for it to be, but I wasn't aware that had been implemented in the API already. Apparently it's been available to mods at the API-level since 0.19.4 (thanks @[email protected] for pointing that out).

For those unaware, the vote viewer is accessible from the Moderation Modal -> View Votes... button.

Posts

All User Defined Invidious/Piped Instances Available

The link menu / alternate source selector for YouTube-like videos now lists all user-defined Piped/Invidious instances instead of a single, static link to the currently-selected instance.

Community Profile Modals

Post Drafts Less Likely to be Accidentally Lost

When creating a post in the community profile modal, the "Return to Home" back arrow will now prompt you for confirmation if there is anything in the post form. Helps prevent accidental loss of post draft via mis-click.

Upload Cleanup

When clicking the "return to home" button from the "Create Post" panel, the resetForm function from the post form will be called which will take care of cleaning up any uploaded media that would otherwise be abandoned.

Markdown Editor

Added new buttons to the toolbar

  • Insert User Link
  • Insert Community Link
  • Table
  • Code Block
  • Formatting Help

The "Insert User/Community Link" buttons will let you search for a user and/or community and insert links to them in the body at the current cursor position. The inserted links are in the @[email protected] / [email protected] format.

The "Table" button will create a markdown table template.

The Code Block button is a menu which will let you select the lanaguage (or plaintext/other).

The Formatting Help button will load a modal with a markdown cheatsheet.

Toolbar Now Reflows

The markdown editor toolbar (with the formatting, emoji, image, etc) buttons will now reflow on mobile/small width screens rather than scroll horizontally.

Various Tweaks to Markdown Editor

  1. Heading button is now a menu; can select headings 1 through 4
  2. Fixed bug where highlighting text and using the toolbar buttons would always scroll it to the bottom
  3. Numbered and bullet lists now give you three entries
  4. On spoiler, code block, and lists, the cursor now goes to inside the block or in position for the first list item (respectively)
  5. Highlighting text and clicking the "Link" button will now automatically put the text into the link label. For example, if you highlight the text "Home" and clicked link:
    • Old behavior: Home -> [Label](url)Home
    • New behavior: Home -> [Home](url)

1.4.27

07 Jan 19:52
Compare
Choose a tag to compare

1.4.27

Bugfixes

  • The 'Filter Annoying CC Licenses on Comments' wasn't working since the markdown pre-processor re-write.
  • Post titles are not longer linkified. This includes unwanted mailto:user/[email protected] email links when the titles contain [email protected] or @[email protected].
  • Dynamically import separate CSS themes for HighlightJS depending on app theme. Unfortunately, this is not reactive to changing the app theme without refreshing the page.

New Features

Misc

  • Added "RemovePaywalls.com" as an option in the archive link selector

Inbox

  • Can now set an option to expand inbox items by default. Settings -> General -> Expand Inbox Items by Default
  • Can now configure how many inbox items are retrieved per page. Settings -> General -> Inbox Items Per Page
  • New inbox sidebar button to expand/collapse all

Reports

  • Can now set an option to expand all report items by default. Settings -> Moderation -> Expand Reports by Default
  • Can now configure how many report items are retrieved per page. Settings -> Moderation -> Report Items Per Page
  • New sidebar button to expand/collapse all reports

Registration Applications

  • Can now set an option to expand all registration applications by default. Settings -> Moderation -> Expand Applications by Default
  • New sidebar button to expand/collapse all applications

1.4.26

03 Jan 22:59
Compare
Choose a tag to compare

1.4.26

Bugfixes

  • Add /report route that redirects to /moderation so the email links from the API work correctly.
  • Add moderation button to crosspost items
  • Long links in the modlog were not wrapping when reflowing to mobile
  • Pause markdown videos/audio when leaving viewport instead of destroying (same as how post videos are now handled).

New Features

Support for Video Uploads

Less a "new feature" and more a bugfix for a feature I didn't realize already existed and mostly worked lol.

The file upload handler sets the supported MIME types, but it has no way to enforce them (it's more a suggestion to the browser). A user reported that they forced a video upload, and it worked, but was buggy. This was a surprise since I'd never actually tested or even thought about supporting video uploads.

So I patched up the upload handler to support video/mp4 and video/webm formats. The previewer will only show the first frame as if it were a static image, but it will no longer glitch out. It will also automatically disable and hide the "Pre-convert to webp" options if a video is detected.

I'm not sure how useful this will be since most instances limit upload file sizes or disallow videos, but if you're on a supported instance, hey, you can do videos now.

Moderation

Added support for issuing bulk community bans/unbans. Highly useful if a known troll is roaming about and you want to quickly ban them from all of the communities you moderate. It works a little differently depending on where it's invoked and whether you're a moderator and/or an admin.

In all cases, the expiration date, reason, and whether to remove content applies to all communities (e.g. the API is called for the same user with the same options and loops through the list of communities you moderate).

User Profile Modal and Moderation Modal:

  • New option in the user profile modal to ban/unban that user from all of your moderated communities. [Mods + Admins]

  • New option in the "Ban User [From instance]..." form to "Ban All Remote Communities". Will issue community bans for all remote communities you may be moderating in addition to the instance ban for your home instance. The "remote" filter is to avoid spamming the modlog in case you're an admin of a large instance (technically you moderate all local communities you're subscribed to) [Admins Only]

Community Profile Modal:

  • The "Ban/Unban" option has been extended to allow optionally banning/unbanning the supplied user from all the communities you moderate. [Mods + Admins]

1.4.25

31 Dec 00:47
Compare
Choose a tag to compare

Bugfixes

  • When viewing a user's submissions in the profile modal from a /c/community page, the post meta is hiding the community and treating inCommunity as true.
  • Removed code to switch between community icon and user avatars in CommentMeta component since that's actually useless since you can't browse just comments in a community.
  • Comment card colors were not reactively updating when user was banned with content removal from site/community
  • When removing/hiding a community, the local cache of the community details was not updated to reflect that; had to open the app in a new tab to get a new session in order to fetch it again. The cache now updates on block/unblock/hide/unhide.

1.4.24

29 Dec 00:58
Compare
Choose a tag to compare

1.4.24

New: Documentation for Mod Tools

I'm (slowly) getting documentation / screenshots written up now that the basic UI paradigm has stabilized. Until now, only the server config/deployment is thoroughly written-up.

The first area of documentation for the frontend is for the mod tooling.

See: Documentation - Mod Tools

Misc Bugfixes

  • Prevent unwanted "scroll to top" behavior when previewing a post.

  • Comment image backgrounds were the same color as the alternate card color in light mode. Set the image background a shade darker

  • Fixed bounding in Community Settings -> Team user items

  • Hidden communities were being filtered out; the documentation/description is vague, but hiding a community seems to hide it when non-admins list/search communities and prevent it from showing up in /all but users already subscribed or those going to it directly should still be able to see it.

  • Tables now scroll horizontally instead of overflowing outside the page bounds

  • Stupid invalid user/community link formats break the UI when clicked (e.g. [anything]([email protected]) and/or [anything](@[email protected])). Even though "thEy WoRk iN lEmMy Ui !1!1!!!" they're not valid hyperlinks and should not be used.

  • Rendering of user/community links stopped if there were more than one in the same line of text.

Bugfix + Enhancement: More Markdown Pre-Processor Optimizations

In the previous release, I started breaking the markdown up into smaller pieces and processing it line by line. This worked much better than trying to grok it all as one big blob and allowed me to simplify my regex patterns significantly.

In this release, I've gone one more step and am breaking the lines apart and processing text word-by-word. This extra granularity has allowed me to further simplify regex patterns and address a few shortcomings such as missing a render when two user/community links were on the same line.

The main benefit here, aside from better and more consistent rendering, is that it has greatly reduced my reliance on regex look-behinds which are not widely supported.

Tweaks and Enhancements

Modals

Could probably call this release "Modal Mania" because of all the work they've seen.

The modals were already horizontally responsive, and I wanted to make them veritically responsive as well. They already kind-of were, but it was inconsistent in places. This required a significant refactor / overhaul of the main modal component which underpins all of the different modals.

Refactored most of the system modals to take advantage of the changes.

Misc

  • When browsing a community or user's submissions in their respective modals, the modal is now taller and has scroll to top/bottom buttons for convenience.
  • When searching a user's submissions from the moderation modal, the search is now scoped to the community relevant to the mod modal.
  • Increase gap between parent comments and parent->children comments in comment section.

1.4.23

26 Dec 23:35
Compare
Choose a tag to compare

1.4.23

This is a minor feature release. Nothing new for regular users, but some new capabilities for admins.

Bugfixes

None discovered since 1.4.22 :)

New Features

Tweaked Admin Area

Got rid of the sub-navbar menus to select which admin section is active. Now uses a button bar like is used in the user profiles.

New Registration Application Manager

What started off as simply adding a text field to the registration applications so the deny reason could be recorded turned into just flat-out re-writing the whole registration application manager.

It makes me sad that I think this is a cool feature update and very few people will actually see it or know it exists lol.

Changes include:

  • More compact/dense as it now uses the inbox / report form factor (expandable accordions)

  • Much needed visual / design overhaul

  • Can now specify the reason when denying an application

  • There's a button which will let you search for alts of the same username. Very useful if you want to see if they're instance hopping and want to check if they're a good fit for your instance. Also useful to see if someone is spinning up lots of alts rapidly (e.g. spammers).

  • A colored badge on each entry indicates the application's status:

    • Pending action (Grey)
    • Approved (Green)
    • Denied (Red)
  • Option to create a modlog entry when approving/denying the application. Disabled by default, accessible via button and/or toggle.

    • Denying an application creates a "ban user" event using the deny text as the reason. This is useful in case denial emails are still not being sent out and the user wants to check their application status.
    • Approving an application will intelligently unban a user if they're banned (i.e. from a mistaken denial).
    • Approving an application with a modlog entry will be a user un-ban (even if they're not banned, it'll still log it)
    • Approve unban message is Registration application approved.
    • Deny ban message is Registration application denied: ${REASON_YOU_SUPPLIED}
  • More information about the applicant:

    • Signup email address
    • Whether the email address has been verified
    • Whether the signup email address is to a known disposable/temporary email provider

Other UI Tweaks

  • Crosspost items have less padding and rounded borders now

1.4.22

25 Dec 23:02
Compare
Choose a tag to compare

1.4.22

Bugfixes

  • Videos are no longer destroyed, just paused, when scrolling out of viewport
  • Better truncating of user/community links
  • Better width bounding to go with the truncation fixes
  • Previewing a community in a modal while on the /c/{community} page of another community would override the modal's settings and show the community from the page route.
  • Fixed Community Menu (from top navbar) overflowing in Firefox
  • Added Loops to the hybrid view configuration panel to allow them to optionally always render as cards
  • Title on /site page was still set to "Legal".
  • Add missing tooltips on user and community links
  • Text was not flowing around the thumbnail image in compact view

Tweaks

  • Comments
    • Comments now use a card effect with alternating shades depending on the depth
    • Changed/standardized how the comment coloring is performed (jumped-to comment, distinguished, removed, etc)
  • Community Groups
    • Added the community groups to the Community Menu in the top navbar
    • Updated the community group management components
  • Sidebar
    • Decreaxed x-axis padding in the sidebar
  • Misc UI
    • Updated several areas to work better with the updated community/user links
    • Reversing the action bar direction no longer reverses the vote button ordering (i.e. upvote stays on the left, downvote on the right)
    • Tweaked crosspost item component

1.4.21

23 Dec 16:14
Compare
Choose a tag to compare

1.4.21

I'm happy to finally have 1.4.21 at a place where I'm comfortable releasing it. There were a few things I wanted to touch up (search and modlog), but time just didn't allow that. I also need to switch to "infrastructure" mode for a while, so I want to wrap this up so I can do the needful on that side of things.

TL;DR: This release has support for Loops (among many other things).

Overview

This release could probably be considered 1.5.0 rather than a 1.4.x point release, but I'm going to wait until I raise the minimum supported API level before bumping the minor version. Currently, I do have support for 0.19.4+ features, but they're limited to a few minor things here and there (see README.md for specifics). I've also added the capability to automatically enable/disable features that require different API versions, so I'll likely be adding some more 0.19.4+ user-facing features in the coming releases. The newer admin/mod features, if any, will need to wait until my own instance is updated past 0.19.3 since I will be unable to test those (I can test the user-level stuff against a different instnace with one of my alt accounts there).

Most of the work in this release has been re-writing core components, getting rid of some legacy stuff, and stanardizing any redundant sections with shared components. All of this is to make the upcoming task of porting to either Svelte 5 or React easier (haven't decided which yet; I'm annoyed that Svelte has so many breaking changes. We also use React at work which is more stable in the long term).

Bugfixes

  • Added missing padding on placeholder initials if there is no site logo

  • If replying to a post/comment removal via a comment reply, send the reply before removing the item otherwise the reply will fail. (when I wrote that in the 0.18.x days, you could reply to removed comments and I just never used that feature since the behavior changed in 0.19.x)

  • When switching instances or loading the site info for another instance into the site sidebar, the taglines would sometimes get stuck on the previous instance's values.

  • Images would fail to render if @[email protected] or [email protected] were in the alt text since it would trigger the pre-processor to convert them into user/community links.

  • Memory optimization hacks; good lord Svelte is a hoarder and refuses to let go of shit. This is a huge reason why I'm probably going to port Tesseract to React instead of going to Svelte 5. Even if the memory leaks are fixed in Svelte 5, they basically turned it into React anyway, so might as well use that.

  • Fix bug where overlap in hashtags (e.g. #Photography and #Photo) would mangle the longer tag.

  • Markdown inside of code blocks is no longer pre-processed. This should fix quirks when viewing code snippets and some of the includes get incorrectly turned into hashtags. It also let me simplify some of the regex patterns since they no longer have to account for code blocks with look aheads/behinds.

  • Linking to a community on another instance (e.g. if you want to show the community on that instance rather than just linking to the community) no longer turns into a community action badge.

  • Bugfixes for bugs introduced during the rewrites have been omitted, but a lot of time was spent tracking those down and squashing them.

Bugfixes for Image Loading and Image Proxy

For efficiency, Tesseract tries to request webp versions of non-animated images at sizes appropriate for their use. e.g. 128px for icons, 256 for thumbnail images, etc. Usually this works, but sometimes remote pict-rs gets all pissy about it. Before, this would cause the image to fail to load until opening it with the Zoom which requested the raw image URL. Now, I've added error handlers for images to fallback automatically/gracefully:

[Desired Resolution and Format] -> [Desired Resolution] -> [Raw URL at default resolution] -> [Static Placeholder Image]

Similarly, if media proxying is enabled, it will use the same fallback path but via the image proxy. Depending on the user-defined fallback behavior, it will either try the raw URL or return a placeholder image.

I've also added apng animated PNG to the list of supported images.

The step to unproxy Lemmy's stupid federated proxy URLs has been moved from individual components to the image proxy URL generator function; that function is used for all images anyway and returns either the original URL or the Tesseract's proxy URL depending on user settings and if the admin has enabled the proxy module. If image proxying is disabled by the admin or the user, it will not unproxy the stupid Lemmy URL and use it as-is.

Did I mention how stupid it is that Lemmy federates the proxied URL for images instead of just returning that via the API to that instance's users? If I haven't, then let me say it's fucking stupid.


Guide: Optimizing Browser Settings for Tesseract

When using "click to play" on media posts (the default setting), the "autoplay" flag is implicitly set on the embed to prevent you from having to click multiple "play" buttons. However, any player besides YouTube (e.g. Invidious, Piped, PeerTube, etc) requires you to click the video again after it switches from thumbnail to embed. This is annoying, and YouTube only seems to get a default pass in Chrome/ium because Google says so.

To remedy this:

  • In Firefox, this mostly works with the default settings and no settings changes are needed. However, you can set the site permissions when a media tries to play (can't seem to get to that setting otherwise?) and change autoplay to "Allow audio and video" if needed.
  • In Chrome(ium): In the Tesseract tab, go into "Site Settings" and change Sound from "Automatic (Default)" to "Allow". This is very counter-intuitive, but it does address the problem.
  • If running as a Chrome(ium) PWA, the app permission settings will be at: [Three Dots Menu] -> App Info -> Settings -> More Settings and Permissions

New Features

Initial Support for Loops Videos

This has been a feature request since Loops first went live, and I finally came up with a satisfactory way to integrate Loops media. The media itself is easy to integrate. The problem is that the metadata returned for a Loops video link does not include the video URL, and there's no way to derive the video URL from the available metadata. In some cases, I can use the thumbnail image and massage that into a working video link, but more often than not, the thumbnail URL was to a pict-rs cached image rather than the value returned from Loops.

Right now, the Loops support is very "beta" but functioning well. There are a few limitations:

  • It can break at any time if Loops decides to go user-hostile and block non-browser requests via Cloudflare or something. Tesseract does a server-side lookup to basically scrape the video URL and then caches that for re-use.

  • It can also break if Loops decides to crack down on "hotlinking" the videos.

  • It only works with the main loops.video domain. For now, this is fine since Loops hasn't released its stack for self-hosting yet. Like Piped/Invidious, I'm basically going to have to have a list of Loops instances to detect. While this is great for decentralization, it's a huge pain in the ass when you want to make a nice client to integrate with them all.

  • Loops videos are not "eligible" to always shows as embeds and must use click to play. This was a choice on my end to avoid hammering Loops with requests for videos that may or may not be watched. The lookup to get the video URL is only invoked when you "click to play" from the post thumbnail image.

  • I've reached out to the Loops team to see if they would add the oc:video tag to the page metadata so the embed video URL can be obtained properly without such hacks. If they ever do add that, then the integration should work cleanly like with PeerTube and without the clunky requirement to have a list of known Loops instances and then scraping the video URL from those.

Alt Text Now Supported

If the connected Lemmy instance is on API 0.19.5 or higher, the post form will now have an "alt text" field if the URL points to an image or video (uploaded or remote URL). If the URL is not an image or direct video, or the API is below 0.19.5, the alt text field will not show up.

Under the Hood Highlights

  • Storage Compression: When data gets stored to sessionStorage, it's compressed first. This has yielded quite a bit of savings and is a workaround for the 5 MB per-key limit on local and session storage in the browser. 5 MB sounds like a lot when it's all text data, but since there's a lot of redundancy in the data returned from the API (e.g. two posts to the same community will each have a full copy of the community details, sidebar info, etc), it fills up fast when you're taking snapshots of the current state (which his how Tesseract keeps your position in the infinite scroll feeds). In the future, I plan to move to IndexedDB which does not have this limitiation and comes with additional benefits. The current plan is to use PouchDB as the wrapper library which opens the door to syncing with a Couch DB add-on to Tesseract's server component and allowing state to be maintained across devices :)

  • More Caching: For data that doesn't change often, such as site and community info, the loaders have been updated to first see if there is a cached record for that data. If so, it will be used to fulfill the API call. If not, it's requested from the server as before and cached until needed. Currently, site (local and remote) and communitiy details are cached. I'm looking into other places data can be cached, perhaps with a shorter validity period.

  • Initial Support for 0.19.4+ API Functions: Tesseract is still designed for 0.19.3...

Read more