Skip to content

fix: improve pro backend retry logic#1885

Merged
Bilb merged 10 commits intodevfrom
pro-backend-retry
Mar 20, 2026
Merged

fix: improve pro backend retry logic#1885
Bilb merged 10 commits intodevfrom
pro-backend-retry

Conversation

@Bilb
Copy link
Copy Markdown
Collaborator

@Bilb Bilb commented Mar 10, 2026

No description provided.

@Bilb Bilb changed the title chore: this is a wip chore: this is a wip for the pro backend retry logic Mar 10, 2026
@Bilb Bilb force-pushed the pro-backend-retry branch from 66d45a4 to 975b8a5 Compare March 17, 2026 06:06
@Bilb Bilb force-pushed the pro-backend-retry branch from 975b8a5 to 22addb7 Compare March 17, 2026 06:07
@Bilb Bilb marked this pull request as ready for review March 20, 2026 00:33
@Bilb Bilb requested review from Aerilym and Copilot and removed request for Copilot March 20, 2026 00:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is a WIP that extends the Pro backend revocation-list flow by (1) persisting the server-provided retry schedule, and (2) making revocations “effective” only after a specified timestamp, with related schema/API updates and test coverage.

Changes:

  • Add retry_in_s support and persist next scheduled run time for UpdateProRevocationListJob.
  • Rework ProRevocationCache to require an explicit DB load and to treat revocations as effective only after effective_unix_ts_ms.
  • Update Pro backend schemas/types (including a new payment provider) and adjust debug/test scaffolding accordingly.

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
ts/test/test-utils/utils/stubbing.ts Add stubStorage helper to stub Storage methods in tests.
ts/test/test-utils/setup.ts Add a unit-test setup shim to silence emoji-mart canvas errors.
ts/test/session/unit/pro/pro_revocation_cache_test.ts New unit tests for ProRevocationCache load/get/set and effective-revocation logic.
ts/session/utils/job_runners/jobs/UpdateProRevocationListJob.ts Persisted “next run” scheduling using server retry_in_s and storage-backed next-run timestamp.
ts/session/revocation_list/pro_revocation_list.ts Add explicit DB load step + “effective” revocation check using NetworkTime.
ts/session/apis/pro_backend_api/types.ts Add Rangeproof payment provider mapping.
ts/session/apis/pro_backend_api/schemas.ts Split API vs DB revocation schemas; add effective_unix_ts_ms and retry_in_s.
ts/session/apis/pro_backend_api/ProBackendAPI.ts Switch revocations endpoint to the renamed API schema.
ts/receiver/types.ts Update revoked-proof check to use isB64HashEffectivelyRevoked.
ts/models/conversation.ts Update proof validity checks to use isB64HashEffectivelyRevoked.
ts/mains/main_renderer.tsx Ensure ProRevocationCache.loadFromDbIfNeeded() runs during startup.
ts/mains/main_node.ts Add dev-only __qa_action IPC hook + app-is-packaged IPC handler.
ts/data/settings-key.ts Add proRevocationListNextRunAtMs setting key.
ts/components/leftpane/ActionsPanel.tsx Adjust revocation polling tick cadence; add Shift-click debug IPC hook.
ts/components/dialog/user-settings/pages/user-pro/ProNonOriginatingPage.tsx Treat Rangeproof provider same as Nil for refunds UI.
ts/components/dialog/debug/components.tsx Avoid showing private master key except in dev; adjust copy-to-clipboard behavior.
ts/components/dialog/debug/FeatureFlags.tsx Move/restore Pro debug actions; add Rangeproof to provider dropdown.
ts/components/dialog/debug/DebugMenuModal.tsx Reorder debug modal sections (About/Other Info placement).
pnpm-lock.yaml Bump libsession_util_nodejs tarball reference to v0.6.17.
package.json Bump libsession_util_nodejs dependency to v0.6.17 tarball.
.mocharc.json Require the new unit-test setup file.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Bilb Bilb changed the title chore: this is a wip for the pro backend retry logic fix: improve pro backend retry logic Mar 20, 2026
@Bilb Bilb force-pushed the pro-backend-retry branch from b044455 to 30852fa Compare March 20, 2026 03:03
Aerilym
Aerilym previously approved these changes Mar 20, 2026
Copy link
Copy Markdown
Collaborator

@Aerilym Aerilym left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Bilb Bilb force-pushed the pro-backend-retry branch from 30852fa to af6ce73 Compare March 20, 2026 03:16
@Bilb Bilb merged commit 007b7e2 into dev Mar 20, 2026
1 of 2 checks passed
@Bilb Bilb deleted the pro-backend-retry branch March 20, 2026 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants