Skip to content

fix: cross-instance settings link recognition without hardcoded app.sable.moe#695

Merged
7w1 merged 7 commits intodevfrom
hazre/fix/remove-settingslinkbaseurl
Apr 20, 2026
Merged

fix: cross-instance settings link recognition without hardcoded app.sable.moe#695
7w1 merged 7 commits intodevfrom
hazre/fix/remove-settingslinkbaseurl

Conversation

@hazre
Copy link
Copy Markdown
Member

@hazre hazre commented Apr 16, 2026

Description

Fixes #646

Changed settings link behavior to use a query parameter marker instead, this avoids hardcoding app.sable.moe, keeps links valid on non-Sable clients, and lets self-hosted Sable instances recognize links copied from other Sable instances without misclassifying arbitrary third-party /settings/... URLs.

Example: https://client.example/settings/account?focus=display-name&moe.sable.client.action=settings

Edit:

I've ended up expanding the scope of the PR. Thanks to some suggestions from @dozro and also general QoL improvements.

  • Settings link URLs now get rewritten when sent from the RoomInput by turning bare settings URLs into markdown links, so they look better on non-Sable clients.
    • Example on non-Sable clients: Settings > Emojis & Stickers > Select Pack
    • Raw markdown sent: [Settings > Emojis & Stickers > Select Pack](http://localhost:8080/settings/emojis?focus=select-pack&moe.sable.client.action=settings)
  • Hardened settings link detection to avoid misclassifying invalid or malformed URLs as settings links.
  • Added validation so a settings link only renders as a settings chip if it points to a real shareable settings target that exists.
  • Invalid or malformed settings-looking URLs now fall back to normal links instead of rendering as settings chips or trying to open invalid focus targets.
  • Fixed a styling issue where the settings link chip was not vertically aligned with surrounding text.
  • Removed settings links from dynamic/user-driven rows, such as emoji packs and similar targets that are not stable to share across clients or instances.

Migration note:

  • settingsLinkBaseUrl is no longer used and can be removed from config.json.

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

@hazre hazre requested a review from 7w1 as a code owner April 16, 2026 18:07
@hazre hazre marked this pull request as draft April 17, 2026 19:26
@hazre
Copy link
Copy Markdown
Member Author

hazre commented Apr 17, 2026

adding one last thing before being ready

@hazre
Copy link
Copy Markdown
Member Author

hazre commented Apr 19, 2026

It ended up being many things. I updated the PR description.

@github-actions
Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

Status Preview URL Commit Alias Updated (UTC)
✅ Deployment successful! https://pr-695-sable.raspy-dream-bb1d.workers.dev 87da39e pr-695 Sun, 19 Apr 2026 11:47:25 GMT

@hazre hazre marked this pull request as ready for review April 19, 2026 12:11
@7w1 7w1 added this pull request to the merge queue Apr 20, 2026
Merged via the queue into dev with commit a029580 Apr 20, 2026
12 checks passed
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.

Fix cross-instance settings link recognition without hardcoded app.sable.moe

2 participants