Repository navigation
webapp: show the dispute period and its end, and sign it - #27
Closed
evgeny-simplex wants to merge 79 commits into
Closed
evgeny-simplex wants to merge 79 commits into
evgeny-simplex wants to merge 79 commits into
Conversation
# Conflicts: # webapp/README.md # webapp/dev/mock.ts # webapp/dev/mock/service.ts # webapp/e2e/balance.spec.ts # webapp/e2e/codes.spec.ts # webapp/e2e/contract.spec.ts # webapp/e2e/helpers.ts # webapp/e2e/screens.spec.ts # webapp/e2e/screens/checkout-review-balance-changed-desktop.png # webapp/e2e/screens/checkout-review-balance-changed-phone.png # webapp/e2e/screens/checkout-review-balance-covers-desktop.png # webapp/e2e/screens/checkout-review-balance-covers-phone.png # webapp/e2e/screens/checkout-review-balance-gone-desktop.png # webapp/e2e/screens/checkout-review-balance-gone-phone.png # webapp/e2e/screens/checkout-review-balance-held-named-confirming-desktop.png # webapp/e2e/screens/checkout-review-balance-held-named-confirming-phone.png # webapp/e2e/screens/checkout-review-balance-held-named-desktop.png # webapp/e2e/screens/checkout-review-balance-held-named-phone.png # webapp/e2e/screens/checkout-review-balance-held-this-name-desktop.png # webapp/e2e/screens/checkout-review-balance-held-this-name-phone.png # webapp/e2e/screens/checkout-review-balance-held-unnamed-confirming-desktop.png # webapp/e2e/screens/checkout-review-balance-held-unnamed-confirming-phone.png # webapp/e2e/screens/checkout-review-balance-held-unnamed-desktop.png # webapp/e2e/screens/checkout-review-balance-held-unnamed-phone.png # webapp/e2e/screens/checkout-review-balance-part-coin-only-desktop.png # webapp/e2e/screens/checkout-review-balance-part-coin-only-phone.png # webapp/e2e/screens/checkout-review-balance-part-desktop.png # webapp/e2e/screens/checkout-review-balance-part-phone.png # webapp/e2e/screens/checkout-review-balance-took-own-order-desktop.png # webapp/e2e/screens/checkout-review-balance-took-own-order-phone.png # webapp/e2e/screens/checkout-review-bonus-tip-desktop.png # webapp/e2e/screens/checkout-review-bonus-tip-phone.png # webapp/e2e/screens/checkout-review-btc-desktop.png # webapp/e2e/screens/checkout-review-btc-phone.png # webapp/e2e/screens/checkout-review-busy-desktop.png # webapp/e2e/screens/checkout-review-busy-phone.png # webapp/e2e/screens/checkout-review-card-desktop.png # webapp/e2e/screens/checkout-review-card-phone.png # webapp/e2e/screens/checkout-review-chat-popup-desktop.png # webapp/e2e/screens/checkout-review-code-refused-expired-desktop.png # webapp/e2e/screens/checkout-review-code-refused-expired-phone.png # webapp/e2e/screens/checkout-review-code-refused-invalid-desktop.png # webapp/e2e/screens/checkout-review-code-refused-invalid-phone.png # webapp/e2e/screens/checkout-review-code-refused-not-covering-desktop.png # webapp/e2e/screens/checkout-review-code-refused-not-covering-phone.png # webapp/e2e/screens/checkout-review-code-refused-reserved-desktop.png # webapp/e2e/screens/checkout-review-code-refused-reserved-phone.png # webapp/e2e/screens/checkout-review-code-refused-unpaid-desktop.png # webapp/e2e/screens/checkout-review-code-refused-unpaid-phone.png # webapp/e2e/screens/checkout-review-code-refused-used-desktop.png # webapp/e2e/screens/checkout-review-code-refused-used-phone.png # webapp/e2e/screens/checkout-review-community-desktop.png # webapp/e2e/screens/checkout-review-community-phone.png # webapp/e2e/screens/checkout-review-community-popup-desktop.png # webapp/e2e/screens/checkout-review-hold-desktop.png # webapp/e2e/screens/checkout-review-hold-phone.png # webapp/e2e/screens/checkout-review-links-desktop.png # webapp/e2e/screens/checkout-review-links-phone.png # webapp/e2e/screens/checkout-review-links-unread-desktop.png # webapp/e2e/screens/checkout-review-links-unread-phone.png # webapp/e2e/screens/checkout-review-method-unavailable-desktop.png # webapp/e2e/screens/checkout-review-method-unavailable-phone.png # webapp/e2e/screens/checkout-review-open-order-confirming-desktop.png # webapp/e2e/screens/checkout-review-open-order-confirming-phone.png # webapp/e2e/screens/checkout-review-open-order-desktop.png # webapp/e2e/screens/checkout-review-open-order-phone.png # webapp/e2e/screens/checkout-review-sending-desktop.png # webapp/e2e/screens/checkout-review-sending-phone.png # webapp/e2e/screens/checkout-review-term-started-desktop.png # webapp/e2e/screens/checkout-review-term-started-phone.png # webapp/e2e/screens/checkout-review-terms-changed-desktop.png # webapp/e2e/screens/checkout-review-terms-changed-phone.png # webapp/e2e/screens/checkout-review-unticked-desktop.png # webapp/e2e/screens/checkout-review-unticked-phone.png # webapp/e2e/screens/checkout-review-xmr-desktop.png # webapp/e2e/screens/checkout-review-xmr-phone.png # webapp/e2e/track.spec.ts # webapp/src/api.ts # webapp/src/flow.ts # webapp/src/screens/checkout.ts # webapp/src/screens/names.ts # webapp/src/screens/order.ts # webapp/src/screens/search.ts # webapp/src/session.ts # webapp/src/store.ts # webapp/src/styles.css # webapp/src/views/checkout.ts # webapp/src/views/names.ts # webapp/src/views/order.ts # webapp/test/api.test.ts # webapp/test/flow.test.ts # webapp/test/rules.test.ts # webapp/test/screens-checkout.test.ts # webapp/test/screens-names.test.ts # webapp/test/screens-order.test.ts # webapp/test/screens-search.test.ts # webapp/test/session.test.ts # webapp/test/terms-vectors.test.ts
…the ended row with names' words
…e's dispute days as the service records them
epoberezkin
marked this pull request as ready for review
November 23, 2026 09:16
epoberezkin
pushed a commit
to simplex-chat/simplex-chat
that referenced
this pull request
Nov 23, 2026
* docs: plan the dispute days of names registrations * store: add dispute days to name orders and intents, with tests * store: sign and register names over the dispute days of their payment * store: document the dispute days of name orders * store: add the ended phase of name orders, with tests * store: show a name registration ended in its dispute period as ended * store: document the ended phase of name orders * store: answer the registrar's dispute end in the close test * store: read zero chain times as none in one place * store: test name dispute reads against the confirmed block * store: end no name on a chain read from before its registration * store: end a name unregistered within the confirmation depth * store: show no expiry or dispute end for an ended name * store: keep ended names readable after the down migration * store: set dispute days by payment kind, not by contract bounds * store: correct the docs of name dispute days and ended orders * store: record test registers mined at the fixture's confirmed block * store: test a landing read that finds another registration of the name * store: end an order whose landing read finds another registration * store: build the names site that signs and shows dispute days * store: name the ended phase and sweep in the worker's comments * store: correct the names docs on landings, roles, links and contracts * store: name the webapp of the dev contract run's cases * store: build the names site at the web store's final dispute days head * store: test balance days, ended orders, close answers and sweep reads * store: state the dispute days of a balance in its view * store: keep an ended order's own dispute end, and answer //close so * store: read the ended sweep's other orders past one failed read * store: read a commit block's time as a register block's is read * store: document balance days, ended orders' rows, sweep reads and gas * store: point the names doc's links at the code they name * store: word the dispute days docs with the data acted upon * store: read a reverted edit's block time as a register block's is read * store: test the ended sweep past a failed read with orders it reads * store: build the names site that reads a balance's dispute days * store: test a balance's dispute days by their values * store: test ended orders' own expiry, Try again, moves and log lines * store: keep the expiry an ended order's register set * store: state a register check's outcome as one sum * store: log each order set ended with the dispute end read * store: track the names branch of the names site * store: state each answer to an unconfirmed register and the gas of disputes * store: restore the space in the answer of //close for an ended order * store: wrap the dispute days check of a lost register receipt * store: build the names site that limits days by the recorded payment * store: state a lost receipt's taken outcome and the dispute write's gas * store: point the names doc's edited links at their code at the head * store: keep the names doc's other links on the code they named before * store: test that the ended sweep's failed read names its order * store: name the order of the ended sweep's failed read * store: word the ends and payments of the dispute docs as acted upon * store: point the names doc's edited links at the code their text names * store: dispute days by payment, and ended names On the order model of #8243: an order's dispute days are set by its payment (card 120, BTC, XMR and codes 14) and stored in dispute_days; RegisterName and registerWithCredit include them, and a reveal signed over other days is refused. A register is checked at the confirmed block only once that block reaches it, and an order whose disputeUntil(id) there is not its register's own end is set ended. An hourly sweep sets ended each registered order whose registration was ended in its dispute period, with a last-completed-pass gauge. The view gains disputeDays, registered's disputeUntil and the phase ended; fixtures are recorded. * store: the Postgres schema dump with the dispute columns * store: pin the names page that signs dispute days and shows ended names apps/simplex-domains at 081069e, the head of simplex-chat/simplex.domains#27; moved to #27's merge commit on names once it merges. * store: the contract run leaves out the page cases of an ended registration and a refused reveal, which need the mock's controls * store: pin the names page at #23's head, excluding its mock-only cases * store: the contract run leaves out #23's two Bitcoin reveal cases, which drop the signed reveal with the mock's /control/stale * store: confirmedBlock is read in Orders, and deepBlock stays in Records * store: pin the names page at #23's head 55a0b0e, which drops the two Bitcoin reveal cases the contract run left out * store: pin the names page at #23's merge commit c13bce0 on names --------- Co-authored-by: brenzi-agent <346870783+brenzi-agent@users.noreply.github.com>
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.
Replaces #23 (Alain's commits kept), with names merged.
Follows simplex-network/ens-contracts#51, merged on
simplexas ebf7698: the sponsor'sRegisterNametype hasuint256 disputeDaysbefore the nonce, and each sponsored registration has a dispute period of 14 to 120 days, during which the registration can be ended (unregister: expiry 0, the name available to anyone at once). Onnames, every registration this page signs reverts on those contracts. The names service's side is simplex-chat/simplex-chat#8278 (intonames), which addsdisputeDays,disputeUntiland the phaseendedto the registration view, anddisputeDaysto its balance; an ended order's view hasexpiresAtanddisputeUntilnull.Signing (
src/crypto/registration.ts,src/flow.ts)RegisterNamewithdisputeDaysbetweendataandnonce; the reveal signs the view'sdisputeDays.Service view (
src/api.ts,src/session.ts,src/store.ts)disputeDays, an integer of 14 to 120;disputeUntil, unix seconds or null; the phaseended.disputeDays, 14 to 120, required: the dispute days of an order paid from that balance. The page keeps them with the balance it pays with; a balance an older page kept without them is not taken: the tab's balance is none, and a checkout holding one is a leftover, as a checkout without its terms is.Payment, the way an order is paid (a method, a code or a balance alone), is the type of a record'smethod.DISPUTE_DAYSholds the days of a card (120), Bitcoin, Monero and a code (14).Paidis a method or a code, or a balance's days with the method of the rest, or none;allowedDays(paid)returns the days allowed for it: the method's or the code's, or, from a balance, the balance's days, or the rest's method's when more.Check your order (
src/views/checkout.ts,src/screens/checkout.ts,src/styles.css)disputeDays, or those of the way to pay the rest when more. The row is drawn with the review's first frame, from the balance as the tab took it. Once the balance is spent on an order of this name whose answer was lost, the row is left out: Open your order opens that order, which is signed for the balance's days.paidOf, returns how the review's order is paid, with the balance's days when a balance pays; the row's days are allowed for it.paymentOfreturns its way to pay, for the payment choices, the wait for a card order Stripe has not confirmed, Pay's label and the words of an earlier try's invoice opened instead.shortNameinsrc/dom.ts; for the card's row,shortRowNameinsrc/views/terms.ts, which returns the name as drawn with the whole name beside it).Order page (
src/views/order.ts,src/screens/order.ts,src/flow.ts,src/format.ts)disputeDaysexceeds what the order's payment allows: 120 for a card, 14 for Bitcoin, Monero or a code, and, for an order paid from a balance, thedisputeDaysof that balance, or those of the way the rest is paid when more. The payment is taken from this browser's record of the order, never from the view'sfromBalance: an order made in this browser without a balance is allowed its own method's days, whatever balance the service's view or find names. A record made here keeps its payment when the order is reopened with its code: an order of the code met by a new order of its name, a newer order of a forgotten one, Check your code, a restore. A code order is allowed a code's 14 days, whatever balance find names for it. A record of an order made in another browser, restored or adopted here, holds the payment the service reported; for an order adopted here, the order its balance came from and its creation time are read from one find, and while find fails, the order stays unadopted until the next read. For an order paid from a balance, the balance's days are the service's report, read from the view of the order it came from only when the view's days exceed the least that payment is allowed: 14 for a balance alone, or the days of the way the rest is paid. An order paid from a balance that find does not name, or that is missing from the view of the order it came from, is not signed, and its reveal is tried again. In place of a reveal over more days, the page says "This order cannot be signed" / "Its registration could be ended for {days} days, longer than the {allowed} days its payment allows. Write to chat@simplex.chat with the reference below.", without the lead to keep the page open, and announces it to screen readers. Such a reveal is signed once the service's view gives other days, as the reveal's key includes them. Your names keeps "Open to finish" for such an order; opening it shows the notice with its reference.Your names, Edit links (
src/screens/names.ts,src/views/names.ts,src/screens/search.ts,src/flow.ts)Dev backend (
dev/,README.md)orderDisputeDaysin Store.hs): 120 for a card; 14 for Bitcoin, Monero or a prepaid code; for an order paid from a balance, that balance's days, or the way to pay the rest's when more. Each balance in its view has dispute days: those of its order, or, for an order closed unpaid, those of its invoice. The mock checks each reveal'sRegisterNamesignature over the order's days and relays them to the sponsor, reads the registrar'sdisputeUntil, and ends a registration with/control/unregister/<registration>, after which the order's view hasexpiresAtanddisputeUntilnull. The seeded names and the rival registrations of/control/takeare signed with 120 days.Tests
hashTypedData, the view's and the balance's parsing, the order, names, search and checkout screens,paymentOfandallowedDays, the days by way to pay and from a balance's days, none once this name's own order took the balance, the reveal's check of a balance's days and its retry, an order made here without a balance refused over its method's days whatever balance the view and find name, also once its code reopens it, a reveal declined for its days signed once the view gives other days, a balance alone signed at 14 days without a read, Edit links and Your names for a registered order whose name the search answers available or reserved, a balance or checkout an older page kept without days, the label abbreviation.CI
At f04f3f7, the head, in the fork run https://github.com/brenzi-agent/simplex.domains/actions/runs/44883416305, whose failed jobs ran again at the same commit:
order-closed-received-offerincluded). In attempt 1 (https://github.com/brenzi-agent/simplex.domains/actions/runs/44883416305/job/136783442589) it fails onlycodes.spec.ts:326and passes Screens. No screenshot changed in this round.community.spec.ts:520(https://github.com/brenzi-agent/simplex.domains/actions/runs/44883416305/job/136783442491),community.spec.ts:406(https://github.com/brenzi-agent/simplex.domains/actions/runs/44883416305/job/136789445912),robustness.spec.ts:544(https://github.com/brenzi-agent/simplex.domains/actions/runs/44883416305/job/136795959853) andcodes.spec.ts:963(https://github.com/brenzi-agent/simplex.domains/actions/runs/44883416305/job/136799144104).app.spec.ts:124,codes-only.spec.ts:114,mockup.spec.ts:201androbustness.spec.ts:544in attempt 1 (https://github.com/brenzi-agent/simplex.domains/actions/runs/44883416305/job/136783442352), andcodes-only.spec.ts:114,codes.spec.ts:326andtaken.spec.ts:236in attempt 2 (https://github.com/brenzi-agent/simplex.domains/actions/runs/44883416305/job/136789446148).The six pushes of this round, the last of f04f3f7, started no PR build: since 5c03bd9 (#19) on
names, the pull request has a merge conflict, and GitHub's documentation of thepull_requestevent states "Workflows will not run onpull_requestactivity if the pull request has a merge conflict." (https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request). The last PR build is https://github.com/simplex-chat/simplex.domains/actions/runs/44818655877, at 83b56c6.The new tests of this round fail at 8e14819 (2c7d641 with the tests) in https://github.com/brenzi-agent/simplex.domains/actions/runs/44882861220 (https://github.com/brenzi-agent/simplex.domains/actions/runs/44882861220/job/136781742290): three of 711 unit tests, a Bitcoin and a code order whose payment a reopen replaced with the service's, and a declined reveal not signed after the view's days changed. Its browser jobs were cancelled, as their code is 2c7d641's.
At the previous head, 2c7d641, in https://github.com/brenzi-agent/simplex.domains/actions/runs/44822792953, Screens failed
order-closed-received-offer(14514 px of the laptop image, 17916 px of the phone's), which this paragraph left out then; the base 738189b fails it by the same pixels in https://github.com/brenzi-agent/simplex.domains/actions/runs/44798348583, and f04f3f7 passes it.The tests failing at f04f3f7, each with the runs in which it fails on the base 738189b, or fails and passes at the same commit:
codes-only.spec.ts:114, the mode asked twice (an xhr and a fetch): fails in both attempts; on the base in https://github.com/brenzi-agent/simplex.domains/actions/runs/44793597850, https://github.com/brenzi-agent/simplex.domains/actions/runs/44793586976, https://github.com/brenzi-agent/simplex.domains/actions/runs/44798348583 and https://github.com/brenzi-agent/simplex.domains/actions/runs/44798769049.mockup.spec.ts:201, a 12-letter heading drawn at 30 px, not 22 px, at 390 px: fails in attempt 1 and passes in attempt 2; on the base in https://github.com/brenzi-agent/simplex.domains/actions/runs/44793597850 and https://github.com/brenzi-agent/simplex.domains/actions/runs/44798348583.app.spec.ts:124, Forget's question scrolled into view in 2 frames, not more: fails in attempt 1 and passes in attempt 2.codes.spec.ts:326(:280on the base), the name-is-yours screen's boxes 13.53 px higher at 390 px once the code is shown: Chromium fails in attempt 1 and passes in attempt 2, WebKit the reverse; on the base in WebKit by the same 13.53 px in https://github.com/brenzi-agent/simplex.domains/actions/runs/44793597850.community.spec.ts:520, the community terms changed after the reveal, whose box is never shown: fails in attempt 1 and passes in attempts 2 to 5; on the base in Chromium with the same error in https://github.com/brenzi-agent/simplex.domains/actions/runs/44798769049.community.spec.ts:406and WebKittaken.spec.ts:236, an order registered without links, never shown as yours within 120 s: each fails in attempt 2 and passes in attempt 1, andcommunity.spec.ts:406in attempts 3 to 5 too; on the base in WebKit with the same error in https://github.com/brenzi-agent/simplex.domains/actions/runs/44798769049 (community.spec.ts:406) and https://github.com/brenzi-agent/simplex.domains/actions/runs/44798348583 (taken.spec.ts:236).robustness.spec.ts:544, the home's room to scroll 78 px, not 150 px, right after its load: WebKit fails in attempt 1 and passes in attempt 2; Firefox fails in attempt 3 and passes in attempts 1, 2, 4 and 5.codes.spec.ts:963(:917on the base, unchanged by this branch), a failed code order's notice of a code check's wait not shown within 15 s of the reload: fails in attempt 4 and passes in attempts 1 to 3 and 5.track.spec.ts:698and:916,robustness.spec.ts:597,codes-only.spec.ts:362, WebKit and Firefoxtaken.spec.ts:312, Chromiumcommunity.spec.ts:520, and Screensorder-closed-received-offer.Open: the merge of
names. Since 5c03bd9 (#19),namesparses the registration view'sphaseas an object (isPhaseinsrc/api.ts); the service of simplex-chat/simplex-chat#8278 encodes it as text (viewJSONinView.hs), and that pull request'sapps/simplex-domainssubmodule is pinned to this branch. This branch is kept on the base 738189b until the order of the two changes is decided.Open: the wording of the ended screens. The ended order's page says "Registration ended" / "The registration of {name} was ended because a payment for it was disputed, reversed or refunded in full.", without "Anyone can register the name now.", because the name can have been registered again since; Your names marks the row "Ended"; Edit links says "The registration was ended" / "A payment for it was disputed, reversed or refunded in full, so this page no longer edits its links."
Merge of
names(4d59775), in 8adf004The conflicts are resolved in the merge commit; Alain's commits are unchanged. Where this description and the merge differ, the merge holds:
names: the owner ruled on 21 November that a balance pays for no other order. Removed: a balance'sdisputeDays, a record'smethod"balance",Paid,allowedDays,paidOf,paymentOf, the spend tests, and the balance screens (the 22checkout-review-balance-*baselines,order-taken-balance-orderandorder-reorder-balance-in-use). A balance is{amount, refunded}.phaseis an object, as onnames;disputeDaysat the top level, an integer of 14 to 120, from the order's payment;registeredis{type, expiresAt, disputeUntil?},disputeUntilabsent when the registrar holds none, asfailed'sheldUntilis;endedis{type: "ended"}.Draft.disputeDays); a name selected for a taken order is signed over the days of the order's own payment; a later signature (revealFor) is refused when the view's days exceed those of the payment in this browser's record. The service computes the digest over its own days for that payment, so other days are refused asbad_request.paid.spec.ts) and the screenorder-registering-days-refusedmake the service ask for a new signature (/control/stale), as onnamesan order is signed when it is placed.checkout-review-*baselines arenames', and CI records them with the Dispute period row.checkout-select-*screens ofnamesgain the Dispute period row, the compact spacing and, for a name of more than 25 letters, its abbreviation in the card;names-row-endedtakesnames' "Free name with a code".Tests at 8adf004, locally:
tscpasses.test/contract,test/terms-vectors.test.ts) run on the service's recorded fixtures.tests/fixtures/store-service/rest-api): 64 passed. They read a registered order's dispute end, one registered without a dispute end, an ended order, and theRegisterNamedigests over a card's 120 and a code's 14 days.