Commit Graph
1048 Commits
Author SHA1 Message Date
Evgeny Poberezkin c194aefb95 Revert "core: wallet for names (#7684)"
This reverts commit 1b329f41fb.
2026-11-14 13:58:26 +00:00
sh-agentsandsh-agents 527662c378 store: fixes after the master merge, page pin to its merged commit (#8199)
* store: names page pinned to a commit outside its branch

* store: master merge restored the removed badge poller

* store: lazy stateTVar left in the store service by the merge

* store: names group tests used query helpers master replaced

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-14 13:43:26 +00:00
Evgeny Poberezkin e4fdc6603c Merge branch 'master' into names 2026-11-14 13:36:20 +00:00
sh-agentsandsh-agents 57d67e5ff0 store: serve the pages as built, settings from /api/config (#8097)
* store: serve the pages as built, settings from /api/config

* store: badges page reads its Stripe key from the API

* store: badges worker waits for a slow page, not the old build

* store: badges page kept a stale Stripe key after the tab returned

* store: names page read settings the service no longer writes

* store: Caddy had no built sites to serve once the export was gone

* store: two page folders where one mount would do

* store: example Caddyfile missed the bare /api and /webhooks paths

* store: a hand-written page copy script where rsync does it

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-14 12:26:54 +00:00
Evgeny @ SimpleX Chat a9bffc7296 core: delete ignored and replaced contact requests (#8185)
* core: test removal of ignored and replaced contact requests

* core: remove ignored and replaced contact requests from agent

* core: query plans of contact request tests

* core: update simplexmq (delete contact requests without rejection)

* core: fix test build with simplexmq server forward workers

* core: update simplexmq
2026-11-14 11:39:57 +00:00
Evgeny @ SimpleX Chat 36e7dc3f9e core: update simplexmq, show skipped messages, read work items in one snapshot (#8190)
* core: lock delivery and relay request work items on PostgreSQL

* core: retry store transactions aborted by PostgreSQL deadlocks

* core: show skipped messages followed by agent messages

* core: read delivery and relay request work items in one snapshot

* core: use the conflict retry of the store transaction for work item reads

* core: show integrity errors of agent messages from MSG without body

* core: show integrity errors from MSGERR, log MSGERR without an error

* core: update simplexmq, set server forward workers in tests

* core: update simplexmq
2026-11-14 10:28:07 +00:00
Evgeny @ SimpleX Chat 348c42a640 ui, core, mcp: show Claude as an agent and User as a person (#8179)
* plan: mcp-agent-profile

* plan: mcp-agent-profile, answers Q1 (b) and Q2 (b)

* plan: mcp-agent-profile, lists render on GitHub

* mcp: User has the peer type of a person

* ui: show the peer type placeholder of members and contacts

* plan: mcp-agent-profile, answers to the user's notes

* ui: compare link icons with peerTypeIcon in the desktop test

* ui: snapshot references of the peer type placeholders

* android: peer type placeholder of a caller on the lock screen

* ios: agent icon of a link in the compose context at text size

* plan: mcp-agent-profile, review fixes

* ios: snapshot references with the compose context line of a link

* core: send a change of the peer type alone to groups

* mcp: User's peer type reaches existing session groups

* plan: mcp-agent-profile, Q1 (a)

* mcp: mark the agent profile item delivered in the roadmap
2026-11-14 09:12:01 +00:00
sh-agentsandsh-agents caf0caa54d store: Prometheus metrics of orders, badges, providers, chain and names (#8143)
* store: Prometheus metrics of name orders and registrar funds

* store: keep the service running when the metrics port fails

* store: describe held balances and the funds read time exactly

* store: export badge, payment provider and chain node metrics

* store: rename a test binding that shadowed hspec's before

* store: count the names on chain in the metrics

* store: check the scraped samples one by one

* store: answer 0 for metrics labels with no rows

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-14 08:45:02 +00:00
sh-agentsandsh-agents 5becf05d6e store: register names across a commitment lapse without signing again (#8145)
* store: register names across a commitment lapse without signing again

* store: count every commit toward Try again and moves

* store: update the names webapp submodule

* store: update the names webapp submodule

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-13 13:55:33 +00:00
Evgeny @ SimpleX Chat 6c3e9709a7 core: show the latest item in chat previews (#8159)
* core: show the latest item in chat previews

* core: update query plans

* tests: pass values to badge test queries as parameters

* core: update query plans
2026-11-13 13:13:04 +00:00
sh-agentsandsh-agents 4c4a2aaaee store: tip transactions at the recent blocks' median tip (#8160)
* store: tip transactions at the recent blocks' median tip

* store: write the minimum tip with digit separators

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-13 12:56:40 +00:00
sh-agentsandsh-agents d0fb34b147 store: adjust limits (#8161)
* store: cap name transactions at 5 gwei and 0.01 ETH each

* store: write the fee caps with digit separators

* store: accept name links of at most 1024 bytes

* store: set the group's daily name codes in the ini

* store: issue badge codes of at most 12 months

* store: give checkouts 30 seconds at the payment provider

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-13 12:01:44 +00:00
sh-agentsandsh-agents 6ccabfbfbe store: limit checkouts per provider and network, bound provider calls (#8092)
* store: limit each BTCPay and Stripe call to 10 seconds

* store: limit checkouts per provider and per client network

* store: skip a timed-out provider for the rest of a poller pass

* store: cancel a BTCPay invoice whose address cannot be read

* store: take a checkout's network and provider tokens together

* store: share the stall switch of the fake providers in tests

* store: drop provider timeout checks that cannot fail

* store: rename a test binding shadowing an import

* store: keep a pass's reads after a timed-out provider list

* store: log a failed checkout at the provider in true terms

* store: document the host-name lookup outside the provider bound

* store: test a created BTCPay invoice whose cancel fails

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-13 08:20:11 +00:00
sh-agentsandsh-agents 38e5ad3577 store: provider references in logs, bounded views, overdue invoices (#8100)
* store: keep invoice ids out of the logs

* store: show the provider reference and owner in //refund

* store: bound the chain reads of registration views

* store: limit host lookups of a link host that does not answer

* store: read overdue BTCPay invoices past the window before expiring them

* store: document restores, pool exposure, late crypto and marked invoices

* store: reword the view reads and marked invoices notes

* store: space a binding in the spend test

* store: expect the provider reference and owner in the group refund tests

* store: name invoices by their provider reference in the logs

* store: limit past-window reads of BTCPay invoices that keep failing

* store: share a link host's running lookup among searches

* store: note that the chain deadline bounds registration views

* store: complete the restore steps and correct the reference notes

* store: word the live order alert by the order's balance

* store: expect the late payment note by the order's balance

* store: count only answered read failures toward giving up an invoice

* store: name the cleanup's orders by their invoice's provider reference

* store: keep the registration id out of a changed order's error text

* store: answer a host's running lookup unread once its timeout passed

* store: correct the notes on unknown invoices and badge references

* store: wait for the shared lookup's slot before the next lookup in its test

* store: name owners and provider references in the close tests

* store: match only the late alert in the no-alert checks

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-13 08:05:24 +00:00
sh-agentsandsh-agents aa313e51b8 store: record refunds and close failed orders from the group (#8142)
* store: limit group name codes to single 2-year codes, 10 a day

* store: exclude console name codes from the group's daily cap

* store: hold managed group joiners for a moderator's review

* store: drop the years option from group name codes

* store: order the group code migration after the terms migration

* store: hold group joiners for review from the join request

* store: name the owner recovery command for a member pending review

* store: read the group info in the joiner test by position

* store: hold for review only the joiners of the managed group

* store: restore member review in the group profile on every join

* store: state the service's member review duties as they hold

* store: rename a joiner test value that shadowed hspec's pending

* store: note why the first group joiner is not held for review

* store: keep the group code column in the names migration

* store: point the group lane references past the approved comment

* store: record refunds and close failed orders from the group

* store: allow 2 to 10 years for group name codes

* store: let group moderators issue name codes

* store: state the group money commands' locking and delay

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-13 06:11:32 +00:00
sh-agentsandsh-agents 53b375d7f3 store: narrow group name codes and review managed group joiners (#8098)
* store: limit group name codes to single 2-year codes, 10 a day

* store: exclude console name codes from the group's daily cap

* store: hold managed group joiners for a moderator's review

* store: drop the years option from group name codes

* store: order the group code migration after the terms migration

* store: hold group joiners for review from the join request

* store: name the owner recovery command for a member pending review

* store: read the group info in the joiner test by position

* store: hold for review only the joiners of the managed group

* store: restore member review in the group profile on every join

* store: state the service's member review duties as they hold

* store: rename a joiner test value that shadowed hspec's pending

* store: note why the first group joiner is not held for review

* store: keep the group code column in the names migration

* store: point the group lane references past the approved comment

* store: allow 2 to 10 years for group name codes

* store: let group moderators issue name codes

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-12 13:37:01 +00:00
sh-agents fde4217623 Merge remote-tracking branch 'origin/names' into sh/names-close-failed
# Conflicts:
#	tests/Bots/StoreService/GroupIntegrationTests.hs
2026-11-11 13:23:21 +00:00
sh-agentsandsh-agents 6a8ae41d0d store: refuse name prices under a configured floor (#8093)
* store: refuse name prices under a configured floor

* store: correct the price floor comment on the allowance

* store: log the configured price floor at start

* store: test the price floor for spends, 3 years and the ini value

* store: document the price floor for searches, moves and spends

* store: reuse withRpcUrl in the price floor boot test, tidy imports

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-11 13:10:05 +00:00
Evgeny @ SimpleX Chat 65c2ff8a6a core: accept updated conditions automatically 31 days after the notice (#8125)
* core: test the conditions deadline after a late notice

* core: accept updated conditions automatically 31 days after the notice

* core: fixes from review of the conditions deadline
2026-11-11 12:44:08 +00:00
sh-agents 368264732d Merge commit '541ded282f' into sh/names-close-failed
# Conflicts:
#	apps/simplex-store-service/docs/names.md
#	apps/simplex-store-service/src/StoreService/Service.hs
#	tests/Bots/StoreService/GroupIntegrationTests.hs
2026-11-11 11:20:19 +00:00
sh-agentsandsh-agents 541ded282f store: keep the names terms texts across restarts (#8095)
* store: keep the names terms texts across restarts

* store: log names terms failures and fetch the texts in a lane

* store: run the names terms fetch lane from the contracts module

* store: test names terms texts kept when storing them fails

* store: take names terms links on GitHub and pinned only by commit

* store: create the names terms table in the names migration

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-11 11:16:23 +00:00
sh-agents 75b2691f8a Merge commit '4aab0ef3a6' into sh/names-close-failed
# Conflicts:
#	tests/Bots/StoreService/GroupIntegrationTests.hs
2026-11-11 09:07:23 +00:00
sh-agentsandsh-agents 4aab0ef3a6 store: refuse unsafe service starts, exit on a lost instance lock (#8096)
* store: restrict Stripe test keys to test chains, refuse mixed modes

* store: limit gas_limit_cap times max_fee_per_gas to 1 ETH

* store: prevent start while another key's transactions are pending

* store: exit when the instance lock's connection fails, restart always

* store: explain the fee cap refusal, match the chain checks' form

* store: check pending transactions' key and chain before the chat starts

* store: print a lost instance lock before the service stops

* store: document start refusals, stuck pending rows and the fee bound

* store: build the pending signer refusal without an inferred constraint

* store: zero the old key's allowance before dropping its pending rows

* store: flush the lost lock line before the service stops

* store: name the pending check after the signatures it checks

* store: test that another key's pending row stops the start

* store: read the chain settings in the start test by field

* store: limit each transaction's fee to 1 ETH at signing

* store: log a fee capped at 1 ETH for replacements too

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-11 08:56:50 +00:00
Evgeny @ SimpleX Chat f8776692df core: update simplexmq (prevent hanging on closed PostgreSQL store) (#8104) 2026-11-10 15:47:53 +00:00
Evgeny @ SimpleX Chat 4a41d4bc5e core: evaluate the new TVar state in stateTVar updates (#8102) 2026-11-09 22:39:06 +00:00
sh-agents a77b6ff302 store: test the //close rollback when its refund is refused 2026-11-09 13:58:42 +00:00
sh-agents 2462ad4b3a store: name each //close outcome and the failure time to check 2026-11-09 13:39:08 +00:00
sh-agents 89de9d895f store: close a failed paid name order and record its refund 2026-11-09 11:39:22 +00:00
Evgeny @ SimpleX Chat 2abd48450b core: accept group file chunks only from the member who sent the file (#8057)
* core: accept group file chunks only from the member who sent the file

* core: inline group file chunk member filter in query
2026-11-07 16:19:02 +00:00
ad75fe706f store: sell and register SimpleX names (#7979)
* core: add prepaid name codes and length bounds

* store: run the names migration after badges

* store: issue and revoke prepaid name codes

* store: document issuing prepaid name codes

* store: move the ABI helpers to Names.Abi

* store: read the [names] and [chain] settings

* store: add the names chain client and reads

* store: refuse group name codes while names are off

* store: search names and preview links

* store: serve each site on its own port

* scripts: deploy the badges and names sites

* store: document search and the two sites

* store: add the drop_taken_codes migration

* store: read the names codes_only setting

* store: add the names store and order signatures

* store: take name orders by card, crypto or code

* store: document name orders and codes-only

* store: add the names transaction sender

* store: commit and register queued orders

* store: reveal and retry an owner's order

* store: document the gas key

* store: add the name balance migrations

* store: read crypto units, rates and confirmations

* store: keep a taken order's money as a balance

* store: spend a balance on another name

* store: record refunds with //refund

* store: document balances and refunds

* store: add the agreed terms migration

* store: read the terms and community names

* store: answer community and terms in search

* store: sign and store the agreed terms

* store: document the terms and community names

* store: add the invoiced units migration

* store: read the crypto an invoice asks

* store: credit late and overpaid crypto by share

* store: document crediting late crypto by share

* store: add the record changes migration

* store: find an owner's orders and move one

* store: relay owners' link edits on chain

* store: document link edits

* store: move isLoopbackHost to Config

* store: trust dev issuer keys on the local chain

* scripts: build the names site from a submodule

* scripts: add the dev setup and contract run

* store: document the dev setup and names image

* store: send a Stripe idempotency key for names

* tests: wait until a relay lets go of its edit

* store: refuse a link edit deadline under 10 min

* store: count reverted link edits in the year limit

* store: require https for a remote chain node

* store: refuse zero chain confirmations

* store: set up the dev stack from the names branch

* store: rerun a failed unpaid cleanup next pass

* store: never replace a succeeded Stripe intent

* store: refuse an ini setting written as key: value

* store: note the webapp submodule's pinned branch

* store: document confirmLanded judging by ownerOf

* store: update the names webapp submodule

* store-service: register names under the name policy, every name accepting its terms on chain (#7889)

* store: accept each name's terms on chain under the name policy

* ci: run the reduced build on sh/names-deploy

* store: address review: policy re-read, terms reads and startup log

* store: never credit an unconfirmed extra

* store: alert money sent to a paid name invoice

* store: refuse to start on another chain's node

* store: keep orders while the allowance is used up

* store: replace a stalled transaction after 3 blocks

* store: judge a name taken at confirmation depth

* store: bind the template's listener to loopback

* store: scan only the ids of active name orders

* store: refuse unknown [names] and [chain] settings

* store: fetch the webapp submodule in upgrade steps

* store: delete definitions only tests use

* store: lock only name invoices at settlement

* store: retry an unexpired commitment as usual

* store: share the helpers defined twice

* store: test route limits on the running service

* store: fix tests that could not fail

* ci: test the store service on Postgres

* store: count IPv6 clients by their /64

* store: sweep invoices read alone past a list cap

* store: cap checkouts of all clients together

* store: cap the long polls held at once

* store: stop the old badge project at upgrade

* store: keep search lookups free of previews

* store: read the ini as UTF-8 in any locale

* ci: run Postgres store tests in a UTF-8 locale

* store: cap the transactions one order sends

* store: cancel a card intent after three declines

* store: refuse a name price under a cent

* store: send each transaction with gas headroom

* store: cap searches and read terms once per block

* store: never log the group join link

* store: mask the database password at startup

* store: run one instance per database

* store: limit name codes to admins, 100 a day

* store: refuse HighSpeed settlement with names

* store: no unverified receipts with a trusted key

* store: cap the log lines of refused webhooks

* store: check Apple certificates at the signed date

* store: refuse a malformed Stripe publishable key

* store: check the owner before a refund

* store: fold the names migrations into one

* store: read onion name links through the proxy

* store: refund money after paid once confirmed

* store: limit the allowance wait to a dry run

* store: bind loopback when upgrading

* ci: cache and widen the store Postgres job

* store: fix stale and duplicate names tests

* store: fix the submodule path in the upgrade

* store: refuse unpaid name codes on the CLI

* store: apply the review's names test list

* store: finish the review's names test list

* store: restore the base registration tests

* store: pass link hosts that do not resolve here

* store: refuse a move once its sends are used up

* store: take the shared checkout at the provider

* store: hold a search slot for chain reads only

* store: state which refunds are safe on a reference

* store: check a failed order's name before refusing its move (#8060)

* store: test and document the shared checkout cap for name orders

* store: check a failed order's name on chain before refusing its move

* store: test name links whose host lookup fails

* store: test that a search holds its slot through the chain reads only

* store: restore the signed transaction check in the chain tests

* store: remove the chain tests' copy of the signed transaction check

* store: correct the search slot texts and the README's balance endpoints

* docs: system and sequence diagrams of the names service (#8068)

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
Co-authored-by: brenzi-agent <brenzi-agent@brenzi.ch>
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-11-07 10:45:19 +00:00
Evgeny @ SimpleX Chat 76cc59eb7a core: keep forwarded messages in order when a batch is full (#8058)
* tests: order of forwarded messages when a batch is full

* core: keep forwarded messages in order when a batch is full
2026-11-06 22:10:35 +00:00
Evgeny @ SimpleX Chat 911f8986e5 core: ignore introductions of own member and from non-announcing members (#7874)
* core: ignore introductions of own member and from non-announcing members

* core: check member introduction in the same transaction

* core: reject introductions of removed members

* tests: describe the channel introduction test by what it checks
2026-11-06 08:09:20 +00:00
Evgeny @ SimpleX Chat 93e2207603 core, ui: report reason with rule text, ios gaps as in plain text (#8035)
* ui: references of the flat layout names, italic and paragraphs

* ui: what's new references with the crowdfunding link

* core, ui: report reason with rule text, ios gaps as in plain text

* ui: references of report reason, ios gaps and right-to-left text
2026-11-05 13:50:56 +00:00
Evgeny Poberezkin 0882a847cc Merge branch 'master' into names 2026-11-05 08:13:14 +00:00
Evgeny @ SimpleX Chat 6aa51dd061 core: apply member role and files setting to every received group file (#7899) 2026-11-05 07:52:00 +00:00
Evgeny @ SimpleX Chat aceb646f95 core, ui: typed empty lines are shown, and the flat chat layout reads as paragraphs (#8023)
* ui: markdown messages show the empty lines that were typed

* ui: snapshot references of messages with empty lines

* ui: terminal layout spacing by one paragraph unit, names at text size

* ui: terminal gap below reactions, same empty lines in both apps

* ui: flat layout references with the paragraph unit

* core, ui: text with empty lines as paragraphs, ios bubbles fit text

* core, ui: move text with empty lines as paragraphs to a follow-up

* ui: ios references with bubbles that fit their text

* ui: other senders' names in the flat layout in the secondary colour

* core, ui: text with empty lines as paragraphs

* core, ui: single-star text italic, reports drawn without core prefix
2026-11-04 13:27:22 +00:00
shandsh-agents 9f8961b8b7 store: badge fixes independent of names (#7971)
* tests: capture store logs at note, uncolored

* tests: flush store logs instead of waiting

* store: read invoices on BTCPay payment events

* store: sweep around invoices a pass failed to read

* store: report closed paid invoices in full

* store: send a Stripe idempotency key

* store: log handler exceptions as whole records

* tests: pin the store service wire tags

* tests: await replies on the member consoles

* scripts: exclude every ini from the image

* scripts: show api_host in the ini example

* store: drop the Stripe idempotency key

* store: give Stripe the order id as its reference

* store: warn of a failed read per invoice

* store: sweep around an overdue unknown provider

* tests: sweep around an overdue unreadable invoice

* store: trust BTCPay's status for closed in full

* store: drop comments that repeat the code

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-04 07:02:58 +00:00
Evgeny @ SimpleX Chat b209bca4a6 core: use the member key sent by the channel owner on role change (#7883)
* core: use the member key sent by the channel owner on role change

* core: check the member key on role change in one branch, rename test

* core: describe the role change test by what it checks
2026-11-03 21:58:53 +00:00
spaced4ndyandspacedandy-agents-simplex b6a71823fc core: badge service logs at the standard levels (#7954)
# Conflicts:
#	apps/simplex-store-service/Main.hs
#	apps/simplex-store-service/src/StoreService/Config.hs
#	apps/simplex-store-service/src/StoreService/Group.hs
#	apps/simplex-store-service/src/StoreService/Log.hs
#	apps/simplex-store-service/src/StoreService/Poller.hs
#	apps/simplex-store-service/src/StoreService/Providers/BTCPay.hs
#	apps/simplex-store-service/src/StoreService/Service.hs
#	apps/simplex-store-service/src/StoreService/StoreReceipts.hs
#	apps/simplex-store-service/src/StoreService/Web/Server.hs
#	simplex-chat.cabal
#	tests/Bots/StoreService/BotTests.hs
#	tests/Bots/StoreService/ConfigTests.hs
#	tests/Bots/StoreService/GroupIntegrationTests.hs
#	tests/Bots/StoreService/WebTests.hs

Co-authored-by: spacedandy-agents-simplex <342056592+spacedandy-agents-simplex@users.noreply.github.com>
2026-11-03 19:56:18 +00:00
shandsh-agents 2c09d06793 store: rename badge service to store service (#7987)
Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-03 13:24:17 +00:00
6f8ebda2c5 name registration service and client functions and mocks (#7693)
* name registration service and client functions and mocks

* 2 rounds of goal iter

* write a plan doc

* 7 rounds of /goal

* adapt contract updates

* intent signature includes duration of reservation. verify field before submitting the tx

* round 11 converged

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
Co-authored-by: shum <github.shum@liber.li>
2026-11-03 08:03:11 +00:00
sh-agents 5f6674fc01 Merge branch 'master' into names 2026-11-03 06:11:46 +00:00
Evgeny @ SimpleX Chat cd32b9ec96 tests: image tests of the chat flow on a small image, unit test of the crop (#7980)
* tests: profile image from file on a small image, unit test of the crop

* tests: image preview in the chat flow on a small image
2026-11-02 20:33:07 +00:00
Evgeny @ SimpleX Chat 2d2913b39f core: fix test build with simplexmq 7.1.0.16 (#7998) 2026-11-02 18:25:47 +00:00
sh-agents 0465fd649a Merge branch 'master' into names 2026-11-02 11:42:59 +00:00
Evgeny @ SimpleX Chat 3a98f25666 core: crop and resize profile images set from files (#7955)
* docs: plan resized profile images from files

* core: crop and resize profile images set from files

* docs: profile image from a file in the chat relay docs

* core: faster crop of profile images
2026-11-01 11:46:25 +00:00
Evgeny @ SimpleX Chat e4c6e67c56 badges: keep the renewal day when the tier changes at renewal (#7965)
* tests: badge renewal dates from the subscription start

* badges: keep the renewal day when the tier changes at renewal

* badges: keep the original ledger comments
2026-11-01 06:57:16 +00:00
Evgeny @ SimpleX Chat 99b91696f7 bots, nodejs: document chat, connection, member contact and network commands, typed commands in library (#7808)
* bots, nodejs: document chat, connection, member contact and network commands, typed commands in library

* bots, nodejs: restore apiConnect, wrap domain once, test all connect responses

* nodejs: JSDoc for new methods

* docs: plan for bot API commands and typed Node library methods

* tests: channel prepared with a domain has a verified SimpleX name

* docs: apply review fixes to the plan for bot API commands

* docs: apply second review pass to the plan for bot API commands

* docs: refer the bot API plan to the rewritten test commit

* docs: record decisions in the plan for bot API commands

* docs: plan tests of the generated Python command strings

* python: test the generated strings of the documented commands

* docs: plan the message information command for bots

* bots, nodejs: message information with the file servers for bots

* docs: plan the relay approval option of receiving files in Node

* nodejs: receive files without approving unknown relays

* docs: plan the user servers command for bots

* bots, nodejs: user servers and relays by operator for bots

* nodejs: document the message information method

* docs: plan the file upload progress event for bots

* bots: file upload progress event for bots

* bots: drop the file upload progress event

* docs: drop the upload progress event plan

* nodejs: document user servers and relay approval of received files
2026-10-31 22:30:16 +00:00
Evgeny @ SimpleX Chat 88ccfaa86c core: keep channel profile from the owner's link when joining (#7876)
* core: keep channel profile from the owner's link when joining

* core: rename test of the channel profile on joining

* core: apply channel profile from link data when connecting
2026-10-31 17:41:41 +00:00
fbca2cae81 core, ui: resize images in the core for sharper previews and images (#7941)
* WIP: Haskell impl of resizeImageToStrSize

* WIP: add FFI export wrapper

* WIP: switch ios resizeImageToStrSizeSync to backend

* WIP: fix resizeImageToStrSizeSync

* WIP: add JNI wrappers

* Add non-base64 resize and cWriteImage

* WIP: add chat_write_image

* fix resizeToStr

* fixes

* fix syntax, raise jpeg quality back

* add chatWriteImage

* Fix cfArgs in tests

* Use jpeg-turbo encoder

* add nix pins

* bump jpeg-turbo

* add CI deps

* add encoding funs to android lib

* bump jpeg-turbo for 20.04 fix

* jpeg-turbo fix for 8.10

* android fixes

* Bump jpeg-turbo

* set static flag for jpeg-turbo

* Fix nix for aarch64/android

* Fix android C api

* Fix resize in android

* Bump hs-libjpeg-turbo

* target correct override

* override android lib from android pkgs

* add macos build tweaks

* bump hs-jpeg-turbo for 8.10 fixes

* more build fixes

* make ios compile

* Always use pkgconfig for libjpeg-turbo

* WIP: debug libjpeg in ubuntu pkg-config CI

* Add pkg-config to dockerfiles

* Add libturbojpeg to dockerfiles

* Use -dev version of libturbojpeg in dockerfiles

* Install pkg-config in windows CI

* Disable flag for custom libturbojpeg linking options

Workarounds relocation error on x86_64-linux with gcc:
  /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/libturbojpeg.a(turbojpeg.c.o): relocation R_X86_64_TPOFF32 against `errStr' can not be used when making a shared object; recompile with -fPIC
  /usr/bin/ld: failed to set dynamic section sizes: bad value

* WIP: debug libjpeg in windows pkg-config CI

* WIP: debug libjpeg package in windows CI

* core: image resize module and buffer FFI

* ci: link libjpeg-turbo statically on all platforms

* ui: resize images in the core

* core: rename image resize functions to chat_resize_image and chat_resize_image_uri

* ci: restore whitespace in build.yml

* ci: build libjpeg-turbo 3.1.4.1 from a submodule

* core: hs-jpeg-turbo from github.com/simplex-chat

* nodejs: resize images

* python: resize images

* core: hs-jpeg-turbo from gitlab.com, the GitHub import lacks LFS objects

* core: generate /img previews

* ci: link libjpeg-turbo on Windows without pkg-config

* ci: build libjpeg-turbo on Windows with the GHC toolchain

* docs: plan for image resizing in the core

* docs: update image resizing plan

* ios: prevent crash when wallpaper image cannot be resized

* android, desktop: raise an error when an image cannot be resized

* docs: update spec references for image resizing

* docker: build the CLI image from a clone without submodules

* docs: apply review fixes to image resizing plan

* docker: build the CLI from a git worktree with the submodule present

* docs: apply second review to image resizing plan

* docs: point image resizing plan at the rewritten commit

* core: choose image format by transparency in chat_resize_image

* nodejs: resize images to the app sizes

* python: resize images to the app sizes

* nodejs, python: describe the core modules as used for image resizing

* docs: add license notices of the image libraries

* ci: describe the avatar method without attributing it to the apps

* ci, ios, nix: remove the libjpeg-turbo build outside cabal

* python: name resize_image in the core module text

* nodejs, python: describe resizing to the app image sizes

* core: refuse images larger than the supported size

* core: resize to JPEG images with a side above 65500 pixels

* docs: record image resizing decisions for the bundled libjpeg-turbo

* core, docs: build libjpeg-turbo and stb from the fork submodules

* docs: record the fork pins in the image resizing plan

* core: resize images to at most 4320 pixels per side, refuse above 16384

* docs: record the image side limits in the image resizing plan

* core: pin the rebased hs-jpeg-turbo fork

* core: pin the hs-jpeg-turbo fork without package.yaml

* docs: plan scaled JPEG decoding and EXIF orientation of images

* docs: copy the JuicyPixels-stbir licence of the pinned fork

* core: pin the hs-jpeg-turbo fork with scaled JPEG decoding

* core: decode JPEG at the display size, up to 65500 pixels per side

* core: rotate JPEG images by their EXIF orientation

* docs: refer the image plan to the JPEG decoding code

* docs: record the approved image processing decisions

* core: limit JPEG decoding memory to 1024 MB outside iOS and Android

* docs: name JPEG decoding in the libjpeg-turbo notice

* docs: plan image resizing from files and the decisions of 26 Oct

* core: scale images in one Catmull-Rom pass with sharpening

* docs: plan image sizes at a fixed quality

* core: resize images at a fixed quality to fill the size limit

* core: resize images from a file path or a file descriptor

* ios, android, desktop: resize picked images from their files

* core: encode resized images with mozjpeg

* tests: check descriptor closing by the file it refers to

* core: raise JPEG quality only for a full-size image below 97% of the limit

* ci: name the mozjpeg submodule in the Windows cleanup comments

* docs: refer the image plan to the current code

* docs: refer the image plan to the code merged with master

* core: export every image resizing function from each library

* core: close the file descriptor when its handle cannot be created

* docs: count the C sources of mozjpeg with the arithmetic decoder

* core: use the reviewed hs-jpeg-turbo and JuicyPixels-stbir forks

* ci: build the armv7a Android core library on request

* core: round image heights half up in the size search

* ios: describe the file image resizing functions in SimpleX.h

* ci: pick, preview and send images in the Claude app tests

* core: decode PNG images with libspng and refuse other formats

* core: encode PNG with libspng, keeping the smaller filter choice

* ci: pick, preview and send images in the scripted app smoke tests

* flake: build the PNG decoder package in nix builds

* ios: remove the copy of a picked image after sending it

* core: refuse image files larger than the decode memory limit

* core: scale a JPEG image to its largest size once per resize

* core: bisect JPEG quality without a step function

* core: reduce the memory used to sharpen and to decode PNG images

* android, desktop: pass the image format to the core as an integer

* android, desktop: fuse the preview conditions of picked media

* android, desktop, ci: check that the core resized the smoke test images

* python: remove the docstrings of the explicit image resizing functions

* docs: add the second review fixes to the image plan

* ci: tap the iOS attachment button by its accessibility label

* core: keep the colour profiles of resized images

* docs: add the colour profiles to the image plan

* ci: wait up to 30 s for the new group screens in the iOS smoke test

* ci: pick the Android smoke test images from their own photo folders

* ci: tap the iOS photo picker by position, as its tree is not shown

* ci: pick the test card and the logo by their iOS picker positions

* core: update JuicyPixels-stbir with the stb_image_resize licence terms

* core: write a fixed Display P3 profile for Display P3 images only

* core: do not keep the input image in memory for its colour profile

* core: read the JPEG segments once for the orientation and the profile

* core: read an image file into one buffer of its size

* docs: add the third review fixes to the image plan

* core: resize images with Display P3 or no profile, not profile bytes

* ci: check the pixel sizes of the images sent in the iOS smoke test

* core: update hs-jpeg-turbo with PNG chunk limits and encoder fixes

* docs: list Compact ICC Profiles, libspng and miniz in the dependencies

* android, desktop: reword the picked media preview comment

* docs: refer the image plan to the code merged with master

* ci: render the iOS snapshots before the images case

* ci: dismiss the snapshot tests' camera alert before the iOS images case

* core: update hs-jpeg-turbo with tests and the JuicyPixels-spng synopsis

* core: pin hs-jpeg-turbo and JuicyPixels-stbir in simplex-chat repositories

* update ios core library

* core, ui: accept only JPEG and PNG image data

* core: update JuicyPixels-stbir

* docs: plan for the iOS copy of picked images

---------

Co-authored-by: IC Rainbow <aenor.realm@gmail.com>
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
Co-authored-by: Alexandre Esteves <alexfmpe@proton.me>
2026-10-30 12:14:51 +00:00