Commit Graph
6817 Commits
Author SHA1 Message Date
spacedandy-agents-simplex 0ea43ea59e fixup! core: send a badge request at once from a build for the dev badge service 2026-10-20 15:37:53 +04:00
spacedandy-agents-simplex c0619385e9 fixup! badge-service: let a dev deployment ask its mock store while coverage runs 2026-10-20 15:37:53 +04:00
spacedandy-agents-simplex e570748206 fixup! badge-service: let a dev deployment ask its mock store while coverage runs 2026-10-20 15:37:53 +04:00
spacedandy-agents-simplex 1193ae953f core: send a badge request at once from a build for the dev badge service
/_badge request <userId> sends the profile's badge request now, while
its badge is shown, and runs the badge pass on the answer, so a renewal
or an ended subscription can be watched by hand against the dev
service.

It is allowed only when ChatConfig's badgeDevRequests is set, which no
shipped build does and nothing sets at runtime: the dev-service branch
sets it beside its own badge service overrides. A request off the shared
expiry would tell requests apart, so every other build refuses it, and
it is refused from a paired remote controller.

Run: 011-subscription-tools, slice S3b
2026-10-20 15:37:53 +04:00
spacedandy-agents-simplex e116987e5b badge-service: let a dev deployment ask its mock store while coverage runs
[dev] check_store_during_coverage = on makes every issueBadge for a
subscription ask the dev mock, during paid coverage too, and bank the
month of a charge it can grant, issued once coverage reaches it. So a
renewal can be watched by hand without waiting a month, and a mock that
forgot the plan after a restart answers ended at once.

Off by default, and refused unless accept_unverified_store_receipts is
on, which is itself refused beside a real store: a real store has not
started its next charge while coverage runs, and asking spends the
quota every subscriber shares.

Run: 011-subscription-tools, slice S3a
2026-10-20 15:37:53 +04:00
spaced4ndy ff22df9cdc update plan 2026-10-20 15:27:18 +04:00
spaced4ndy 53683c415d shorter plan 2026-10-20 14:49:13 +04:00
spaced4ndy 77479516d2 transfer plan 2026-10-20 14:35:26 +04:00
spacedandy-agents-simplex 26f846e1a5 fixup! core: retire a subscription badge as soon as its store says it ended 2026-10-20 06:29:36 +00:00
spacedandy-agents-simplex 5dc5da61b2 docs: record that a badge subscription cannot be restored or bought again
Restoring a subscription on a new device or under another profile fails for two independent reasons, the client's restore reading only unfinished transactions on iOS and the service answering any key but the one it credited receipt_used, and a lapsed iOS subscriber cannot subscribe again on the same install either. Both gaps files record it in their own format, and both restorePurchases() say why reading the store's entitlements alone would not help.

Run: 010-subscription-lifecycle, slice S2c
2026-10-20 03:29:19 +00:00
spacedandy-agents-simplex 55d69781e8 core: retire a subscription badge as soon as its store says it ended
A subscription badge retired only on an ended answer to a request that was due, and only once the ledger's paidThrough had passed, so an ended answer while the ledger still covered, or the iOS app's report of StoreKit's expired or revoked state, left the badge shown, Support SimpleX unreachable and every purchase refused until a later request. Now an answered ended state is stored even while coverage runs (the service writes it only from a store check, after which it grants nothing), and every pass retires a subscription whose state, from this pass's answer or else as stored, is ended, whatever the ledger covers. The paidThrough guard stays at the prepaid call site, its only remaining user.

Run: 010-subscription-lifecycle, slice S1
2026-10-20 03:10:59 +00:00
spaced4ndy 2d093d8c0a ui wip 2026-10-19 20:58:34 +04:00
spaced4ndy 2058daf700 ui 2026-10-19 19:29:21 +04:00
spacedandy-agents-simplex f82b1e3301 docs: replace the badge subscriptions diagrams README with a short summary
A plain-English summary for anyone on the team, with the seven
diagrams and a self-contained HTML page; the plan links it again.
Diagrams follow the branch: Restore purchases is on Support SimpleX,
"Renewing" shows past paidThrough, and only a present retryAfter is
raised to an hour.
2026-10-19 19:28:07 +04:00
spaced4ndy a1392e2713 ios: no alert when a badge purchase is cancelled 2026-10-19 18:29:49 +04:00
spaced4ndy b5b9b664dd ios, android, desktop: smaller Restore purchases label 2026-10-19 18:23:32 +04:00
spacedandy-agents-simplex 27311bd84f docs: keep only the badge subscription diagrams, with a README
The reviewer summary leaves the repo; the folder keeps the seven
diagrams with a README that captions each, and the plan links the
README.
2026-10-19 18:20:01 +04:00
spaced4ndy 9e62d09941 ios, android, desktop: show the badge privacy policy in the app 2026-10-19 18:13:09 +04:00
spaced4ndy e2119cef14 ios, android, desktop: restore purchases on the Support SimpleX screen 2026-10-19 18:08:36 +04:00
spacedandy-agents-simplex 8166b69ec8 docs: summarize the badge subscriptions PR for reviewers, with diagrams
A summary of PR #7716 as built: buying, renewing and retiring on each
store, the retirement window, lanes and store limits, RPC, API and
database changes, alerts, tests, open items, and a review map. Seven
SVG diagrams, an HTML page with them inline, and a link from the plan.
2026-10-19 18:05:27 +04:00
spaced4ndy 140db8db88 ios, android: hide Restore purchases on the order screen 2026-10-19 17:57:51 +04:00
spaced4ndy da39d8923a update ios lib 2026-10-19 16:53:47 +04:00
spaced4ndy ffb036680f update postgres schema 2026-10-19 15:37:45 +04:00
spacedandy-agents-simplex a2e9456e6d ios, android, desktop: use the dev badge page for testing (don't merge) 2026-10-19 11:19:14 +00:00
spacedandy-agents-simplex ea359edb66 ios, android, desktop: choose a badge in the app 2026-10-19 11:18:25 +00:00
spacedandy-agents-simplex d50488460d Merge branch 'master' into f/badge-subscriptions
# Conflicts:
#	src/Simplex/Chat/Store/SQLite/Migrations/chat_query_plans.txt
2026-10-19 09:49:17 +00:00
spaced4ndy 0eeac1bb92 docs: normalize badge in-app checkout wireframe 2026-10-19 13:00:31 +04:00
sh bdc4edc524 nix: build armv7a from master with ghc 8.10.7 (#7763) 2026-10-19 09:07:52 +01:00
EvgenyandEvgeny @ SimpleX Chat 924f2b9644 api: fix python code generation (#7764)
* api: fix python code generation

* fix python types

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-19 08:32:09 +01:00
spacedandy-agents-simplex ebc0c532b9 fixup! core: add the badge subscription columns in their own migration 2026-10-19 07:23:28 +00:00
EvgenyandEvgeny @ SimpleX Chat a766d0af0f ci: package releases with drafts in simplex-chat-libs (#7754)
* ci: package releases with drafts in simplex-chat-libs

* test release

* core: 7.1.0.12

* packages: release nodejs and python libraries

* fixes

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-19 07:50:09 +01:00
EvgenyandEvgeny @ SimpleX Chat 0563460204 core, ui: support block markdown (#7734)
* plan: support block markdown

* update plans

* core, ui: markdown plans and implementation

* better

* simplify

* markdown tests and fixes

* implement

* fixes

* fix test

* bold

* block markdown rendering

* fix selection and rtl

* fixes

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-18 22:44:33 +01:00
EvgenyandEvgeny @ SimpleX Chat 5a5a927821 ci: reduce the number of runners (#7750)
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-18 11:40:08 +01:00
EvgenyandEvgeny @ SimpleX Chat 1d0247b7dd core: preserve profile peer type when connecting incognito (#7751)
* core: preserve profile peer type when connecting incognito

* Apply batched suggestions from code review

Co-authored-by: Evgeny <evgeny@poberezkin.com>

* fix

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-18 08:51:33 +01:00
EvgenyandEvgeny @ SimpleX Chat 139ce5f8cc core: fix profile creation and update in channels (#7740)
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-17 19:49:30 +01:00
EvgenyandEvgeny @ SimpleX Chat 77f9f4a464 core: add peer type "agent" (#7738)
* add agent peer type

* bot types

* agent app icons

* refactor

* smaller image

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-17 19:23:53 +01:00
EvgenyandEvgeny @ SimpleX Chat 9a90d8e230 ci: cache build artifacts for faster builds (#7730)
* ci: cache build artifacts for faster builds

* test build

* compression

* fix macos-latest

* debug build

* better caching

* test cache

* update build

* test cache

* ci: check toolchain restore

* ci: remove Windows toolchain cache

* ci: skip tests on macOS Intel

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-17 17:12:08 +01:00
spacedandy-agents-simplex 68b10a46af tests: drop the FilePath import a merge duplicated
The branch and master each added import System.FilePath ((</>)) to
Direct.hs on 2026-10-14 at different positions, and an earlier merge
kept both, so GHC warned that one was redundant. Keep master's.

Run: 008-subs-migration-split, slice 2
2026-10-16 22:35:48 +00:00
spacedandy-agents-simplex dd9e09486f core: add the badge subscription columns in their own migration
M20261016_badge_store_receipts shipped to master in #7587, so it must
stay as released. Restore it in both dialects and move the
subscription_status, unrenewed_since and last_unrenewed_at columns,
with the down step that clears subscription_cancelled acknowledgements
master cannot read, into M20261016_badge_subscriptions.

Run: 008-subs-migration-split, slice 1
2026-10-16 21:47:06 +00:00
spaced4ndy 19566b5274 Merge branch 'master' into f/badge-subscriptions 2026-10-16 23:32:16 +04:00
spaced4ndy a932c8298a buying a badge in the app (#7587) 2026-10-16 18:10:25 +00:00
spaced4ndy a356512645 Merge branch 'master' into badge-in-app-checkout 2026-10-16 22:07:28 +04:00
spaced4ndy a1529cd33f core: update postgres schema 2026-10-16 21:40:13 +04:00
spaced4ndy 5a80713699 ci: test the desktop app on Linux runners on request, with an optional Claude session (#7736) 2026-10-16 17:34:43 +00:00
spaced4ndy 7c5b6bb3d7 ci: test the iOS app in the simulator on request, with an optional Claude session (#7737) 2026-10-16 17:33:50 +00:00
spaced4ndy c998eb1fee ios, android, desktop: use the production badge page 2026-10-16 21:30:55 +04:00
spaced4ndy 898c6f1266 ios, android, desktop: choose a badge on the website 2026-10-16 21:07:45 +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
spacedandy-agents-simplex 613ce364f4 review: round 1 fixes
R1-A1: the docs and the PlayReads comment said the purchase path reads Play's subscriptions at most 300 times a minute; it asks about at most 300 subscriptions, and a credited one is read once more to acknowledge it, so made-up tokens can spend at most a tenth of the quota renewal checks share.
R1-A2: a comment on RequestLane repeated the one above the queues.
R1-B1: a test that a held pass, which sends no request, leaves the unrenewed run unchanged.
R1-B2: the outage test's last wait for the run is 30 s instead of 5 s.

Run: 007-subscriptions-retirement-lane, review round 1
2026-10-16 12:58:51 +00:00
spacedandy-agents-simplex aac6d6e54f core: count the subscription retirement window from the first answer that renewed nothing
The window was counted from the client's paidThrough, which moves only when the client asks, so after months away the first answer that granted nothing for any reason, a transient error, Play's clipped last days or a billing retry, retired a subscriber whose store may still have been charging. The purchase now stores its unrenewed run: the first answered request after which the ledger covered nothing, and the latest one. The badge retires once the window has passed since the run started, still only after an answer; a renewal ends the run, and an answer that comes a window or more after the latest one starts a new run, since an absence or an outage that long may hide a renewal. The window stays 67 days, written as Apple's 60-day billing retry plus the week contacts give an expired credential.

Run: 007-subscriptions-retirement-lane, slice 4
2026-10-16 12:30:14 +00:00