Skip to content

Rich presence, bookmarks, stickers, themes, mobile and screen-share improvements - #492

Open
caduHD4 wants to merge 200 commits into
TheZwiss:mainfrom
caduHD4:feat/backspace-pr
Open

caduHD4 wants to merge 200 commits into
TheZwiss:mainfrom
caduHD4:feat/backspace-pr

Conversation

@caduHD4

@caduHD4 caduHD4 commented Nov 13, 2026 •

Copy link
Copy Markdown

Testing status

  • Tested on: Linux (CachyOS) with KDE Plasma and with Hyprland; Windows 10; and the browser.
  • Not yet tested on Windows 11.
  • This PR has not been through the full CI suite on this branch yet; please treat the first CI run as the real signal.

This PR bundles the work done on top of main since 2885a7d3: 199 commits, 1100 files changed (+177,093 / −4,798). It includes the four PRs that are still open (#471, #474, #478, #482). Those can be closed in favour of this one, or reviewed separately if you prefer.

The changes are grouped by area below. Database migrations run from 0032 to 0043, and there is one activity migration (0036) to check when reviewing.

Rich presence and game/media activity (desktop + server + web)

  • Local rich presence IPC server for game clients, including the READY frame format they expect.
  • Activities pushed over IPC are overlaid on process detection, and stale PIDs are handled.
  • Game detection on Linux: Minecraft, osu!, any installed Steam game (local manifests), Flatpak and GOG games, Wine/Proton/Bottles/Heroic/Lutris titles, and a hint for unknown Wine programs.
  • Steam runtime and Proton are never reported as the game.
  • Multiple games detected at once; manual games can be named, renamed, hidden, reordered (drag to reorder) and removed.
  • Game icons taken from the player's own machine (including .desktop entries and Wine .exe files), hosted by their instance, with a 30-day retention renewed by the client, and a sharing switch.
  • Cross-platform media detection (including Windows SMTC and NetEase Cloud Music), playback progress, listening timer continuity, and a setting to hide browser players from the status.
  • Multi-activity preemption, smoother status transitions, and realpath matching for process identity.
  • Profile activity card with art and a live elapsed clock; activity details in the profile popout.
  • Relayed activities are kept when a replicated user's session ends (federation).

Bookmarks (server + web)

  • Personal bookmarks: a copy of a message plus a link to the original.
  • Bookmark from the message hover bar and menu; bookmarks window on desktop and mobile; bookmarks button in the chat top bar.
  • Jump to the original message from a bookmark; own-session events.
  • Instances without bookmarks show an empty state instead of an error.

Stickers (server + web)

  • Federated sticker store with configurable size limits and a store modal, plus reaction picker integration.
  • Private and server sticker libraries; separation of servers from sticker packs; switching between every joined server.
  • Private album management, asset optimization and message limits.
  • Loopback sticker URLs are drawn from the page origin.

Chat, messages and social

  • Drop files anywhere in the chat window to attach them, with the overlay kept while a file is held over the chat.
  • A tap on a message no longer opens the desktop action bar.
  • Friendship alerts, attention mutes, and a confirmation step (with restricted actions) before removing a friend.
  • MSN nudges and social/mobile UX improvements.
  • Fixed the edit-message button icon (pencil).

Voice, calls and screen sharing

  • Calls: animated profiles, camera call controls, improved screen audio, DM history, and attention calls delivered in the browser.
  • Voice channel quality set by admins (64, 128 or 256 kbps); default is 128 kbps.
  • Webcam published as a single quality, captured in a 16:9 mode that the camera supports, and given uplink priority over the screen share.
  • Change the shared screen or window from the control bar without stopping the share.
  • Clickable voice channel name; simplified Text Voice into one guided screen.
  • Low-latency Brazilian Portuguese text voice for calls; local CPU/GPU speech recognition and voice dictation; overlapping sound effects.
  • Server soundboards with shared call playback, and a sound effect trimmer for uploads.
  • Screen share on Windows: borderless window capture on Windows 10, live source list, paused card while the window is unfocused, follows a dragged window, handles exclusive fullscreen and monitor changes, and recaptures the display without a user gesture.
  • GPU shared-texture screen capture with fallback to the existing path; processing of padded capture frames; idle preview and thumbnail players are suspended.
  • Screen share on Wayland: capture always goes through the portal on every Wayland session (including Hyprland and other non-KDE compositors), and the share no longer gets stuck small.
  • Process audio worklet emitted as a CSP-compatible asset.

Themes and UI

  • MSN (Live Messenger) theme with Light and Dark variants, an XP-frame switch, a Messenger sign-in screen, display-picture sign-in, and presence-tinted DM photo frames.
  • Light, OLED and Anime themes in Appearance settings.
  • Standardised UI, consistent click feedback on interactive icons, state motion, a status thought bubble, effect previews, and a scrolling settings sidebar with sub-section icons.
  • Fixes for MSN strip action tiles on the light frame and the MSN photo frame in server chats.

Mobile

  • Phones keep the mobile layout on their side.
  • The system Back button closes sheets and dialogs; the profile can be closed.
  • Composer placeholder, empty code blocks, attach sheet, and accessible names on phones.

Storage and media

  • Photos and videos are compressed on the device, with a "Document" option to send the original.
  • Automatic cleanup when the disk is nearly full (server), configurable by the instance owner in Settings.

Server, federation and reliability

  • Static files are resolved per request, so a swapped web bundle is served.
  • Service-worker caches poisoned with index.html are healed.
  • Deploy: verify the web dist before swapping it and heal an incomplete one; restart a server killed during the web build before rolling back; keep the update lock out of child processes.
  • LiveKit: proxy-aware URLs and CA download; the server has a direct address to LiveKit's HTTP API.
  • Desktop: enters recovery at once when the server returns HTTP 5xx.

Desktop (Windows and Linux)

  • Silent update installation on Windows.
  • Activity detection kept alive on Windows; Windows audio capture polish.
  • Build step for the Windows native helpers (process audio and DXGI output probe) in release CI.
  • Packaged window now ships build/icon.png.
  • Update release links point to TheZwiss/backspace.

Tests, CI, dependencies and docs

  • Test suites aligned with the current UI; a dialog Escape ownership fix and a duplicate dialog role fix.
  • Server tests and profile image resize work on Windows.
  • Open OSV advisories cleared.
  • Docker image ships the desktop UI definitions the web build imports.
  • Windows test environment with a local LiveKit and Electron clients (scripts/testenv.ps1, scripts/testenv.sh).
  • Documentation updated for the systems above (docs/systems/*), plus audit notes and benchmarks under docs/audits and docs/benchmarks.

Deployment and infrastructure (self-hosted Android / PRoot setup)

These changes target one self-hosted deployment (Android device running Debian under PRoot, with Tailscale for HTTPS). They are included for completeness and can be dropped from this PR if they do not fit upstream:

  • deploy/prort/ deployment kit: Caddy and Tailscale HTTPS notes, a reproducible patched LiveKit build, an auto-update loop that follows main, Termux autostart, and a start-stack.sh / status-stack.sh / stop-stack.sh set.
  • Root-level INSTALACAO-ANDROID-PROOT.md installation guide.
  • Tailscale-specific LiveKit candidate handling (advertise only the Tailscale IP on that deploy).
  • Personal hostnames, IP addresses and test credentials were replaced with placeholders (*.example, 100.64.0.x, 192.168.1.x, <sua-tailnet>).

Release and versioning

  • Package versions are set to 1.11.1. This PR does not cut a release. The chore: release commits in its history are kept as they were.

Notes for reviewers

  • Migrations 0032 to 0043 run in order. Please check the activity migration (0036) and the stickers migration for conflicts with any migration you have in flight.
  • The change set is large. Happy to split it into smaller PRs by area if that is easier to review.

Cirzear and others added 30 commits October 15, 2026 20:07
…limits, and store modal

- Add federated sticker store with pack lifecycle (draft, submit review, approve/reject, versioning)
- Support peer federation policies and remote sticker pack synchronization
- Add configurable sticker size limit with admin storage settings panel
- Support compressed sticker preview thumbnails and increased animation pixel limits
- Add comprehensive translations across en, zh, de, pt, ru
The detector previously matched only the bare comm name from `ps -A -o comm`,
which loses case, arguments, and everything past 15 characters. Minecraft
(a `java` process from every launcher) and osu! were therefore invisible on
Linux, and long launcher names like minecraft-launcher arrived truncated.

Walk /proc directly on Linux instead: the exe symlink (full name, case
preserved, Wine paths included), the NUL-separated cmdline, and comm as a
last resort. Dictionary entries gain optional cmdlinePatterns so one entry
can cover every launcher variant of an interpreter-hosted game: Minecraft
matches vanilla/Fabric/Quilt/Forge/NeoForge/Prism/MultiMC markers and never
bare `java` (no false positives on servers or IDEs), while a separate
minecraft-launcher entry — ordered after the game — covers the launchers.

Dictionary loading now picks the higher of cache vs bundled seed and promotes
a winning seed into the cache; previously any valid cache shadowed the seed
forever, so dictionary updates shipped with new builds never reached
existing installs. The dead processMap and its stale lint suppression are
gone. games.json is now v2 (+osu!, +minecraft-launcher, Minecraft cmdline
markers) with 45 new tests covering /proc parsing, Wine, comm truncation,
priority and the seed contract.

Co-Authored-By: Z.ai <noreply@z.ai>
ProcessInfo now carries the /proc exe symlink target verbatim, case and all.
The name-based matching stays as it is, but source detectors that resolve a
running process to an installed game (Steam libraries next) need the full
path to match against install directories — Wine prefixes, AppImage mounts
and native installs alike. exe is null on the ps/tasklist fallback paths and
when the symlink is unreadable or marked (deleted).

Co-Authored-By: Z.ai <noreply@z.ai>
The dictionary only knew ~250 curated titles, so any Steam game outside it
was invisible to rich presence. Add a local Steam source that resolves every
installed title — native and Proton alike — straight from the installation:

- libraryfolders.vdf yields every library, including extra disks
- appmanifest_*.acf yields appid/name/installdir and the StateFlags gate
  (bit 4 = fully installed; downloads and updates are skipped)
- a running process matches when its full exe path lives under
  <lib>/steamapps/common/<installdir>/ — Proton's exe resolves there through
  Wine's Z: drive, so native and Windows titles match identically, while
  compatdata prefixes are correctly rejected

Roots cover ~/.steam/steam, the native data dir, the Flatpak sandbox and the
snap layout, realpath-deduplicated so the symlink and the real dir collapse
into one. The manifest index is cached for 60s so the 15s poll reuses it.

Detection now flows through detectActivity: the dictionary keeps priority,
and source detectors fill the gap for anything installed but not curated.

Co-Authored-By: Z.ai <noreply@z.ai>
Two more local sources close the remaining install-per-provider gaps:

Flatpak: a sandboxed game's processes run from
  <install>/app/<id>/<arch>/<branch>/active/files/
so the running exe is matched against that prefix. Only apps whose exported
.desktop file carries the Game category are indexed, and known launchers
(Steam, Lutris, Bottles, Heroic, itch, Prism) are excluded so they don't
shadow the games they start. Covers user and system installs.

GOG: the installer layout ~/GOG Games/<dir>/ with goggame-*.info providing
the display name (directory name as fallback). Matching is by exe path under
the game directory — case-insensitively, since the info file and the
filesystem disagree on case more often than not — with a command-line
fallback for start.sh wrappers whose exe is the shell.

Both indexes cache for 60s like the Steam one.

Co-Authored-By: Z.ai <noreply@z.ai>
…sources

games.json v3 adds fourteen native Linux games (Wesnoth, Luanti, Minetest,
OpenMW, 0 A.D., SuperTux, SuperTuxKart, Half-Life, Half-Life 2, Warzone
2100, Teeworlds, Endless Sky, Mindustry, Xonotic) — client binaries only,
deliberately excluding dedicated-server names (wesnothd, minetestserver,
teeworlds_srv, ...) so hosting a server never shows as playing.

docs: desktop.md gains a Local Game Sources section (Steam/Flatpak/GOG
tables, priority, caching, root discovery) and the detectActivity flow;
activity-presence.md's boundary section now points at it and lists the
source modules instead of deferring to a future spec.

Co-Authored-By: Z.ai <noreply@z.ai>
Speak the local IPC protocol games use for rich presence, so their
pushes (osu!lazer's current map and menu state, elapsed time, cover art) can
surface as Backspace activities instead of relying on process-name detection
alone.

Protocol, verified against public protocol documentation and an open-source
client library osu!lazer ships with: frames are [i32 LE opcode][i32 LE
length][JSON]; opcodes HANDSHAKE/FRAME/CLOSE/PING/PONG; unframed raw-JSON
handshakes are accepted too, including multiple messages glued into one
segment (a brace scanner splits them). SET_ACTIVITY payloads are normalized
into our clamped activity shape — codepoint-safe truncation to the shared
limits, asset keys resolved via the public app-assets CDN (client_id is
validated as 1..64 digits, so it cannot inject path segments), and
buttons/party/secrets are never read, let alone relayed.
SUBSCRIBE/UNSUBSCRIBE are ACKed without dispatching events; PING answers
PONG.

Slots: all ten protocol socket slots are bound across XDG_RUNTIME_DIR and
the TMPDIR chain, one net.Server per path. Live servers (the first-party
desktop client) keep their slots; crash leftovers are probed
(ECONNREFUSED) and reclaimed; non-socket files are never touched; sockets
are chmod 600.

Semantics: pushes for dead pids are stale (dropped, and void the
connection's earlier push), a 2.5s disconnect grace absorbs client
reconnects, and a monotonic sequence number makes the last push win across
connections. stop() unlinks everything and the server restarts cleanly.

Co-Authored-By: Z.ai <noreply@z.ai>
Wire the rich presence IPC server into the activity pipeline. The effective
activity is the IPC push while one is live — richer data: real details
(osu!lazer's current map), menu/spectate state, elapsed timestamps and
cover art — and the scan-detected game otherwise. A change in either layer
takes effect immediately: a map switch shows up within a second instead of
waiting for the next 15s poll, and emissions happen only when the effective
activity actually changed.

Pushes without a name get one from the dictionary via the pushing pid
(resolveIpcGameName reads /proc for that pid and matches it like a scan), or
from a small known-client map (osu!lazer), before falling back to a generic
label. If the scan game exits while an overlay is live, the exit is not
lost: clearing the overlay then yields no activity rather than a ghost.

main.ts starts the server next to process detection and stops it in
before-quit alongside the detector.

Co-Authored-By: Z.ai <noreply@z.ai>
The card only showed the game name and a static elapsed line. Rich
activities now render in full: cover art (large image with a small
badge in the corner, both with text tooltips, both hidden when they fail to
load), details and state lines with emoji shortcode support, and a live time
line — a countdown while the activity's end is in the future, elapsed time
otherwise, ticking every second via useNowTick.

Only http(s) art URLs are ever rendered (isRenderableActivityImage): data:/
javascript:/relative URLs from activity data are dropped. Durations flow
through the i18n formatters so digits follow the selected locale, and
time.left ships in all five languages. Hooks stay above the early returns
to keep the Rules of Hooks intact; the card test grew from 3 to 14 cases.

Co-Authored-By: Z.ai <noreply@z.ai>
… detail fields

desktop.md gains a Rich Presence IPC Server section — the wire protocol
(framed and raw-JSON handshakes, command handling), socket/slot coexistence
with the first-party client, push semantics (normalization, CDN asset
resolution, dead-pid staleness, disconnect grace, last-push-wins) and the
overlay rules. The Activity Detection section now documents the
effective-activity lifecycle (applyIpcActivity, both shutdowns) and the
extended Activity object with details/state/assets.

activity-presence.md's boundary section describes both detection sources
(scan + IPC push) and lists the full interface including the new helpers,
with stable component names instead of drifting line-number references.

Co-Authored-By: Z.ai <noreply@z.ai>
getFlatpakInstallDirs filters candidate dirs by existence, so the test's
length-1 assertion only held on hosts without a system-wide Flatpak — on a
machine with /var/lib/flatpak present the function legitimately returned
two dirs and the test failed. The system dirs are now a parameter
(production default unchanged), and the test covers both cases explicitly:
a missing system dir is skipped, an existing one is appended after the
user dir.

Co-Authored-By: Z.ai <noreply@z.ai>
The IPC server used to answer the handshake with a bare {v:1, config:{...}}
object. Clients built on Lachee-style Discord RPC libraries (osu!lazer among
them) only complete the handshake when the frame arrives as a DISPATCH
event - cmd == "DISPATCH" and evt == "READY" - and they also read
data.user; without it they stay in Connecting forever and never push
SET_ACTIVITY.

READY is now dispatched as {cmd:'DISPATCH', evt:'READY', data:{v:1,
cfg:<config>, config:<config>, user:{id, username, discriminator, avatar,
bot, flags}}} - both cfg and config keys are sent for compatibility with
different client library versions. Test expectations updated to match the
new frame.
The profile popout now shows the full rich presence activity under the custom status: the headline (the app name, falling back to the push's details), the details and state lines, a live elapsed/countdown time line and the asset art — the large image with a small badge overlay. Only remote http(s) art is rendered and each image hides itself when it fails to load, matching the row treatment.

Docs updated in docs/systems/activity-presence.md; new test cases cover the popout card, its headline fallback and the art guards.
A SET_ACTIVITY that carried an activity was silently dropped when the pid
it reported was not alive: the ACK went out, but the push was never
stored, so the card stayed on the scan-detected game without details. A
client that just sent a frame is running regardless of the pid it reports
(AppImage wrappers report a pid that may exit, pids can come from another
namespace), so the live connection is now the source of truth and the
push is kept. Pushes from games that exit are still dropped by the
disconnect grace when their socket closes.

Both hops of the chain now log what they saw, one line per event:
handshakes, pushes (pid, liveness, which fields arrived), the winning
activity in the IPC server, and the effective activity (source, name,
out det) in the detector.

Signed-off-by: Z.ai <noreply@z.ai>
…e original)

A bookmark keeps the text and metadata of a message as they were when it was
saved, with the ids needed to open the original. It is private to its owner,
lives on the instance that serves the message and is never relayed.

- schema + migration 0032: message_bookmarks, bookmark_attachments
- REST: GET /api/bookmarks (keyset-paged, no per-user limit),
  GET /api/bookmarks/keys (per conversation), PUT and DELETE
  /api/bookmarks/:kind/:messageId (idempotent)
- create requires read access to the message now; an unreadable message is
  answered like a missing one
- status of the original (ok, edited, deleted, unavailable) is computed on read
- attachments: metadata and the original's file name are kept, files are not
  copied yet; snapshotBookmarkAttachments is the one place to change for that
- lifecycle: tombstoneUser purges bookmarks, getReferencedFilenames counts files
  a bookmark owns, bulk deletes use subqueries (no bound-variable cap)
- docs: bookmarks.md, database.md, api.md, uploads.md, CLAUDE.md table

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Server: PUT /api/bookmarks/:kind/:messageId pushes bookmark_added when it
created a bookmark, DELETE pushes bookmark_removed (with the conversation)
when it removed one, both to the caller's own sockets only. Nothing is
relayed; a repeated create or a no-op removal sends nothing.
deleteBookmark now returns the removed bookmark's channel id (or null).

Web: the jump to a message is lifted out of MainContent's local state into
stores/jumpStore.ts (requestJump, useActiveJump). useJumpNavigation, mounted
in AppLayout, opens the target conversation by writing the route (and the
channel-chat screen on a phone); the list takes the request once its channel
is open, and a request nobody took in 15 s is dropped. Search results now go
through it, and MobileChatScreen takes jumps too.

Docs: websocket.md, bookmarks.md, api.md, search.md, message-list.md.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Client state for bookmarks and the message-side controls; the list window and
its entry points follow in the next patch.

- api client: bookmarks.list / keys / add / remove
- stores/bookmarkStore.ts: per-origin keys of the opened conversations and the
  paged list per instance; bookmark_added / bookmark_removed from the socket are
  filed under the origin that delivered them, changes during a read are laid
  over its answer, resync on a socket's ready, reset on sign-out, forget on an
  instance's removal
- hooks/useBookmarks.ts: useBookmarkedConversation (mounted by MessageList) and
  useMessageBookmark (toggle, busy guard, failure toast)
- Message.tsx: bookmark button in the hover bar (highlighted when saved, click
  removes) and a context-menu entry; not offered for pending or system messages
- i18n: namespace bookmarks in en, ru, de, pt, zh
- docs: bookmarks.md, localization.md

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The page's own instance has the origin '' in the client, but the bookmark
button and the conversation read treated '' as "instance unknown", so
nothing could be bookmarked on the home instance and its bookmarked
messages were never read. Only an origin the client does not hold at all
(undefined) has nothing to ask now.

Regression tests cover the button, the toggle and the conversation read on
the empty origin.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A list of the user's bookmarks from the page's own instance and every
connected one: author (live avatar, initials fallback), instance, space,
channel, date and time, the saved text, attachments by name, and a badge
for an edited, deleted or unavailable original. A row opens the exact
conversation at that message through the jump store; the highlighted icon
removes the bookmark.

Desktop opens it from a space sidebar button as a modal; mobile pushes a
bookmarks screen from a row on the You screen. Strings in all five
languages; docs updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Drizzle skips a migration whose journal `when` is older than the newest
applied one. Record when that happens to bookmarks and how to recover.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Move the desktop entry from the space sidebar to the top bar, to the left
of the downloads indicator, in all the header variants of MainContent.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A connected instance on a version without bookmarks answers 404. The list
showed "could not load the bookmarks of some instances" for it every time,
and every conversation of it asked again on each open. Treat 404 as none.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
An instance that cannot be read is left out of the list silently (the
store still logs it) instead of showing a banner with a retry. Opening the
window reads the list again.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…c timestamps to ms

- expect READY envelope {cmd,evt,data} (3 tests)
- accept dead-pid pushes; staleness handled by disconnect grace
- clampTimestamps: seconds->epoch ms so web elapsed timer is correct
…d-liveness check

applyMatchedGame rebuilt the scan activity with a fresh timestamps.start on
every 15s poll. Since the effective activity is compared as a whole, each poll
of a steadily running game counted as a change: the activity was re-emitted
and the elapsed clock restarted every 15 seconds (before the overlay work only
a change of game emitted). nextScanActivity now returns the previous activity
while the same game keeps running.

Also:
- remove isProcessAlive and the "stale pid" log, which only fed a log line
  after pushes from dead pids started being kept
- drop an overlong art URL instead of cutting it off into a broken link
- name resolution no longer repeats the pushed name in the process lookup
- desktop.md no longer says a dead-pid push is dropped, and documents the
  seconds-to-ms timestamp conversion; activity-presence.md lists the helper

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
An activity card can show an icon for the detected game without any
third-party art service. The desktop client extracts the icon locally -
Steam's appcache/librarycache by app id, Flatpak's exported hicolor icons,
GOG's support/icon.png, an AppImage mount's .DirIcon (the pushing process's
/proc/<pid>/exe leads there), and .desktop entries resolved through the
hicolor theme directories - and caches it by game name while detection runs.

The renderer asks for it over the new get-game-icon IPC, uploads the bytes
to the user's own instance (POST /api/game-icons, shaped after the personal
sticker route: authenticated JSON base64, sharp re-encode to a 256px WebP,
sha256 content addressing, per-account quota and rate limit, public GET
with the sticker asset sandbox headers) and attaches the returned instance
URL to the activity's assets.largeImage, cached per game name so one upload
serves every later activity. A push that needs no upload sends exactly as
before; a stuck pipeline times out after 4s and never blocks presence.

Accordingly, the Discord protocol's asset keys are now dropped at
normalization instead of being resolved against Discord's CDN: only http(s)
art a game pushes as a full URL passes through.
ActivityArt kept the failed state per image but the frame around it stayed, so
a failed large image left an empty box (or a lone badge in the corner of one).
ActivityArtwork owns the load state of both images: a failed image is dropped,
a badge left without its large image is promoted to the full-size image, and
with nothing left no frame is rendered. A failure is remembered per URL, so a
new URL is tried (the old per-image state stayed failed for good).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… honor the sharing switch

Review of the game icon pipeline found four defects and two limit problems.

- activityStore: switching "show activity" off did not cancel a push whose
  icon was still uploading, so the activity (with the game's name) was sent
  after the user had opted out. setShowActivity(false) now invalidates the
  push in flight, like reset().
- gameIcons: readIconFile read the whole file before checking its size, and
  the candidate list included the game's own executable, so a 300 MB binary
  was read into memory as an "icon". A candidate is now stat-ed first and only
  a regular file within the limit is read, into a buffer of its size; the
  executable is no longer a candidate.
- gameIcons: a .desktop entry matched when its Exec line merely contained the
  executable's name, so a java-hosted game (Minecraft) got the icon of any
  java program (JDownloader). Exec now has to run the same program, compared
  whole (execProgramName), and a host program (java, wine, python, mono, sh,
  steam, ...) never matches by Exec; such a game matches by display name.
- i18n: the three game_icon_* error codes had no catalog entries, which failed
  scripts/check-i18n.mjs; added in en, de, pt, ru, zh.
- limits: the desktop read up to 2 MiB while the server takes 512 KiB, so
  larger files travelled to the renderer and were refused; the desktop limit
  now matches. MAX_GAME_ICONS_PER_USER (per account) goes from 128 to 25,600.
- docs: database.md and api.md describe the two tables and the two routes;
  uploads.md no longer claims the quota is a lifecycle and says what is open.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Z.ai <noreply@z.ai>
…dictionary games

Rich presence misses games, and sometimes finds the wrong name. Settings →
Privacy now lets the player name the game they are playing and show a
detected game under another name. Both are kept by this client and applied
before the activity is sent, so the server and federation see an ordinary
playing activity and the wire format does not change.

- Manual game: replaces detected "playing" activities, stays until cleared
  (no timer), is pushed on connect even with nothing detected, and is cleared
  on sign-in and sign-out. The desktop offers suggestions from the dictionary
  and the installed Steam, Flatpak and GOG games (list-known-games IPC).
- Renames: remembered by detected name, case-insensitive, capped at 200,
  applied after the icon lookup so the icon is found by the detected name.
- Icons: a game the dictionary matched, or one the player typed, never reached
  the Steam/Flatpak/GOG sources because only a store's own match carried a
  store id. findGameIcon now resolves the store by the running executable and
  then by display name. get-game-icon waits for a lookup in flight and starts
  one for a name nothing warmed.
- Turning sharing back on republishes what is being shown.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
With Steam open and no game running, the activity became "Steam Linux
Runtime 3.0 (sniper)" or "4.0": the runtimes and Proton are installed as
apps under steamapps/common, their processes run whenever Steam does, and the
exe-path match took them for games. A Proton game had the same problem the
other way round: its own process is a Wine binary inside the Proton
directory, so the exe path named the tool, never the game.

- Steam's tool apps (Steam Linux Runtime *, Proton *, Steamworks Common
  Redistributables) are not indexed. The manifest has no flag for them, so
  they are told apart by name or install directory.
- The game is read from the launch command of Steam's supervising reaper
  process (`reaper SteamLaunch AppId=<id> -- ...`), which names the app id for
  every game Steam starts, native or Proton. The install-directory match
  remains for native games.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
claude and others added 26 commits November 12, 2026 12:57
Presentation-only theme: Luna/Aero blue frames, glossy buttons, docked
composer, Segoe/Tahoma type. No behaviour or DOM structure changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177uyDnR1RCvUxyDRztGFDt
…rames

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177uyDnR1RCvUxyDRztGFDt
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177uyDnR1RCvUxyDRztGFDt
feat(web): MSN and MSN Dark themes (Live Messenger look)
…rver chats; skip release-bot workflows outside upstream

- UpdatesPanel: the 2s 'Copied' reset timer is now cleared on unmount. Left
  running it fired setState after the test environment was torn down, which
  made vitest exit 1 on Node 22 CI despite every test passing.
- MSN theme: server-channel message photos get the presence-tinted frame too.
- metrics.yml / backfill.yml: also skip outside the upstream repository; a
  detached copy has no release bot so the token step failed every run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177uyDnR1RCvUxyDRztGFDt
Files longer than 5 s are cut in a waveform editor before upload: draggable
window capped at 5 s, keyboard control, local preview, trim silence and edge
fades. The cut is rendered to the canonical WAV client-side; the server is
unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177uyDnR1RCvUxyDRztGFDt
feat: sound effect trimmer, MSN frames in server chats, CI flake and workflow fixes
… and block double clicks

The first camera start of a session measured the device before turning it on:
one applyConstraints per size and frame rate, an extra camera open, all before
the UI changed (several seconds, and a second click could publish twice).

- handleCameraAction sets voiceStore.isCameraStarting; the three camera buttons
  show a spinner, are disabled, and a second call is ignored.
- buildCameraCaptureOptions(measure:false) fits to cached modes or asks for the
  wanted size with an ideal 16:9 aspect ratio; measuring stays in the settings
  preview and live quality changes.
- probeCameraTrack reads the frame rate back instead of applying it on cameras
  limited to 30 fps.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177uyDnR1RCvUxyDRztGFDt
The hover toolbar drew the edit button as a gear (the settings glyph); the
message context menu already used the pencil.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177uyDnR1RCvUxyDRztGFDt
perf(web): start the webcam without measuring it first
The Windows process query returns every process's command line as JSON and
ran with a 1 MB maxBuffer, so on a desktop with browsers and launchers open it
failed on every poll, and the first failure stopped detection for the session
without telling the user. Raise the buffer, add a timeout and windowsHide, fall
back to tasklist, keep polling after a failure and stop only when no listing
command exists.
A tab playing in Chrome, Firefox or Edge was shown as listening or watching.
Add a per-client switch in Privacy that drops listening/watching activities
whose player is a browser before they are pushed.
Opt-in (DISK_CLEANUP=true). At 90% used it runs the safe cleanups, then deletes
chat attachments oldest first, never newer than 30 days, down to 80%. Status at
GET /api/admin/storage/disk.
…option

Photos are re-encoded with a canvas and videos with WebCodecs (mediabunny,
loaded on demand and kept out of the precache) before the upload starts. The
attach button now offers Photo or video (compressed by default) and Document
(the original file). A video shows progress with Send original and Cancel.
Replace the DISK_CLEANUP_* environment variables with four instance_settings
columns (migration 0043) edited in Settings > Instance > Storage: the switch,
the start level, the clean-down level and the age floor. The worker now runs
always and reads the saved settings each check, so a change takes effect
without a restart. PATCH /settings/instance validates the bounds; the panel
shows live disk usage, the last sweep and a Check now button
(POST /admin/storage/disk/sweep).
quitAndInstall() with no arguments runs the NSIS installer with its window.
Route every user-requested install (Restart, the update notification, the
recovery screen) through installDownloadedUpdate(), which on Windows asks for
a silent install that reopens the app, like Discord. macOS and Linux keep the
updater defaults.
Compressão no cliente, limpeza de disco, Windows e players de navegador
A tap makes the browser fire compatibility mouse events at the tapped point,
so mouseenter showed the reactions / reply / delete bar under the finger and
the click that followed landed on one of its buttons. Ignore the mouseenter
that follows a touch, and never show the bar in the mobile layout, where
holding the message opens its menu.
A phone in landscape is 640-930px wide, past the 768px line, so it got the
desktop shell in ~400px of height, and crossing the line on rotation reset the
screen stack (a call or a stream was lost). A touch device under 500px tall
now stays in the mobile shell.
…can be closed

A sheet pushed no history entry, so Back popped the screen under it. Open
overlays now register a same-URL marker entry that Back consumes before the
screen stack is touched. The profile screen opened its modal while rendering,
so its X, backdrop and Esc re-opened it; it now opens once from an effect and
the screen follows the modal closing. Also names the space rail and header
icon buttons for assistive technology.
…ccessible names on phones

The composer kept a one-row height until the first keystroke, cutting off the
second line of the placeholder. An empty fenced block printed the word
undefined. The attach menu is a bottom sheet on phones. Switches, the new-DM
button, the profile close button and the banner button get accessible names.
Navegação mobile: toque, paisagem, botão Voltar, perfil e acessibilidade
@caduHD4

caduHD4 commented Nov 13, 2026

Copy link
Copy Markdown
Author

Heads-up on overlap with the open PRs: this PR includes the commits from #471 (stickers store), #474 (bookmarks), #478 (chat file drop) and #482 (rich presence / game and media activity). Those four are still open, so the same changes appear in both places. Once one of them is merged, the others will conflict or duplicate. Happy to close the four in favour of this PR, or to merge them first and rebase this one on top, whichever you prefer.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Before we can merge it, we need you to sign our Contributor License Agreement. You keep the copyright to your work — this just grants the maintainer the rights needed to use and relicense the project. To sign, post a comment below with exactly this sentence:


I have read the CLA Document and I hereby sign the CLA


2 out of 3 committers have signed the CLA.
✅ (Cirzear)[https://github.com/Cirzear]
✅ (QuddyMusic)[https://github.com/QuddyMusic]
❌ @caduHD4
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@github-actions

Copy link
Copy Markdown
Contributor

Automated pre-review notes

Hi @caduHD4, thanks for the PR! This bot summarises what a pull request touches so the maintainer can decide from anywhere whether to approve CI runs and where to start reading. It only looks at file paths and dependency sources, never at whether the change is good, so nothing here is feedback on your work.

CI approval: read first. This PR changes the pipeline itself, so the maintainer reads these before approving CI runs or merging: .github/workflows/backfill.yml, .github/workflows/metrics.yml, .github/workflows/release.yml, Dockerfile, deploy.sh, docker-compose.yml, install.sh, osv-scanner.toml and 5 more. This step can take a little longer.

Area Result
CI workflows changed: .github/workflows/backfill.yml, .github/workflows/metrics.yml, .github/workflows/release.yml
Install-time code (postinstall and friends, pnpm settings, .pnpmfile.cjs, .npmrc, patches/) package.json: pnpm.overrides; packages/desktop/package.json: scripts.build:ts, scripts.dev, scripts.build, scripts.build:all
Build recipes (Dockerfile, Compose, Flatpak manifest and helpers, shell scripts) changed: Dockerfile, deploy.sh, docker-compose.yml, install.sh, packages/desktop/electron-builder.yml, packages/desktop/scripts/buildTextVoice.mjs
Scanner configuration (CodeQL, OSV, Trivy, ZAP, gitleaks) changed: osv-scanner.toml
pnpm-lock.yaml 39 packages updated, 24 new: @echogarden/espeak-ng-emscripten, @huggingface/jinja, @huggingface/tokenizers, @huggingface/transformers, @protobufjs/aspromise, @protobufjs/base64, @protobufjs/codegen, @protobufjs/eventemitter, @protobufjs/fetch, @protobufjs/float and 14 more. All registry-resolved. overrides changed
flatpak/node-sources.json unchanged

The dependency rows are for the merge review. They only affect the CI verdict when they add something the build itself executes.

Updated for commit 5b62f3a (1100 files changed).

@QuddyMusic

Copy link
Copy Markdown
Contributor

Is it really a good idea to combine PRs that add functionality and touch absolutely every aspect of the application? A single pull request of 170,000 lines is impossible for one person to review. Isn't it better when 1 pull request solves 1 task?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants