Commit Graph
22 Commits
Author SHA1 Message Date
Evgeny @ SimpleX Chat 17c9ad1c61 ios, android, desktop: previews render the same in every snapshot run (#7938)
* ios, android, desktop: previews draw fixed sample data instead of calling the core

* desktop: database error preview passes the keychain setting

* ios: snapshot fixtures use fixed parsed markdown instead of the core

* ios: snapshot fixtures: raw string delimiters past the # in markdown JSON

* desktop: snapshot test sets the app bar height as the app does

* docs: plan to replace preview-only parameters with test measures

* ios, desktop: previews run master's code; badges and version views split

Preview-only parameters are removed. BadgesCheckOrderView, BadgesHowLongView and VersionView are split into a loader and a layout, which their previews draw. Snapshot tests set a fixed QR picture: the environment value fixedQRCode on iOS, LocalFixedQRCode on desktop.

* ios: snapshot fixtures build parsed markdown with initializers

The table held the JSON of the Linux core, which the iOS app does not decode. The values are those the core returns for each text.

* ci: references of fixed QR codes and version; ios: call overlay preview as on master

iOS references from https://github.com/evgeny-simplex/simplex-chat/actions/runs/40944118370, desktop references from https://github.com/evgeny-simplex/simplex-chat/actions/runs/40932566864. ActiveCallOverlay_Previews, its scene and its references are restored as on master.

* ios, desktop: snapshot tests render every preview, no exclusion lists

BadgesChooseBadgeView, ServersSummaryView and TerminalView are split into a loader and a layout. AddChannelView, AddGroupView, GroupProfileView and UserProfileView layouts take the name and description validators, so desktop previews render without the core library. NewChatView's preview opens the Connect tab, UserProfilesView's preview has its own users. AppearanceSettings, MigrateFromDevice and the duplicate UserProfileLayoutEditOn previews are deleted.

* ios, desktop: previews show short links; tests draw the fixed QR code with each app's generator

The snapshot tests draw the fixed QR picture for a short address link with generateImage on iOS and qrCodeBitmap on desktop, in place of committed images. Previews of group links, addresses, a pending connection and QR codes pass short links, as the apps show them. The fixture markdown table equals the output of master's parser.

* ios, desktop: excluded previews and their views as on master

* ci: references of short-link QR codes
2026-10-30 06:41:40 +00:00
Evgeny @ SimpleX Chat b7bae8c47e core, ui: markdown links in parentheses, keep single line breaks (#7940)
* core: tests of markdown links in parentheses and single line breaks

* core, ui: markdown links in parentheses, keep single line breaks

* core: test of a hyperlink text across lines with the address as a link

* ci: desktop references with **bold** in the markdown help

* ci: iOS references with **bold** in the markdown help
2026-10-29 20:36:16 +00:00
Evgeny @ SimpleX Chat 3bdecd63f8 android, desktop: chat view previews draw member names (#7915)
* android, desktop: chat view previews draw member names and the input bar

* android, desktop: compose view parses no empty draft

* ci: update references of the chat view preview snapshots

* android, desktop: chat view previews without the input bar, which calls the core

* ci: references of the chat view previews without the input bar

* ci: desktop references with member names in the group chat preview
2026-10-29 16:31:34 +00:00
Evgeny @ SimpleX ChatandEvgeny Poberezkin 1217fbea42 ui: even insets, line heights and time placement in classic bubbles (#7896)
* plan: UI improvements to improve LLM usage via SimpleX

* core, ui: types for chat layout

* core, ui: settings for alternative terminal-like chat layout for managing LLMs or other service bots

* plan: message priority

* fixes

* query plan

* update plans

* remove silent messages plan

* rename migrations

* implement layout

* amend

* fix

* fix

* fix

* improve

* time on the right, sender name in blue

* no avatar in direct chats

* better previews

* update, fixes

* update

* time gap

* changes

* ui: terminal layout line heights, gaps and time placement

* ui: simplify terminal meta layout, correct its docs and tests

* ui: right-to-left emoji edge in terminal rows, time placement tests

* android, desktop: raise Kotlin compiler memory to 4 GB

* ui: terminal captions as follow-up text, classic event separators

* ui: terminal media edge and overlay time, plan decisions

* ui: simplify terminal row separation, correct doc line references

* ui: keep the media time inside terminal rows, restore caption conditions

* ui: terminal heading capitals at large font scales, idle live message time

* ui: rename the classic voice-with-text flag, correct the meta copy docs

* ui: smaller terminal layout diff, sender gap and meta names

* ui: terminal row as tall as the media time

* docs: remove the chat layout section from the bots readme

* docs: shorten the terminal layout section of the chat view

* core: address settings API as on master, /auto_accept reads the stored layout

* ui: smaller terminal headings

* ui: classic sender rows and avatar rule as on master

* ui: classic reply quote text colour as on master

* ios: keep the chat layout setting with other UI settings

* ui: go-to button at the end of terminal rows, no gutter in direct chats

* ui: forwarded arrow on the header line of terminal rows, above the time

* ui: forwarded arrow centred above the time line of terminal rows

* ui: even insets, line heights and exact time space in classic bubbles

* ui: draw the time once in classic decryption errors

* tests: two-line text in the bubble inset test

* ui: exact time space in classic group invitations

* docs: classic bubbles plan: results and open questions

* ui: the time alone moves to the next line in classic bubbles

* ui: file icon on the size-line baseline in classic bubbles

* ui: calls in classic chats as on master

* ui: headings at 1.5625, 1.25 and 1 of the body size in both chat layouts

* ui: 11sp text inset and 14dp sides in classic bubbles

* ui: tail space in classic deleted and error items

* ui: events in classic chats grouped in runs

* ui: group sender name at the bubble edge in classic chats

* docs: classic bubbles plan: results of the 2026-10-26 decisions

* ui: events classified by the sender rule, one file icon size

* tests: no invisible character in the bubble copy test

* docs: classic bubbles plan: the shared sender rule

* docs: product concepts: the renamed meta copy

* ui: inline the copy of the time in decryption errors

* docs: chat view spec: line links after the classic bubbles changes

* ui: group invitation time on the last baseline, joined to the last word

* docs: classic bubbles: tail and time of a message above an event run

* ui: time on the last line of wrapped deleted and error texts

* ui: one layout switch in deleted and error items

* ui: one layout switch in message text padding

* ui: one name for the chat typography flag

* ui: one check whether a chat item tail is drawn

* ui: event run gaps in the chat list, row separation as on master

* ui: chat item previews draw bubbles as the chat does

* docs: classic bubbles: item cards, tail check, previews

* ui: deleted and error items without tails, insets fixed at large fonts

* ui, ci: references of classic bubbles, chat view previews in bubbles

* ci: desktop references of classic bubbles with message text at 95%

* ui: time on the drawn text baseline in desktop bubbles

* ci: desktop references with the time on the drawn text baseline

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2026-10-29 14:35:23 +00:00
Evgeny @ SimpleX Chat bcb1afba40 ci: desktop snapshots render animations at their end (#7916)
* ci: desktop snapshots render animations at their end

* ci: re-record the desktop snapshots of the loading link preview
2026-10-29 09:55:40 +00:00
Evgeny @ SimpleX Chat 3be145105a android, desktop: message text at 95% in dark themes (#7929)
* android, desktop: message text at 95% in dark themes

* ci: desktop references with message text at 95% in dark themes
2026-10-29 09:42:50 +00:00
Evgeny @ SimpleX Chat 03ba484f11 android, desktop: chat view previews show their sample messages (#7914)
* android, desktop: chat view previews show their sample messages

* ci: references of the chat view preview snapshots
2026-10-28 07:45:07 +00:00
Evgeny @ SimpleX Chat b1c90784ad ci: render all desktop previews in tests, compare with references (#7911)
* ci: render all desktop previews in tests, compare with references

* ci: desktop snapshot test provides the app bar handler and window state

* ci: leave out desktop previews that call the core library

* ci: references of the desktop preview snapshots

* ci: desktop snapshot test clears the terminal before each render

* ci: reference of the dark terminal preview with an empty terminal
2026-10-27 23:05:15 +00:00
Evgeny @ SimpleX Chat b72379c640 desktop: ask before replacing a file, do not suggest hidden file names (#7877)
* desktop: ask before replacing a file, do not suggest hidden file names

* desktop: test the file name suggested by the Save dialog
2026-10-26 20:19:21 +00:00
Evgeny @ SimpleX ChatandEvgeny Poberezkin 7810fc4752 core, ui: terminal chat layout for LLM and service bot chats (#7811)
* plan: UI improvements to improve LLM usage via SimpleX

* core, ui: types for chat layout

* core, ui: settings for alternative terminal-like chat layout for managing LLMs or other service bots

* plan: message priority

* fixes

* query plan

* update plans

* remove silent messages plan

* rename migrations

* implement layout

* amend

* fix

* fix

* fix

* improve

* time on the right, sender name in blue

* no avatar in direct chats

* better previews

* update, fixes

* update

* time gap

* changes

* ui: terminal layout line heights, gaps and time placement

* ui: simplify terminal meta layout, correct its docs and tests

* ui: right-to-left emoji edge in terminal rows, time placement tests

* android, desktop: raise Kotlin compiler memory to 4 GB

* ui: terminal captions as follow-up text, classic event separators

* ui: terminal media edge and overlay time, plan decisions

* ui: simplify terminal row separation, correct doc line references

* ui: keep the media time inside terminal rows, restore caption conditions

* ui: terminal heading capitals at large font scales, idle live message time

* ui: rename the classic voice-with-text flag, correct the meta copy docs

* ui: smaller terminal layout diff, sender gap and meta names

* ui: terminal row as tall as the media time

* docs: remove the chat layout section from the bots readme

* docs: shorten the terminal layout section of the chat view

* core: address settings API as on master, /auto_accept reads the stored layout

* ui: smaller terminal headings

* ui: classic sender rows and avatar rule as on master

* ui: classic reply quote text colour as on master

* ios: keep the chat layout setting with other UI settings

* ui: go-to button at the end of terminal rows, no gutter in direct chats

* ui: forwarded arrow on the header line of terminal rows, above the time

* ui: forwarded arrow centred above the time line of terminal rows

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2026-10-25 18:03:11 +00:00
spaced4ndy a356512645 Merge branch 'master' into badge-in-app-checkout 2026-10-16 22:07:28 +04:00
sh aaa388e570 desktop: add emoji picker (#7708)
* desktop: add emoji picker data and generator

* desktop: emoji picker in compose field

* desktop: document compose emoji picker
2026-10-16 14:34:04 +01:00
shandspaced4ndy efab293609 desktop: deep links on macOS, Windows and Linux (#7605)
* tests: close the walk stream in withTempDir

* desktop: receive app links from args and macOS

* desktop: forward an app link to the running app

* desktop: initialize the desktop platform lazily

* tests: share the temp directory helper

* desktop: register simplexchat scheme in packages

* desktop: register simplexchat scheme at runtime

* ui: end the badge page with a link on desktop

* desktop: raise the window over other apps

* docs: describe desktop deep links in the spec

* docs: plan desktop deep links

* docs: report on desktop deep links

* desktop: open simplex connection links

* docs: describe simplex links on desktop

* desktop: keep a link from opening twice

* desktop: retry taking a signal held open

* desktop: keep the user's AppImage link handler

* desktop: register Windows links through Capabilities

* desktop: add %u to the deb entry only once

* docs: describe the review fixes

* ui: open the badge link screen on the left

* ui: import moko accessors in the badge screens

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2026-10-08 14:48:50 +00:00
EvgenyandEvgeny @ SimpleX Chat a1cf69e9a9 desktop: allow only one connection from call page (#7619)
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-02 17:06:48 +01:00
Narasimha-sc 6e3c668fb9 ios, android, desktop: do not add loaded items of another chat to the opened chat (#7450)
* ios, android, desktop: do not add loaded items of another chat to the opened chat

apiLoadMessages could apply a loaded page to a chat it was not loaded for,
mixing messages of two chats in one list:

- the chat id was not checked at all for .last pagination, and the loading
  coroutine is not cancelled when the chat is closed (PreloadItems wraps it
  into NonCancellable, apiFindMessages runs in a scope of its own), so a .last
  page loaded for the previously opened chat was appended to the items of the
  chat opened while it was loading;
- for the other paginations the chat id was checked before the items were
  loaded, but they are applied on the main thread after a dispatch, so the chat
  could be switched in between.

Check the chat id (and the remote host id in kotlin) right before the items are
applied, in every pagination except .initial and opening around item that set
chat id themselves. Empty chatItems remain allowed for .last that is used for
searching.

* android, desktop: test that loaded items of another chat are not added to the opened chat

Reproduces the bug deterministically, without depending on the timing of the
race: processLoadedChat is called with a page loaded for another chat while the
opened chat has its own items.

Without the fix the items of the two chats end up in one list:

    lastPageLoadedForAnotherChatIsNotAddedToOpenedChat
      expected:<[101, 102]> but was:<[101, 102, 201, 202]>
    beforePageLoadedForAnotherChatIsNotAddedToOpenedChat
      expected:<[101, 102]> but was:<[201, 202, 101, 102]>
    aroundPageLoadedForAnotherChatIsNotAddedToOpenedChat
      expected:<[101, 102]> but was:<[101, 102, 201, 202]>
2026-09-05 15:28:00 +01:00
Narasimha-scandsh 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>
2026-08-21 20:30:11 +01:00
sh 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.
2026-07-17 16:58:40 +01:00
shandPaul Bottinelli 5d54362ca8 multiplatform: bound shared file URI copies (#7075)
* Bound shared file URI copies

* test: cover multi-read path in bounded URI file copy

* android, desktop: bound URI copies by sender badge file limit

* android, desktop: show file-too-large alert on bounded URI copy overrun

---------

Co-authored-by: Paul Bottinelli <paul.bottinelli@trailofbits.com>
2026-07-11 09:18:05 +01:00
shandPaul Bottinelli 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>
2026-07-10 09:02:27 +01:00
shandPaul Bottinelli 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>
2026-06-16 10:23:27 +01:00
shandEvgeny @ SimpleX Chat 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>
2026-05-18 09:15:20 +01:00
Stanislav DmitrenkoandEvgeny Poberezkin f1e8c65aa1 android, desktop: using SemVer when checking for updates (#4768)
* android, desktop: using SemVer when checking for updates

* simplify

* simplify

* no comment

* simplify

* change

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-08-26 21:06:21 +01:00