Skip to content

perf(mobile): stop rebuilding Home's channel list when a route covers it - #9459

Merged
brow merged 3 commits into
mainfrom
tomb/mobile-home-route-rebuild
Nov 13, 2026
Merged

brow merged 3 commits into
mainfrom
tomb/mobile-home-route-rebuild

Conversation

@brow

@brow brow commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Opening any route or sheet above Home (search, a message's action menu, a profile sheet, Activity, Settings) rebuilt Home's whole channel list twice: once when the route started covering Home and once when it finished. On a phone the open channel sits inside Home's conversation pane, so a sheet over a channel (long-press menu, profile) did the same. HomePage and ChannelsPage read ModalRoute.of(context) in their own builds, which depends on every part of the route's state (whether it's current, whether it's offstage, and so on). ChannelsPage also depended on the whole DuoToolbarScope, whose active flag flips whenever a route covers the pane, through frostedAppBarHeight. Every channel row and the Solo section depended on ConversationPaneScope for the selected channel, and that scope notified all of them when its route-dependent active flag flipped. Each of those rebuilt a fresh channel inventory, including Solo rows that had scrolled away, which resubscribed their typing feeds for 30 seconds.

Now:

  • Home's native controls (Activity bell, tab bar, Duo rail) read the route in a small _NativeControlsGate leaf, so only they rebuild when Home is covered.
  • ChannelsPage mirrors route currency into its header suppression notifier from a _RouteCurrencySync leaf above the header, so the header still switches in the same frame. The two "wait until this route is current again" loops read the same notifier.
  • DuoToolbarScope is an InheritedModel with a strip-only lookup, maybeStripOf. The frosted header's height and ChannelsPage use it, so active changes no longer reach them. Every other reader keeps maybeOf and its current behavior.
  • ConversationPaneScope's active flag lives in its own private inherited widget, read only by isActiveOf. Rows that only need the controller no longer rebuild when it flips.
  • Opening a channel looks up the conversation pane instead of depending on it.

Validation

New test: opening and closing a sheet above Home rebuilds neither HomePage, ChannelsPage nor any channel row. It fails without this change.

Full mobile test suite, flutter analyze and the file-size check pass.

On the iPhone 12 mini (profile build, Builderlab):

Same scripted run on main and on this branch (search opened and closed 3 times, then a message's long-press menu and a profile sheet over an open channel):

main this branch
Widget builds per search open 126 to 350 56 to 60
Build time per search open 79 to 90 ms 29 to 41 ms
Build time, long-press menu open 64 ms 17 ms
Typing subscriptions reopened by the sheets 9 (about 80 KB of messages downloaded) 0

The menu, profile sheet, channel header and Home's tab bar and Activity button behaved the same in both runs.

Regressions

None expected. The native controls and header switch from the same route state as before, in the same frame. A DuoToolbarScope strip change still reaches the header and the channel list.

Home and its channel list depended on their route's whole state, so any
route or sheet opening above Home (search, a message menu, a profile)
rebuilt the full channel inventory at the start and end of the
transition. On a phone the open channel sits inside Home's conversation
pane, so a sheet over a channel did the same, and the rebuilt Solo rows
resubscribed their typing feeds.

The route-dependent native controls and header suppression now read the
route in small leaf widgets, the frosted header reads only the pane's
strip, the conversation pane's route-dependent active flag has its own
inherited widget, and opening a channel looks up the pane instead of
depending on it.

Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@buzz.block.builderlab.xyz>
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-13T20:33:57.984107Z 4bf3b76 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. Swish!

Reviewed commit: 8feaddfbe9

ℹ️ 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".

square-tomb and others added 2 commits November 13, 2026 02:46
Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@localhost>
Signed-off-by: Tom Brow <[email protected]>
Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@localhost>
Signed-off-by: Tom Brow <[email protected]>
@brow

brow commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 4bf3b761f7

ℹ️ 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 20:32
@brow
brow requested a review from a team as a code owner November 13, 2026 20:32
@brow
brow deployed to codex-review November 13, 2026 20:32 — 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: 59ae028a360242d43ffbfdafca8a76eda00484d9...4bf3b761f72651c85a9028820b0af577666090c1
  • 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 regressions found in the authorized PR range after tracing the changed navigation, route visibility, and pane state paths.

Findings

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

Notes

  • Review was limited to read-only source and history inspection; builds and tests were not executed, as instructed.

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 the 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 5f1cd67 into main Nov 13, 2026
60 checks passed
@brow
brow deleted the tomb/mobile-home-route-rebuild branch November 13, 2026 22:40
wpfleger96 added a commit that referenced this pull request Nov 14, 2026
* origin/main: (24 commits)
  docs(readme): point desktop readers at block/buzz-app and describe where each client lives (#9493)
  test(cli,db): freeze the assertion test clock and give pool release tests a test-lane acquire budget (#9442)
  test(desktop): unmount every TerminalSubstrate tree before the window closes (#9440)
  fix(mobile): drop the iOS share extension from the build until it's signed (#9489)
  chore(release): release Buzz Desktop version 0.5.30 (#9491)
  perf(mobile): parse each event's thread reference once (#9460)
  perf(mobile): load only the directory when search opens (#9466)
  perf(mobile): stop rebuilding Home's channel list when a route covers it (#9459)
  perf(mobile): ask typing subscriptions only for the typing window (#9454)
  perf(mobile): skip avatar URL parsing for non-HTTP URLs (#9448)
  perf(mobile): download the identity archive list only when it changed (#9445)
  perf(mobile): don't treat a Control Center pull as a resume (#9443)
  fix(mobile): keep a superseded roster read out of the offline snapshot (#9452)
  perf(mobile): read channel bot roles from the member list (#9451)
  perf(mobile): read Activity once per reconnect (#9455)
  fix(mobile): offer role controls for agents (#9475)
  perf(mobile): stop rebuilding the native nav bar on every scrolled frame (#9458)
  perf(mobile): keep verified-name batches open as people are added (#9450)
  perf(mobile): read only changed custom emoji sets on reconnect (#9446)
  perf(mobile): keep latest-message times on a directory load (#9457)
  ...

Signed-off-by: Will Pfleger <[email protected]>

# Conflicts:
#	crates/buzz-cli/src/desktop_provider.rs
bostonaholic added a commit that referenced this pull request Nov 14, 2026
…eaction-recipients

* origin/main: (111 commits)
  perf(acp): avoid repeated observer batch serialization (#9483)
  docs(readme): point desktop readers at block/buzz-app and describe where each client lives (#9493)
  test(cli,db): freeze the assertion test clock and give pool release tests a test-lane acquire budget (#9442)
  test(desktop): unmount every TerminalSubstrate tree before the window closes (#9440)
  fix(mobile): drop the iOS share extension from the build until it's signed (#9489)
  chore(release): release Buzz Desktop version 0.5.30 (#9491)
  perf(mobile): parse each event's thread reference once (#9460)
  perf(mobile): load only the directory when search opens (#9466)
  perf(mobile): stop rebuilding Home's channel list when a route covers it (#9459)
  perf(mobile): ask typing subscriptions only for the typing window (#9454)
  perf(mobile): skip avatar URL parsing for non-HTTP URLs (#9448)
  perf(mobile): download the identity archive list only when it changed (#9445)
  perf(mobile): don't treat a Control Center pull as a resume (#9443)
  fix(mobile): keep a superseded roster read out of the offline snapshot (#9452)
  perf(mobile): read channel bot roles from the member list (#9451)
  perf(mobile): read Activity once per reconnect (#9455)
  fix(mobile): offer role controls for agents (#9475)
  perf(mobile): stop rebuilding the native nav bar on every scrolled frame (#9458)
  perf(mobile): keep verified-name batches open as people are added (#9450)
  perf(mobile): read only changed custom emoji sets on reconnect (#9446)
  ...

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

This branch was successfully deployed

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