Commit Graph
443 Commits
Author SHA1 Message Date
7w1 2f013c1ade fix(media): bypass stale service worker auth 2026-07-30 16:00:54 -05:00
Erwan Leboucher 38c95e7b20 fix(media): fall back when service worker auth is unavailable 2026-07-30 15:45:51 -05:00
7w1 cd0f58a729 fix: keep enter preference local (#1499)
<!-- 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:

- [ ] 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-30 20:05:51 +00:00
Erwan Leboucher 3eda0cdf8f fix: Missing scheduled message chip (#1514)
<!-- 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 missing schedule message chip bug which showed up during the
matrix SDK migration. My first pass at fixing this was a one-line change
(which did work) but generated a type error during the requested
post-deploy checks. I used Claude to investigate the errors and it added
the remaining changes which fix all type errors.

Deployed in my test environment and the scheduled message feature is
fully working as expected again.

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

- [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. -->
As above I used Claude to help me resolve the type error after deploying
a one-line visibility fix
2026-07-30 15:59:23 +00:00
Erwan Leboucher 3ede6cc2ab fix: keep enter preference local 2026-07-30 10:42:40 +02:00
Erwan Leboucher 08dddd3e7b fix(diagnostics): satisfy lint 2026-07-30 08:51:54 +02:00
jasonlaguidice 0a4d420f73 Fix missing scheduled message chip 2026-07-29 23:36:11 -07:00
Erwan Leboucher 09b1430dcb feat(diagnostics): add capture workflow 2026-07-30 08:34:15 +02:00
7w1 ff98677d77 fix: track result of export 2026-07-29 22:54:34 -05:00
Erwan Leboucher d9eb43e4fa feat(mobile): export diagnostics 2026-07-29 22:06:25 -05:00
7w1 5e79335798 fix: double check that response succeeded 2026-07-29 21:05:59 -05:00
Erwan Leboucher 08b80e20af Merge branch 'dev' into fix/mobile-media-downloads 2026-07-29 19:27:24 +02:00
Erwan Leboucher a8a634634f fix(mobile): improve image saves and touch handling 2026-07-29 18:22:54 +02:00
Erwan Leboucher 025839605f fix(mobile): save downloaded media 2026-07-29 11:14:25 +02:00
7w1 a52bbeef91 fix(notifications): fail open encrypted unified push (#1452)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

fix issue with unreliable notifications for desktop and android

Fixes #1448

#### 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
- [ ] 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-28 22:41:31 +00:00
7w1 8dd2049ee7 fix: catch controller failure 2026-07-28 17:39:55 -05:00
Erwan Leboucher 8f04652088 fix(mobile): save downloaded media 2026-07-28 17:11:53 +02:00
Erwan Leboucher f8ec1a3690 fix(media): fall back when service worker auth is unavailable 2026-07-28 12:39:54 +02:00
7w1 92c7822f69 feat(diagnostics): add sanitized log export (#1421)
<!-- 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

- [ ] 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-07-28 03:30:12 +00:00
7w1 3a5ef43930 lint 2026-07-27 22:28:53 -05:00
Erwan Leboucher 5699dba70d feat(diagnostics): add sanitized log export 2026-07-27 23:34:03 +02:00
lunar-seal f6f5dc28f7 fix: handle middle click and remove access to chromium features on linux 2026-07-27 12:15:45 +02: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 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 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
Erwan Leboucher 91b51fa108 fix(notifications): gate notification sound on window focus, not tab visibility 2026-07-26 17:52:59 +02:00
7w1 1c85c1b417 cleanup, lazy loading, image viewer 2026-07-26 10:51:19 -05: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
Erwan Leboucher 2cd71b342e fix(ios): fall back to native clipboard for empty paste events in composer 2026-07-26 14:59:49 +02:00
Erwan Leboucher 90115b5705 refactor: remove unused exports flagged by fallow 2026-07-25 21:05:33 -05:00
Erwan Leboucher 1a4ccb657f refactor: share one SequenceCardStyle and one thread reply collector 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 b04c15b6d5 fix: apply nicknames to thread mentions and rewrite room avatar urls 2026-07-25 21:05:03 -05:00
Erwan Leboucher c4cde87e8e fix: play notification sounds via Web Audio so they stay out of the media session 2026-07-25 19:15:03 +02:00
Erwan Leboucher 16f44b6adb fix(media): decrypt encrypted media on Android and improve slow-network loading 2026-07-24 22:30:18 +02:00
7w1 6e0bd7424f fix(media): sniff decrypted image content type and harden encrypted media cache (#1271)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

- Sniff decrypted image MIME type from magic bytes when sender omits
mimetype
- Keep encryption params on SHA-256 mismatch so transient network errors
are retryable
- Use no-store Cache-Control for octet-stream responses to prevent
cached broken render
- Self-heal existing cache entries with sniffed content type
- Release concurrency semaphore earlier after decrypt
- Skip thumbnail requests for animated images (GIF/APNG/AVIF/WebP)
- Fall back to full download when thumbnail fails on retry
- Swallow unhandled rejection on URL preview fetch (SABLE-167)
- Catch Tauri HTTP plugin SyntaxError on HTML error pages (SABLE-16F)

#### 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-24 15:31:24 +00:00
Erwan Leboucher 87d7a8945d fix(sentry): scrub homeserver host from Sentry data
Redact external http(s) origins (homeserver, OIDC issuers, media
redirectors) to [HOMESERVER] before sending to Sentry. Preserve the
app's own origin and local dev hosts. Also drop the sync.base_url span
attribute and the baseUrl debug-log field that leaked the homeserver
explicitly.
2026-07-24 10:52:18 +02:00
Erwan Leboucher 8042533981 fix(media): sniff decrypted image content type and harden encrypted media cache 2026-07-24 10:25:40 +02:00
7w1 76bffcfb52 Fix synced local tweaks (#1220)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

Restores locally imported CSS tweaks after settings sync on a new
device. The change migrates legacy cache-only tweaks, restores listing
and application without IndexedDB races, bounds aggregate CSS payloads,
preserves source-only oversized tweaks, and reports partial sync when
necessary.

#### Verification

- `npm run test:run -- src/app/utils/settingsSync.test.ts
src/app/hooks/useSettingsSync.test.tsx
src/app/theme/syncedTweakCss.test.ts src/app/pages/ThemeManager.test.tsx
src/app/theme/processThemeImport.test.ts
src/app/features/settings/cosmetics/ThemeCatalogSettings.test.tsx` (65
passed)
- `npm run fmt:check -- src/app/utils/settingsSync.ts
src/app/utils/settingsSync.test.ts`
- `git diff --check`
- `npm run typecheck` remains blocked by pre-existing Matrix OAuth
exports and the missing sharekit declaration; no errors point to this
change.

Fixes #1208

#### 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)
- [x] 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).

<!-- The template requires this explanation to be written by the
contributor, not generated by AI. -->
2026-07-24 05:18:34 +00:00
7w1 e3ff86dfce fix(android): dismiss overlays on system back instead of navigating away (#1249)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

Add useDismissOnBack(requestClose, enabled) hook to androidBack utils
and wire it into full-screen and interaction-blocking overlays. On
Android the system back action (edge-swipe and 3-button nav) was passing
through these overlays and navigating the underlying route, leaving the
overlay open.

Wired overlays:
- Modal500: Room Settings, Space Settings, Settings shallow route
- MobileSwipeDownModal: message context menu, header menu, nav sidebar
menu
- ImageViewer (refactored from inline handler)
- GlobalModalManager: Delete, Report, Source, Reactions, EditHistory,
ReadReceipts (gated, excludes Forward and MobileOptions)
- MessageForward: forward picker
- IncomingCallModal (gated by open state)
- DeviceVerification
- Emoji boards in RoomInput, Reactions, MessageEditor (gated, the latter
via a MobileEmojiOverlay wrapper since its state comes from a
UseStateProvider render-prop)
- FileContent text and PDF viewers (gated)

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-23 22:27:54 +00:00
7w1 645fe0d862 perf: coalesce unread timeline scans 2026-07-23 16:42:38 -05:00
Erwan Leboucher 1b61caa879 fix: use window origin for call widget parentUrl on Tauri 2026-07-23 23:22:04 +02:00
7w1 1d256b9961 fix: stop wiping unread counts for spaces and unchanged rooms in incremental recompute (#1257)
<!-- 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 two regressions from #1253 that caused spaces and channels to lose
unread badges after the incremental unread recompute landed.
1. getUnreadInfosForRooms deleted space rooms instead of skipping them.
The RESET path (getUnreadInfos) skips spaces, but the new incremental
path pushed them to the deleted list. Space unread is derived from
children via parent propagation in the atom reducer, a direct DELETE
wiped the aggregated count, and non-dirty children never re-PUT to
restore it.
2. Empty [] account_data rooms were marked dirty. The server echoes
every subscribed room in the account_data extension with an empty array
when nothing changed. The old code added all of them to dirtyRoomIds,
marking ~150 rooms dirty per sync cycle and defeating the incremental
optimization.

#### 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-23 20:15:13 +00:00
Erwan Leboucher acb85e7604 fix: resolve lint and format failures in unread test 2026-07-23 22:11:58 +02:00
Erwan Leboucher 807135e734 Add native push notifications with reply actions, content preview, and configurable gateway 2026-07-23 14:45:06 -05:00
Erwan Leboucher 302e9d671d fix: stop wiping unread counts for spaces and unchanged rooms in incremental recompute 2026-07-23 21:24:27 +02:00
7w1 7beb2da029 fix: media 401, slow-internet loading, and native streaming decryption (#1246)
<!-- 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. -->

#### Media 401 on authenticated media (MSC3916)
useMediaAuthentication returned false while /versions was unresolved, so
the app built unauthenticated URLs that 401 on MSC3916-strict
homeservers during first render. Now fails closed (true until versions
loads). SW skips session-recovery retry on genuine M_UNKNOWN_TOKEN 401s
to avoid loops.

#### Slow / flaky-internet loading
- Fetch timeout 30s → 120s (Rust + TS).
- One retry on 5xx or network error after 1.5s backoff; no retry on
AbortError.
- Missing media session returns 503 + Retry-After instead of 401.
- Explicit redirect::Policy::default() — strips Authorization on
cross-origin MSC3916 redirects to signed CDNs.

#### Native streaming decryption (Tauri)
Encrypted media was fully buffered/decrypted in JS with no Range or disk
cache. New set_media_encryption command passes AES-CTR key/IV/SHA-256 to
Rust, which decrypts in place (Ctr64BE/Ctr128BE per version), verifies
ciphertext SHA-256, and serves plaintext — encrypted media now streams
and caches like unencrypted. Added aes + ctr crates,
tauriMediaEncryption.ts helper, and routed
Audio/Video/Image/ThumbnailContent through the native path.

#### 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-23 17:36:09 +00:00