Repository navigation
webapp: read the names service link data and stale nonce, and take links as the chat core does - #19
Open
evgeny-simplex wants to merge 43 commits into
Open
evgeny-simplex wants to merge 43 commits into
evgeny-simplex wants to merge 43 commits into
Conversation
epoberezkin
approved these changes
Nov 17, 2026
…skip in WebKit what it cannot show, keep traces of failures
…rather than a ticked one
epoberezkin
approved these changes
Nov 17, 2026
…step needs the dev server's stand-in form
epoberezkin
approved these changes
Nov 17, 2026
…, whichever answer the page reads first
… into ep/names-wire
epoberezkin
approved these changes
Nov 17, 2026
…om /api/config, which no view or search answer repeats
…contact or channel, with an image the core dropped read as none
…ing, reserved or registered with the store resolver's records or none
The answer nests the name's case under "found", tagged by "type"; "community" is present only for a community name, and its "for" only when the service has words for it. A registered name's records are nested as {type: own, contact, channel, nonce, edits} or {type: other}; edits.nextAt is an ISO time, omitted while edits are left. The available case drops "currency" and gives the community name's own years; its "terms" is omitted while they cannot be read.
…type on the names endpoints or by error on the others; edit_limit is 409 with an ISO time
The search, preview, terms, code check and records endpoints, and the rate limit of every names route, answer {type: code, ...}; the order endpoints and those badges share still answer {error: code}. A code the page does not know reads as internal, or network under a gateway status, and every 429 as rate_limited. edit_limit moves from 429 to 409 with nextAt as an ISO time, and record_reverted no longer includes the revert. The mock answers so, its find limit taken as a route limit.
… service answers in place of not_found
restore answers null and codeOrderOf "none" for an empty list, and newerOrder finds nothing newer in it; the mock answers an owner of no order with {registrations: []}.
…k, as the page reads its deployment there
…raw request, which the page no longer builds
…'s request types, the terms as a record and the method as the chat core's
Nesting, as the service's derived decoders read it:
- an order is {owner, fields, timestamp, signature}, its fields {labelHash, length, duration, commitment, sealed, terms}, terms {communityName, termsHash};
- /api/invoice sends the order as "order", with kind, method and price; /api/name/register as "order", with code;
- a move sends {fields, timestamp, signature}; a spend sends them as "signed", with price, balance and, for a difference, method;
- method is {"type": "card", "provider": "stripe"} or {"type": "crypto", "currency": "btc" | "xmr"}.
The page keeps its records and the signed messages as they were; api.ts builds the request at the call. The mock reads the same requests.
…xmr, as the badge page does
The chat core's derived JSON of the payment method writes a card as {"type": "card", "provider": []}, since its card provider has one constructor, so the service reads the method as the text both pages send.
…he service's request types, which api.ts builds for them
… STORE_FIXTURES with the page's own request functions and the search screen, skipped without it
…er's terms record inside the service's request types
…ned_in_time or not_registered, and worded by the page
…'s words for the service's not_registered reason
…ase with what each phase holds, how it was paid, the hold on its balance and the terms it signed as a record The mock answers the same shape, and the browser and unit tests read it.
… page with its name code, and a failed order offers another name or support in place of Try again The failure reasons are the service's: sends used up, links refused, registry refused. The mock keeps a lapsed order waiting for /retry, which it takes only for such an order.
…asses, and the page tells the hours left to sign from the order's revealBefore The deadline is 2^53-1, the largest the page, the service and the contract hold exactly. The checkout note no longer names 24 hours, as a page opened later commits the order again.
…name, and two retries at once race on a lapsed order The failed page searches no name since it always offers another one. The mock's /retry checks the version after its write delay, as the service's turn does, so of two at once one is answered registration_changed.
…every browser, as the service's view names it The view's replacedBy names the order and its invoice. The page keeps no link of its own and no longer guesses one from expiry times, find's list order or creation times. Your names hides a replaced order by its last read, adds the order that replaced it from the code's find by its id, and keeps the replaced one listed while money reached it. A forgotten order's link says it does not work.
… code opens the newest order rather than a closed one The service's find answer names a closed order's phase closed. The contract test reads the recorded find-orders answer.
… from the service's recorded vectors instead of copies The tests read STORE_FIXTURES' vectors-signatures, vectors-acceptance, vectors-codes and vectors-labels, as the store's answers are read, and are skipped without them. The prepaid code vectors copied from the chat core's tests go.
sh-agents
added a commit
to sh-agents/simplex.domains
that referenced
this pull request
Nov 18, 2026
sh-agents
added a commit
to sh-agents/simplex.domains
that referenced
this pull request
Nov 18, 2026
sh-agents
added a commit
to sh-agents/simplex.domains
that referenced
this pull request
Nov 18, 2026
sh-agents
added a commit
to sh-agents/simplex.domains
that referenced
this pull request
Nov 18, 2026
sh-agents
added a commit
to sh-agents/simplex.domains
that referenced
this pull request
Nov 18, 2026
sh-agents
added a commit
to sh-agents/simplex.domains
that referenced
this pull request
Nov 18, 2026
sh-agents
added a commit
to sh-agents/simplex.domains
that referenced
this pull request
Nov 18, 2026
sh-agents
added a commit
to sh-agents/simplex.domains
that referenced
this pull request
Nov 18, 2026
sh-agents
added a commit
to sh-agents/simplex.domains
that referenced
this pull request
Nov 18, 2026
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.
The names service changes its API in simplex-chat/simplex-chat#8243; the page and the service ship together. This pull request replaces #18, closed when sh/names-webapp was merged into names; its two commits are moved onto names unchanged.
deepLinkis always a string.aorcin either case, an optional/before#, a key in canonical base64url, and a server (hfor asimplex:/link). The four seeded links and the test vectors get canonical keys.stale_nonce; the page re-reads the nonce as on any refused save.Tests: CI run 44128302280 of the webapp workflow at 3d635d2 passed: unit, and the browser tests in Chromium, Firefox and WebKit against the dev server and the production build.
Browser test fixes, as CI ran them for the first time:
Known gaps of the mock: one body cap of 16384 bytes, where the service caps records, reveal, preview, code check and find at 8192;
contract.spec.ts431-441 expects 409record_revertedfor an edit another relayer applied first, where the service answers 200{"tx": null}(the spec runs against the mock only).