Conversation
There was a problem hiding this comment.
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_ssupport and persist next scheduled run time forUpdateProRevocationListJob. - Rework
ProRevocationCacheto require an explicit DB load and to treat revocations as effective only aftereffective_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.
ts/session/utils/job_runners/jobs/UpdateProRevocationListJob.ts
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.