mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-06 12:24:18 +00:00
f99c474ca67adf9e849f61bbfed5ac80e99abbec
202
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d7e0f85976 |
desktop: fix rotated video squashed on playback and preview rotated twice (#7413)
* desktop: fix rotated video squashed on playback and preview rotated twice vlc applies the display matrix before a frame reaches the vmem callback, so the buffer has to be requested with the sides swapped for the transposed orientations, and the snapshot must not be rotated again by hand. Read the snapshot on the event thread, where the render callback writes it, and draw the inline playback surface with FillWidth so a video narrower than the item fills it like its preview does. Bound the requested buffer: the size comes from a received file, so it is capped by area, cannot be zero, and a frame that does not fill the bitmap is dropped. * desktop: harden the video frame path against crafted files Only transpose the buffer for the track's own sides - the size libvlc passes is already rotated, so swapping it would recreate the squash for a file declaring a rotation with a zero-sized track. Copy the frame inside the render callback, on vlc's thread, where the native buffer is guaranteed to exist, and hand only the copy to the event thread. Drop a frame rendered with a format the bitmap was not sized by, or arriving before any buffer was allocated. Divide the pixel budget by a side pinned at 1 instead of scaling both sides, so a 2000000000x1 declaration cannot take 45 times the budget. Publish the bitmap only when skia took the pixels, size the copy after a rewind, and log a failed snapshot conversion instead of throwing it into callers that have no handler for it. |
||
|
|
1196d362ee |
desktop: animate GIFs and animated WebP (#7365)
* desktop: add bounded animated image decoder Skia's Codec is already on the desktop classpath through skiko and decodes both GIF and animated WebP. The frames come from a file somebody else composed, so the decoder is bounded before it allocates: the raster is measured in bytes with the sides multiplied as Long, each side is capped separately so an extreme aspect ratio cannot slip under the byte budget, and the encoded size is checked before the bytes are copied into native memory. Anything outside the bounds, or any failure, keeps the still image the chat already renders. Nothing calls this yet. * desktop: animate GIFs in chat items and full screen Both views drew the first frame only. The full screen view also decoded its still on every recomposition, which an animation recomposes once per frame, so that decode is remembered against the data it comes from. The chat list preview stays a still image: it is a 36dp box that the desktop layout keeps on screen the whole time, so animating it would hold a raster and spend a frame of work per listed chat, without pause. Removes the two markers left for this work. * desktop: don't decode animation frames that cannot be seen With media blur on, a blurred image is only revealed while the mouse is over it, so every frame was decoded, uploaded and then blurred away again for nobody - and the blur is a render effect re-run per frame. Frames now decode only while the image can be seen, which also stops motion showing through a blur that is there to hide it. Passing the blur state to the view is why the shared signature changes; coil drives its own animation on Android, so there is nothing to pause there. * docs: move animated images plan to plans/ * docs: drop file path references from animated images plan * docs: correct animated images plan against the code * desktop: correct animated image comments * desktop: reduce animated image comments * desktop: correct and bound animated image decoding * docs: correct animated images plan against measurements * desktop: fuse the animation prior frame decision * docs: cover desktop animated images in spec and product * desktop: drop the unused animated image component * desktop: return the animation frame instead of its state * docs: correct the animated images documentation * desktop: don't decode animations under the full screen viewer * desktop: bound the frames an animation rebuilds * desktop: pause animations under any full screen modal * desktop: stop animations that alternate expensive frames * desktop: read what playing a frame needs only once * desktop: close the codec of an animation outside the bounds * desktop: wait out what an animation frame cost to decode * docs: correct animated images claims against the code * desktop: bound the frame count where the others are bounded * desktop: don't wait out a stall an animation frame did not spend * desktop: say what the slow frame constants stand for * desktop: don't decode animations behind a minimised window * desktop: make the animation frame wait testable * desktop: bound the file size where the others are bounded * desktop: pin the frame wait clamp in its test * desktop: keep the frame wait clamp private * desktop: reduce animated image comments --------- Co-authored-by: sh <github.shum@liber.li> |
||
|
|
11c7a62a38 |
desktop: fix stretched video preview and playback for AV1 videos (#7391)
* desktop: fix stretched video preview and playback for AV1 videos libvlc passes the padded size the decoder allocated to the buffer format callback, not the size of the picture. dav1d pads to a multiple of 128, so a 1920x1080 AV1 video arrives as 1920x1152, and vlc scales the picture to fill it - the preview sent with the message, and desktop playback, were 6.7% too tall. H264 pads much less, so it was barely visible there. Ask for the size of the track being played instead. It is already populated when the buffer format is negotiated, and matching the track that is playing matters for files with more than one video track, where the first track is not necessarily the one being decoded. Falls back to the previous behaviour when the track is not known. * plans: desktop video preview aspect ratio |
||
|
|
abd5954675 |
ui: send dropped .webm as video only when it has a video track (#7354)
* ui: send dropped .webm as video only when it has a video track .webm is as commonly an audio-only container as a video one, so the extension alone cannot tell whether there is a frame to embed. Read the container to decide: files with a video track are sent as video, the rest as files. Only done for files attached without the user saying how to send them (drag & drop, paste). An explicitly picked video is still sent as one, so .webm is now listed in the video file picker too. * plan: send dropped .webm as video only when it has a video track |
||
|
|
0324517bfe |
android, desktop: keep database passphrase toggle inside the section card (#7326)
The "Save passphrase in settings/Keychain" label had no weight, so Row measured it at full available width, the weighted spacer collapsed to 0 and the trailing DefaultSwitch was placed past the row's right edge. Harmless until #6777: the section card is now inset by CARD_PADDING and clipped with SectionCardShape, which cut the row from 348dp to 316dp on the desktop start pane and made the overflowing switch both invisible and unclickable, since Modifier.clip clips pointer input too. With a custom passphrase set the toggle is enabled but unreachable, so the passphrase stays saved in settings and the app never prompts for it on start. Give the label weight(1f) and drop the weighted spacer, matching what SettingsActionItemWithContent does for every other toggle row. |
||
|
|
e7c94472c4 |
desktop: fix chat switch deleting the in-app updater's download (#7295)
* desktop: fix chat switch deleting the in-app updater's download
createTmpFileAndDelete registered every temp file it created in
ChatModel.filesToDelete, which ComposeView.deleteUnusedFiles() empties on every
chat open/switch/close. The updater's ~350 MB download lives in such a file for
minutes, so switching chats during it deleted the file. copyTo kept writing
through the still-open fd, so the transfer completed and progress reached 100%;
only the following Files.move failed, with NoSuchFileException on the source,
and that went into a catch that logs to stdout only - no dialog, no error, no
file.
The registration was redundant for every caller: the helper's own
finally { tmpFile.delete() } already removes the file, deleteOnExit() covers a
clean JVM exit, and Main.kt wipes tmpDir at startup for crashes. It only ever
duplicated the finally while arming a trap for long-running lambdas - the same
window also existed for the settings and themes writers.
* desktop: download the app update into a file the updater owns
Per review of #7295: instead of removing the ChatModel.filesToDelete
registration from createTmpFileAndDelete, stop using that helper for the
downloaded file.
downloadAsset now writes into "<asset name>.part" in tmpDir and moves it onto
the asset name when the transfer completes, so the download is never registered
in ChatModel.filesToDelete and ComposeView.deleteUnusedFiles() can no longer
delete it mid-transfer. Cleanup is unchanged in substance: the finally block
removes the partial file when the download fails or is cancelled (and is a
no-op after a successful move, as the helper's own finally was), deleteOnExit
covers a clean exit, and Main.kt wipes tmpDir at startup after a crash.
createTmpFileAndDelete is restored to its previous behaviour, with a comment
warning that its file does not survive a chat switch.
* desktop: reduce comments in updater download fix
|
||
|
|
fc28914455 |
desktop: fix saving files with '[', '*', or '?' in name on Linux (#7290)
* desktop: fix saving files with '[', '*', or '?' in name on Linux
JFileChooser's BasicFileChooserUI treats filenames containing
'[', '*', or '?' as glob patterns on Unix when the file does not
exist on disk. The Save button's ApproveSelectionAction then
applies a GlobFilter and returns without saving — the dialog
stays open and nothing is written.
Regression introduced in #2789 (commit
|
||
|
|
3615927db5 |
multiplatform: remove unused clipboard state polling that froze desktop UI (#7237)
The desktop app polled full clipboard contents every second on the AWT event thread to update ChatModel.clipboardHasText. On X11, each read blocks up to sun.awt.datatransfer.timeout (10s) when the selection owner does not respond (e.g. after KeePassXC's clipboard auto-clear), making every click/scroll wait ~9s. clipboardHasText has had no readers since its only consumer was removed in #4398, so the whole mechanism (desktop poll, Android clip listener, onResume refresh, expect/actual, state field) is deleted. See plans/2026-07-11-fix-desktop-clipboard-freeze.md. |
||
|
|
147355b76a |
desktop: don't delete shared temp dirs from a transient second instance (#7168)
On an incoming call the desktop window blinked continuously (FileNotFoundException
from SoundPlayer.start writing into a missing ...\Temp\simplex).
Root cause: Files.desktop top-level val initializers run in any process that
touches the facade class, including a transient second instance (which reaches
acquireSingleInstance -> dataDir). Two of them deleted shared state used by the
running primary:
- tmpDir had .also { deleteOnExit() } - the second instance's normal exit deleted
...\Temp\simplex, so the primary then failed to write call sounds/recordings.
- preferencesTmpDir had .also { deleteRecursively() } - the second instance's
<clinit> wiped configPath\tmp (same anti-pattern, firing even earlier).
Make both declarations pure and do the destructive cleanup in Main, past the
single-instance check, so only the owning instance performs it (preferencesTmpDir
kept early, before any settings write). The remaining val-initializer side effects
are idempotent creations (mkdirs) that destroy nothing and are left in place.
|
||
|
|
7adadfe2cd | desktop: show only desktop .deb packages for current architecture in updater (#7270) | ||
|
|
27da94e11d |
desktop: fix low-quality image previews from over-downsampling (#7267)
getLoadedImage subsampled with an OR cap on the larger side, so tall images (e.g. phone screenshots) were reduced far below the display size and rendered blurry. Mirror Android's calculateInSampleSize (keep the smaller side at the target) so previews stay sharp, and add a decoded- pixel ceiling so extreme aspect ratios can't blow up decode memory. |
||
|
|
11f0b6bd51 |
desktop: show startup errors in a copyable window instead of bare "Failed to launch JVM" (#7261)
* desktop: show startup errors in a copyable window instead of bare "Failed to launch JVM" When any exception escapes main() before the app window appears - a missing DLL, a failed migration, broken AWT init - the jpackage launcher shows only "Failed to launch JVM" and the cause is recorded nowhere: the launcher runs without a console, so stderr is lost. Every report in #4146 stalled on this. Catch the error and show it in a native Win32 window laid out like a message box: an error icon and message, two clickable report links (the GitHub issue tracker and the support email) above a read-only selectable box with the stack trace, and an OK button. The links are SS_NOTIFY statics opened with ShellExecute (browser for the URL, mail client for the email). Native, not Swing, because broken AWT initialization is one of the failure causes. On Windows the process then exits cleanly so the launcher does not also show its own box; on other systems the error is rethrown to stderr. * docs: plan justifying desktop startup error window (#4146) |
||
|
|
56040adf28 |
multiplatform: improve image processing (#7082)
* Bound attachment image decoding * desktop: downsample attachment images like android; keep user picks uncapped --------- Co-authored-by: Paul Bottinelli <paul.bottinelli@trailofbits.com> |
||
|
|
e79b6ead11 |
desktop: fix Windows in-app updater corrupting install (#7105) (#7136)
* desktop: fix Windows in-app updater corrupting install by exiting before the MSI runs The Windows install path ran msiexec while the app was still running and waited for it. The running JVM holds SimpleX.exe, the JRE and DLLs open, so the per-machine MSI upgrade cannot replace them, defers to a reboot, and the install ends up broken - the app fails to launch (#7105). Launch the installer and exit instead, so the files are unlocked; the user reopens from the Start Menu. Also pass the path via the array form of exec (fixes spaces in the path) and remove a leftover installer before the next download, since the exiting app can no longer delete it itself. * docs: plan justifying the Windows in-app MSI updater fix |
||
|
|
b3944af735 |
desktop: fix crash when opening a video full screen (#7167)
Opening a video full screen could crash with NoSuchElementException from VLC native-library discovery. Each MediaPlayerFactory() runs a JDK ServiceLoader (not thread-safe), and the second preview factory added in #6924 let the render thread and preview thread construct factories concurrently. Serialize the two constructions behind a shared lock. |
||
|
|
8bf571cf5d | Merge branch 'stable' | ||
|
|
9b76742c6e |
desktop: fix in-app updater deleting the download before "Open file location" (#7104)
* desktop: fix updater deleting the download before "Open file location"
The in-app updater downloads to a temp UUID file via createTmpFileAndDelete,
then relies on `file.renameTo(newFile)` to move the bytes to the asset name so
they survive that helper's `finally { tmpFile.delete() }`. The rename's return
value was ignored: if it failed, the bytes stayed at the UUID path and the
finally block deleted the only copy, so the "Download completed" dialog appeared
but "Open file location" opened an empty /tmp/simplex.
Use Files.move with REPLACE_EXISTING instead. It performs the same in-place
rename when possible (verified: inode preserved, no copy), falls back to
copy+delete when an atomic rename isn't possible, and throws on genuine failure
- which the existing outer catch handles - instead of silently losing the file.
* docs: plan for updater open-file-location fix
* docs: plan - note Whonix compatibility (updater previously failed there)
|
||
|
|
43904dd0dc |
desktop: authenticate call server websocket (#7076)
* Authenticate desktop call websocket * call: patch ui.ts source for ws token and add server auth integration test --------- Co-authored-by: Paul Bottinelli <paul.bottinelli@trailofbits.com> |
||
|
|
37f7ed3126 | Merge branch 'stable' | ||
|
|
ad23da63d0 |
core: supporter badges using anonymous BBS credentials (#7040)
* core: supporter badges using anonymous BBS credentials * badges in profiles * badge in profiles * process badges * update simplexmq * update simplexmq * change types * fix migration * migration * update simplexmq * fix bot API, schema * fix postgresql build * refactor * postgresql schema * correctly set badges in all cases * badges ffi * plan, bot types * FFI * FFI: export badge symbols * add extra field * refactor badge types to GADT * configurable badge key * add badge to profile, test * ui: badge images * generate badge key and sign badge * badge sign in CLI * fix commands, ui * rename badges * Binary * image size, migration * update badge images, add public key * send badges in more cases * update UI, tests * bot types, schema * postgres schema * tone down badges * revert formula * refactor badges * smaller badges * badge position * better badge position * simpler * position * move position * update simplexmq * show badge after name * badge layout * fix badge * debug badge height * shift badge * fix badge in member name * bigger badge * badge layout * differentiate badge colors * more avatars for the user's profiles * refactor * remove color filter * alerts * multiple keys, old expired * use new BBS api * update badge keys, bot api * presentation header * simplify * parser * update iOS images * update public keys * query plans * update simplexmq * refactor badge types * simplexmq * bot api types * update simplexmq - commoncrypto flag * update simplexmq * pass commoncrypto flag to simplexmq in nix iOS build * ios ui * update core library, fixes * badge layout * badge size * badge gap * remove extensions * simplify * share badge in more events, reverify badge if verification failed * larger files with badges * allow sending larger files * simpler * update simplexmq * better decoder for badge keys * update simplexmq --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> Co-authored-by: shum <github.shum@liber.li> |
||
|
|
bf905eb545 |
ui: settings navigation reorganization (#7005)
* android, desktop: settings navigation reorganization
Restructure the root Settings screen into two top-level sections and
fold previously-scattered items into three new sub-screens.
Root:
- Appearance, Your privacy, Chat data
- Help & support, Migrate to another device, Advanced settings
Your privacy (renamed from Privacy & security): keeps Device,
link previews / remove tracking, auto-accept images, blur media,
contact requests from groups. Adds a "More privacy" sub-screen.
More privacy (new): show last messages, message draft, encrypt local
files, protect IP address (with original dynamic footer preserved),
notification preview mode (moved from Notifications), and delivery
receipts.
Help & support (new): merges Help and Support SimpleX Chat sections
into Help / About (with App version) / Contact / Support the project.
Advanced settings (new): Network & servers, Notifications (Android),
Audio & video calls; then Developer tools, Restart and Shutdown
(Android), App update channel (desktop). Notifications is hidden on
desktop because the screen is empty after Show preview moves to
More privacy.
Chat data is the new top-level menu label for the existing
Database passphrase & export screen.
* android, desktop: trim settings reorg diff
- Remove 5 dead strings from base/strings.xml (privacy_and_security,
database_passphrase_and_export, settings_section_title_chat_database,
settings_section_title_support, settings_section_title_app) — no
Kotlin references after the reorg.
- Drop the now single-variant CurrentPage enum in
NotificationsSettingsView; replace with a direct callback.
- Read userDisplayName locally in HelpAndSupportView instead of
threading it through SettingsLayout/SettingsView/Preview.
* android, desktop: remove orphan locale strings
Companion to 442a368c9 which removed 5 dead keys from base/strings.xml.
The :common:adjustFormatting task enforces that every locale string has
a corresponding base entry, so these orphans broke the build. Removed
across 35 locale files (154 lines).
Keys removed:
- privacy_and_security
- database_passphrase_and_export
- settings_section_title_chat_database
- settings_section_title_support
- settings_section_title_app
* Revert "android, desktop: remove orphan locale strings"
This reverts commit 0ad5fc9308a3599d15bf50ca1980002ae0e467b2.
* android, desktop: restore base strings for removed keys
Counterpart to revert of 0ad5fc930: re-add the 5 base entries that
442a368c9 had deleted so the locale files (restored by the prior revert)
are no longer orphaned. Translation keys must not be removed once
introduced — the values can change but the keys stay.
Keys restored to base with their master English values:
- database_passphrase_and_export
- privacy_and_security
- settings_section_title_chat_database
- settings_section_title_support
- settings_section_title_app
* android, desktop: keep share-button helpers in SettingsView
ContributeItem, RateAppItem, StarOnGithubItem were moved from
SettingsView.kt to HelpAndSupportView.kt as part of the reorg.
Move them back: just drop the `private` modifier (one-word edit
per function) so HelpAndSupportView can call them in place. Saves
~60 lines of diff churn vs the move + matches the file's existing
pattern where helpers like AppVersionItem, ChatPreferencesItem,
ChatLockItem, etc. are all public top-level @Composable.
* android, desktop: inline HelpAndSupportView into SettingsView.kt
HelpAndSupportView is the only call site of SettingsView.kt's
share-button helpers; placing it as a top-level @Composable in
SettingsView.kt keeps the help/about/contact/support flow next to
the other settings entry points and removes the need for a new file.
Three imports (BuildConfigCommon, SimpleXInfo, WhatsNewView) that
the reorg was deleting from SettingsView.kt stay in place. Saves
~35 lines of diff and one new file.
* android, desktop: inline AdvancedSettingsView into SettingsView.kt
Same treatment as HelpAndSupportView in the previous commit:
AdvancedSettingsView is only reached from SettingsLayout, so the
function and its expect declaration live as top-level @Composable
in SettingsView.kt instead of a new file. NetworkAndServersView
import that the reorg was deleting from SettingsView.kt stays.
The .android.kt / .desktop.kt actuals are unchanged and keep
implementing the (now relocated) expect. Saves ~15 lines and a file.
* ios: settings navigation reorganization
Mirror the multiplatform reorg on iOS:
Root SettingsView: collapse the 5 sections into 2 unlabeled groups —
{Appearance, Your privacy, Chat data} and {Help & support, Migrate to
another device, Advanced settings}. "Privacy & security" becomes
"Your privacy"; the database row label becomes "Chat data".
PrivacySettings: keeps Device, link previews / remove tracking,
auto-accept images, blur media, contact requests from groups. Adds a
"More privacy" link.
MorePrivacy (new, inlined in PrivacySettings.swift): show last
messages, message draft, encrypt local files, protect IP address
(with original dynamic footer preserved), notification preview mode
(moved from NotificationsView), delivery receipts. Own state and
private helpers for the moved set* functions.
HelpAndSupportView (new, inlined in SettingsView.swift): merges Help
and Support sections into Help / About (with App version) / Contact /
Support the project.
AdvancedSettingsView (new, inlined in SettingsView.swift): Network &
servers, Notifications, Audio & video calls, Developer tools. iOS has
no Restart/Shutdown (Android-only) or App update channel (desktop).
NotificationsView: "Show preview" navigation removed — it now lives
in MorePrivacy. notificationsIcon() promoted to a free function so
AdvancedSettingsView can render the notifications status badge.
* android, desktop: keep platform file names as SettingsView.{android,desktop}.kt
Revert the file renames from {Advanced}SettingsView.{android,desktop}.kt.
Function rename SettingsSectionApp → AdvancedSettingsAppSection stays
inside each file; only the file path returns to its original name. No
behavior change; diff stat now shows two in-place modifications instead
of renames.
* ios: keep PrivacySettings/SettingsView state in place, use inline destinations
Restructure the iOS reorg to avoid moving state, helpers, and the alert
enum out of PrivacySettings — and to avoid moving notificationsIcon
out of SettingsView. The Help & Support, Advanced Settings, and
More Privacy "screens" become private computed properties on their
parent struct, so all @AppStorage, @State, set* helpers, and the
PrivacySettingsViewAlert enum stay UNCHANGED from master. NavigationLink
destinations reference the computed properties directly.
Net iOS diff vs master: 220+/154- (was 361+/259-) — saves ~245 lines.
* simplex settings
* android, desktop: mirror iOS settings reorganization
- inline Advanced settings section into the main settings list (Network &
servers, Notifications, Audio & video calls, App version); remove the
separate Advanced settings page
- reorder first section: Appearance, Your privacy, Help & support, Chat data,
Migrate; merge About SimpleX Chat into the Help section
- move the developer/maintenance section under App version (VersionInfoView);
load core version inside the view so it always opens (Developer tools and
Shutdown stay reachable even if the version request fails)
- keep "Developer tools" label (not renamed to "Developer")
- replace the Restart row with Cancel/Restart/Shutdown options in the
Shutdown dialog
- split DatabaseView: "Chat data" page (messages TTL, Database passphrase &
export, Files & media) and a sub-page with passphrase/export/import/delete
and the Run chat toggle; rename title to "Chat data"
- align delivery receipts alert wording with the renamed "Your privacy" settings
* android, desktop: simplify settings reorg internals
- VersionInfoView: drop the section/card wrapping, keep the original plain
version-text layout; load core version in-view so the screen always opens
- DatabaseView: make the "Database passphrase & export" sub-page a
self-contained DatabaseManagementView that owns its own state, mirroring the
DatabaseView/DatabaseLayout pattern instead of threading params through a modal
* android, desktop: show App version screen as a card screen
VersionInfoView now hosts a settings section (Developer tools / updates), so
open it with cardScreen = true like the other settings screens — otherwise the
section renders without the card box around it.
* android, desktop: show "Rate the app" only on mobile
The action opens a Play Store link, which does nothing on desktop (the
market:// scheme has no handler and the web fallback never fires). Gate it to
Android, like the Contribute item.
* android, desktop: move Shutdown to settings above app version
Move the Shutdown action out of the app version screen into the main
advanced settings section, just above the app version row. It stays
Android only (desktop is closed via the window) through an
AppShutdownItem expect/actual.
* android, desktop: show app version info in its own card
Wrap the version info block on the app version screen in a section card,
matching iOS and the rest of the card-screen settings.
* fix background
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
|
||
|
|
507a4de61c | Merge branch 'stable' | ||
|
|
ff36d401ce |
desktop: fix video playback hang caused by stuck preview snapshot (#6983)
* desktop: fix video playback hang caused by stuck preview snapshot Problem: clicking play on a video did nothing when an earlier video's preview generation was stuck — every subsequent VideoPlayer.play() was queued behind it on the shared playerThread. Cause: helper player reuse across previews exhausted the libavcodec h264 frame-buffer pool with --avcodec-hw=none (PR #6924), and the synchronous libvlc snapshots().get() call then hung waiting for a frame that was never decoded. Fix: drop the helper-player pool (release each helper after use) and run preview generation on a dedicated previewThread so a stuck preview can no longer block playback. * plans: add 2026-05-15-fix-video-preview-snapshot-hang.md * desktop: capture preview via callback surface, keep helper pool Follows up on the previous commit (4a964c66). The actual hang was in libvlc's synchronous snapshots().get() on a reused helper, not in the pooling itself. Replace the polling loop with a CallbackVideoSurface (the existing SkiaBitmapVideoSurface) wrapped in withTimeoutOrNull — the wait is bounded, so a non-decoding helper can't block previewThread. Restore the helper-player pool that the previous commit dropped. * plans: update 2026-05-15-fix-video-preview-snapshot-hang.md for final fix |
||
|
|
9bd9e6a16c |
desktop: fix in-app updater on Windows, AppImage, and aarch64 (#6985)
* desktop: fix in-app updater silently failing on Windows
chooseGitHubReleaseAssets ran `which dpkg` unconditionally to probe for
Debian-derivative systems. On Windows there is no which.exe, so
Runtime.exec threw IOException, which the outer catch in checkForUpdate
logged and swallowed -- the update dialog never appeared. Gate the
probe on desktopPlatform.isLinux().
* desktop: fix in-app updater install step on AppImage
xdg-open on the downloaded .AppImage opened it in whatever the desktop
environment's default handler for the AppImage MIME type is -- usually
an archive viewer, which reports 'Archive format not recognized'. The
running AppImage was never replaced.
Detect $APPIMAGE (set by the AppImage runtime to the path of the
running .AppImage file). Copy the downloaded file to a staging file in
the target's own directory, mark it executable, then atomic-move it
onto $APPIMAGE. Staging in the target directory keeps the final move a
same-filesystem rename(2), so an interrupted copy never leaves the
running AppImage partially overwritten. On failure (permission denied,
target read-only, etc.) fall back to opening the parent directory so
the user can install manually -- the same fallback the existing
xdg-open path already used.
* desktop: fix in-app updater silently failing on aarch64 AppImage
The LINUX_AARCH64 githubAssetName had a literal leading space
(" simplex-desktop-aarch64.AppImage"), so the exact-name filter in
chooseGitHubReleaseAssets never matched the real release asset name
"simplex-desktop-aarch64.AppImage". The asset list came back empty
and checkForUpdate's early-return at "No assets to download for
current system" suppressed the dialog. Same silent-failure pattern as
the Windows bug.
* plans: justify desktop in-app updater fixes
|
||
|
|
df5ea3d460 |
android, desktop: new settings section design (#6777)
* android, desktop: new settings section design * Section facelift: LIGHT canvas swap, equal padding, 2dp item dividers - LIGHT canvas (themedBackground) now paints the off-white formula (bg.mixWith(onBackground, 0.95f)) so white cards read as raised. DARK/BLACK keep palette bg (cards already raised via founder's formula in Section.kt). SIMPLEX keeps its gradient. - Section cards in LIGHT switch from formula to pure white via Color.White. DARK/BLACK keep the formula, unchanged. - Section card horizontal padding equalized to 16dp on outer + inner for clean canvas-edge alignment. extraPadding (icon-indented rows) keeps DEFAULT_PADDING * 1.7f. - 2dp dividers between rows inside section cards, color matches the per-theme canvas (SIMPLEX uses gradient bottom stop). Implemented via Modifier.drawBehind on each SectionItemView, gated by a private LocalInSectionCard CompositionLocal set true only by SectionView's inner Column — standalone SectionItemView usage (alerts, pickers) stays unaffected. Single canvas helper canvasColorForCurrentTheme() in Theme.kt is the source of truth for both canvas paint and divider color. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Section: paint item divider on top of clickable's hover indication Previously sectionItemDivider() was inside the modifier val before clickable, so the hover background drew over it inconsistently — on hover the row's content area got a tinted overlay while the 2dp divider area stayed at canvas color, creating visible contrast that read as a "dark line below hovered row". Moving the modifier to the end of the chain (after clickable+padding) makes drawBehind paint after the hover indication, so the divider color is consistently #F2F2F2-ish regardless of hover state. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Section: trim section item horizontal padding to 15dp CARD_PADDING (16dp) still drives outer card margin from screen edge. Item content inside the card now uses CARD_ITEM_PADDING = CARD_PADDING - 1.dp, giving the row text a slightly tighter horizontal inset that reads better at the current card width. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Appearance: drop redundant 10dp spacer between Apply-to row and wallpaper preview Before section facelift the spacer separated the Apply-to row from the wallpaper preview block visually. With the new 2dp item divider drawing under the Apply-to row that separation is already provided, and the spacer leaves an awkward white gap between the divider and the preview. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Section: repurpose SectionDivider() as explicit 2dp canvas-color line; use in Appearance themes card SectionDivider() composable had 0 callsites and used Material Divider with horizontal inset (unused legacy). Repurposed to draw a 2dp canvas-color Box matching the auto-divider style used by SectionItemView, gated by LocalInSectionCard so it no-ops outside a section card. Use it in Appearance themes card between WallpaperPresetSelector (custom composable, not a SectionItemView, so no auto-divider) and the following content (Remove image / Color mode / Dark mode), providing the visual separator the user expects between the theme grid and the rows below it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Appearance: symmetric vertical padding around profile avatar row ProfileImageSection's Row had Modifier.padding(top = 10.dp), giving 10dp above the avatar and 0dp below — visibly asymmetric inside the card. Changed to vertical = 10.dp so top and bottom padding match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * NetworkAndServers: move messages card footer/spacer out of SectionView Before PR #6777 SectionView had no card chrome, so SectionTextFooter and SectionDividerSpaced placed inside its content lambda rendered as plain inline content. After the card chrome was added, the same code rendered the footer caption and the spacer INSIDE the white card area, producing an unwanted gap (and visible auto-divider tail) under Advanced network settings. Move both out of the SectionView lambda so the footer reads as a caption below the card (iOS-style) and the spacer separates this card from the next one. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * DeveloperView: move card footer/bottom-spacer out of SectionView lambdas Same pre-card-chrome pattern as NetworkAndServers: SectionTextFooter ("Show: Database IDs and Transport isolation...") and SectionBottomSpacer were inside SectionView lambdas, so after PR #6777 added card chrome they rendered inside the white card area — the footer caption sat inside the first card and the 48dp bottom spacer appeared as an empty row at the end of the deprecated-options card (after SimpleX links). Move both out of the SectionView lambda so the footer reads as a caption below the first card and the bottom spacer adds safe-area room after the deprecated-options card (not inside it). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ChatInfoView: move chat-ttl footer caption out of SectionView lambda Same pre-card-chrome pattern: SectionTextFooter("Delete chat messages from your device.") was inside the ChatTTLOption SectionView lambda, so after PR #6777 added card chrome it rendered inside the card. Move it out so the caption sits below the card iOS-style. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ChatWallpaperEditor: wrap loose params in SectionView cards In ChatInfo > Chat theme screen the wallpaper preset selector, the wallpaper setup controls, the reset/set-default buttons and the "Apply to" mode dropdown were rendered as loose composables on a gray canvas — no card chrome, inconsistent with the rest of Appearance. Wrap them in SectionView so they read as raised iOS-style cards: - wallpaper preset selector + setup view → one card - reset-to-global + set-default buttons → one card - (advanced mode) Apply-to dropdown → one card - (collapsed mode) Advanced-settings button → one card CustomizeThemeColorsSection and ImportExportThemeSection were already SectionView-wrapped and remain unchanged. UserWallpaperEditor (sister function with similar layout, lines 28-220) is intentionally left alone — user reported only the chat-theme entry point. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * GroupChatInfoView: render group members inside the same SectionView card as owner Previously the members card showed only the current user (owner) and the add-members button — the actual group members were rendered as separate LazyColumn items() OUTSIDE the SectionView, so they sat on the gray canvas without card chrome. Visually inconsistent: owner in a card, everyone else floating. Move filteredMembers.value.forEach { ... } INSIDE the SectionView lambda so every member row is part of the same card as the owner. Drop the explicit Divider() call (auto-divider handles it now). Move remember key to member.groupMemberId so per-member state survives reorders. Trade-off: lazy rendering of member rows is replaced with eager composition inside a Column. For typical groups (<100 members) this is imperceptible; very large groups may compose slower on open. Watching for reports. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ChatInfoView: move E2E encryption card spacer out of SectionView lambda Same pre-card-chrome pattern: SectionDividerSpaced was inside the single-row SectionView around the InfoRow, so after PR #6777 added card chrome it rendered as a white gap inside the card (under the auto-divider on the InfoRow), producing the "extra divider + gap" the user reported. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ServersSummaryView: wrap Message reception sections in SectionView card SubscriptionsSectionView and SMPSubscriptionsSection both rendered their InfoRows + control item in a plain Column without card chrome — so on the Servers info screen the "Message reception" section title sat above loose rows on the gray canvas (no card), inconsistent with the rest of the screen. Wrap the inner Column in SectionView so the rows get the raised iOS-style card look. The custom header Row (title + subscription status indicator) stays outside the card so the icon stays inline with the title text. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Appearance: add missing SectionDivider import |
||
|
|
c165663555 |
desktop: prevent duplicate launches (#6979)
* desktop: prevent duplicate launches Acquires a file lock and listens on a loopback ServerSocket in dataDir. A second launch signals the running instance to restore its window and exits silently. See plans/2026-05-13-desktop-single-instance.md. * desktop: un-minimize window in showWindow toFront() does not un-minimize a JFrame on any AWT platform. Clear the ICONIFIED bit so a minimized window restores; preserves MAXIMIZED_BOTH. Also fixes the same case when restoring from the tray icon. * desktop: move showWindow from DesktopTray to DesktopApp It has callers outside the tray (single-instance signal) and belongs next to simplexWindowState, which it operates on. * simplify * refactor * desktop: start show-file watcher when choosing minimize from first-close dialog The handleCloseRequest path already starts the watcher when minimizing to tray; the Ask-dialog path did not, so the first-time user who picks "Minimize to tray" got a hidden window with no signal handling — a duplicate launch would not restore it. * desktop: always watch for duplicate-launch signal, drop hung-instance alert The watcher now runs for the JVM lifetime once the lock is acquired, not only when minimized to tray. Duplicate launches always restore the primary's window (un-minimize, un-tray-hide, toFront) instead of being silently dropped when the primary is not minimized. Drops the "may be hung, start anyway?" popup and the two strings — that fallback was needed only because the watcher could miss signals. With the always-on watcher there is no scenario where the primary fails to consume simplex.show, so the escape hatch becomes dead code. * desktop: alert when primary's watcher doesn't consume the show file Restores the "another instance may be running" alert. Every duplicate launch waits up to 1s for the primary's watcher to delete the show file it just created. If the file is consumed within the window, the duplicate exits silently. If still there after 1s the primary is hung and the alert fires. --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> |
||
|
|
334a50dda5 |
desktop: add tray support (#6970)
* plans: design and implementation plan for desktop tray icon Adds a system tray icon to the SimpleX desktop app with first-close dialog and an Appearance toggle. Covered: minimize-to-tray on Linux, Windows, and macOS via ComposeNativeTray; tri-state CloseBehavior preference; unread-dot icon swap; show/quit menu. The design plan covers the user-facing behavior, library choice rationale (AWT/Compose Tray is broken on stock GNOME per JDK-8322750; ComposeNativeTray uses platform-native APIs and is maintained), and out-of-scope items. The implementation plan splits the work into 8 incremental commits, each leaving the build green. * desktop: add CloseBehavior preference * plans: switch tray to built-in Compose Tray with GNOME probe * desktop: branch close handler on CloseBehavior preference * desktop: first-close dialog for tray choice * desktop: tray icon assets and menu strings * desktop: system tray icon with show/quit menu * desktop: unread indicator on tray icon * desktop: Appearance toggle for minimize-to-tray * desktop: tray feature fixes from audit - Scope closedByError per application iteration; set before dispatchEvent. - Short-circuit Ask to Quit when tray is unavailable. - Sum users.unreadCount (pre-aggregated) instead of iterating chats. - Replace dialog's captured lambdas with a top-level flag and ApplicationScope extension; wrap in SimpleXTheme. - Probe SystemTray with real add/remove off the EDT. - Drop duplicate ic_simplex_tray.svg; nudge unread dot to cy=34 to stop the r=6 circle clipping at the viewBox bottom. - Use mkSafeEnumPreference, PreferenceToggle, SectionTextFooter. * plans: sync desktop tray plans with implementation * desktop: render close-behavior popup via AlertManager Replaces the bespoke DialogWindow with AlertManager.shared.showAlertDialogButtonsColumn — same in-app surface as e.g. the link-previews opt-in alert. Drops isAskingCloseBehavior, the CloseBehaviorDialog Composable, the resetAskCloseBehavior helper, and the per-iteration reset call: the alert's lifecycle is now bounded by AlertManager's single slot, so a crash mid-dialog gets cleanly overwritten by the crash report. * desktop: reset closeBehavior with 'Reset all hints' Generalises AppPreferences.hintPreferences to a heterogeneous List<HintPref> so non-Boolean prefs can participate. Adds closeBehavior to the list, so 'Reset all hints' brings the first-close dialog back. * desktop: skip muted profiles in tray unread sum Active profile still counts so the user can see their own unread; non-active muted profiles contribute zero. * desktop: dark-theme tray icons Adds ic_simplex_tray_light and ic_simplex_tray_dot_light — copies of the existing tray SVGs with the navy back-X swapped to white. Picks the variant via isInDarkTheme() so the icon stays visible against dark tray backgrounds. |
||
|
|
5d597faf7e |
desktop: pick a free port for the call server if 50395 is in use (#6963)
* desktop: pick a free port for the call server if 50395 is in use startServer() bound a hard-coded port (50395); when it was already in use, NanoWSD threw "BindException: Address already in use: bind" and the call failed. It now falls back to an OS-assigned free port, and WebRTCController opens the browser at the actually-bound port (server.listeningPort) -- still 50395 in the normal case, so browser camera/mic permission stays put. * plans: justify call server port-bind fix |
||
|
|
8c9c6471a7 |
desktop: fix RTL text rendering under the send button (#6906)
* desktop: fix RTL text rendering under the send button (#4137) The chat composer's text field reserved 50dp on the wrong horizontal side when an RTL message was typed under an LTR system locale: BiDi auto-detection right-aligned the text onto the BottomEnd edge where the send button sits, hiding the first characters as they were typed. The padding was originally written inside the CompositionLocalProvider( LocalLayoutDirection provides Rtl) scope (#4675), where start resolved to the right edge for RTL paragraphs. The "edge to edge design" refactor (#5051) lifted the modifier out of that scope onto the outer BasicTextField, so start began resolving against the global LTR direction and the reservation drifted to the left. Always reserve on the global end - the same side Alignment.BottomEnd in SendMsgView resolves to - so the reservation tracks the send button regardless of locale or typed-text direction. Behavior is byte-identical for LTR text and for any RTL-locale combination; only the buggy "RTL text + LTR system locale" pair changes. * desktop: minimise diff of RTL fix to 2 lines (#4137) The previous commit (bfc111cc6) renamed/removed several helper locals and rewrote the comment block alongside the behaviour change. The behaviour-changing part is just two lines: making startPadding always 0.dp and endPadding equal to startEndPadding. Restore the surrounding code (startEndPadding name, startPadding decl, PaddingValues argument, .padding modifier, and the original two-line comment) to its master form so the PR's only effect on master is the two-line fix. Behaviour: cases 1, 3, 4 of the locale x text matrix are byte-identical to master. Only case 2 (LTR locale + RTL text) flips the reservation from the wrong side to the correct side. * plans: desktop RTL composer fix (#4137) * plans: align with surgical 2-line fix in PR (#4137) |
||
|
|
ab2d036301 |
android, desktop: reduce timeout and do not use hardward acceleration for video preview generation (#6924)
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> |
||
|
|
d49ab88e66 |
desktop: fix Windows per-app volume reset on video playback (#6852)
VideoPlayer's mediaPlayerReady listener called mediaPlayer.audio().setVolume(100) on every freshly created VLC player. On Windows, VLCJ routes setVolume through WASAPI's ISimpleAudioVolume, which is the per-app entry in the Windows Volume Mixer — so every video playback snapped SimpleX Chat's mixer volume back to 100%, overriding the user's own setting. The call was also redundant: VLCJ's default volume for a new MediaPlayer is already 100, and the only path that previously used setVolume (enableSound) has been disabled since VLCJ issue #985 ("Impossible to change volume for only one player. It changes for every player."). Dropping the setVolume(100) line fixes the Windows regression without changing playback loudness on any platform. AudioPlayer / SoundPlayer / CallSoundsPlayer use a singleton VLC player and never called setVolume, so voice messages and ringtones are unaffected. Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com> |
||
|
|
035a2f954c |
ui: new UX for making connections after / as part of onboarding (#6753)
* ui: additional images, views for making connections and creating groups (#6750) * ios: setup for additional assets * ios build config * header * fix * update layout * more views with images * layout * layout * android images and view * fix path * fix desktop * fix desktop build * smaller image * layout * more layout * more kotlin views * group layout * padding * create group layout * more create group layout * layout * tweak layout * more tweak * config --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> * ios: connecting as part of onboarding (#6754) * ios: implementation of "connecting" cards * ios: revision * fix flip * fixes * fix frame * replace nav stack with tab view * rename * update gradient and card label material * fix gradient * debug * remove debug code * update card labels * card label layout * landscape cards * layout * safe area * less bold * debug landscape * refactor titles, back inline with title in landscape * remove ignoreSafeArea * remove extra padding * refactor * clean * layout spec added to plan --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> * android, desktop: connecting during onboarding - new cards (#6757) * android, desktop: connecting during onboarding - new cards * fix * change layout * fixes * fix * fix * layout * fix layout * animation * import * paddings * 350ms * font * fonts * layout * box * more layout * layout * simpler * hide toolbar heading in onboarding mode * simpler desktop layout * better desktop * revert desktop toolbar * bigger font, landscape * fix desktop * cap width * refactor, simplify * qr code scanner icon * use icon without assets * cleaner * fix * fix --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> * android, desktop: connect banner after onboarding (#6761) * android, desktop: connect banner after onboarding * improve * smaller button * bigger icon, same string * fallback gradients * improve build * simpler connect screens during onboarding * left-align * update strings * improve state machine * text, padding * strings * primary color for tap to paste link * fix race condition * fix loading race --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> * ios: banner and connect screens (#6767) * ios: banner and connect screens * fix * return nav * remove padding * refactor * refactor * refactor 2 * refactor 3 * refactor 4 * header * xcode files * improve * fix toolbar * toolbar 2 * no assets * no assets 2 * padding * android padding * simplify * layout * fix --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> * fix refreshable * text * fix toolbar color * rework address share logic * padding --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> |
||
|
|
4545fdd0a9 |
desktop: support sending voice messages, use shared VLC media-player factory (#6739)
* desktop: support sending voice messages * alert for unsupported platforms * dont record on error * better initialization * desktop: use shared VLC media-player factory (#6741) * desktop: use shared VLC media-player factory * fix factory --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> |
||
|
|
4db9319c40 | Merge branch 'stable' | ||
|
|
c3663ae285 |
android, desktop: constrain image sizes for previews (#6726)
* android, desktop: constrain image sizes for previews * use correct JSON parser * more JSON fixes * constrain ratio in image decoder * constrain max height in layout --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> |
||
|
|
024df7099d |
multiplatform: fix image loading performance and layout stability (#6631)
- Replace runBlocking { imageAndFilePath(file) } with LaunchedEffect +
withContext(Dispatchers.IO) to unblock main thread on all platforms
- Set fixed container size (width + aspectRatio) from preview bitmap to
eliminate layout shifts during async image loading
- Cache base64ToBitmap() with remember() in CIImageView and FramedItemView
- Desktop: replace imageBitmap.toAwtImage().toPainter() with BitmapPainter
to eliminate unnecessary round-trip conversion
- Desktop: add LRU cache for base64ToBitmap (200 entries) and
getLoadedImage (30 entries) to survive LazyColumn item disposal
- Clear loaded image cache on app file deletion via expect/actual
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
|
||
|
|
a09acda329 | multiplatform: product specification (#6655) | ||
|
|
2fc72861e2 |
multiplatform/common: catch every exception at base64ToBitmap (#6576)
Co-authored-by: shum <github.shum@liber.li> |
||
|
|
d1d2e4bc18 |
android: hold wakelock for 30 seconds after received event was processed, to prevent race condition with incoming call activity. (#6224)
* android: hold wakelock for 45 seconds after event is received * create new lock instances, delay release by 30 seconds * comment |
||
|
|
83923b9740 |
android: reduce battery usage by not using permanent wakelock (#6176)
* android, desktop: core API event timeout setting
* chat_recv_msg_wait with STM timeout
* Revert "chat_recv_msg_wait with STM timeout"
This reverts commit
|
||
|
|
e8d0425b38 |
android, desktop: compose 1.8.2 + Kotlin 2.1.20 + compileSdk 35 (#5774)
* android, desktop: compose 1.8.0-beta01 + Kotlin 2.1.20 + compileSdk 35 * more fixes * remove non-total methods * fix script path * switch to stable compose.ui, import icons separately --------- Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com> |
||
|
|
d3a5936d17 | android, desktop: gaurd crashes when item is absent in the list (#6140) | ||
|
|
a6a5afb58e | ui: use conventional save icon for all files (#6077) | ||
|
|
b848f735ce |
ui: smaller QR code for short links (#5946)
* ui: smaller QR code for short links * more small * size * translations |
||
|
|
b0547cf6f7 | Merge branch 'stable' | ||
|
|
7b362ff655 |
ui: label in compose when user cannot send messages (#5922)
* ui: label in compose when user cannot send messages * gray buttons when user cannot send messages * improve * kotlin * fix order * fix alert --------- Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> |
||
|
|
a92c74d3e5 | android, desktop: better Chat with admins indications for members; unread badges (#5917) | ||
|
|
b97e1e0f11 | ui: show new messages from support scope in main chat preview when invitee is pending (#5909) | ||
|
|
805a69da94 | android, desktop: group knocking (#5816) | ||
|
|
0f3e546e36 | kotlin: refactor chat contexts 2 (null secondary context, pass context instead of content tag, straighten chat state code) (#5830) |