Commit Graph
249 Commits
Author SHA1 Message Date
7w1 254cd5e907 Fix crash while scrubbing some audio files (#902)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

I don't think we technically do "scrubbing" but idk any other word for
it.

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

Fixes the crash while scrubbing audio files by pretty much just spamming
infinity checks everywhere and adding a helper to calculate duration
properly (previously the voice message content never specified duration
so it would only appear after the file fully loaded in).

#### 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-05-25 15:47:08 -05:00
7w1 69315dc2ed fix: various hardening for audio messages to ensure finite-ness 2026-05-24 21:50:15 -05:00
Shea Duma 39bfed2208 highlight to be replied to
Signed-off-by: Shea Duma <[email protected]>
2026-05-23 17:02:43 +03:00
7w1 7170a1d78f fix typecheck 2026-05-18 12:17:42 -05:00
7w1 c9ff055c24 fix: emojis not rendering in replies 2026-05-18 12:13:38 -05:00
7w1 5b1fb580d2 satisfy linter 2026-05-14 23:01:23 -05:00
7w1 a64ecd5773 fix reply chips not showing some replies 2026-05-14 22:47:34 -05:00
7w1 daba875a93 formatting and lint things 2026-05-14 15:16:10 -05:00
7w1 604ad29728 Fix fallback text wrapping (#806)
<!-- 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 #766, updates the wrapping behavior to wrap the message type and
body together rather than separately, as shown in the images in the
issue.

#### 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-05-13 20:13:58 -05:00
7w1 7bca285366 fix: close modal instantly 2026-05-13 19:24:21 -05:00
7w1 b2adebdc70 feat: forward modal swap & forward to same room 2026-05-13 19:17:45 -05:00
7w1 1b003df34a formatting 2026-05-13 15:42:45 -05:00
7w1 446f77cdac fix: fallback body wrapping with type 2026-05-13 15:42:20 -05:00
7w1 f9ade5b986 add ability to cap preview size and minor adjustment to restore codeblock background of misc data 2026-05-09 16:42:07 -05:00
7w1 afa9f64cee Fix of wrong alignment with mixed RTL and LTR text (#743)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

This PR resolves formatting and alignment issues with mixed RTL
(Right-to-Left) and LTR (Left-to-Right) text within messages.
Previously, mixed text direction caused display inconsistencies in the
main message body and the reply content area.

**Changes made:**
* Added `dir="auto"` to the base message `Text` component, allowing the
browser to automatically determine the base text direction according to
the first strongly-typed character of the message.
* Applied `unicode-bidi: plaintext` to the message content CSS and the
`Text` component inside the reply content. This ensures the browser
dynamically evaluates and handles the text direction based on the actual
characters used rather than inheriting the container's direction.
* Set `align-self: start` on the message content. This ensures that even
for RTL messages, the content block anchors appropriately to the left
side (start) of the view, while still preserving the correct internal
text direction.

#### 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).
<!-- No AI was used in the creation of this code. -->
2026-05-09 19:40:12 +00:00
7w1 cda61305ab typecheck fix 2026-05-07 14:50:41 -05:00
7w1 c86f8b6e8e unify the two read receipt boxes and fix the sizing inconsistency 2026-05-07 14:41:26 -05:00
7w1 bd4b2137b1 fix inline image height and add settings for capping incoming height 2026-05-07 12:48:58 -05:00
7w1 8cd927ae37 changeset and fix unrelated typo in pins text 2026-05-06 17:38:59 -05:00
7w1 aa93278d6d fix empty messages 2026-05-05 17:27:50 -05:00
7w1 34fbfdacbe Refactor codebase and standardize unstable prefix usage (#746)
### Description

This pull request standardizes the usage of Matrix event content keys by
replacing hardcoded property names and older constants with centralized,
unstable prefix constants imported from the `$unstable/prefixes` module.
This change improves maintainability and consistency across the
codebase, especially in handling experimental or non-standard Matrix
properties.

The most important changes are as follows:

##### Prefix Standardization and Centralization 
Replaced all hardcoded Matrix property names and older constants (e.g.,
`'com.beeper.per_message_profile'`, `'com.beeper.linkpreviews'`, etc.)
with corresponding constants from the `$unstable/prefixes` module
throughout the codebase, including message rendering, room creation,
user profiles, and input handling.

##### Message Content Handling
Updated all logic for reading, writing, and deleting Matrix event
content properties (e.g., per-message profiles, link previews, image
source packs, spoilers, blur hashes, forward metadata) to use the new
prefix constants, ensuring consistent access and mutation of event
content.

##### User Profile and Room Metadata
Updated user profile extended keys (such as bio, banner, pronouns,
timezone, animal identity) in `UserRoomProfile.tsx` to use the new
prefix constants, replacing all previous hardcoded or legacy key
strings.

##### Room Creation and Calls
Changed the room call state event type to use the new unstable prefix
constant in room creation utilities.

##### Code Clean-up
Removed now-unused imports of old constants from files where they have
been replaced with the new prefix-based constants.

These changes collectively improve the code's future compatibility with
evolving Matrix specifications and make it easier to update property
names as they stabilize.

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

Shouldn't cause user facing changes

### Checklist:

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

No AI usage
2026-05-05 15:25:53 -05:00
Rye e6858778c2 refactor: standardize usage of unstable prefixes across components 2026-05-05 18:21:36 +02:00
Rye 8ecd3e80fb refactor(unstable prefixes): inital refactor to clean up the codebase 2026-05-05 16:47:02 +02:00
Shea Duma c52a07a46a fix some newly introduced linkpreview bugs 2026-05-05 16:42:08 +03:00
Sina Sadeghi 882515f0e2 Add dir auto for Base message Text 2026-05-05 14:09:09 +03:30
Sina Sadeghi 2cf66f33a9 fix rtl & ltr mixed message reply direction 2026-05-05 13:41:09 +03:30
Sina Sadeghi c623ca4fe0 fix rtl & ltr mixed message content direction 2026-05-05 13:40:59 +03:30
7w1 61f2b09def fix bundled urls with pmps 2026-05-05 00:18:40 -05:00
7w1 4f5f6e662a Merge branch 'dev' into feat/msc4459 2026-05-04 16:40:28 -05:00
Rye 3d1b1026bb fix(formatting): fix formatting issues 2026-05-03 19:11:48 +02:00
Rye cbe38bae35 Merge branch 'dev' into feat/msc4459 2026-05-03 18:34:54 +02:00
Rye 6a4d5059b8 fix(msc4459): refactoring and restricting getImagePackReferencesForMxc to public rooms 2026-05-03 18:19:45 +02:00
7w1 6aa8dde28d formatting... 2026-04-30 09:41:16 -05:00
7w1 982c87557e firefox list fix 2026-04-30 09:39:43 -05:00
7w1 5832b71da1 deduplicate the url things + fix code block urls 2026-04-30 00:48:43 -05:00
Shea Duma 6a68f4f468 added edge case fixes 2026-04-27 08:19:04 +03:00
Shea Duma 3140b1620c minimum viable solution 2026-04-27 02:52:19 +03:00
Shea Duma 7499b17d88 almost working 2026-04-26 03:27:36 +03:00
Shea Duma bdd902cdc9 add changeset 2026-04-24 08:12:49 +03:00
Shea Duma c2ac2c78bb add stripping in plaintext 2026-04-24 06:31:38 +03:00
Shea Duma 372504a82e base functionality working 2026-04-24 04:49:02 +03:00
hazre 840ff239b2 refactor: align matrix event types with sdk primitives 2026-04-21 22:29:46 +02:00
hazre bb9d59d7f6 Merge remote-tracking branch 'origin/dev' into migrate-oxlint-oxfmt
# Conflicts:
#	src/app/components/RenderMessageContent.tsx
#	src/app/components/url-preview/UrlPreviewCard.tsx
#	src/app/components/user-profile/UserRoomProfile.tsx
#	src/app/features/settings/Settings.test.tsx
#	src/app/features/settings/general/SettingsLinkBaseUrlSetting.test.tsx
#	src/app/features/settings/general/SettingsLinkBaseUrlSetting.tsx
#	src/app/features/settings/settingsLink.ts
2026-04-21 16:35:04 +02:00
7w1 ff01d8d5d0 Merge branch 'dev' into muliple-previews 2026-04-20 10:52:01 -05:00
7w1 40bb35f34c linting awayy 2026-04-17 16:23:59 -05:00
7w1 144e148154 many lint fixes 2026-04-17 14:09:04 -05:00
7w1 27eaadf9ae typecheck and linting fixes 2026-04-17 00:37:15 -05:00
7w1 b13c9b61d4 formatting 2026-04-16 22:38:18 -05:00
7w1 1717ca872f migrate to oxlint and oxfmt
ran formatter
fixed lint issues, primarily getting rid of "any"s and swapping to .toSorted()
2026-04-16 22:15:13 -05:00
Shea Duma 471e77e15f fix showing multiple previews 2026-04-12 10:18:52 +03:00