Skip to content

fix(lk): say why no user resolves: the default user, or several users - #1075

Merged
Topherhindman merged 1 commit into
mainfrom
fix/lk-broken-default-user-message
Oct 23, 2026
Merged

Topherhindman merged 1 commit into
mainfrom
fix/lk-broken-default-user-message

Conversation

@Topherhindman

@Topherhindman Topherhindman commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

When no user could act on the target Public API, resolveSessionUser always said "no user is signed in", even when the default user was signed in elsewhere or two users were signed in there. It now says which:

  • two or more users on that API, none of them the default: 2 users are signed in to … and none is the default user; pass --user to pick one;
  • the default user is signed in to a different API, e.g. LIVEKIT_API_URL points away from it: the default user "u_1" is signed in to <its API>, not <target> (run … to sign in there);
  • the default user isn't signed in anywhere: the default user "gone@example.com" is not signed in to <target> (run … to sign in).

"No user is signed in" is left for when that's true. An explicit --user already has its own errors and is unaffected.

Testing:

  • broken-default-user.txtar drops its known-bug skip and matches the new message.
  • two-users-same-api.txtar drops its known-bug skip and checks for the --user hint.
  • TestRequireUserSessionAPIURL gains the different-API case.
  • The rest of cmd/lk passes.

@Topherhindman
Topherhindman force-pushed the auth-tests/lk-auth-scripts branch from 81c5844 to 7d625e4 Compare October 23, 2026 17:11
@Topherhindman
Topherhindman force-pushed the fix/lk-broken-default-user-message branch from b079635 to 485185d Compare October 23, 2026 17:11
@Topherhindman
Topherhindman force-pushed the auth-tests/lk-auth-scripts branch from 7d625e4 to e07a424 Compare October 23, 2026 17:53
@Topherhindman
Topherhindman force-pushed the fix/lk-broken-default-user-message branch from 485185d to 5afd2a7 Compare October 23, 2026 17:53
Base automatically changed from auth-tests/lk-auth-scripts to main October 23, 2026 19:24
When no user could act on the target Public API, resolveSessionUser
always said "no user is signed in", even when the default user was
signed in elsewhere or two users were signed in there. It now says
which:

- two or more users on that API and none is the default: pass --user
  to pick one;
- the default user is signed in to another API: names it and that API;
- the default user isn't signed in anywhere: names it.

"No user is signed in" is left for when that's true. An explicit --user
already has its own errors and is unaffected.
@Topherhindman
Topherhindman force-pushed the fix/lk-broken-default-user-message branch from 5afd2a7 to 5f790ea Compare October 23, 2026 19:39
@Topherhindman
Topherhindman merged commit c4c0c91 into main Oct 23, 2026
25 checks passed
@Topherhindman
Topherhindman deleted the fix/lk-broken-default-user-message branch October 23, 2026 20:24
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