Skip to content

[BUG] CLI change-username flow: doesn't sync from profile, hangs silently, wrong default #263

@ottovlotto

Description

@ottovlotto

Severity: P2
Reported by: DevEx Audit External
Source: DevEx Audit (External), 3 June 2026

Symptom

Change username
not critical but lies on the happy path. Right after logging in CLI suggests to set a username - and the default option is Yes.
Which is weird - it could have synced a username from the user's profile.
Also the CLI process is still active and doesn't explain what it is waiting for - could have exited with 1.
Cosmetic: account in use playground.dot/0 - wrong username

Three related observations about the post-login username flow:

  1. CLI suggests setting a username right after login, default = Yes. But the user already has a username on their playground.dot profile — the CLI should sync from that, not prompt.
  2. If the user dismisses or hesitates, the CLI process stays active without explaining what it's waiting for. It should either exit non-zero with a clear message or progress to a sensible default.
  3. The cosmetic display shows playground.dot/0 (numeric placeholder) as the "account in use" — wrong username.

Reproduction

DOT_DEPLOY_VERBOSE=1 DOT_MEMORY_TRACE=1 pg login 2> >(tee dot.log >&2)

with an existing playground profile (set up via Polkadot App).

Observe:

  • Prompt to set username (default Yes), ignoring profile username.
  • CLI hangs if user doesn't immediately respond.
  • "account in use playground.dot/0" shown instead of real username.

Recommended fix / next steps

  • Sync username from the user's profile / Polkadot identity at login. Only prompt if no username is available.
  • If waiting for input, make the prompt explicit ("Press Enter to keep [profile-username], or type a new one") and time out / exit cleanly if no input.
  • Fix the display: read the actual username, don't fall back to playground.dot/0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions