Skip to content

NEXT iOS: keep offline agent drafts with Retry - #27304

Merged
teamleaderleo merged 4 commits into
feat-cmux-nextfrom
lane/ios-offline-send
Oct 30, 2026
Merged

teamleaderleo merged 4 commits into
feat-cmux-nextfrom
lane/ios-offline-send

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Sending an agent-chat prompt with no Mac connection now returns the text and attachments to the composer and shows “Mac offline. Not sent.” with Retry. Retry uses the normal composer send path, preserving queue/steer behavior and prompt deduplication. Other errors remain dismissible.

Leo’s request:

well i just think we can improve it a f***ton more than it is now... it's slow it's bad it belabours the point in too many tooltips it's ugly in places it doesn't even work in places there's lots of functionality that needs to get in

Addresses B2 and the offline-send part of C4. Chief and the upstream shared packages are unchanged. Risk: the retry action reuses the existing send and returned-draft handling; failed sends never create a transcript turn.

Validation at 2896c7ef7e14eb442f8d0904246f612985a7e9f0: fleet simulator compile and launch pass, independent SHIP, and 33 focused tests pass: DisconnectedAgentSourceTests 3/0, PromptResendTests 5/0, WorkspaceTabsSourceTests 25/0. This reruns the workspace assertion from the original full-kit failure; it is not excused as a base red.

Updated head e3d7acdfd7989932d67fc44efdc95c1ae0a5c8f9 incorporates base 299ebaa7980c. The sole conflict was the composer's haptic modifier: retained the preference-aware cmuxMobileSensoryFeedback and the Retry handler. New focused fleet validation and independent review are pending at this head. The product diff remains six files and passes git diff --check against the updated base.

Screenshots use -cmux-mobile-demo offline-send. Before is base ba6bbf43e28b3d49f431d9438855650c90089347 with only the DEBUG demo hooks; after is 2896c7ef7e14. The subsequent base update preserves this UI. Capture method and fleet receipts.

Before After
Light
Dark

Apple HIG consulted: Feedback, keeping actionable failure feedback next to the composer. The SwiftUI Retry observation lives with the composer and is removed when the view disappears. The DEBUG demo task sends once and finishes; SwiftUI cancels it if the view disappears. No new timer or animation loop.

Agent session: agent session
🤖 Generated with Claude Code

@blacksmith-sh

blacksmith-sh Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test 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.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-7x9mt3 created for this PR by the cmux coordinator.

@teamleaderleo

teamleaderleo commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator Author

Fleet iOS receipts for head 2896c7ef7e14eb442f8d0904246f612985a7e9f0 (base ba6bbf43e2).

Compile: passes. Demo simulator app ** BUILD SUCCEEDED ** (fleet step 0dbd2005e4ea0633f6b964ad, unmodified scripts/ci/cmux-next-ios-sim.sh test, iPhone 17 Pro / iOS 27.0). Launch is ok.

Tests (full CmuxMobileKit suite on the simulator): 1399 passed, 1 failed, 1 skipped (227 s, exit 65).

  • DisconnectedAgentSourceTests and PromptResendTests (CmuxMobileAgentChatTests) ran in that suite and are not in the failure list. The step reports counts and failures only, with no per-test lines.
  • The one failure is CmuxMobileWorkspacesTests / WorkspaceTabsSourceTests / closingATabWithARunningProgramAsks(): WorkspacesTests.swift:45: Expectation failed: (pending.message → "Checking what’s running on the Mac…") == "Still running: sleep.". It's an assertion, not a crash. This PR doesn't touch CmuxMobileWorkspaces. The same test is already noted as timing-sensitive under load (cmux-next-ios/verify/url-truncation.md). It is not red on base: the unmodified full-kit step at base ba6bbf43 (fleet step e87ad3b0a4da40c98ccaa450) passed 1399, failed 0, skipped 1, with closingATabWithARunningProgramAsks passing. The same test also failed once at an unrelated commit (0817d9a8, step d4bbf5cffc028bc10cb4cb61). So it is not a base red; it is a timing-sensitive test in a module this PR doesn't touch, and it failed as an assertion, not a crash.

Screenshots (-cmux-mobile-demo offline-send, mock auth, Demo configuration):

  • Before: base ba6bbf43e2 plus only this PR's two DEBUG demo hooks: the DemoDriver offline-send scene (and its entry in names) and the ChatComposer #if DEBUG .task with its ranOfflineSendDemo state. Both are copied verbatim from the PR. The base already had everything they call (DisconnectedAgentSource(summary:), AgentSessionDirectory.makeSource, send(steer:)), so nothing from the fix was ported. The Retry plumbing (retryCount, canRetryPrompt) and the DisconnectedAgentSource.send change were left out.
  • After: the PR head, unchanged.
Before (base + demo hooks) After (2896c7ef7e)
Light
Dark

Before: the prompt is sent into the void. The composer clears, and the generic "Claude is on Mac. Connect to it to see this chat." error appears with no retry. After: the text comes back to the composer with "Mac offline. Not sent." and Retry, and the send button is live. No transcript turn is created in either case. Captured over SSH on a fleet simulator Mac (iPhone 17 Pro, iOS 26.5), because the fleet step route can't run scene captures today.

Agent session: agent session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex-review-box/gpt-6-astra high, lane-place): SHIP at 2896c7e

SHIP

Reviewed SHA: 2896c7e

No actionable findings. Tests could not run because this Linux box has no Swift toolchain or iOS SDK.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

release-notary / Guard status fail the same way on base and are listed as non-blocking base reds, so no per-assertion evidence is needed. The failure is in highlight docs this PR doesn't touch (computer-use-live-preview.md, computer-use-target-guard.md). With the exact-head SHIP and the focused suites green, this lands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Focused fleet tests at 2896c7e: 33 passed, 0 failed. Step 0f2957f1e38ee0f55d28a357, exit 0.

The ref was 1008a044: the head tree plus the feat-cmux-next tip's scripts/ci/cmux-next-ios-sim.sh and ios_sim_runtime.py, both unchanged.

Suite Passed Failed
CmuxMobileWorkspacesTests/WorkspaceTabsSourceTests 25 0
CmuxMobileAgentChatTests/PromptResendTests 5 0
CmuxMobileAgentChatTests/DisconnectedAgentSourceTests 3 0

The compile and the before/after captures at this head are in #27304 (comment).

Agent session: agent session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Final-head validation request: e3d7acd incorporates base 299ebaa. The sole conflict retains the preference-aware cmuxMobileSensoryFeedback modifier and the offline Retry handler. Please run the simulator compile and focused DisconnectedAgentSourceTests, PromptResendTests, and WorkspaceTabsSourceTests at this head. Previous head passed all 33 focused tests; screenshots remain representative. Independent review is being retried after its process exited without a verdict. The internal message relay currently refuses delivery, so this request records the remaining work here.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex-review-box/gpt-6-astra high, lane-place): SHIP at e3d7acd

SHIP

No blocking findings. Reviewed the diff and surrounding send, draft-restoration, and retry paths. Swift tests could not run because Swift is unavailable in this box.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Simulator failures in run 40960222486 at e3d7acd are all MacHomeFeedTests, each await until { feed.rows?.count == 4 } timing out (MacHomeTests.swift:171/186/252/268). Under load on GitHub's simulator these were already shown to be flakes on #27286: paired fleet runs at head and base passed 8/8. A focused fleet MacHomeFeedTests rerun at this head and at base will confirm.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex-review-box/gpt-6-astra high, lane-place): SHIP at e3d7acd

SHIP

No blocking findings. Tests could not be run because the box has no Swift toolchain.

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
@teamleaderleo
teamleaderleo marked this pull request as ready for review October 29, 2026 23:31
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

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

Review e3d7acd: 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=pr27304 -f ref=lane/ios-offline-send -f platform=macos -f backend_mode=local

Not verified: macOS jobs did not run: compile and app tests were skipped on e3d7acdfd7; ci-status is green without them.

CI passes on e3d7acdfd7 (run 40993656730 attempt 1).
macOS jobs did not run: compile and app tests were skipped: Fast static checks skipped (the macos job needs both to succeed). Re-run CI once they pass, before merging.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

cmux-bot approves e3d7acd: an independent review passed this exact head (review box review-27304-e3d7acdf receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Fleet iOS evidence at e3d7acd (base 299ebaa)

The GitHub kit job 123750745721 exited 65 with no crash. It had 8 failures in suites this PR does not touch (the PR changes only CmuxMobileAgentChat, DemoDriver and AgentMockRemovalTests):

  • 7 × MacHomeFeedTests: the feed.rows?.count == 4 wait timed out at MacHomeTests.swift:171/186/201/232/241/252/268.
  • ProbeRaceTests.timeoutWinsOverAnUncancellablePing() at LiveTests.swift:1086: 1.1999 s against a 1 s limit.

Focused fleet reruns on iPhone 17 Pro, iOS 26.5, Xcode 26.6:

Suite Head e3d7acd Base 299ebaa
CmuxMobileChiefTests/MacHomeFeedTests step 770156f8: 7 passed, 0 failed step e2f257b5: 7 passed, 0 failed
CmuxMobileLiveTests/ProbeRaceTests step 2bbb7dc3: 2 passed, 0 failed step 2a5eb872: 2 passed, 0 failed

Both suites pass at head and base, so they are timing flakes under load (MacHomeFeedTests is the known flake from #27286), not this PR's reds. No other check failed.

The exact-head SHIP is #27304 (comment). Landing next, pinned to e3d7acd.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

The GitHub kit reds at e3d7acd are not this PR's own. One focused fleet run, head vs base 299ebaa7:

Suite Head cfa182d1 Base d3d2888e
CmuxMobileChiefTests/MacHomeFeedTests 7/0 7/0
CmuxMobileLiveTests/ProbeRaceTests 2/0 2/0
CmuxMobileWorkspacesTests/WorkspaceTabsSourceTests 30/0 30/0
CmuxMobileAgentChatTests/PromptResendTests 5/0 5/0
CmuxMobileAgentChatTests/DisconnectedAgentSourceTests 3/0 2/0

The full kit job (run 40960222486, job 123750745721) failed 8 tests. None of them crashed.

  • Seven MacHomeFeedTests: each failed at a MacHomeTests.swift line with await until { feed.rows?.count == 4 }.
  • ProbeRaceTests.timeoutWinsOverAnUncancellablePing: LiveTests.swift:1086, with an elapsed time of 1.1999 s against a limit of under 1.0 s.

All eight pass on the fleet at both head and base, and the PR doesn't touch either suite. The same MacHomeFeedTests failures also show up on GitHub for unrelated PRs (#27286, #27300, #27295), so they're runner timing flakes.

Agent session: agent session

@teamleaderleo
teamleaderleo merged commit 538ccd0 into feat-cmux-next Oct 30, 2026
197 of 200 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/40993667266 at f809a7a failed: cmux-next checks (god files, concurrency, crash safety, l10n).
Those jobs last passed at 2346629. This pull request is one of 2 merged since: #27304, #27844.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@github-actions

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/40993775806 at a90490c failed: cmux-next checks (god files, concurrency, crash safety, l10n).
Those jobs last passed at 2346629. This pull request is one of 2 merged since: #27304, #27844.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

This branch was previously deployed

1 inactive deployment
ci-routing-agent — e3d7acdf Deployed Oct 29, 2026 by teamleaderleo via wait for same-key tree publisher #78482
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant