Skip to content

Fix thread hang edge case#778

Merged
7w1 merged 2 commits into
devfrom
fix/thread-edge-case
May 9, 2026
Merged

Fix thread hang edge case#778
7w1 merged 2 commits into
devfrom
fix/thread-edge-case

Conversation

@7w1
Copy link
Copy Markdown
Member

@7w1 7w1 commented May 8, 2026

Description

Fixes the bug that occurs when a reply to a message that also has replies (so a message in the middle of a reply chain) has a thread started on that message causing a hang.

My shortcut introduced to improve loading speeds by bypassing the SDKs on-load thread single event spam created empty fake thread events whenever it was called. It assigned each of those as a thread root message, bypassing the SDKs various checks. As a result, when a thread was started involving those bypassed shells, uh, they didn't always get properly reloaded and had extraneous data causing infinite loops and whatnot.

Now, long story short, there's an extra method that actually checks for the thread root along with associated fixes to reduce rerenders and calculations and... well I tried a lot of random stuff, some works, some didn't, and to be totally honest I'm not 100% sure how all these changes work.

But hey it works! I think thread performance is still a little worse than the main timeline, not specifically related to this, but that's all noted and out of scope for this PR.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

AI disclosure:

  • Partially AI assisted (clarify which code was AI assisted and briefly explain what it does).
  • Fully AI generated (explain what all the generated code does in moderate detail).

AI was involved in the debugging stages to locate the issue and handled the test case updates.

@7w1 7w1 requested a review from hazre as a code owner May 8, 2026 21:44
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

Status Preview URL Commit Alias Updated (UTC)
✅ Deployment successful! https://pr-778-sable.raspy-dream-bb1d.workers.dev a37b32b pr-778 Fri, 08 May 2026 21:47:26 GMT

@7w1 7w1 merged commit 5024f55 into dev May 9, 2026
12 checks passed
@7w1 7w1 deleted the fix/thread-edge-case branch May 9, 2026 19:54
Septicity pushed a commit to Septicity/Sable that referenced this pull request May 10, 2026
> [!IMPORTANT]
> Merging this PR will create a new release.

## Fixes

* Self-hosted deployments can set optional `settingsDefaults` in
`config.json` to override built-in client settings. See the README for
details. ([SableClient#785](<SableClient#785>) by
@7w1)
* Updated the math detection to avoid accidental detection when talking
about math or spamming dollar signs.
([SableClient#779](<SableClient#779>) by @7w1)
* Added a couple new settings for max incoming inline image height and
default height for unspecified.
http://localhost:8080/settings/appearance?focus=incoming-inline-images-default-height&moe.sable.client.action=settings
([SableClient#772](<SableClient#772>) by @7w1)
* Fixed links with suppressed previews not having the arrow brackets
readded when editing a message.
([SableClient#772](<SableClient#772>) by @7w1)
* Added the ability to cap preview embed size.
http://localhost:8080/settings/appearance?focus=link-preview-image-max-height&moe.sable.client.action=settings
([SableClient#783](<SableClient#783>) by @7w1)
* Fix the inconsistent sizing for the read receipt dialog boxes.
([SableClient#772](<SableClient#772>) by @7w1)
* Fixed room avatars set in the settings cosmetics menu not applying.
([SableClient#772](<SableClient#772>) by @7w1)
* Fix room names being overriden when only 1 other person is in a room.
([SableClient#784](<SableClient#784>) by @7w1)
* Fix small text being parsed in code blocks and not being escapeable.
([SableClient#782](<SableClient#782>) by @7w1)
* Fixed the hang when a message that replies to a message has a reply,
and you attempt to start a thread on that message.
([SableClient#778](<SableClient#778>) by @7w1)
* Fix RTL/LTR mixed text formatting and alignment in messages
([SableClient#743](<SableClient#743>) by
@sinasadeghi83)
* Readded various missing settings from the settings sharing list.
([SableClient#765](<SableClient#765>) by @7w1)
* Various small adjustments to the themed profiles for better
consistency. ([SableClient#777](<SableClient#777>) by
@7w1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant