Skip to content

fix(mobile): stop asking for an API token when the channel list is refused - #9327

Draft
loganj wants to merge 3 commits into
mainfrom
larry/mobile-channels-signin-badge
Draft

loganj wants to merge 3 commits into
mainfrom
larry/mobile-channels-signin-badge

Conversation

@loganj

@loganj loganj commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • When the relay refused the channel-list request (HTTP 401), the mobile app said "Not authorized. Check your API token." The app has no API token, so the advice could not be followed.
  • The message now reads "This community couldn't authenticate the request. Try again." Retry stays: for org and hosted communities the refused token is dropped and Retry gets a fresh one, and a self-hosted relay that refuses the key has no other recovery on this screen.
  • One exception: when the organization sign-in has ended, the app sends reads unsigned and Retry can never succeed, while the Home banner already offers a working Sign in. In that state the channel list says "Use the sign-in prompt below to reconnect." and hides Retry.

Details

  • _ErrorView (mobile/lib/features/channels/channels_page/badges.dart) only appears on a cold load with no saved channel list. It replaces the list, so Retry is the only control on that screen.
  • It reuses the shared organizationSignInPromptVisible predicate, the same one the Home banner and the community switcher use, so the error view and the banner agree on who owns the action.
  • The 403 "Access denied." message is unchanged.
  • Widget tests cover the new 401 copy with Retry, and the signed-out organization state with no Retry.

🤖 Generated with Claude Code

loganj and others added 3 commits November 10, 2026 13:09
…fused

A relay 401 on the channel list said "Not authorized. Check your API
token." The mobile app has no API token, so the advice could not be
followed. It now says the community did not accept the sign-in, and
keeps Retry: for a protected community the refused token is dropped
and Retry gets a fresh one, and the shell banner takes over once the
sign-in has really ended. A self-hosted relay that refuses the key
also needs Retry, since no banner covers it.

Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Logan Johnson <loganj@squareup.com>
The error view sees only the status code, and a 401 can come from a
refused sign-in, a self-hosted relay that refused the key, or a proxy.
Say that the community could not authenticate the request instead of
claiming the sign-in was refused.

Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Logan Johnson <loganj@squareup.com>
… sign-in ends

When the organization sign-in has ended, the app sends channel reads
unsigned, so the channel list's Retry can never succeed, while the Home
banner already shows "It looks like you're signed out." with a working
Sign in button. The error view now points to that prompt and hides
Retry whenever the organization sign-in prompt is visible for the
current community. Every other failure keeps Retry.

Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Logan Johnson <loganj@squareup.com>

This branch has not been deployed

No deployments
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