Skip to content

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

Merged
brow merged 4 commits into
mainfrom
larry/mobile-channels-signin-badge
Nov 11, 2026
Merged

brow merged 4 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.

Screenshots

Android emulator, debug build, against a local test relay that refuses the channel-list read with HTTP 401 (no saved channel list, so the error view shows):

Channel list error: This community couldn't authenticate the request. Try again. With a Retry button

🤖 Generated with Claude Code

@loganj
loganj marked this pull request as ready for review November 11, 2026 18:55
@loganj
loganj requested a review from a team as a code owner November 11, 2026 18:55
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

🔐 Codex Security Review

Note: This is an automated, security-focused review generated by Codex.
Use it as a supplement to human review; false positives are possible.

Scope

  • Exact PR diff: ef57fec4d26cee1939a329acd7c8c2b079b56576...5f2dea0575f28b7ca1889d327b80717b5f8bef4b
  • Model: gpt-6.1-sol

💡 Click "edited" above to see earlier reviews for this PR.


Review Summary

Overall Risk: NONE

No concrete security, correctness, or reliability findings in the authorized PR range. The error view uses the banner's existing community-scoped visibility predicate, and successful sign-in reconnects the relay and refreshes channels.

Findings

No concrete security, correctness, or reliability findings were identified.

Notes

  • Review used read-only source inspection. Builds and tests were not run, as requested.

Generated by Codex Security Review |
Requested by: @loganj |
Workflow run

kazemek21

This comment was marked as resolved.

loganj and others added 4 commits November 11, 2026 16:45
…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 <[email protected]>
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 <[email protected]>
… 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 <[email protected]>
The ended-sign-in copy and the hidden Retry now apply only when the relay
refuses the read with a 401. Organization relays can serve a read without
the organization sign-in, so a timeout or server error keeps its message and
Retry, as before this PR. The copy points up: the sign-in prompt sits at the
top of Home.

From #9358.

Co-authored-by: Tom Brow <[email protected]>
Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Logan Johnson <[email protected]>
@loganj
loganj force-pushed the larry/mobile-channels-signin-badge branch from aab8360 to 5f2dea0 Compare November 11, 2026 21:49
@github-actions github-actions Bot removed the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 11, 2026
@loganj
loganj deployed to codex-review November 11, 2026 21:49 — with GitHub Actions Active
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 11, 2026
@brow
brow merged commit 8f80b17 into main Nov 11, 2026
53 checks passed
@brow
brow deleted the larry/mobile-channels-signin-badge branch November 11, 2026 22:58
ravarora2 pushed a commit that referenced this pull request Nov 12, 2026
…small

* origin/main:
  fix(db): seek replaceable heads by channel (#9147)
  buzz-db: check events created_at floor in app writers (phase 1) (#8325)
  fix(mobile): keep a thread tail behind the keyboard unread (#9295)
  fix(mobile): restore header cues and per-channel identity check for #9369 (#9370)
  fix(relay): treat empty filter sets as match-nothing in SQL (#9342)
  buzz-cli: add --before and --before-id to messages search (#9382)
  feat(relay): agents cannot write in DMs except with their owner (#9371)
  fix(relay): bound each cross-node delivery attempt (#9305)
  feat(mobile): add iOS Home Screen shortcuts for New chat, New DM and the Bestie (#9360)
  perf(mobile): stop downloading whole videos for posterless stills (#9367)
  Enforce single-community relay mode (#9149)
  fix(relay): match #a tag filters in SQL before LIMIT (#9339)
  Add participant avatars to mobile conversation headers (#9369)
  fix(mobile): stop asking for an API token when the channel list is refused (#9327)
  chore(release): release Buzz Relay version 0.3.0 (#9362)
  Fix gallery video selection, thumbnails, and swipe dismissal (#9356)

Signed-off-by: dessert <7d616e7e143e5d408159614dccff1371350a1c1bd36c8de838a45ece5aca0aca@buzz.block.builderlab.xyz>

This branch was successfully deployed

1 active deployment
codex-review — 5f2dea05 Deployed Nov 11, 2026 by loganj via Run Codex Security Review #14462
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex-security-review-current The posted Codex security review matches its recorded range.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants