24 Commits
Author SHA1 Message Date
7w1 4fbcfef90d feat: add editor multiline mode and many edge case fixes (#476)
### Description

Fixes #350

This adds a dynamic multiline layout to `CustomEditor`. When the message
input grows past a single line (word wrap, explicit newlines, or
multiple blocks), the editor shifts from a single-row layout into a
two-row grid, before/textarea on top, with responsive content spanning
the full width below. It drops back to single-row once the text fits on
one line again.

The old `replacementContent` prop (which swapped out the textarea on
mobile during voice recording) is gone. It's replaced by
`responsiveAfter`, which renders inline next to the send button in
single-line mode and moves down to the footer row in multiline mode.
There's also a `forceMultilineLayout` prop for when you want to push
into multiline immediately, which is what we use when the audio recorder
opens. This means the recorder now takes the same code path on desktop
and mobile instead of having a separate mobile-only branch.

A few other things got fixed along the way:

- Holding the record button on mobile was selecting the "following the
conversation" text underneath it. Fixed with `userSelect: none`.
(related to #350)
- The stop button's `onClick` was being skipped on mobile entirely, so
if `pointerup` got lost mid-drag there was no way to stop recording. Now
`onClick` works as a fallback when recording is already active. (a form
of recovery in case more situations like #350 happen again)
- The waveform bar count is now calculated from the actual container
width via `ResizeObserver` instead of a hardcoded number.
- `cleanupMediaRecorder` wasn't being called in all the
stop/delete/restart/error/unmount paths, which could leave the mic track
open. That's fixed.
- Firefox couldn't seek voice messages because `audio/webm` doesn't
include a seek index. Codec preference now puts `audio/ogg;codecs=opus`
first so Firefox records seekable blobs. Also added a `seekTo` helper
that waits for `loadedmetadata` if the audio element isn't ready yet,
and `audio.preload = 'auto'` + `audio.load()` on mount so Firefox parses
metadata right away.
- Multiline wrap detection is now debounced through
`requestAnimationFrame` and uses a `ResizeObserver` on the scroll
container to cut down on flicker and extra re-renders.
- Added cloudflared tunnels for easier testing on mobile

Also sorry for the cursed line height measurer, there was legit no other
way to detect it that didn't cause other issues.

Good amount of this was created with help of AI (like figuring out
options on how to fix the edge cases), especially the edge case unit
tests, but It had to be fixed by hand in many places and frankly I can't
tell you exactly where was what. I've been working on this for couple
days now.. (losing my mind over it)

### Screenshots:

https://github.com/user-attachments/assets/bcff3766-6c60-46c7-ac9e-a8b943a665d3

https://github.com/user-attachments/assets/367cdcc4-666e-4324-8e81-1b415feb0aca

#### Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] 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
- [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:

- [x] 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).
2026-03-23 04:02:36 +00:00
Septicity 515e386b74 Make Vite store all icons in public folders and make manifest.json pull from production file locations 2026-03-22 12:50:19 -05:00
hazre 54ce4aa721 chore: add cloudflared tunnels for easier testing on mobile 2026-03-22 18:13:09 +01:00
Septicity 41c5ef9868 Added maskable icons for Android/iOS PWAs 2026-03-22 00:23:15 -05:00
Evie Gauthier 57eedcbf60 chore: resolve merge conflicts with dev; document telemetry consent banner 2026-03-16 22:27:17 -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
melogale b06e177449 merge 2026-03-15 22:42:21 -04:00
hazre c710b5d803 fix: align workflows to v* tags and support manual release deploys 2026-03-15 00:16:30 +01:00
hazre e44ee39b5e fix: docker images 2026-03-12 00:31:27 +01:00
hazre fcfe06fc95 fix: resolve peer dependency and matrix-sdk-crypto-wasm issues 2026-03-11 17:23:52 +01:00
hazre 8f9095a393 fix: type and fmt issues 2026-03-11 17:20:05 +01:00
melogale 726129f9dd sable call and avatar fix 2026-03-10 02:08:52 -04:00
Bea f252568ede perf: add build-time Brotli pre-compression
Generate .br sidecar files at max quality (level 11) during the Vite
build for all compressible assets (JS, CSS, HTML, WASM, SVG, etc.).
Compressible assets shrink from ~17 MB to ~3.4 MB — an 80% reduction.

Configure Caddy to serve pre-compressed .br files via file_server
precompressed, with on-the-fly zstd/gzip fallback for assets without
sidecars.
2026-03-07 19:18:23 +00:00
Bea b1d5844da8 feat: show dev version with commit hash when not on a release tag 2026-03-06 14:53:08 +00:00
hazre 5bb0ce0643 feat: add Cloudflare Workers IaC and deployment workflows 2026-03-04 14:31:15 +01:00
7w1 3a8ed931e3 Merge pull request #67 from CloudHub-Social/sliding-sync
Add optional beta Sliding Sync support
2026-03-02 23:54:41 -06:00
Evie Gauthier 6250fefc08 add build/git hash to about page 2026-03-03 00:06:03 -05:00
7w1 628da99a55 chore: update changelog and disable css obfustication on production builds 2026-03-02 22:52:52 -06:00
hazre 8372758843 refactor: rename shared utils alias to $utils 2026-03-01 19:10:02 +01:00
hazre 724415fb2f chore(vite): add types and remove invalid option 2026-03-01 14:02:24 +01:00
hazre ee3609bb24 Merge remote-tracking branch 'sable/dev' into chore/cleanup-codebase-1 2026-02-26 19:25:24 +01:00
hazre b8a998cab7 Merge remote-tracking branch 'sable/dev' into chore/cleanup-codebase-1 2026-02-26 19:04:09 +01:00
hazre 69937e0187 refactor: app import aliases 2026-02-14 23:26:58 +01:00
hazre 795b8be0d7 chore(deps): upgrade Vite stack and patch audited dependencies 2026-02-14 20:48:00 +01:00