Skip to content

fix(admin): address PM playtest UX feedback (6 items) - #6

Merged
anggorodewanto merged 1 commit into
mainfrom
fix/admin-pm-feedback-ux
Jun 4, 2026
Merged

anggorodewanto merged 1 commit into
mainfrom
fix/admin-pm-feedback-ux

Conversation

@anggorodewanto

Copy link
Copy Markdown
Collaborator

Fixes 6 admin UX issues from the PM playtest (item 7 — file naming — is ADT-engineer scope, excluded). Frontend-only; backend binary unchanged.

# Fix
1 scrollToFirstError on create+edit Form — validation jumps to first bad field instead of leaving it off-screen
2 Duplicate-slug create shows "Slug is already in-use, please use another". Root cause: error surface read response.data.errorMessage (a field grpc-gateway never emits) → every error toast hit a generic fallback. New api-error helpers match gRPC code 6 / HTTP 409.
3 ADT radio card no longer stretches at 1440px (scoped .pth-radio-card CSS)
4 Player sign-up URL hidden on detail page while DRAFT (header link + share input)
5 "Link ADT Namespace" button beside the linking-required badge, reusing StartADTLink
6 Distribution tab derives ADT "Connected" from live linkage (not stale adtNamespace) + loading guard + re-link warning

Verification

  • npm test — 111/111 (24 new tests)
  • npm run lint — 0 errors
  • npm run build (tsc -b + vite) — ok
  • make smoke — PASS (backend unchanged)

Risk

  • Item 3 CSS selector confirmed against antd v6 DOM but pixel result unverified at exactly 1440px (no standalone harness; component only mounts in the AGS Admin Portal). Recommend a quick eyeball post-deploy.

🤖 Generated with Claude Code

Product-manager playtest surfaced 6 admin UX issues. All fixes are
frontend-only (no backend/proto/RPC change); backend binary unchanged.

1. Create form now scrolls to the first invalid field on submit
   (scrollToFirstError on create + edit Form) — errors were rendered
   off-screen and invisible when the Create button sat below the fold.
2. Duplicate-slug create now shows "Slug is already in-use, please use
   another" instead of a generic failure. Root cause: the error surface
   read response.data.errorMessage, a field grpc-gateway never emits (the
   body is {code,message,details}) — so EVERY error toast silently fell
   back to a generic string. Added robust api-error helpers
   (apiErrorMessage / apiErrorCode / isSlugConflict, matching gRPC code 6
   / HTTP 409, never the message text).
3. ADT distribution radio card no longer stretches at 1440px — scoped
   .pth-radio-card CSS keeps the indicator fixed and lets the label flex.
4. Player sign-up URL is hidden on the detail page while a playtest is
   DRAFT (header link + share-link input), with a note explaining it
   appears once published — opening a draft URL showed "not available".
5. "Link ADT Namespace" button added beside the ADT-linking-required
   badge on the create form, reusing the existing StartADTLink flow.
6. Distribution tab now derives ADT "Connected" from the live linkage
   (GetAdtLinkages) instead of the stale playtest.adtNamespace, adds a
   loading guard, and warns the admin to re-link when the linkage is gone
   ("Download link for the players cannot be generated unless they
   re-link the ADT again").

Verified: admin npm test 111/111, eslint 0 errors, tsc+vite build,
backend make smoke PASS. Item 3 pixel result still wants a 1440px eyeball.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@anggorodewanto
anggorodewanto merged commit fd3a282 into main Jun 4, 2026
6 checks passed
@anggorodewanto
anggorodewanto deleted the fix/admin-pm-feedback-ux branch June 4, 2026 01:55
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.

1 participant