* android, desktop: open correct image in fullscreen viewer
Fullscreen image viewer occasionally opened a different image than
the one clicked. Root cause: when the LaunchedEffect probe at
ImageFullScreenView.kt:48-55 calls getMedia(initialIndex - 1) to check
whether a previous media item exists, getMedia returns null for both
"no item" and "item found but failed to load" (e.g. undecodable bytes,
missing file, crypto error). The probe treated null as "no previous
item" and called scrollToStart(), which rewrote initialChatId to the
chat's oldest media item - making the viewer display that oldest item
instead of the clicked one.
Fix: scrollToStart() no longer rewrites initialChatId. The pager is
still repositioned to page 0; getMedia(0) resolves against the
already-set initialChatId (the clicked item) and renders it correctly.
* android, desktop: regression test for fullscreen viewer anchor preservation
Drives the public providerForGallery interface: moves the anchor away from
cItemId via currentPageChanged, calls scrollToStart, then reads the anchor
back through onDismiss's scrollTo callback. The pre-fix code rewrote
initialChatId to the chat's oldest showable, which would surface as
scrollTo(2); the fix preserves the anchor and produces scrollTo(1).
* plan: design doc for fullscreen viewer wrong-image fix
Documents the pager state model, the root cause of the wrong-image bug,
why the one-line deletion in scrollToStart fixes it for both call sites,
and why the wider getMedia null-overload refactor is deliberately out of
scope for this fix.
* desktop: fix copying selected text in reports
Text selection in report items rendered a red reason prefix (e.g. "Spam: ")
before the user's comment but dropped the prefix when copying, because
selection offsets are in rendered-text space while copy extraction was
operating on ci.text / ci.formattedText directly.
Introduce itemPrefixText(ci) as the single source of truth for the rendered
prefix, and drive both selection copy and snap-to-segment from a unified
itemDisplaySegments list that prepends the prefix as a leading segment.
This also fixes mention/link snapping on the selection boundary inside
report comments.
* desktop: scope report-selection fix to report items
Inline a prefix preamble + offset shift in selectedItemCopiedText and
snapOffset instead of routing every item through itemDisplaySegments.
Non-report items now run the original pre-PR loop unchanged; reports
emit the selected slice of the rendered prefix and shift body offsets
by prefix.length.
* desktop: simplify report selection arithmetic
Selection offsets are in display-text space, which already includes the
leading itemPrefixText for reports. Treat the prefix as the leading
display segment and seed displayOffset with prefix.length, instead of
shifting body offsets by prefix.length in the inner loop and gating
snapOffset on offset <= prefix.length.
The inner loop body of selectedItemCopiedText becomes identical to
pre-PR for non-reports (prefix is "" so displayOffset starts at 0),
and snapOffset reduces to a one-line seed change. Same fix, smaller
diff, fewer intermediate variables.
* desktop: drop helper, inline report-prefix in selection only
Revert itemPrefixText helper extraction (TextItemView.kt and
FramedItemView.kt back to pre-PR). Inline the report-prefix expression
at its two use sites in TextSelection.kt directly.
PR diff is now confined to TextSelection.kt: +13/-6.
* desktop: extract itemPrefixText, drop dead defensive code
Re-introduce itemPrefixText(ci) helper in TextItemView.kt and migrate all
four sites that compute the report prefix (FramedItemView,
ChatPreviewView, TextSelection x2). The prefix expression now has one
definition and one place to change.
Also drop the unreachable sel.first.coerceAtLeast(0) on the prefix-slice
append — selectedRange guarantees sel.first >= 0.
* plans: justify desktop fix for copying selected text in reports
Add 2026-05-08-fix-select-in-reports.md covering the problem, the offset
flow, the minimal structural change (seed displayOffset with prefix.length),
the itemPrefixText single-source-of-truth migration across the four
prefix sites, the verified edge-case table, and the rollback path.
* 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)
* bots: document APIGetChats command and CRApiChats response
* bots: regenerate API docs and TypeScript types
* simplex-chat-nodejs: add apiGetChats
* support bot: avoid OOM on large databases
apiListGroups / apiListContacts return every record in one response and
overflow V8's string allocation on large DBs. Replace list-then-find-by-id
patterns with apiGetChat(type, id, 0) lookups, and the one genuine scan
(refreshAllCards) with paginated apiGetChats, count=1000.
* support bot: update test assertions to match current message text
* bots: simplify PaginationByTime, expose only PTLast
* simplex-chat-nodejs: bump types and nodejs versions
* directory: support public channels and relay-based groups (plan)
* types
* amend types
* directory types, resolve known link
* implementation, test fails
* fix test
* fix test
* more test
* minimal test
* more test
* debug test
* clean up
* remove debug logs
* refactor
* use group/channel terms correctly
* remove unsupported commands
* manage profile update
* owner left the channel
* more tests, correct response to sent link
* re-registration
* /help and /link commands
* correct listing for channels
* fix test
* fix bot api
* refactor
* do not include link data in GLPKnown
* refactor
* diff
* undo refactor
* simplify
* remove harness test
* remove flip
* add v6.5 app requirement for channels
* add website support
* update bot api types
* correct member count, fix test
* members -> subscribers
* add link to channel description
* fix css
* move version note
---------
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
* ios: sharing channel links/cards
* update nix shas
* improve
* fix preview
* change condition
* move button for owner
* refactor
* refactor 2
* fix sheets
* MsgChatLink JSON encoding
* correct default icon when editing group profile
* drop link from card
* card layout
* strip link from text
* remove file ref
* share via chat when created
* rename file, do not show text when there is no text
* better card layout
* padding, info string
* add log
* padding
* text layout
* warning emoji if signature verification failed
* chat link preview in chat list
* description
* alert information
* tappable preview
* better
* conditional border color
* sending and forwarding views
* small link icons for forwarding
* strip link in one place
* forwarded context
* quote view for chat links
* reduce diff, remove unnecessary changes
* simplify
* trim description
* diff
---------
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
* core: share links to channels and verify shared links when connecting
* refactor
* improve
* refactor case
* simplify
* exctract encodeChatBinding
* share api
* corrections
Co-authored-by: Evgeny <evgeny@poberezkin.com>
* tests
* verify signature in the tests
* drop signature if context does not match on reception
* try to test "fake" forward
* fix
* fix direct chat sharing test
* channel test
* sign link
* rename api
* refactor view
* chal link item CLI view, tests
* clean up
* share channel in channel as channel
* query plan
* fix test
* refactor
* whitespace
* simpler
* refactor
* dont use partial field update
---------
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
* core: open chat on "new" unread items (contigous unread aread in the end)
* move
* ui: match first unread logic with core
---------
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
* core: small text markdown
* ios: small markdown
* desktop, android: small markdown
* fix font size
* small markdown on website
* update ios core library
* update bot api docs
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
* add implementation plan
* website: remove unnecessary libsodium direct dependency from file page plan
* website: update file page plan for async encryption, tailwind, no worker
* add product plan
* update product plan based on the feedback
* remove implementation details from product plan
* update product plan
* add updated implementation plan
* website: add build infrastructure for /file route
* website: fix card click and overlay hash handling for /file page
* website: add /file page with XFTP file transfer and protocol overlay
* website: redesign /file page layout and styling
* fix(website): scope hero h1/h2 font overrides to .hero-section-1
* fix(website): fix /file overlay diagram scaling on short viewports
* style(website): match /file page top padding with /directory
* website: remove file page in navbar
* website: switch xftp-web to official one
* website: fix web.sh
* update texts
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>