7320 Commits
Author SHA1 Message Date
Evie Gauthier 023bf2a325 feat: persist room timeline to IndexedDB before pruning from memory 2026-03-17 18:22:14 -04:00
Evie Gauthier 67c626c6b2 fix: correct IndexedDB persistence claim in pruneRoomTimeline comment 2026-03-17 18:11:03 -04:00
Evie Gauthier 4b90cc5b5e chore: add changeset 2026-03-17 18:06:08 -04:00
Evie Gauthier e1d51ad852 chore: add changeset 2026-03-17 18:05:57 -04:00
Evie Gauthier 1df87084a0 fix: stop sliding sync on dispose and prune inactive room timelines
Two memory management issues fixed:

1. SlidingSyncManager.dispose() now calls this.slidingSync.stop() before
   removing listeners. Without this the SDK's internal Promise loop keeps
   polling the sliding sync proxy even after the client is disposed, leaking
   network connections and preventing garbage collection.

2. pruneRoomTimeline() is called from unsubscribeFromRoom(). When a room
   leaves the active subscription its EventTimeline chain can hold hundreds of
   events in memory. Once the event count exceeds PRUNE_TIMELINE_THRESHOLD
   (= ACTIVE_ROOM_TIMELINE_LIMIT_HIGH = 150) the live timeline is reset via
   EventTimelineSet.resetLiveTimeline(). The full history remains on disk in
   IndexedDBStore and is re-fetched via the active-room subscription on next
   open, so there is no user-visible change.

Adds 5 unit tests: 1 for dispose, 4 for the pruning threshold boundary.
2026-03-17 17:57:04 -04:00
Evie Gauthier 3f26cd9515 fix: hide ThreadIndicator badge inside ThreadDrawer compose box
Inside the ThreadDrawer the user is already in thread context, so showing
the "Thread" badge in the reply chip is redundant and visually noisy.

The compose box always sets replyDraft.relation.rel_type = RelationType.Thread
when threadRootId is set (so the message goes to the right thread), but that
should not make the ThreadIndicator visible there.

Add !threadRootId guard to the ThreadIndicator render condition.

Adds 4 unit tests covering the four branches of the condition.
2026-03-17 17:56:24 -04:00
7w1 e08639869d Merge pull request #334 from SableClient/release
chore: prepare release 1.9.3
v1.9.3
2026-03-17 21:43:29 +00:00
github-actions[bot] 55d27dcd5e chore: prepare release 1.9.3 2026-03-17 21:41:47 +00:00
7w1 399890b06e Merge pull request #345 from SableClient/fix-autocomplete
add tab
2026-03-17 16:41:26 -05:00
7w1 f94d400584 add tab 2026-03-17 16:11:11 -05:00
7w1 b3d9b3550e Merge pull request #342 from SableClient/fix/autocomplete-selection
fix(autocomplete): Enter always selects first item; first item not highlighted on open
2026-03-17 20:53:06 +00:00
Evie Gauthier 0fb883bfaa test(autocomplete): add tests for data-selected stamping and keyboard navigation
Covers the two bugs fixed in the previous commit:

- Verifies the first button gets data-selected="true" on initial render so the
  CSS highlight rule fires immediately (regression for the dep-array fix).
- Verifies the first button is also stamped when async search results load new
  buttons after the initial render (the original regression).
- Verifies keyboard navigation via the AUTOCOMPLETE_NAVIGATE_EVENT moves the
  selected index and that it clamps at the list boundaries.

Also adds an eslint-disable comment in AutocompleteMenu.tsx explaining why
the no-dep-array useLayoutEffect is intentional (setSelectedIndex is a stable
React setter; the conditional call cannot cause an infinite loop).
2026-03-17 16:38:39 -04:00
Evie Gauthier 8dba3afe85 chore(threads): add changeset for thread drawer spacing fix 2026-03-17 16:17:48 -04:00
Evie Gauthier cc8bad2853 fix(threads): reduce dead space around root message in thread drawer
The root message section had two sources of excess whitespace:

1. hideTrack={false} forced a visible scrollbar gutter on the Scroll
   component even when the message fit within the 200px max-height and no
   scrolling was needed. Changed to hideTrack (default true = hidden) so
   the gutter only appears when actually scrollable.

2. padding: S400 0 S200 0 (16px top / 8px bottom) on the root message box
   was adding significant dead space above the message content that
   compounds with the Message component's own internal padding.
   Reduced to S200 0 S100 0 (8px top / 4px bottom).
2026-03-17 16:17:48 -04:00
Evie Gauthier 86bdb80816 refactor+test(threads): extract getThreadReplyEvents and add unit tests
Extract the replyEvents IIFE into a module-level function so the fix-first-
then-check-length logic can be exercised in isolated unit tests without
mounting the full component.

Tests cover:
- Returns thread.events (minus root) when the Thread object has replies.
- Excludes reactions (RelationType.Annotation) from the results.
- Classic-sync regression: thread.events = [rootEvent] => falls back to the
  live room timeline (the bug was that length-1 thread blocked the fallback).
- Falls back to live timeline when getThread() returns null.
- Filters out events belonging to a different thread.
- Returns [] when neither source has relevant events.
2026-03-17 16:17:47 -04:00
Evie Gauthier 2a63f596fe fix(threads): thread drawer empty with classic sync
With classic sync, RoomViewHeader creates Thread objects via
room.createThread(id, rootEvent, [], false) — passing no initialEvents.
This means thread.events starts as just [rootEvent] (or empty).

Two bugs resulted:

1. The gate `if (fromThread.length > 0)` blocked the live-timeline fallback.
   Since thread.events = [rootEvent], length was 1 (truthy), but after
   filtering the root out the array was empty — yielding zero replies even
   though the events were present in the main room timeline.
   Fix: compute the filtered array first, then gate on its length so the
   fallback is reached when the thread object has no actual replies yet.

2. Even after #1, subsequent renders and read-receipt logic used thread.events
   (empty) rather than the live timeline.
   Fix: add a mount-time useEffect that backfills matching events from the
   unfiltered live timeline into the Thread object via thread.addEvents() so
   the authoritative source is populated for future interactions.
2026-03-17 16:17:47 -04:00
Evie Gauthier e033e36a1e fix(autocomplete): Enter always selects first item; first item not highlighted
Two related bugs in the mention/room/emoji autocomplete:

1. Enter key always inserted the first suggestion instead of the highlighted one.
   Cause: querySelector('[data-selected]') matched ALL buttons since every button
   has the attribute set to either 'true' or 'false'. The first button in DOM
   order was always returned.
   Fix: use '[data-selected="true"]' to select only the active item.

2. The first item had no visual highlight on initial open (the CSS rule requires
   data-selected='true', but the useLayoutEffect responsible for stamping that
   attribute only re-ran when selectedIndex changed -- not when buttons first
   appeared after async search results loaded).
   Fix: remove the dep array so the effect runs after every render; newly-loaded
   buttons are stamped immediately.
2026-03-17 16:17:32 -04:00
Kace Cottam e69fc1250f another lint check 2026-03-17 13:04:09 -07:00
Kace Cottam e904a543db resolve issues after linting 2026-03-17 12:54:41 -07:00
Kace Cottam 689aee5ac3 Merge branch 'dev' of https://github.com/SableClient/Sable into improve-space 2026-03-17 12:50:02 -07:00
Kace Cottam ad3e907373 Run lint fix and fmt 2026-03-17 12:39:13 -07:00
Kace Cottam 557f3fc7cc Add "Open Lobby" for subspaces in lobby view 2026-03-17 12:34:11 -07:00
Rose e3120287f5 Merge branch 'dev' into feat/allow-setting-pmp 2026-03-17 20:17:48 +01:00
Rye 67056a264d refactoring pmp 2026-03-17 20:13:59 +01:00
Rye d91adfb032 refactor: animalCosmetics 2026-03-17 20:13:17 +01:00
Rye b56f2eb246 fixed pronouns error 2026-03-17 19:59:12 +01:00
Rye 8360ee1f50 fix: add missing key prop to PerMessageProfileEditor component 2026-03-17 19:40:52 +01:00
Rye 3b4a12f689 fix: update import statements for PronounEditor and PronounSet in Cosmetics.tsx 2026-03-17 19:33:22 +01:00
Rye 793ce6deeb actually delete the entry from the index when 2026-03-17 19:23:11 +01:00
Rose ab138a11b5 Merge pull request #311 from SableClient/fix/better-ux-voice-messages
fix: better ux voice messages
2026-03-17 18:17:18 +00:00
Rye 3c3fa36e6d add rename functionality for per-message profiles 2026-03-17 19:08:39 +01:00
hazre 42351dac03 docs: add changeset 2026-03-17 18:58:33 +01:00
hazre 35e842f768 fix: simplify mobile stuff 2026-03-17 18:54:18 +01:00
hazre 8f5b2e32f8 fix: waveform algorithm 2026-03-17 18:54:18 +01:00
hazre f81fdd38af chore: merge dev into nyxsutsn 2026-03-17 18:54:18 +01:00
hazre 4ed7f65399 fix: prevent first waveform bar from being lit when audio not playing 2026-03-17 18:54:17 +01:00
7w1 9fa328dd12 Merge pull request #338 from SableClient/fix-image-render
Fix images not rendering when dimensions aren't present
2026-03-17 12:45:55 -05:00
7w1 2a1e4105ac fix images not rendering 2026-03-17 12:41:43 -05:00
Rye 3d58df0468 remove console warnings for per-message profile handling 2026-03-17 18:25:31 +01:00
Rye 52c42ccbdd added changeset 2026-03-17 18:17:45 +01:00
Rye 80c8597295 refactor: replace perMessageProfileAtomFamily with getCurrentlyUsedPerMessageProfileForRoom in RoomInput bc somehow caching didn't really work in any reliable manner 2026-03-17 18:14:17 +01:00
7w1 54415a1a21 Merge pull request #337 from SableClient/various-patches
fix enter emoticon autocomplete & empty message rendering
2026-03-17 12:11:33 -05:00
7w1 1a9f41805a Update MsgTypeRenderers.tsx 2026-03-17 12:09:28 -05:00
7w1 2a42941e4b fix enter & empty messages 2026-03-17 11:44:02 -05:00
Rye 7e7adbb7d2 implement per-message profile management and pronouns support 2026-03-17 17:25:47 +01:00
Rye 919daf0f5d documentation of code relating to displaying pronouns in the room timeline 2026-03-17 16:29:55 +01:00
Rye e321d5f953 refactor: use constant for account data prefix in setCurrentlyUsedPerMessageProfileIdForRoom 2026-03-17 16:27:06 +01:00
Rye 0ef60ca4d2 enhance documentation for PerMessageProfileRoomAssociationWrapper; clarify purpose of associations field 2026-03-17 16:26:03 +01:00
Rye 26bc3744bc add pronouns support to PerMessageProfile; update editor and hooks for pronoun management 2026-03-17 16:24:46 +01:00
Rose 9ed985a2a8 Merge pull request #328 from DidiDidi129/dev
Fix macOS name in the devices tab from 'Mac OS' to 'macOS'
2026-03-17 15:06:25 +00:00