bug(ui): a taken table name passes validation and is quoted a price, then fails on chain with a raw error
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- blockchain, typescript
- Área
- blockchain, frontend
Línea de trabajo
Start with src/utils/tableName.ts and trace the create-table form’s current validation, pricing, submission, and chain-error handling. Review block52/pokerchain#374 and its query.proto changes before implementing availability checks; done means taken, available, failed, unknown, and race outcomes are handled, with tests covering those states and a readable rejection message.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Follow-up to #562 (which is still open although its code shipped in #592 + #595). Chain side: block52/pokerchain#374.
What happens today
A player types a table name that someone already owns. The UI:
- validates it against charset and length — passes
- quotes the price — "8 characters × $0.10 = $0.80"
- accepts the submit
- the chain rejects the tx with a raw Cosmos error:
table name "friday-night" is already taken
src/utils/tableName.ts mirrors the chain's charset, length and per-character fee exactly — #595 did that part well — but it knows nothing about uniqueness. A grep across src/ for already taken, nameAvailable or isNameTaken returns nothing.
Why this is a bug and not a missing nice-to-have
#562's own acceptance criteria say:
- Submit is blocked (with reason) when balance < buy-in + name cost, or when the name violates charset/length rules.
Uniqueness is a third validation rule that the chain added after that ticket was written — #562's open question 1 proposed "start non-unique (keyed by tableId)", and the chain shipped global uniqueness instead. So the UI is enforcing two of the three rules the chain enforces, and the one it misses is the only one that cannot be worked out locally. The result is the exact failure mode that criterion exists to prevent: a confident price quote, then a raw chain error.
Blocked on the chain
The UI cannot fix this alone — there is currently no query to ask. GameNames is write-only from outside the chain: 20 RPCs in query.proto and none resolves a name. block52/pokerchain#374 proposes NameAvailable and GameByName.
This issue should be picked up after #374 lands. What can be done ahead of it is listed below.
Acceptance
Once block52/pokerchain#374 is available:
- The create-table form checks name availability (debounced, on the normalized name) and shows a clear taken/available state
- Submit is blocked with a reason when the name is taken — never a price quote for a name that cannot be bought
- Loading, error and unknown are three different states: if the availability query fails we say so and allow submit (the chain remains the authority), rather than silently claiming the name is free
- The chain's rejection is still handled gracefully as a race — two creators can pass the check and one must lose
- Tests over taken, available, query-failed, and the race
Independent of #374:
- Map the chain's
table name %q is already takenrejection to a readable message instead of a raw Cosmos error - If block52/pokerchain#375 settles as "permanent", say so at the point of payment — a name that is irrevocable should not be sold without telling the buyer
While we are here
#562 is open although every line of its code has shipped (#592, #595 merged; #593 and pokerchain#337 closed). Its six open questions were all answered unilaterally by the chain and never written back — one of them, uniqueness, contradicts the ticket. I have left a comment on #562 recording the answers; it should be closable once this issue and #374 carry the remaining work.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2
- Forks
- 5
- Merge medio
- 23 h 37 min
- PR fusionados (30 d)
- 96
Preparar el entorno
Aún no hemos revisado los archivos de configuración de este proyecto. Empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de block52/ui
-
guards: accept readonly arrays (and other array-likes) in isEmpty / hasElements / safeLengthAbiertoenhancement tech debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug: next-to-act flash stuck on the last folder when their fold closes a called all-in (fold + runout + hand_ended in one snapshot)Posiblemente ocupada @bitcoinbrisbane la tomó hace 2 días. Abiertoanimation bug game-flow sit-and-go UI Week 2
block52/ui#968 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
feat(ui): player language setting and translated player screensPosiblemente ocupada @Dzeezbtc la tomó hace 4 días. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
-
feat(ui): player notes and tags — click a seat to note a player; tag icons (fish, shark, tight, loose…) show by their pillPosiblemente ocupada @Dzeezbtc la tomó hace 6 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
architecture refactor tech debt
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
Todos los issues de block52/ui
Issues similares
-
Waiting for: Product Owner
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
getsentry/sentry-javascript#26203 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
bytedance/flowgram.ai#1235 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
devswha/herdr-web-ui#3325 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100