Commit Graph
3149 Commits
Author SHA1 Message Date
Evie Gauthier b74cb0bb28 chore: add changeset for thread fallback reply fix 2026-03-15 13:56:08 -04:00
Evie Gauthier 43dba190ff fix: set m.in_reply_to fallback to latest thread event per spec 2026-03-15 13:31:29 -04:00
Evie Gauthier 69fc890a03 Merge pull request #279 from Just-Insane/fix/timeline-all-fixes
fix(timeline): stable refs, scroll guard, and listener leak fixes
2026-03-15 17:12:17 +00:00
Evie Gauthier 76fa7f3030 fix: prevent event listener accumulation during sync retries
- Add unreadInfoRef in RoomTimeline; remove unreadInfo from useLiveEventArrive
  callback deps and LocalEchoUpdated effect deps to stop per-message listener churn
- Fix CallEmbed .bind(this) leak: bind handlers once in start(), push cleanup to
  disposables so dispose() correctly removes all listeners
- Add stable refs in useCallSignaling for mutedRoomId/ring callbacks; tighten
  effect deps to [mx, mDirects, setMutedRoomId] to prevent SessionEnded listener
  accumulation during sync retry cycles
2026-03-15 01:27:19 -04:00
Evie Gauthier 1bd5281c93 fix(timeline): stable callback ref pattern for room event listener hooks
useLiveEventArrive, useRelationUpdate, useLiveTimelineRefresh, and
useThreadUpdate each passed their callback argument into the useEffect
dependency array. This caused the listener to be removed and re-added
every time the callback identity changed (e.g. when unreadInfo toggled
or when any other parent-scope value included in the useCallback deps
changed).

Under normal conditions React's synchronous effect cleanup guarantees
one listener at a time. But during sliding-sync error/retry cycles the
client emits MaxListenersExceededWarning (11 session_ended, 51
RoomState.events) confirming that listeners accumulate. When the
callbacks change fast enough — or React defers cleanup in concurrent
mode — multiple handleTimelineEvent instances are live simultaneously.
Each one independently calls setTimeline({ range: start+1, end+1 }) for
the same arriving event, producing the spurious scroll jumps reported.

Fix: use the stable callback ref pattern in all four hooks.
- Add a ref (onArriveRef / onRelationRef / onRefreshRef / onUpdateRef)
- Assign ref.current = callback on every render (always up-to-date)
- Remove the callback from the useEffect dep array (effect runs only
  when `room` changes)
- Inside handlers, delegate via ref.current() instead of the captured
  closure value

The event listener identity is now stable for the entire lifetime of
each room mount. Listener counts stay at 1 regardless of how many
re-renders occur or how many sync error/retry cycles fire.
2026-03-15 01:27:04 -04:00
Evie Gauthier 832f597d6a fix(timeline): don't force scroll-to-bottom on sync gap when scrolled up
When a sliding-sync limited response fires RoomEvent.TimelineReset (or
the app fires RoomEvent.TimelineRefresh) the useLiveTimelineRefresh
callback was unconditionally calling setAtBottom(true) and incrementing
scrollToBottomRef, scrolling the user to the bottom even if they had
scrolled up to read history.

Three coordinated changes:

1. Add RoomEvent.TimelineReset handler to useLiveTimelineRefresh.
   The SDK emits TimelineReset on the EventTimelineSet (not the Room)
   when a limited sync response replaces the live EventTimeline. Without
   this listener the stored linkedTimelines reference the old detached
   chain; back-pagination silently no-ops, freezing the room.

2. Gate the viewport scroll on atBottomRef.current (prior position).
   Capture wasAtBottom before calling setTimeline(getInitialTimeline).
   Only call setAtBottom(true) and increment scrollToBottomRef when the
   user was already at the bottom. When scrolled up we still reinit the
   timeline (the old chain is gone) but avoid the forced scroll.

3. Add timelineJustResetRef to allow the self-heal effect to run when
   atBottom=false after a reset. The SDK fires TimelineReset before
   populating the fresh timeline, so getInitialTimeline sees range.end=0.
   Without the atBottom guard bypass the range stays at {0,0} as events
   arrive, leaving the virtual paginator rendering nothing. The ref is
   cleared on first successful heal, after which normal atBottom-gated
   behaviour resumes.
2026-03-15 01:27:04 -04:00
haz b90555a27c Merge pull request #275 from SableClient/fix/release-tag-workflows
fix: align workflows to v* tags and support manual release deploys
2026-03-14 23:19:07 +00:00
hazre c710b5d803 fix: align workflows to v* tags and support manual release deploys 2026-03-15 00:16:30 +01:00
7w1 f80f2737de Merge pull request #272 from SableClient/release
chore: prepare release 1.8.0
2026-03-14 22:25:10 +00:00
github-actions[bot] edddf2c06c chore: prepare release 1.8.0 2026-03-14 22:20:09 +00:00
7w1 162625a915 Merge pull request #274 from SableClient/7w1-patch-2
Update add_voice_message_func.md
2026-03-14 22:17:43 +00:00
7w1 25bb9dc7d2 Update add_voice_message_func.md 2026-03-14 17:16:04 -05:00
7w1 efeac92d08 Merge pull request #273 from SableClient/7w1-patch-1
add back deleted changeset
2026-03-14 22:10:46 +00:00
7w1 5cf778e891 Create fix_call_prefs.md 2026-03-14 17:08:57 -05:00
7w1 4925f0f579 Merge pull request #176 from dozro/feat/audio-recordings
Add voice message functionality
2026-03-14 21:59:07 +00:00
7w1 b2728598a0 Merge pull request #262 from dozro/fix/sticker-picker-webkit-speed-optimizations
Implement opt-in experimental bandwidth saving for stickers and emojis
2026-03-14 19:17:35 +00:00
7w1 c13cb81035 Merge pull request #271 from SableClient/fix/workflows
fix workflows again
2026-03-14 18:57:29 +00:00
7w1 ee3fdf68d5 Update prepare-release.yml 2026-03-14 13:55:38 -05:00
7w1 2419d75615 Merge pull request #270 from SableClient/fix/workflows
Fix workflows
2026-03-14 18:48:51 +00:00
7w1 74a4d6a9ec Update prepare-release.yml 2026-03-14 13:47:28 -05:00
7w1 6881752c31 Update prepare-release.yml 2026-03-14 13:41:58 -05:00
7w1 f63a347df4 Update prepare-release.yml 2026-03-14 13:39:54 -05:00
7w1 fbbd46cd62 Update cloudflare-web-deploy.yml 2026-03-14 13:37:37 -05:00
7w1 8e67dbacbe Merge pull request #264 from piko-piko/urlpreview-middleclick
Middle click to open the url preview card thumbnail in a new tab
2026-03-14 15:16:24 +00:00
piko-piko 02aa299558 fixed formatting; fixed linting issues 2026-03-14 14:55:26 +01:00
7w1 28073b57a0 Merge pull request #253 from Vespe-r/small-notifications
Add width limit to notification banners
2026-03-14 12:38:55 +00:00
Vesper c811733e0a Add changeset 2026-03-14 11:31:10 +00:00
piko-piko 93c51ce6cc Middle click to open the preview card thumbnail in a new tab 2026-03-14 12:22:31 +01:00
Rye 8e07ab9911 implement bandwidth saving feature for stickers and emojis, but because it will increase server load make it opt-in and experimental 2026-03-14 05:45:44 +01:00
7w1 f008ca80ef Merge pull request #261 from SableClient/7w1-patch-1
fix more changesets
2026-03-14 04:11:43 +00:00
7w1 f57bffaff4 Update perf-sliding-sync.md 2026-03-13 23:09:41 -05:00
7w1 ec39a832d2 Update fix-ui-bugs.md 2026-03-13 23:09:22 -05:00
7w1 00b7fe47c2 Update fix-notification-handling.md 2026-03-13 23:08:49 -05:00
7w1 a84d604d38 Update fix-badge-positioning.md 2026-03-13 23:08:13 -05:00
7w1 ef57d4a6a6 Merge pull request #260 from SableClient/7w1-patch-1
fix changesets
2026-03-14 04:04:17 +00:00
7w1 d4ba3634a1 Update strip_beeper_pmp_on_forward.md 2026-03-13 23:02:33 -05:00
7w1 185f07846d Update feat-threads.md 2026-03-13 23:01:51 -05:00
7w1 4a1e51ffbf Update feat-internal-debug-logging.md 2026-03-13 23:01:36 -05:00
7w1 09c57366e5 Update error_page_with_report.md 2026-03-13 23:01:14 -05:00
7w1 dd73ea784c Update disable_quick_add_for_encrypted_sticker.md 2026-03-13 23:00:54 -05:00
7w1 a4b9e2da6a Update add_tombstone_settings_toggle_for_redacted_msgs.md 2026-03-13 23:00:17 -05:00
Evie Gauthier 61d5a2ebd0 Merge pull request #123 from Just-Insane/feat/threads
feat(threads): implement thread side panel with full functionality
2026-03-14 03:51:49 +00:00
Evie Gauthier aed7b76f08 fix: resolve merge conflict markers and restore non-thread files from upstream 2026-03-13 23:48:22 -04:00
Evie Gauthier 0516054580 chore: remove non-thread files and references 2026-03-13 23:33:33 -04:00
Evie Gauthier dfcefe0d58 chore: remove thread-mockup and check-quality.sh, restore CallControls
- Remove src/app/features/thread-mockup/ directory and all mockup references
- Remove scripts/check-quality.sh
- Restore CallControls.tsx to origin/dev (removed unrelated changes)
- Verified RoomInput.tsx and RoomTimeline.tsx contain only thread-related changes
2026-03-13 23:30:01 -04:00
Evie Gauthier 962736cabf revert: remove unintended workflow file changes 2026-03-13 23:30:01 -04:00
Evie Gauthier 897ad0e7c3 fix(threads): add explicit type annotations to ThreadBrowser callbacks 2026-03-13 23:30:01 -04:00
Evie Gauthier e617ce0b1e feat(threads): add supporting features and infrastructure
Editor:
- Fix Slate initialValue per-instance to support multiple editors
- Each editor (main timeline, thread drawer) maintains independent state
- Prevents value conflicts between simultaneous editors

Thread Mockup:
- Add ThreadMockupPage for development and design testing
- Full mockup UI with realistic thread interactions
- Navigation from WelcomePage for easy access
- Routes added for /mockup/threads path

Quality Tooling:
- Add check-quality.sh script for pre-push validation
- Runs type checks, lint, and builds before pushing
- Helps catch issues before CI/CD

CI/CD:
- Update GitHub Actions workflows for quality checks
- Update dependabot and cloudflare preview workflows
- Update docker-publish workflow
- Update require-changeset workflow

Call Preferences:
- Clean up unused imports in CallControls.tsx
- Remove orphaned callPreferences hook code

Changesets:
- Add feat-threads.md for minor version bump
- Remove fix_call_preferences.md (superseded)
2026-03-13 23:30:01 -04:00
Evie Gauthier 516cd3d51e feat(threads): add thread reply input handling
RoomInput:
- Seed thread reply draft when opening drawer from notification
- Handle thread relation in message composition
- Support isolated draft state per thread
- Auto-populate replyTo when replying in thread
- Send messages with thread relation metadata
- Clear thread draft after sending reply
2026-03-13 23:30:01 -04:00
Evie Gauthier 04495680a1 feat(threads): integrate threads into room timeline and header
RoomTimeline:
- Add ThreadReplyChip component showing reply count, avatars, latest reply preview
- Filter thread replies from main timeline (keep only root messages)
- Add thread button to start threads from messages
- Exclude thread events from triggering timeline pagination
- Re-render on ThreadEvent updates for live reply counts
- Thread reply counts exclude root message, reactions, and edits

RoomViewHeader:
- Add thread button with unread badge using SDK notification APIs
- Initialize Thread objects from room history on mount
- Scan timeline for thread roots and thread replies
- Auto-create Thread objects for new thread events
- Toggle between thread drawer and thread browser
- Close drawer and open browser when clicking button with drawer open

Room:
- Render ThreadDrawer when thread is open (desktop: side panel, mobile: overlay)
- Render ThreadBrowser when browser open and no thread active
- Auto-open thread drawer when navigating to thread event IDs
- Coordinate openThreadId and threadBrowserOpen state

RoomViewFollowing:
- Support filtering read receipts by thread participant IDs
- Show thread-specific following indicator
2026-03-13 23:27:42 -04:00