Commit Graph
6704 Commits
Author SHA1 Message Date
Rye aaa802606d added missing questionmark lol 2026-03-18 22:49:55 +01:00
7w1 9efbce6d34 make linter happy 2026-03-18 16:21:30 -05:00
7w1 6d60ff7f80 initial big refractor, probably broke stuff and forgot stuff but oh well baby steps 2026-03-18 16:13:22 -05:00
Rye cee2cb6118 added fallback body to be spec compliant 2026-03-18 21:56:31 +01:00
Evie Gauthier b98fa45820 feat: auto-unsubscribe and prune timeline when local user leaves a room
Wire onMembershipLeave to RoomMemberEvent.Membership in attach()/dispose().
When the local user leaves or is banned from a subscribed room, calls
unsubscribeFromRoom() which prunes timelines exceeding PRUNE_TIMELINE_THRESHOLD.

Previously, unsubscribeFromRoom() was dead code — nothing in the app called it.

Also add 5 unit tests covering: leave, ban, other-user leave, join (no-op),
and non-subscribed room (no-op).
2026-03-18 15:22:56 -04:00
Rye ce3d20b1f8 added changeset 2026-03-18 19:45:49 +01:00
Rye c5eb3020f5 fix stripping nickname from replies and plain mentions 2026-03-18 19:39:25 +01:00
Evie Gauthier 0f6067e04c refactor: remove adaptive timeline limits, stop unsubscribing on navigation
Replace the adaptive 50/100/150 timeline limit system with a flat
ACTIVE_ROOM_TIMELINE_LIMIT=50, matching Element Web approach.
Stop calling unsubscribeFromRoom() on room navigation so subscriptions
accumulate across the session for instant room switching.

Element Web SlidingSyncManager.setRoomVisible() never removes subscriptions
at all -- no pruning whatsoever. Our PRUNE_TIMELINE_THRESHOLD=100 guard
is more conservative than their approach.

- Remove AdaptiveSignals type, readAdaptiveSignals(),
  resolveAdaptiveRoomTimelineLimit(), applyRoomTimelineLimit()
- Remove adaptiveTimeline and configuredTimelineLimit class fields
- Remove adaptiveTimeline from SlidingSyncDiagnostics type and UI
- Stop unsubscribing on nav in useSlidingSyncActiveRoom
- Lower PRUNE_TIMELINE_THRESHOLD from 150 to 100
2026-03-18 14:31:18 -04:00
7w1 53a652b47a Merge pull request #347 from SableClient/fix/thread-indicator
fix: hide ThreadIndicator badge inside ThreadDrawer compose box
2026-03-18 18:04:58 +00:00
7w1 3d75daf691 Merge pull request #364 from SableClient/tiny-hoverstate-patch
tiny patch
2026-03-18 13:03:26 -05:00
7w1 9c736203ad Update ImageContent.tsx 2026-03-18 12:56:52 -05:00
Kace Cottam 10a2c400b2 Improve nested displays and clean up UI for small displays 2026-03-18 10:51:06 -07:00
Rye a842bce6e1 stub: add PluralKit command message handler and data models 2026-03-18 15:05:43 +01:00
Rye 93a93a686a doc: a bit of code doc 2026-03-18 15:03:44 +01:00
Rye 2ad4fa055a merging from dev 2026-03-18 14:59:04 +01:00
Rye c836e90338 Merge remote-tracking branch 'fork-new/dev' into feat/allow-setting-pmp 2026-03-18 14:58:41 +01:00
Rye 8d598fdf3f fix a few pmp editing bugs 2026-03-18 14:48:20 +01:00
Rye cd4079be99 remove unused profile invalidation functions and fix profile association handling 2026-03-18 13:02:51 +01:00
7w1 21dc9c5b2f pull out scroll logic 2026-03-18 01:09:43 -05:00
7w1 b396ccec70 remove the comments >:D and merge the updated roomtimeline to have the new stuff and use the util file and yes 2026-03-18 00:52:10 -05:00
7w1 13bd62a8c8 make better yes 2026-03-18 00:44:21 -05:00
7w1 a9704a0ed1 Merge branch 'dev' into timeline-rewrite 2026-03-17 23:29:56 -05:00
7w1 1ef961e084 begin pulling apart the giant timeline file smh 2026-03-17 23:27:33 -05:00
7w1 74ece9e6ac merge 2026-03-17 23:18:55 -05:00
7w1 476ec6ffe1 Merge pull request #355 from SableClient/fix-mention-highlight-toggle
Add toggle for mention highlighting
2026-03-17 22:03:26 -05:00
7w1 75f84f90d1 Merge pull request #354 from SableClient/fix/hide-presence-member-list
Hide presence badge in members list for unsupported users
2026-03-17 22:01:56 -05:00
7w1 54c5562bea Merge pull request #353 from SableClient/feat/pronoun-parse
Pronoun pills for all
2026-03-17 22:01:42 -05:00
7w1 3043f77d85 add toggle for mention highlighting 2026-03-17 21:58:31 -05:00
7w1 4eef3cefef Hide presence badge in members list for users without homeserver support, mimicking room profile apperance. 2026-03-17 21:36:48 -05:00
7w1 dcfafa4f5e Update Message.tsx 2026-03-17 21:28:22 -05:00
7w1 c851eb4e11 cache things 2026-03-17 21:23:18 -05:00
7w1 0f14e675ba pronoun pills for all 2026-03-17 21:15:38 -05:00
7w1 53df685fa3 Merge pull request #351 from SableClient/7w1-patch-1
Update CODEOWNERS
2026-03-17 18:53:30 -05:00
7w1 4b4d41f98f Update CODEOWNERS 2026-03-17 18:50:59 -05:00
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