Skip to content

fix(mobile): keep publishing presence while the app is open - #9441

Merged
brow merged 1 commit into
mainfrom
tomb/mobile-presence-heartbeat
Nov 13, 2026
Merged

brow merged 1 commit into
mainfrom
tomb/mobile-presence-heartbeat

Conversation

@brow

@brow brow commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Mobile stopped publishing presence on November 1. The heartbeat in PresenceNotifier only runs while something holds presenceProvider, and its last always-mounted watcher was the app-bar ProfileAvatar, deleted as dead code in #8880 dead code cleanup. Since then the app sends "online" only while Settings is open, stops when Settings closes, and never sends "away" when backgrounded. Other people see a phone user as offline (or stuck on whatever Settings last sent).

This keeps the provider alive from the signed-in shell, next to the other app-wide ref.listen keep-alives in app.dart.

Found during a combined performance and network hunt on a physical iPhone SE running main (bf3bdd0 GIF timing): a 5-minute foreground idle window on the channel list sent no websocket events at all.

Regressions

The app goes back to its pre-#8880 traffic: one small signed kind:20001 event per minute while foregrounded, plus one on each lifecycle change. The heartbeat code is unchanged. ref.listen doesn't rebuild the App when presence changes.

Validation

  • Added tests: presence_shell_test.dart pumps the signed-in App without opening Settings and expects an "online" presence publish. It fails without the app.dart change (expected ['online'], got []) and passes with it.
  • Full mobile suite passes (4785 tests).
  • Not yet done: device confirmation that heartbeats resume and "away" goes out on backgrounding.

The presence heartbeat only runs while something watches presenceProvider.
Its last always-mounted watcher was the app-bar avatar removed in #8880, so
since then the app sends "online" only while Settings is open and never
sends "away" on backgrounding. Keep the provider alive from the signed-in
shell, like the other app-wide listeners.

Signed-off-by: Tom Brow <[email protected]>
@brow

brow commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T03:44:05.687257Z 51cefc0 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 51cefc0ca6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@brow
brow marked this pull request as ready for review November 13, 2026 03:42
@brow
brow requested a review from a team as a code owner November 13, 2026 03:42
@brow
brow enabled auto-merge (squash) November 13, 2026 03:43
@brow
brow deployed to codex-review November 13, 2026 03:43 — 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 13, 2026
@github-actions

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: 3c0adc188206bab8551a7af53dcf6bd54c9d0d09...51cefc0ca6a820ee29775e8b371ea1f65bf90e02
  • Model: gpt-6.1-sol

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


Review Summary

Overall Risk: NONE

No concrete findings in the authorized PR range. Traced presence initialization, lifecycle handling, community switching, signing, and relay validation.

Findings

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

Notes

  • Review was limited to read-only inspection. Builds and tests were not run, as requested.

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

@kazemek21 kazemek21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kyle reviewed this PR and the Nexus review-tracker notes and approved with no comments.

Posted by Codex (gpt-6.1-sol) on behalf of kylez

@brow
brow merged commit 3d3f9cf into main Nov 13, 2026
60 checks passed
@brow
brow deleted the tomb/mobile-presence-heartbeat branch November 13, 2026 06:58
bostonaholic added a commit that referenced this pull request Nov 13, 2026
Co-authored-by: mboston.Engineer <932d3b6ebea6cc83e091551ae46d1c7e7f8f7d0fa8e9cef5e6facc8544af413b@buzz.block.builderlab.xyz>

* origin/main:
  fix(mobile): require Builderlab consent for existing identities (#8823)
  feat(mobile): use HTTP/2 on iOS through app-wide URLSessions (#8897)
  fix(relay): publish a git push only when refs changed; check the protocol by refinement (#9425)
  fix(mobile): show shared chats under Solo (#9348)
  chore(release): release Buzz Desktop version 0.5.29 (#9456)
  feat(mobile): render messages with gpt_markdown 1.3.4 plusparse (#8945)
  fix(acp): bound observer retention by bytes (#7987) (#9436)
  Tune release codegen for faster/smaller binaries (#9434)
  feat(desktop): add dismissible banner pointing to the new buzz app (#9379)
  fix(mobile): keep publishing presence while the app is open (#9441)
  feat(mobile): share into Buzz from the iOS share sheet (#9433)
  fix(mobile): qualify every namesake mention and keep authored mention casing (#9325)
  fix(mobile): match browser GIF timing in the iOS reaction sheet (#9437)
  fix(mobile): play short-delay animation frames at browser speed (#9432)
  buzz-search: read profile names without the profile_name_fields function (#9397)
  buzz-db: build the community deletion lock key in Rust (#9396)
  fix(cli): pair for the active community, skip stopped desktops, accept a bare relay host (#9417)
  test(mobile): run push tests without a gateway dart-define (#9423)
  fix(mobile): never pop Home when archiving from channel settings (#9387)
  perf(acp): reduce observer CPU and lock overhead (#9381)

Signed-off-by: Matthew Boston <[email protected]>
bostonaholic added a commit that referenced this pull request Nov 13, 2026
…count-backfill

Co-authored-by: mboston.Engineer <932d3b6ebea6cc83e091551ae46d1c7e7f8f7d0fa8e9cef5e6facc8544af413b@buzz.block.builderlab.xyz>

* bostonaholic--agent-reply-count:
  fix(mobile): require Builderlab consent for existing identities (#8823)
  feat(mobile): use HTTP/2 on iOS through app-wide URLSessions (#8897)
  fix(relay): publish a git push only when refs changed; check the protocol by refinement (#9425)
  fix(mobile): show shared chats under Solo (#9348)
  chore(release): release Buzz Desktop version 0.5.29 (#9456)
  feat(mobile): render messages with gpt_markdown 1.3.4 plusparse (#8945)
  fix(acp): bound observer retention by bytes (#7987) (#9436)
  Tune release codegen for faster/smaller binaries (#9434)
  feat(desktop): add dismissible banner pointing to the new buzz app (#9379)
  fix(mobile): keep publishing presence while the app is open (#9441)
  feat(mobile): share into Buzz from the iOS share sheet (#9433)
  fix(mobile): qualify every namesake mention and keep authored mention casing (#9325)
  fix(mobile): match browser GIF timing in the iOS reaction sheet (#9437)
  fix(mobile): play short-delay animation frames at browser speed (#9432)
  buzz-search: read profile names without the profile_name_fields function (#9397)
  buzz-db: build the community deletion lock key in Rust (#9396)
  fix(cli): pair for the active community, skip stopped desktops, accept a bare relay host (#9417)
  test(mobile): run push tests without a gateway dart-define (#9423)
  fix(mobile): never pop Home when archiving from channel settings (#9387)
  perf(acp): reduce observer CPU and lock overhead (#9381)

Signed-off-by: Matthew Boston <[email protected]>

This branch was successfully deployed

1 active deployment
codex-review — 51cefc0c Deployed Nov 13, 2026 by brow via Run Codex Security Review #14819
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