Skip to content

Home: read every page of the Cloud inbox (Mac, daemon, classic iOS) - #27752

Merged
cmux-bot[bot] merged 15 commits into
feat-cmux-nextfrom
feat-cmux-next-home-chiefs-pagination
Oct 30, 2026
Merged

cmux-bot[bot] merged 15 commits into
feat-cmux-nextfrom
feat-cmux-next-home-chiefs-pagination

Conversation

@azooz2003-bit

@azooz2003-bit azooz2003-bit commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A user reported that Home doesn't paginate its Chiefs properly. Findings:

  • Confirmed: the Cloud inbox was read only one page deep. UserDO's inbox.list pages by 200 with a keyset next_cursor. The daemon's cloud-inbox-list (which had no cursor field), home-inbox's Cloud rows, the Mac's CloudHomeSource and classic iOS's WireHomeSource all took page 1 and stopped. A Cloud Chief or conversation past the newest 200 never showed in Home.
  • Refuted: cmux-next iOS Home's list logic. The phone reads the Mac's whole home-inbox list in one reply (MacHomeFeed), so it has no paging to get wrong. In a live run with 25 Chiefs it listed each one once and in order, and 5 Chiefs made while Home sat at the end showed up in 0.5 s.
  • Found, not fixed here: about 60 Chiefs exhaust the Mac's Chief daemon. That daemon accepts at most 64 connections (MAX_SERVER_CONNECTIONS), and each Chief's host holds more. With 60 Chiefs the phone's chief channel was refused ("Couldn't read this Mac's Home: daemon channel closed"), and so was cmux chief new. This needs a separate daemon-side change.

Fix

  • cloud-inbox-list {limit?, include_archived?, cursor?} reads one page per call and returns the owner's next_cursor, so every reply is one bounded read.
  • CloudHomeSource pages with the cursor (at most 50 pages). An entry listed twice keeps its first copy, and the first page's revision is used, so touched events after it still win. An older daemon's single page is still the list.
  • home-inbox's Cloud rows read every page in the daemon, within 10 s after the first page. If a later page fails, the pages already read are kept.
  • WireHomeSource (classic iOS) follows next_cursor the same way.
  • Spec, sdk-schema.json, the regenerated bindings and api-compat.surface.json include cursor.
  • New live rig journey cmux-next-ios/verify/home_chiefs_paging_live.py: N Chiefs, scroll Home end to end, then M more made live.

Changelog

  • Fixed: Home on the Mac lists every Cloud conversation and Chief, not only the newest 200.

Testing

Red/green results (focused commands):

  • cargo test --locked -p cmux-tui --test ws_cloud_conversations home_inbox (rbx): on base 0da5bc3 plus the new test, it fails with 200 rows instead of 450. On 4039a59 it passes (3/3).
  • cargo test --locked -p cmux-tui-core --lib inbox_list (rbx): the first version's tests were 3/3 red on the base and green on the fix. The final tests are 4/4 green on 4039a59.
  • package-test-lane.sh suite Packages/Shared/CmuxHomeCore WireHomeSourceTests (cmux-ci): theInboxReadsEveryPage fails on 32b928c (only the first page, cursors [nil]) and passes on 78e1e26.
  • package-test-lane.sh suite Packages/macOS/CmuxNext CloudInboxPagingTests,CloudPinMuteTests,CloudAttachmentTests (cmux-ci step 3282f12652eb): passes at scratch 262168f, which is this head plus fix(cmux-next): await FolderChanges.events() in the machine consent watch (base Release compile red) #27722.

Observed / Not run

No capture: the fix is a data read past 200 Cloud inbox entries, and no Home layout changes. The live phone stills are in the report.

🤖 Generated with Claude Code

azooz2003-bit and others added 2 commits October 29, 2026 17:22
cloud-inbox-list with no limit reads every inbox.list page through
next_cursor; with a limit or cursor it reads one page and returns
next_cursor. WireHomeSource (classic iOS) follows next_cursor too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The owner pages inbox.list by 200 (keyset, next_cursor). The daemon's
cloud-inbox-list, home-inbox's Cloud rows, the Mac's CloudHomeSource and
classic iOS's WireHomeSource read only the first page, so a Chief or
conversation past the newest 200 never showed in Home, and the Mac
dropped one it knew from the list on every refresh.

- cloud-inbox-list: optional cursor; returns next_cursor. With neither
  limit nor cursor it follows next_cursor for every page (at most 50 of
  200), keeps an entry listed twice once, and answers the first page's
  revision. home-inbox's Cloud rows use it.
- CloudHomeSource asks for the whole inbox (no limit); an older daemon
  answers its newest 200 as before.
- WireHomeSource follows next_cursor (at most 50 pages).
- Spec, SDK schema, generated bindings and the api-compat surface name
  the cursor field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of #27752: a whole-inbox cloud-inbox-list could run 50 reads under
the app's one 30 s request timeout and hold a cloud request slot after
the app gave up.

- cloud-inbox-list is one page per call again (limit default 200), now
  with cursor in and the owner's next_cursor out.
- CloudHomeSource pages itself: up to 50 one-page calls, first copy of an
  entry listed twice, the first page's revision (touched events after it
  win). An older daemon's one page is the list.
- home-inbox's Cloud rows read every page in the daemon within a 10 s
  budget after the first page; a later page's failure keeps the pages
  read.
- The integration FakeCloud pages inbox.list as UserDO does; a 450-entry
  inbox lists every row once through home-inbox.
- Spec, SDK constraint text, surface order; bindings regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wn; add the live many-Chiefs rig journey

configure() starts a background inbox read on the source's daemon, which
also logged cursors. The pages now come from a second fake.

verify/home_chiefs_paging_live.py: N Chiefs made on the rig Mac; the
phone's Home scrolled end to end lists each once, in order, and M more
made while it sits at the end show without a touch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@azooz2003-bit azooz2003-bit changed the title Home: read the whole Cloud inbox, every page (Mac and classic iOS) Home: read every page of the Cloud inbox (Mac, daemon, classic iOS) Oct 30, 2026
@azooz2003-bit

Copy link
Copy Markdown
Collaborator Author

Correctness review (subagent), on 78e1e26, and how each finding was resolved:

  1. Medium: up to 50 reads ran under the app's single 30 s request timeout. Fixed in 4039a59. cloud-inbox-list is one page per call, and CloudHomeSource pages with the cursor.
  2. Medium: an abandoned read kept its cloud request slot. Fixed in 4039a59, for the same reason: each call is one bounded read. home-inbox's in-daemon read now has a 10 s budget.
  3. Low: one failed page dropped all the pages before it. Fixed: a later page's failure keeps the pages already read and names where the read stopped. Only a first-page failure fails the read.
  4. Low: an entry can move to page 1 while later pages are read. Covered on the Mac by touched events newer than the first page's revision. The daemon's home-inbox gets it on the next refresh, the same as before.
  5. Low: the first copy wins over a newer duplicate. Kept, because event replay brings the newer state (see 4).
  6. Low: Swift couldn't tell when the cap stopped the read. CloudInboxList.nextCursor now carries it.
  7. Low: the spec text disagreed with the code. Fixed.
  8. Low: surface key order. Fixed (sorted).
  9. Info: there's no capability for clients to detect paging. No longer needed: an older daemon ignores cursor and answers one page, as before.

Verdict after the fixes: no open correctness findings.

@azooz2003-bit
azooz2003-bit marked this pull request as ready for review October 30, 2026 01:36
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 79f64a2: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr27752 -f ref=feat-cmux-next-home-chiefs-pagination -f platform=macos -f backend_mode=local

web and size checks: green

@blacksmith-sh

blacksmith-sh Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Found 6 test failures on Blacksmith runners:

Failures

Test View Logs
main.DeveloperIdAppTests.test_download_prints_the_active_profile_only/
test_download_prints_the_active_profile_only
View Logs
stubs: /System/Library/Frameworks/Security.framework/Versions/A/Security has no stub/
Security has no stub
View Logs
stubs: CoreFoundation.tbd: install-name /System/Library/Frameworks/
CoreFoundation.framework/Versions/A/CoreFoundation, missing 1: ['_CFRetain']/
CoreFoundation, missing 1: ['_CFRetain']
View Logs
stubs: CoreFoundation.tbd: install-name /System/Library/Frameworks/
CoreFoundation.framework/Versions/A/CoreFoundation, missing 1: ['_log2']/
CoreFoundation, missing 1: ['_log2']
View Logs
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)/
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)
View Logs
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…eview)

Final-head review of #27752: the Mac's HomeInboxSource asked home-inbox
with the connection's 2 s default, while the daemon's whole-inbox read
could hold a cloud request slot for about 30 s, so a large inbox failed
on the Mac and abandoned reads piled up toward the 16-slot limit.

- HomeInboxSource asks for Cloud rows with the Cloud's 30 s request
  timeout (CloudConversationClient.networkTimeout).
- The daemon's budget counts from the start of the read and is 8 s, so
  with one more page's 20 s read it ends inside 30 s.
- CloudHomeSource.allPages and WireHomeSource keep the pages already
  read when a later page fails, as the daemon does.
- Doc comments back on their consts; spec wording matches the budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
azooz2003-bit and others added 2 commits October 29, 2026 20:41
…sic iOS (review)

Re-review of 846cb0c: keeping a partial list replaced the whole inbox
with it, so conversations past the failed page left Home until the next
good read. Both readers throw again and the store keeps its last whole
list. The daemon's home-inbox keeps its partial pages (its caller takes
the rows as one reply, and the first page's failure still fails it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…navailable

A partial list in home-inbox would drop the rows past the failed page on
the Mac; failing the read makes the rows unavailable, and HomeInboxSource
keeps its last rows then.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@azooz2003-bit azooz2003-bit added ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds and removed ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds labels Oct 30, 2026
@azooz2003-bit

Copy link
Copy Markdown
Collaborator Author

Review (claude-opus-5.5 review subagent): SHIP at a68ad03

b19ce52..a68ad03 adds one more merge of feat-cmux-next and no change to this PR's files. That merge brings 7365192 (#28316, "count the participant tag #27935 added (base red)"), which fixes the optchat-chief harness test the autolander counted as this PR's red.

  • On rbx, the_chiefs_turn_and_compactor_sessions_carry_cmux_chief_and_children_do_not failed at b19ce52 (left 5, right 4), passes at base 14f30b7, and passes at a68ad03.
  • The earlier SHIP review and tests stand: Mac paging suites at b19ce52 (d84e7624c09d), and the Rust paging tests unchanged.

@azooz2003-bit azooz2003-bit added ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds and removed ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds labels Oct 30, 2026
@azooz2003-bit

Copy link
Copy Markdown
Collaborator Author

Review (claude-opus-5.5 review subagent): SHIP at 5ec7c0a

a68ad03..5ec7c0a adds one more merge of feat-cmux-next (3736365), with no change to this PR's files. It picks up the base fixes the autolander asked for ("base red since fixed"). The earlier SHIP review and tests stand.

@azooz2003-bit

Copy link
Copy Markdown
Collaborator Author

Review (claude-opus-5.5 review subagent): SHIP at cf10d6a

5ec7c0a..cf10d6a adds one merge of feat-cmux-next. It brings 84770f4 (#28426), the base fix for tooling-tests that next-autoland was waiting for ("base red since fixed"). The merge auto-merged WireHomeSourceTests.swift, where the base added attachment tests; cmux-ci 0f2fa30c4128 shows WireHomeSourceTests passing at this head. release-notary is still red on the base tip (4db9c7d, test_digest.py and the signing-hooks test).

@azooz2003-bit

Copy link
Copy Markdown
Collaborator Author

Review (claude-opus-5.5 review subagent): SHIP at 9c9331b

cf10d6a..9c9331b adds one merge of feat-cmux-next, with no change to this PR's files. It brings the base fixes for nightly-guards (release-notary and Guard status are green on base bdc44fa) that next-autoland counted as this PR's red.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

This branch was previously deployed

3 inactive deployments
artifacts — 9c9331bc Deployed Oct 30, 2026 by azooz2003-bit via add the Windows daemon to the tree #84653
ci-routing-agent — 9c9331bc Deployed Oct 30, 2026 by github-actions[bot] via cmux-next macOS placement #50830
sentry-dsyms — 9c9331bc Deployed Oct 30, 2026 by azooz2003-bit via upload cmux-tui dSYMs to Sentry #84653
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant