console fill play-app-record: read the real account chooser, match names loosely

With the copied Chrome profile, `console fill play-app-record` stopped with
"no developer account named "<name>" (play.developerAccount) on the
chooser" although the name was there: the real "Choose developer account"
rows are not plain /developers/<id> text links (nested spans, icon-font
glyphs, role=button rows with the id in a data attribute, an avatar row
whose id only its click reveals).

- readChooser: every visible clickable row in the page content (header
  and navigation left out); the name is the first visible line (icon
  fonts, images and aria-hidden parts skipped); the id comes from
  /developers/<id> in any attribute, else a data-*id attribute, else ''
  (the row is then opened through the account-switch gate and the id is
  read from the URL). "Create a new developer account" is not an account.
- matchAccount: exact spelling, then spaces and case aside (Turkish I/ı
  folded), then a unique prefix. A case pair (ACME / Acme) needs the
  exact spelling; otherwise it stops and lists both with their ids.
- One developer account: picked (a different play.developerAccount is
  said). Not found: every visible account is listed with its id.
- The resolved developerId is remembered as before.

Fixtures play-chooser-real.html (the owner's chooser shape, placeholder
names) and play-chooser-one.html; tests for exact, case pair, prefix,
single account and not found.
This commit is contained in:
CRTkafa 2026-10-12 07:12:05 +08:00
parent 81313b6fa4
commit 8b669f5c86
5 changed files with 244 additions and 32 deletions

View file

@ -97,9 +97,11 @@ It is not available over MCP.
parameter that picks a team, so storebound does not use one.
- Play Create app (`play-app-record`) is a first create: no account has the package yet, so storebound does not
search, it picks: `play.developerId` (or the workspace account's id, or the remembered one), else the only
account the login sees, else the chooser entry named exactly `play.developerAccount` (case aside, e.g. an
organisation account). Several accounts and none of these set, or a name that matches none or two: it stops
and lists the accounts. Ask the owner which one; never guess. The choice is remembered under
account the login sees (picked even when `play.developerAccount` names another; the log says so), else the
chooser entry named `play.developerAccount`: the exact spelling first, then spaces and case aside, then a unique
prefix ("ACME" and "Acme" are two accounts: only the exact spelling picks one). Several accounts and none of
these set, or a name that matches none or two: it stops and lists every account with its developer id. Ask the
owner which one; never guess. The choice is remembered under
`play.packageName`.
- Switching only changes what the console shows. Each switch click must be an account name storebound just read
from the chooser or the menu, and never Sign Out or a deny-listed name (a studio called "Next Games" is left