Commit Graph
426 Commits
Author SHA1 Message Date
7w1 9c736203ad Update ImageContent.tsx 2026-03-18 12:56:52 -05: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 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
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
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
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
Evie Gauthier f624c8d36b feat(sentry): make consent banner non-dismissable 2026-03-17 09:34:28 -04:00
Evie Gauthier 9e9218bb00 feat(sentry): switch crash reporting from opt-out to opt-in 2026-03-17 09:03:12 -04:00
7w1 add946378a fix replies new lines 2026-03-16 23:57:45 -05:00
Evie Gauthier f226a422e8 Merge pull request #280 from SableClient/feat/sentry-pr
feat(sentry): error tracking, performance monitoring, and session replay
2026-03-17 03:04:48 +00:00
Evie Gauthier 2ee72702e6 Merge pull request #314 from SableClient/fix/matrix-to-custom-base
fix: support custom matrix.to base URL via config
2026-03-17 03:04:28 +00:00
Evie Gauthier 4714518514 test(sentry): unit tests for scrubbers and TelemetryConsentBanner
- Extract scrubMatrixIds/scrubDataObject/scrubMatrixUrl from instrument.ts
  into src/app/utils/sentryScrubbers.ts so they can be tested independently
- Add 43 unit tests covering token redaction, Matrix entity ID scrubbing,
  URL path scrubbing (API + app routes + percent-encoded deep-links),
  and scrubDataObject recursive traversal
- Add 12 RTL integration tests for TelemetryConsentBanner: visibility
  gating (no DSN, pre-existing pref), Got it, dismiss, and Opt out flows
2026-03-16 22:44:37 -04:00
Evie Gauthier 57eedcbf60 chore: resolve merge conflicts with dev; document telemetry consent banner 2026-03-16 22:27:17 -04:00
Evie Gauthier f65f12687a test(matrix-to): add RTL integration tests for config→matrix-to wiring 2026-03-16 22:19:23 -04:00
7w1 687d6721ce Merge pull request #127 from melogale/dev
Bring in sable-call!
2026-03-17 01:33:17 +00:00
Evie Gauthier 121334b5e1 fix: keep formatted_body links as standard matrix.to for interop
Outgoing links embedded in Matrix events (mention HTML, reply quotes)
must use https://matrix.to so other clients (Element, FluffyChat, etc.)
can parse them as Matrix permalinks. Custom base applies only to UI
navigation links (copy-to-clipboard buttons).
2026-03-16 21:26:18 -04:00
Evie Gauthier 2da742d716 fix: dynamic matrix.to regexes; route mentions through plugin generators (#67)
- matrix-to.ts: replace static hardcoded regexes with a lazily-built
  cached set that matches both https://matrix.to (cross-client compat)
  and the configured custom base URL (if matrixToBaseUrl is set in
  config.json)
- editor/output.ts: Mention block now calls getMatrixToRoom /
  getMatrixToRoomEvent instead of hardcoding the matrix.to base
- room.ts: parseReplyFormattedBody uses getMatrixToRoomEvent /
  getMatrixToRoom for the same reason
2026-03-16 21:17:19 -04:00
Evie Gauthier 62925c8d7e Merge pull request #310 from SableClient/fix/quick-issues-batch-1
fix: Quick issues batch 1 — UI/UX polish
2026-03-17 01:10:31 +00:00
Evie Gauthier 097e12d3a4 fix: correct remaining VIDEO_VOLUME_KEY reference and add useEffect import 2026-03-16 21:03:30 -04:00
Evie Gauthier 1a4af27d49 fix: persist volume for audio+video; split changesets; revert matrix.to (#120) 2026-03-16 20:51:22 -04:00
Evie Gauthier d7ede9532c fix: resolve lint/format errors in autocomplete virtual selection 2026-03-16 20:30:30 -04:00
Evie Gauthier b6db65c33b fix: virtual autocomplete selection — typing preserved, arrow keys navigate 2026-03-16 20:14:46 -04:00
Evie Gauthier c7063690f0 fix: focus first autocomplete item on menu open 2026-03-16 19:52:20 -04:00
melogale 3e42d3bf70 Merge remote-tracking branch 'upstream/dev' into dev 2026-03-16 19:49:03 -04:00
Evie Gauthier e252a1242b fix: highlight first autocomplete item to indicate Enter selection 2026-03-16 17:29:49 -04:00
Evie Gauthier ec5e9812aa fix: quick issues batch 1 (#2 #44 #45 #52 #66 #67 #69 #79 #35 #103 #120 #168) 2026-03-16 17:16:04 -04:00
Rose 5b1245c4ee Merge branch 'dev' into sonarqube/maintainability-2026-03-14 2026-03-16 21:42:24 +01:00
7w1 4badb3785e Merge pull request #307 from SableClient/fix/animated-avatars
Make animated svgs loop
2026-03-16 20:01:42 +00:00
7w1 84ce6d7572 there had to have been a better way to do this 2026-03-16 14:59:36 -05:00
Evie Gauthier 888ab90fe7 Merge pull request #301 from SableClient/fix/url-preview-scroll-arrows
fix(url-preview): show scroll arrows only when content overflows
2026-03-16 19:54:54 +00:00
Evie Gauthier 293dee7b34 fix(lint): use return undefined for consistent-return in useEffect 2026-03-16 15:16:54 -04:00
Evie Gauthier 85aac4ff64 fix(sidebar): center notification dot on avatar corner
The dot badge (8px circle) was positioned at top:-2px, left:-2px
which placed its CENTER 2px inside the avatar corner rather than
on the corner itself. Changed to top:-4px, left:-4px so the dot
is centered exactly on the top-left corner of the avatar, matching
how the count badge (top:-6px for ~12px height) is positioned.

Also updated the folder compound variant dot position from +2px to 0px
for consistency.

Fixes #293
2026-03-16 15:07:37 -04:00
Evie Gauthier 0e21656451 fix(url-preview): replace IntersectionObserver with scroll/resize measurement for arrows
The old code used IntersectionObserver anchors to determine whether scroll
arrows should be shown. This caused false positives in two scenarios:
1. When a UrlPreviewCard renders null (fetch error), the empty anchor div
   was sometimes not detected as intersecting, leaving a stale arrow visible.
2. When loading (Spinner makes card 400px wide), the IO would mark the front
   anchor as not visible, showing the arrow; after load failure the arrow
   stayed stuck.

Replace with direct scrollWidth/clientWidth measurement via ResizeObserver
(fires on container and content resize) plus a scroll event listener. Arrows
now only appear when the horizontal scroll area actually has overflowed content.

Fixes #220
2026-03-16 14:54:13 -04:00
hazre bf6d7ce4a6 fix: a lot more polish on voice messages 2026-03-16 15:16:20 +01:00
Shea Duma 55d92c6610 making formatter happy 😄 2026-03-16 08:16:45 +02:00
Shea Duma 75c128831f overspecified the width of the texteditor to make sure it doesnt shrink for no reason 2026-03-16 07:38:14 +02:00
Evie Gauthier 31bee68006 feat(sentry): opt-in consent model with first-login banner
- Flip Sentry from opt-out to opt-in: enabled only when sable_sentry_enabled === 'true'
- Add TelemetryConsentBanner: fixed bottom slide-up banner shown once on first login
  - 'Enable crash reports' reloads page so Sentry initialises immediately
  - 'No thanks' / dismiss X sets sable_sentry_enabled=false, no repeat prompts
  - Only shown when VITE_SENTRY_DSN is configured (self-hosters unaffected)
- Update DiagnosticsAndPrivacy toggle: enable path now sets 'true' instead of removeItem
- Update SentrySettings dev panel to match new opt-in read logic
2026-03-16 00:25:39 -04:00
melogale 56d3918db1 fix calls! 2026-03-16 00:15:25 -04:00
Evie Gauthier d57ebdd4a3 feat(sentry): detailed timeline and scroll instrumentation, sync batch monitoring, and anomaly detection
RoomTimeline.tsx:
- atBottom transition breadcrumbs (ui.scroll) with rapid-flip detection:
  true→false within 200ms captures warning (IntersectionObserver false-positive)
- Virtual paginator window shift breadcrumbs (ui.timeline)
- scroll-to-bottom trigger breadcrumb; captures warning when fired while
  user is scrolled up without a pending reset
- eventsLength batch monitoring: breadcrumb on every batch with delta,
  batchSize label (single/small/medium/large), rangeGap, atBottom
- Large batch warning (>50 events, liveTimelineLinked=true) for sliding
  sync adaptive load detection

slidingSync.ts / initMatrix.ts:
- sync.sliding breadcrumb in onFirstRoomData with latency + event count
- sable.sync.room_sub_event_count distribution metric

Message interaction metrics (IncomingCallModal, MessageDelete, MessageForward,
MessageReport, RoomTimeline reaction handler):
- sable.call.answered/declined, sable.message.delete/forward/report/reaction.*
2026-03-15 23:40:58 -04:00
Evie Gauthier 4e539b91ca feat(sentry): comprehensive data scrubbing, settings UI, and privacy policy
Before-send scrubbing in instrument.ts covers:
- Matrix user IDs (@user:server → @[USER_ID])
- Room IDs (!room:server → ![ROOM_ID])
- Event IDs ($event → $[EVENT_ID])
- Percent-encoded sigils (%40, %21, %24, %23)
- Hybrid-encoded forms (decoded sigil + %3A colon)
- Tokens, credentials, and query params (access_token, next_batch, etc.)
- All span data string values (not just http.url)
- Profile URLs, key backup paths, media paths in span data
- preview_url query params and exception values
- 'none' sentinel for unset room tags

Privacy policy added to docs/PRIVACY.md (linked from General settings).
DiagnosticsAndPrivacy component added to General settings with error
reporting and session replay toggles.
TS2367 redundant phase guard removed from useCallSignaling.ts.
2026-03-15 23:40:58 -04:00
Evie Gauthier 3ce9e54145 feat(sentry): initialize SDK, performance instrumentation, developer settings, and error capture
Adds Sentry error tracking, performance monitoring, and session replay:

- Environment-based sampling: production 10%, preview/dev 100%
- Session replay with full privacy masking (text, media, inputs)
- Hashed MXID as anonymous user ID with homeserver tag
- Error rate limiting (50 events/session) to protect quota

Performance spans and metrics across all critical paths: auth login,
message send, timeline jump-load, per-event decryption, sliding sync
cycles, key backup, store wipe, UTD failures, sync degradation,
background notification clients, media uploads.

Developer settings panel (Settings → General → Diagnostics & Privacy):
error reporting toggle, session replay opt-in, breadcrumb category
controls, debug log export.

Crash page shows Sentry event ID with one-click feedback dialog.
Bug report modal sends structured reports to Sentry feedback API
with optional debug log attachment.

CI: Sentry env vars injected into preview (100% sampling) and
production (10% sampling) builds. Source maps uploaded via
@sentry/vite-plugin.
2026-03-15 23:40:58 -04:00
Shea Duma 5dd2fd72ce unstupidified spoiler pill code 2026-03-16 01:47:51 +02:00
Shea Duma 0db649b22f put the titles in the right places 😭 2026-03-16 01:36:38 +02:00
Shea Duma 4a62139026 added titles to the hover option 2026-03-16 01:33:55 +02:00
Shea Duma e6589c0a0f reverted unintended changes 2026-03-15 09:23:36 +02:00