Skip to content

webapp: a name is selected for a taken order in the ordinary search and checkout - #25

Merged
epoberezkin merged 18 commits into
simplex-chat:namesfrom
evgeny-simplex:ep/names-page-select
Nov 22, 2026
Merged

epoberezkin merged 18 commits into
simplex-chat:namesfrom
evgeny-simplex:ep/names-page-select

Conversation

@evgeny-simplex

Copy link
Copy Markdown
Contributor

An order has two parts, set independently: the name, selected or not, and the payment or the name code. When the service finds the selected name taken, it resets the order to "name not selected" and keeps its payment or code. The person then selects a name for the same order, with a new order's checks, without a window or a limit. Service side: simplex-chat/simplex-chat#8243.

sequenceDiagram
  actor P as Person
  participant O as Order page
  participant S as Search
  participant C as Checkout
  participant V as Service
  V-->>O: phase taken
  P->>O: Choose another name
  O->>S: /#/?name=&order=<registration>
  P->>S: a name, Register
  S->>C: Links, then Check your order, the order's name code saved already
  P->>C: Register with your payment / Register with your code
  C->>V: POST /api/registration/:id/name
  V-->>C: view, phase queued, or a new order's refusal
  C->>O: the order's page
Loading

Page

  • The taken screen's "Choose another name" opens the ordinary search with order=<registration>, which replaces retarget=<registration>.
  • The search shows a code order's names as Free for the order's years, and answers a name shorter than the order's code at once, as the codes-only search does. A paid order's names show their price.
  • Register leads to the ordinary checkout. Check your order shows no payment choices and no code field; its button reads "Register with your code" or "Register with your payment".
  • The selection sends POST /api/registration/:id/name; a refusal shows the checkout's screen for a new order's refusal. A selection whose answer was lost, or one made elsewhere, opens the order.
  • Removed: the move's opening line, the terms box and refusal notes in the search, the move limit note, the window, and the screen of a code order after the window.
  • api: selectName and selectable replace retarget and movable; moves, move_limit, price_too_high and the taken phase's heldUntil are gone.

Mock

  • POST /api/registration/:id/name: phase taken only; order_exists before the timestamp; a paid order at its own price, else catalog_changed {price}; the balance spent; a code order's code reserved again; the order's month from the selection. No limit, no window, no moves.

Tests

  • Unit: the search state, the checkout's code entry for a selection, selectable, selectName, and the contract tests against the reset's fixtures (select-*, registration-taken-code).
  • E2E: a paid and a code order taken, then a name selected; a name of another price refused; a code refusal; a community name's terms; a name taken meanwhile.
  • Screens: the move's screens removed; home-select-* and checkout-select-* added, their baselines from CI.

Contract tests against the fixtures of simplex-chat at aa7574847: 63 passed (store 47, vectors 5, terms vectors 11).

@epoberezkin
epoberezkin marked this pull request as ready for review November 22, 2026 09:13
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.

2 participants