Skip to content

Cloud: Share with Me resends the refused start - #29785

Merged
teamleaderleo merged 2 commits into
feat-cmux-nextfrom
fix/share-resend-and-owner-state
Nov 1, 2026
Merged

teamleaderleo merged 2 commits into
feat-cmux-nextfrom
fix/share-resend-and-owner-state

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

After Share with Me went through on a refused Cloud chat start, nothing happened until the person sent again (#29563, a P2 from #29283's review).

Why: the refusal hands the queued prompt back to the composer (harnessSwitch.fail), and a chat on another machine starts only with a send (run returns when startsOnSend and nothing is queued). The share's chat.harness.retry re-armed the switch with an empty queue, so it waited.

Fix: a share that went through retries, then sends the composer's prompt again, the same way Trust's answer already resends (trustAsk.refused(..., () => composerHandle.current?.send())). Retry after Ask the Owner does the same once the owner has shared; with no share yet it stays a plain retry. Without an onShared handler the card falls back to the old retry.

Tests: SwitchNotice.share.test.tsx checks that a share resends, that without a handler it falls back to a retry, that a recheck which finds the share resends, and that a recheck with no share is a plain retry.

Risk: low. Webview only, 4 files. It only runs after a successful share on the start-refusal card.

#29564 (the pane keeps ownerCloud: false after a share) is left for its own PR: whether a guest counts as owner is a separate decision.

Fixes #29563

🤖 Generated with Claude Code

Agent session: agent session


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


Summary by cubic

Fixes Share with Me on a refused Cloud chat start, where after the share went through nothing happened until the person sent again (#29563).

The refusal hands the queued prompt back to the composer, and a chat on another machine starts only with a send, so the share now retries the start and resends the composed prompt, matching how Trust's answer already resends. Retry after Ask the Owner resends once the owner has shared; with no share yet it stays a plain retry. Without an onShared handler the card falls back to the old retry.

Tests cover the resend on share, the fallback without a handler, a recheck that finds the share and resends, and a plain retry when a recheck finds none.

Written for commit 53922f6. Summary will update on new commits.

View guided diff Turn on auto-fix

After Share with Me went through, the card only retried the switch. The
refusal had already handed the prompt back to the composer, and a chat on
another machine starts only with a send, so nothing happened until the
person sent again. The share now retries and resends the composer's prompt,
as Trust's answer does. Retry after Ask the Owner does the same once the
owner has shared; with no share yet it stays a plain retry.

Fixes #29563

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 53922f6: 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=pr29785 -f ref=fix/share-resend-and-owner-state -f platform=macos -f backend_mode=local

Gallery before/after for 53922f6: 16 states rendered, 0 images differ, 1100 more touched states not rendered. Images are in the run's artifact, not on this public PR; the independent review of this head reads them on its own, so the PR needs no hand-made screenshots of these states.

gh run download 41253316610 -R manaflow-ai/cmux -n gallery-advisory-29785-53922f61396c9279fe55bebc7a4daea6b2d2d30b (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.chat-width/standard Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/standard Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/short-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/short-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/wide-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/wide-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/no-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/no-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors unchanged 0% own App.tsx
agent-pane.continuation-spacing/shipped Apple System Colors Light unchanged 0% own App.tsx
agent-pane.continuation-spacing/shipped Apple System Colors unchanged 0% own App.tsx
agent-pane.continuation-spacing/two-thirds Apple System Colors Light unchanged 0% own App.tsx
agent-pane.continuation-spacing/two-thirds Apple System Colors unchanged 0% own App.tsx
agent-pane.continuation-spacing/half-tucked Apple System Colors Light unchanged 0% own App.tsx
agent-pane.continuation-spacing/half-tucked Apple System Colors unchanged 0% own App.tsx
agent-pane.continuation-spacing/before Apple System Colors Light unchanged 0% own App.tsx
agent-pane.continuation-spacing/before Apple System Colors unchanged 0% own App.tsx
agent-pane.copy-controls/output Apple System Colors Light unchanged 0% own App.tsx
agent-pane.copy-controls/output Apple System Colors unchanged 0% own App.tsx
agent-pane.docked-chat/new-chat Apple System Colors Light unchanged 0% own App.tsx
agent-pane.docked-chat/new-chat Apple System Colors unchanged 0% own App.tsx
agent-pane.docked-chat/after-turn Apple System Colors Light unchanged 0% own App.tsx
agent-pane.docked-chat/after-turn Apple System Colors unchanged 0% own App.tsx
agent-pane.docked-chat/working Apple System Colors Light unchanged 0% own App.tsx
agent-pane.docked-chat/working Apple System Colors unchanged 0% own App.tsx

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

Shipped in:

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent Codex gpt-6.1-sol, high, via the review router; full diff from merge base b06e339 to this head): SHIP at 53922f6.

[P2] [follow-up] [App.tsx:11757] - The delayed share callback sends whatever is currently in the composer without verifying that the original refusal/session is still active. If the user navigates or edits/types while sharing is in flight, it can submit an unrelated draft (and attachments) to the wrong chat. Capture and validate the refusal/session generation before retrying and sending.

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 53922f61 Deployed Oct 31, 2026 by teamleaderleo via wait for same-key tree publisher #92085
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