Commit Graph
1192 Commits
Author SHA1 Message Date
7w1 a5ca9dfd04 fix: scrolling, closing, and animations in bottom sheets 2026-07-26 18:40:40 -05:00
7w1 f5650a3a65 Fix the timeline loading a room's entire history on open (#1373)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

Opening a room paginated until it ran out of history, scrolling the view
up as it went. Worst rooms burned 8-10s of CPU per open on a Pixel 3a.

The viewport-fill effect compared `processedEvents.length` against a
value captured in the same render, so the guard was always true and the
condition reduced to `!hasRealScrollRoom || atTop`. It re-runs on every
length change, so staying near the top kept it firing. Pre-existing
since March, triggered by #1363 leaving fewer rendered events per page.

Also in here:

- `setAtBottom` was only called from the scroll handler, so a resize
(composer, keyboard) left it stale and killed auto-follow. Now
recomputed from the ResizeObserver.
- Notification sound gates on window focus instead of tab visibility. A
visible but unfocused window is now silent unless background
notification sounds is on.
- Desktop reads window focus from `onFocusChanged`, since
`focusin`/`focusout` miss app switches. Mobile and web unchanged.

Pixel 3a, release builds, CPU per room open:

| | before | after |
|---|---|---|
| Sable Announcements | 9.72s | 1.06s |
| 1 (DM) | 8.03s | 2.57s |
| 10 DMs | 31.34s | 17.19s |

Fixes #1371

#### 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. -->
2026-07-26 20:54:42 +00:00
7w1 6be8d77330 fix unrelated test 2026-07-26 15:35:51 -05:00
lunar-seal 5d1b61e094 feat: add always inline editor option for multiline messages
# Conflicts:
#	src/app/features/settings/general/General.tsx
2026-07-26 15:28:23 -05:00
7w1 d4b4929c21 fix: ensure images without specified emoticon don't grow 2026-07-26 15:10:36 -05:00
7w1 58f8fad580 fix: platform bindings after rebase 2026-07-26 13:51:45 -05:00
hazre 45c359dea6 refactor(ci): unify cloudflare infra workflows and remove is_release_tag
Signed-off-by: hazre <[email protected]>

fix: resolve rebase merge conflicts

Signed-off-by: hazre <[email protected]>
2026-07-26 13:33:40 -05:00
hazre 0e72405875 feat: unify product name and build flavor across builds
Signed-off-by: hazre <[email protected]>
2026-07-26 13:32:41 -05:00
7w1 c9652725f7 Add support for displaying gzipped lottie (e.g. tgs) (#1104)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

Hi,
This PR adds support for displaying gzipped Lottie files, such as `.tgs`
(Telegram sticker) files.

Demo video:
<img width="640" height="694" alt="demo"
src="https://github.com/user-attachments/assets/0941b014-8031-4a78-85ff-c62c90afb877"
/>


## How it works

Gzipped files begin with a fixed byte sequence (`1f 8b`), which
distinguishes them from standard image formats (PNG, WebP, JPG). The
implementation detects this signature in the file header and
automatically decompresses gzipped content before parsing it as Lottie
JSON. If parsing succeeds, the decompressed animation is passed to the
Lottie player.

To test this feature, download and unzip
[AnimatedSticker.tgs.zip](https://github.com/user-attachments/files/30024283/AnimatedSticker.tgs.zip),
then send it as `m.image` or `m.sticker`.

## What I have tested
- [x] Works as `m.image`, `m.sticker`, and inline emoji on Chrome
- [x] Works as `m.image` and `m.sticker` on Safari
- [x] Functions correctly in sticker and emoji picker on both browsers

## Next steps
- [ ] Fix inline Lottie emoji width on Safari
- [ ] Respect `autoplayStickers` setting when rendering stickers (set
`autoplay={false}` in DotLottieReact)
- [ ] Respect `autoplayEmojis` setting when rendering emojis (set
`autoplay={false}` in DotLottieReact)

---

#### 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:

- [x] 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-07-26 12:59:26 -05:00
7w1 2a372dfc25 lint 2026-07-26 12:27:43 -05:00
7w1 380ade185b simplify some things 2026-07-26 12:14:39 -05:00
7w1 8a1589c0cf perf: cache lottie info 2026-07-26 11:52:48 -05:00
Erwan Leboucher 137fdc3532 fix(mobile): stop swipe handlers swallowing taps in bottom sheets 2026-07-26 18:52:41 +02:00
7w1 0a2072437a better detection, fallback, decompression limits 2026-07-26 11:21:26 -05:00
Erwan Leboucher 740a082e92 feat(desktop): source window focus from the OS instead of DOM focus events 2026-07-26 17:53:44 +02:00
7w1 1c85c1b417 cleanup, lazy loading, image viewer 2026-07-26 10:51:19 -05:00
Mohammad-Mohsen d4072d8aa9 Add support for displaying gzipped lottie (e.g. tgs) files 2026-07-26 10:51:19 -05:00
Erwan Leboucher 228494c1f9 refactor: own the Button component with a built-in loading state 2026-07-26 16:51:58 +02:00
Erwan Leboucher dd254457a1 refactor: share cross-cutting hooks and fix the menu, thread and sheet regressions 2026-07-26 16:51:56 +02:00
7w1 11f45e8a84 fix(ios): fall back to native clipboard for empty paste events in composer (#1374)
…

<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description
fix pasting on ios

Fixes #1364

#### 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. -->
2026-07-26 09:25:29 -05:00
lunar-seal 15fff0e6c0 feat: add retry button for homeserver discovery during login 2026-07-26 16:12:34 +02:00
Erwan Leboucher 2cd71b342e fix(ios): fall back to native clipboard for empty paste events in composer 2026-07-26 14:59:49 +02:00
7w1 2f031b132d Fix some OIDC things (#1365)
<!-- 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. -->

Show all methods instead of just oidc when its present, show oidc first,
then sso, then password in the login page hierarchy.

#### 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).
<!-- 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-07-25 21:48:27 -05:00
Erwan Leboucher 791fe4451b refactor: migrate sidebar, space and image viewer menus to useMenuAnchor 2026-07-25 21:05:33 -05:00
Erwan Leboucher 90115b5705 refactor: remove unused exports flagged by fallow 2026-07-25 21:05:33 -05:00
Erwan Leboucher f6876a7cd0 refactor: share one settings shell and add an imperative confirm facade 2026-07-25 21:05:32 -05:00
Erwan Leboucher a1403751b6 refactor: split commands per domain and move screen-size styling to css 2026-07-25 21:05:32 -05:00
Erwan Leboucher 1a4ccb657f refactor: share one SequenceCardStyle and one thread reply collector 2026-07-25 21:05:32 -05:00
Erwan Leboucher 78c4c36d24 refactor: share one persisted string-set atom and guard import cycles 2026-07-25 21:05:32 -05:00
Erwan Leboucher 9e651eed26 refactor: drop unused overlay props and route avatars through one helper 2026-07-25 21:05:32 -05:00
Erwan Leboucher a3f0d510ba fix: keep favourite gifs live instead of snapshotting them into state 2026-07-25 21:05:03 -05:00
Erwan Leboucher 38a0f60ed8 refactor: type the klipy search response instead of disabling any 2026-07-25 21:05:03 -05:00
Erwan Leboucher 30a2c0921d fix: apply inline image sizing in threads and collapse setting options 2026-07-25 21:05:03 -05:00
7w1 8a0a0d9819 fix: tests 2026-07-25 19:58:00 -05:00
Erwan Leboucher aa20a2fd76 refactor: add useMenuAnchor and restore focus trapping in mobile menus 2026-07-26 00:05:45 +02:00
Erwan Leboucher f8eb8c7834 refactor: fold remaining selectors and extract MessageSearchHeader 2026-07-26 00:05:45 +02:00
Erwan Leboucher 4b974ee7a1 refactor: migrate hand-rolled overlays and split ClientNonUIFeatures 2026-07-26 00:05:45 +02:00
7w1 f05a11db42 fix: adjust login auth page flow 2026-07-25 16:56:57 -05:00
Erwan Leboucher 25368f43eb refactor: share bottom-sheet menus and one SettingMenuSelector 2026-07-25 23:54:18 +02:00
Erwan Leboucher f26d93f102 refactor: give ModalOverlay mobile presentation and android back 2026-07-25 23:54:17 +02:00
Erwan Leboucher 5dc5239893 refactor: collapse route selection hooks and share one sidebar panel 2026-07-25 23:52:44 +02:00
Erwan Leboucher 7a5e6b3387 refactor: merge space settings into room settings 2026-07-25 23:52:44 +02:00
Erwan Leboucher b77640531d refactor: make create, bug report and navigate surfaces shallow routes 2026-07-25 23:52:44 +02:00
Erwan Leboucher 03b922b62b refactor: share one FormPage and FormModal across the create surfaces 2026-07-25 23:52:08 +02:00
Erwan Leboucher 48767e43a7 refactor: share one ModalOverlay across the modal surfaces 2026-07-25 23:52:07 +02:00
7w1 4edda08cac fix: submit the m.oauth stage type when completing OAuth UIA (#1348)
<!-- 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. -->

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
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] 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).
<!-- 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-07-25 16:00:56 -05:00
7w1 5ab18f20f2 fix(mobile): clip the nav drawer viewport so it cannot scroll out of frame (#1343)
…

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

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
- [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. -->
2026-07-25 15:59:27 -05:00
Erwan Leboucher 4f97d6b75a fix: submit the m.oauth stage type when completing OAuth UIA 2026-07-25 16:48:27 +02:00
Erwan Leboucher 127f60deed fix(media): request our own video and audio with CORS so Firefox does not block it 2026-07-25 11:58:42 +02:00
Erwan Leboucher 7f0ae05dbd fix(mobile): clip the nav drawer viewport so it cannot scroll out of frame 2026-07-25 10:14:59 +02:00