Commit Graph
4075 Commits
Author SHA1 Message Date
Matt Van Horn ccfd9afc3b fix: prevent iOS overscroll on root element
Add overscroll-behavior: none to the html element to prevent the
elastic bounce-back scroll effect on iOS that competes with the
timeline scroll.

Fixes #500
2026-04-07 02:26:50 -07:00
Shea Duma 3e234492fa add blank spaces and fix regression 2026-04-07 07:01:48 +03:00
7w1 e78e97f86b Add support for displaying bundled previews MSC4095 (#590)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description
This PR wishes to display bundled previews, should they be offered, in
order to align to MSC4095.

Implements:
https://github.com/matrix-org/matrix-spec-proposals/pull/4095

Also i swear i didnt modify anything past line 75 in
/src/app/components/url-preview/UrlPreviewCart.tsx i just added a param
to UrlPreviewCard which pushed the length over the limit breaking the
params into a table format, which then put the closing angle bracket
right before the arguments which then made it no longer take one
indentation which pushed the entire code to have one less indentation
for prettier and if i am to change anything meaninglessly it just
reverts it 😭

#### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] 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:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] 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).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
A Jihn waswasa-ed the implementation to me.
2026-04-06 22:37:11 +00:00
Shea Duma dd842d63cb merge 2026-04-07 00:56:23 +03:00
Septicity e5aadcb203 fix: Re-introduce timeline regrouping for PMP messages after sticky scroll fix 2026-04-06 16:17:33 -05:00
Evie Gauthier 76333bdb6d chore: add changeset for feat-thread-enhancements 2026-04-06 12:53:55 -04:00
Evie Gauthier b3e434dbc2 feat(threads): thread drawer, thread browser, live reply counts, and unread badges 2026-04-06 12:51:03 -04:00
Shea Duma 83f931148a making linter happi 😄 2026-04-06 07:15:18 +03:00
Shea Duma 3b2a795723 move presence pill next to status in member drawer to avoid z-fighting 2026-04-06 07:06:27 +03:00
Shea Duma d92f47a96f add changeset and statuses in member tile 2026-04-06 06:02:23 +03:00
Shea Duma e582e429ab update all pages to show the right room image 2026-04-06 05:26:27 +03:00
Shea Duma 31fec891f7 added presence and setting 2026-04-06 04:54:14 +03:00
Shea Duma 88fffdbc4d added statuses to dms 2026-04-06 03:00:32 +03:00
7w1 8d5521598d Re-introduce custom HTML formatting for long messages (#641)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

For long formatted messages (specifically, messages with over 8000
characters in their internal source), styles are disabled. I personally
noticed this when trying to use `/rainbow` messages.

I noticed that this regression was caused by [this
commit](https://github.com/7w1/sable/commit/d97a6c6cc345c58b4c21813560951595bb708e32);
while sanitizing the formatted body of a long message was safe for the
specific message in the channel that was linked in the issue, it ended
up disabling _all_ HTML formatting for longer messages.

Here, you can see the result of my fix:
<img width="50%" alt="image"
src="https://github.com/user-attachments/assets/a5ed26b4-bf55-492a-83d1-93c747226d74"
/><img width="50%" height="877" alt="image"
src="https://github.com/user-attachments/assets/84312b48-c426-4508-8341-6445fb9460ec"
/>

Specifically, I've determined that the cause of the original crash was
specifically only related to jumbo emojis; as I've kept the safeguard
regarding jumbo emojis, this still prevents the crash, as well as
keeping any spacing or line breaks in a message with many emojis. Here's
the difference:
<img width="50%" alt="image"
src="https://github.com/user-attachments/assets/35dbd824-f14a-4a61-9dfa-93593e01a1e1"
/><img width="50%" alt="image"
src="https://github.com/user-attachments/assets/873429bb-1166-418d-b7fd-b0c9f102e285"
/>

_(I'm considering this a breaking change because, as far as I can tell,
this does _technically_ make emojis no longer jumbo in longer messages.
I could be wrong, though.)_

#### Type of change

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

### Checklist:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] 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).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
2026-04-05 21:35:43 +00:00
Septicity 73c139f719 Re-introduce custom HTML formatting for long messages
- The issue that this was originally removed to fix was actually only related to jumbo emojis.
- Since I've kept the safety mechanisms for jumbo emojis, there should be no regression.
2026-04-05 06:05:45 -05:00
7w1 0ae47b689d Fix invisible names (#640)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description
Small change to attempt to default to the right name so that they do not
show as being blank

Had to be a hard list because there does not seem to be a list of
characters that are supposed to be blank within the \p type

#### Type of change

- [x] 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:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] 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).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
A million monkeys spent a million years typing out the implementation
2026-04-05 02:57:30 +00:00
Shea Duma a2c6eeb1b7 fix invisible names 2026-04-05 05:42:40 +03:00
7w1 72fcd1ae61 fix: preserve linkification in formatted body text (#632)
### Description

Fixes the regression caused by
https://github.com/SableClient/Sable/commit/18a7ca092 that makes urls
not get dedicated in `formatted_body`

- preserve auto-linking for bare URLs in `formatted_body` text nodes
when abbreviation replacement runs
- keep URL tokens intact when an abbreviation term appears inside the
URL itself
- add regression coverage for adjacent-to-URL and inside-URL
abbreviation cases

#### Type of change

- [x] 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:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] My changes generate no new warnings

### AI disclosure:

- [ ] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [x] Fully AI generated (explain what all the generated code does in
moderate detail).
2026-04-04 01:00:16 +00:00
7w1 4ff8b3c8e7 Add setting to collapse folders by default (#624)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

<!-- Please include a summary of the change. Please also include
relevant motivation and context. List any dependencies that are required
for this change. -->

Adds a setting to visual tweaks that allows collapsing folders by
default instead of the current behavior of saving the state of
opened/closed folders

Fixes #616

#### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] 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:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] 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).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
2026-04-03 19:54:21 -05:00
7w1 0ed196dd46 Add a dismiss button to command messages (#625)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

<!-- Please include a summary of the change. Please also include
relevant motivation and context. List any dependencies that are required
for this change. -->

Adds a dismiss button to command feedback messages and clarifies that
they're client side

Fixes #594

#### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] 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:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] 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).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
2026-04-03 19:53:56 -05:00
7w1 9ffeedd8d6 Fix focus when replying to messages (#623)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

<!-- Please include a summary of the change. Please also include
relevant motivation and context. List any dependencies that are required
for this change. -->

Recaptures input box focus when replying to a message.

Fixes #621

#### Type of change

- [x] 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:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] 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).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
2026-04-03 19:53:38 -05:00
7w1 8c62746576 Fix "sticky scrolling" issue in encrypted rooms with many PMP messages (#626)
### Description

Previously, in encrypted rooms with many PMP messages, scrolling to the
bottom of the page resulted in the view "sticking"; you would need to
scroll either very quickly or manually with the scrollbar to get
"unstuck".

This stemmed from a part of the logic for grouping PMP messages together
in encrypted rooms; a timeline update seemed to be erroneously
triggered, re-rendering the timeline repeatedly (effectively sending you
back to the bottom).

I've removed the offending line, and the original functionality of the
change (i.e. PMP messages continuing to be grouped both as they are
sent, edited, and re-rendered) seems to still be present.

#### Type of change

- [x] 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:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] 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).
2026-04-02 17:13:33 +00:00
hazre 00c454424a docs: add changeset for formatted body links 2026-04-02 14:02:13 +02:00
hazre a5251818d3 fix: preserve linkification in formatted body text 2026-04-02 13:49:48 +02:00
Septicity 93165ad8d4 fix: Make scrolling in encrypted rooms with many PMP messages no longer "sticky" 2026-04-01 21:04:48 -05:00
7w1 81b0233c78 add focusId to setting 2026-04-01 17:31:48 -05:00
7w1 88af897062 Merge branch 'dev' into feat/collapse-folders-setting 2026-04-01 17:30:59 -05:00
7w1 67093c5b1e feat: route settings and add setting links (#577)
### Description

This PR reworks settings into route-driven navigation instead of local
component state. Settings now use canonical `/settings/<section>` URLs,
render as a shallow modal on desktop, render full-page on mobile, and
use route-based open, close, and back behavior so the shell and history
handling stay consistent.

It also adds shareable settings links with `?focus=` targets. Those
links can be copied from setting rows, render as internal setting-link
pills in chat, route back into the app, and flash the targeted setting
after navigation. The settings link base URL is configurable, dynamic
per-device rows do not expose copy links because they are not stable
across clients, and the settings-specific `Permalink` naming has been
cleaned up to `SettingLink` for consistency.

### Screenshots

https://github.com/user-attachments/assets/3a876046-1b7d-42b9-aa09-a1d89b92c9b2

#### Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [x] 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:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] My changes generate no new warnings

### AI disclosure:

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

This PR moves settings state into the router, adds the shallow desktop
modal route renderer and mobile full-page settings flow, introduces
canonical settings-link parsing/building plus chat
rendering/interception for those links, adds focus-target highlighting
and configurable settings-link base URL handling, and polishes the
row-level copy-link controls and naming so the settings-link codepath is
internally consistent.
2026-04-01 22:20:29 +00:00
7w1 77c3cccbc1 add dismiss button to messages 2026-04-01 16:56:28 -05:00
7w1 8c0646ffa1 add setting to collapse folders by default 2026-04-01 16:27:16 -05:00
7w1 fe09f2a2d2 add changeset 2026-04-01 16:08:01 -05:00
7w1 5ab31d8dbd capture focus when replying to messages 2026-04-01 15:31:54 -05:00
7w1 45cda45343 fix: Make right clicking no longer drag images in the image viewer (#620)
### Description

As per typical UX conventions, right clicking no longer drags images in
the image preview.

Fixes #555

#### Type of change

- [x] 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:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] 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).
2026-04-01 17:50:50 +00:00
Septicity 2e5663b4ac fix: Make right clicking no longer drag images in the image viewer 2026-04-01 07:03:07 -05:00
Rose ab80d3388e feat: center image zooming on the cursor (#602)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

This PR makes the image zooming via double-click or mouse wheel centered
on the cursor position rather than the center of the image.
Clicking the zoom % label (between + and - buttons) now resets the image
zoom and pan.
Zooming was also changed from being additive to multiplicative, which
makes the "zooming speed" feel consistent.

In the process of doing this I merged the zoom and pan state into one,
making it possible to change them at the same time.
The `setPan` and `setZoom` functions were recreated for compatibility.
`resetTransforms` was added for convenience.
`handleWheel` was moved from the ImageViewer into the image gestures
hook.

#### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] 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:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] 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).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
2026-03-31 13:44:54 +00:00
hazre ae66ba6bec fix: hide desktop settings back button 2026-03-31 14:19:05 +02:00
hazre 0c4face49e Merge remote-tracking branch 'origin/dev' into hazre/feat/settings-routing-links
# Conflicts:
#	src/app/plugins/react-custom-html-parser.test.tsx
2026-03-31 14:07:53 +02:00
mini-bomba 2e2c8a795d fix: make zoom buttons zoom towards the center of the screen 2026-03-31 11:30:09 +02:00
7w1 f04fff486c Harden YouTube URL handling in embed feature (#599)
### Description

This pull request refactors the `parseYoutubeLink` function in
`ClientPreview.tsx` to use the standard `URL` API for parsing YouTube
URLs. This change improves the reliability and maintainability of the
code by handling edge cases and reducing manual string manipulation.

#### Improvements to YouTube URL parsing

- Refactored `parseYoutubeLink` to use the `URL` API for robust parsing
of YouTube URLs, improving error handling and supporting more YouTube
link formats.
- Enhanced extraction of video ID, playlist, and timestamp by using
`URL` search parameters instead of manual string splitting, making the
code more readable and less error-prone.

Fixes https://github.com/SableClient/Sable/security/code-scanning/9

#### Type of change

- [x] 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:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] 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).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->

No AI involved
2026-03-31 00:03:21 +00:00
7w1 82f9c8d7d0 Change code block highlighting from Prism to Arborium (#576)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

I was inspired by this tweet.
https://fxtwitter.com/DiscordPreviews/status/2036671398265995336

- replace Prism-based code block highlighting with Arborium for timeline
code blocks and text previews
- add Arborium theme metadata, runtime wiring, and a code block theme
setting that matches the existing System Theme pattern, with system
light/dark selections plus a single manual override
- extract a reusable `SettingMenuSelector`, remove
`NotificationModeSwitcher`, and reuse the shared selector in
notification, room, and theme settings
- wrap rendered code blocks so long lines break in both highlighted
messages and text previews instead of forcing wide horizontal overflow

The cool thing about Arborium is that all the language support and
themes are loaded from a CDN. So you basically ship nothing and on
demand, it downloads the proper grammer for each language that shows up
in the messages. fallback is just no syntax highlighting.

### Sceenshots

https://github.com/user-attachments/assets/1185d147-50ad-4b77-87c2-50660899c4b8

<img width="593" height="411" alt="image"
src="https://github.com/user-attachments/assets/b2eb8915-59dc-4198-a6de-7c8ae8c8d1d5"
/>

#### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] 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:

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

### AI disclosure:

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

The main change in this PR is replacing the old Prism-based highlighting
path with Arborium for rendered message code blocks and text previews.
The message renderer and text viewer now go through the Arborium-backed
code highlight renderer, Arborium themes are loaded through the new
theme bridge instead of the old Prism theme classes, and unsupported or
failed language/theme loads still fall back safely to plain rendered
code. The settings work in this PR now exposes code block theming with
the same structure as the existing app theme controls: a System Theme
toggle that keeps separate light and dark Arborium theme selections,
plus a single Manual Theme selector that can override them when system
mode is off. The reusable `SettingMenuSelector` extraction is supporting
cleanup that lets the same dropdown pattern drive notification settings,
room notification controls, and the theme pickers while removing the
older one-off switcher component. The wrapping changes are the last part
of that migration work: Arborium-rendered code now wraps in both
timeline messages and text previews so long lines stay readable without
forcing wide overflow. The tests cover Arborium theme selection and
loading, selector reuse, notification option reuse, and the
message/text-viewer code block regressions.
2026-03-30 23:56:59 +00:00
Shea Duma 8aef658bbb Merge remote-tracking branch 'upstream/dev' into msc4095 2026-03-31 02:39:29 +03:00
mini-bomba 88408aec59 feat: center image zooming on the cursor 2026-03-31 00:52:37 +02:00
hazre 3bb692fdb0 Merge branch 'dev' of github.com:SableClient/Sable into hazre/feat/arborium-migration
# Conflicts:
#	src/app/plugins/react-custom-html-parser.test.tsx
#	src/app/plugins/react-custom-html-parser.tsx
#	src/app/utils/sanitize.test.ts
#	src/app/utils/sanitize.ts
2026-03-30 23:30:29 +02:00
hazre be8912675b Merge remote-tracking branch 'origin/dev' into hazre/feat/settings-routing-links
# Conflicts:
#	src/app/plugins/react-custom-html-parser.test.tsx
#	src/app/plugins/react-custom-html-parser.tsx
2026-03-30 23:29:26 +02:00
Rye 4048d4d8c9 fix(youtube embed): hardening of youtube url handling 2026-03-30 17:23:50 +02:00
7w1 6d6d163c05 Fix keyboard shortcut modifiers (removing redundant identity replacement) (#597)
fix for https://github.com/SableClient/Sable/security/code-scanning/1
removed the redundant replacement with it self.

#### Type of change

- [x] 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:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] 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).

codeql was used, if that counts, but it was a one line change, so no AI
was used
2026-03-30 05:06:06 +00:00
Rose 7213aff4fc Fix keyboard shortcut modifiers for Mac users
fix for https://github.com/SableClient/Sable/security/code-scanning/1
2026-03-30 06:37:55 +02:00
7w1 63afb74a48 chore: prepare release 1.13.1 (#581)
> [!IMPORTANT]
> Merging this PR will create a new release.

## Fixes

* Add youtube shorts support to stop it from crashing sable.
([#578](https://github.com/SableClient/Sable/pull/578) by @nushea)
* Fix rich-text reply previews and custom-formatted messages so unsafe
HTML is filtered more strictly and Matrix colors render correctly.
([#571](https://github.com/SableClient/Sable/pull/571) by @hazre)
* Fix crash when previewing non-video YouTube URLs (channels, @handles,
etc.) that lack query parameters.
([#584](https://github.com/SableClient/Sable/pull/584) by @Just-Insane)
* fix id handling and id generation for Personas
([#583](https://github.com/SableClient/Sable/pull/583) by @dozro)
v1.13.1
2026-03-30 03:55:05 +00:00
github-actions[bot] 7661bfa2e4 chore: prepare release 1.13.1 2026-03-30 03:33:46 +00:00
7w1 f60bd221f9 fix(url-preview): guard against undefined query string in YouTube URL parser (#584)
### Description

Fixes a crash when any non-video YouTube URL is previewed — channels
(`youtube.com/@handle`), channel IDs (`youtube.com/channel/...`), or any
URL path without a `?` query string.

The existing code (even after #578) had:
```ts
params = path.split('?')[1].split('&');
```
When there is no `?` in the URL, `split('?')[1]` returns `undefined`,
and calling `.split('&')` on it throws:
> `TypeError: Cannot read properties of undefined (reading 'split')`

Fixed with optional chaining + nullish fallback:
```ts
params = path.split('?')[1]?.split('&') ?? [];
```

This causes `videoId` to remain `undefined` for non-video URLs, which is
handled correctly by the existing `if (!videoId) return null` guard —
the preview simply doesn't render rather than crashing the entire app.

Fixes #

#### Type of change

- [x] 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:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] My changes generate no new warnings

### AI disclosure:

- [x] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).

AI identified the root cause after reviewing the PR #578 diff — the
shorts fix added the `/shorts/` branch but left the original
`youtube.com` branch with the same unguarded `.split()` call. The
one-line fix (`?.split('&') ?? []`) was AI-suggested; I reviewed and
confirmed it is correct.
2026-03-30 03:31:15 +00:00