Repository navigation
fix(notifications): use a local device profile without wallet login - #12742
Draft
0xApotheosis wants to merge 1 commit into
Draft
0xApotheosis wants to merge 1 commit into
0xApotheosis wants to merge 1 commit into
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Oct 7, 2026
This branch has not been deployed
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.
Description
Create a notification profile silently from a device key stored in IndexedDB. Reloads reuse that identity; separate browser profiles get separate identities. Public wallet addresses are no longer used to retrieve or merge user profiles.
Keep session tokens in memory, renew expired sessions automatically and complete mobile registration only after receiving the native push-verification proof.
What this affects
The trading app's background device-profile and notification registration, in desktop browsers and the mobile WebView. It creates a local device identity without a wallet-login signature. Clearing site data creates a new identity; connecting the same wallet in another browser does not restore the old profile. There is no new profile/history screen to inspect.
Issue (if applicable)
No linked issue.
Risk
High: changes profile registration and requires the companion user/notification services and mobile handler. Clearing local storage creates a new profile and does not recover previous history. No wallet signature prompt is introduced.
Deployment and QA environment
Ship/test together: user-service #68, notifications-service #69, web #12742, and mobile #166 + #165. Engineering prepares a combined integration build and resolves their shared-module/migration conflicts before QA. Apply the shared
security_limitsanddevice_authmigrations once to an isolated PostgreSQL database; run migration/concurrency tests against that database.Backend environment: The Railway
microservicesproject currently hasdevelopandproduction, with no separate PR environment. Engineering must create an isolated QA environment for this bundle and post its service/deployment links. Deploy user-service and notifications-service there, plus swap-service with the updated internal caller code and matching server-onlySERVICE_API_KEY. Configure exact app origins,NOTIFICATIONS_SERVICE_URL, and trusted ingress peers where required. The checkeddevelopuser-service configuration did not yet includeDEVICE_ALLOWED_ORIGINSorNOTIFICATIONS_SERVICE_URL; an existing develop deployment is not sufficient evidence that this bundle is ready.Client environment: Deploy web #12742 to an assigned
beard/juiceQA slot, pointVITE_USER_SERVER_URLat the QA user-service, and enable WebServices. Supply native internal builds of #165 + #166 whose configured trusted origin is that same QA web URL. Ordinarysecurity/*web branches do not automatically deploy. Use disposable wallet/device profiles and test push recipients.Release: Repeat the web checks on
releasewith the intended service configuration and repeat native checks on release-candidate binaries. Provision the production schema/configuration first, make compatible native builds available, then coordinate backend and web activation. Old native clients cannot complete the new proof exchange. Record the supported native version and how older clients will be handled before release; independently deploying one component is not a complete rollout.QA handoff: Environment inventory was checked on 9 October 2026. Before Operations starts, Engineering posts the exact app/install links, deployed commit/build numbers, test fixtures and readiness confirmation in this PR. Operations records the browser/device, steps passed/failed and screenshots of failures. Environment preparation and tests described here are a plan, not a claim that deployment or live QA has already happened.
Testing
Engineering
Validated locally: 5 device-key persistence/signature and API tests, full lint and TypeScript passed. Lint reports 9 existing warnings.
With Node 22 and pnpm, install dependencies and build workspace declarations first, then run:
pnpm exec vitest run src/lib/user/api.test.ts src/lib/user/deviceIdentity.test.ts pnpm run lint --fix pnpm run type-checkThe tests use browser-storage and native-bridge mocks. Supported WebView persistence and real push delivery still need device QA.
Integration/security checks — Engineering
The checks below require service configuration, API tools or backend observation. Engineering owns them; the click-through Operations checklist follows. Any environment setup mentioned here must follow the deployment plan above.
VITE_USER_SERVER_URLat the companion backend, enable WebServices and connect a test wallet. Confirm profile creation completes without requesting a wallet signature.Operations
Open: Engineering's web QA URL in two separate browser profiles, A and B. Engineering enables WebServices and records the backend profile IDs during the test. Use the supplied disposable wallet.
Pass: Normal use, persistence and renewal work. Engineering supplies evidence of identity separation and storage behavior; profile IDs and backend history are not visible in the app.
Related PRs
Screenshots (if applicable)
Not applicable; verification focuses on requests, authorization and existing flows.