Skip to content

Answer a paired Mac's Bot's plans, folder requests and routine ideas here - #909

Open
sambitcreate wants to merge 11 commits into
claude/project-thread-awyxuf-pr2from
claude/project-thread-awyxuf-pr3
Open

sambitcreate wants to merge 11 commits into
claude/project-thread-awyxuf-pr2from
claude/project-thread-awyxuf-pr3

Conversation

@sambitcreate

Copy link
Copy Markdown
Owner

Requested by sbt · project thread

Stacked on #907, which is stacked on #895. Merge those first; GitHub then retargets this PR.

Problem

In a Bot chat opened from another Mac:

  • A Bot waiting on folder access or a plan showed only "Scout needs you on your Mac: allow access to Documents". The person had to walk to the other Mac.
  • Routine suggestions and "Memory updated" lines were missing.
  • A sent message didn't show until the other Mac had it.
  • A Mac paired before Bots could be shared showed no Bots and no reason.
  • On the host, one Bot the Remote contract can't carry (an edit time before its creation time after a clock change, a name over the limit) failed the whole Bot list. That emptied the Bot list and host feed for every paired phone and Mac. I confirmed this with a test before fixing it.

Change

PR 3 of the fix plan. Desktop only, no protocol revision. It uses opt-ins phones already hold.

  • Negotiation: peer-host-registry.ts asks for bot:cards, bot:access-requests and bot:plans. Each goes in a call of its own and only when the host lists it in serverCapabilities, so a host that refuses one keeps the rest. An older host keeps sending the notice line.
  • Peer operations: botRespondPlan, botAnswerAccessRequest and botRespondRoutineProposal map to the existing /plans/{planId}/respond, /access-requests/{waitId}/answer and /routine-proposals/{proposalId}/respond routes. Request bodies go through the protocol's own parsers, and receipts are checked against the contract.
  • Session mapping (remote-bot-session.ts):
    • Plan and access frames fill snapshot.plan and snapshot.accessRequest. Plan items get ids from their position, and each plan frame gets a new revision.
    • memory_update and routine_proposal entries become this Mac's own transcript rows.
  • RemoteBotChatView:
    • The access card and a pending plan join the Needs-you slot in the local order. An approved plan shows its checklist with Stop plan.
    • The composer waits while a plan is pending.
    • Add and Not now on routine suggestions work. "Memory updated · Open" says to open the memory on the other Mac.
    • A sent message shows at once, using the local chat's echo helpers (now exported from bot-chat-pane.tsx), along with "Getting ready". It leaves when the host's entry arrives, or when the send fails, and the draft stays.
    • A paused Bot's composer says it's paused on that Mac instead of "can't take messages right now".
  • Re-pair hint: a host that serves Bot sessions but never gave this Mac bot:read shows "To use 's Bots here, pair this Mac with it again." under its name. Search hides it.
  • Host: AidenRemoteBotService.list() leaves out a Bot whose summary fails the contract instead of failing the list.
  • Docs: docs/aiden-on-the-go-remote-access.md, docs/aiden-remote-api-v1.md (capability rows, paired-desktop negotiation), docs/bot-access-requests.md, docs/bot-rules.md, .memory/bot-chat-activity.md.

Not in this PR:

  • approval:cards, bot:allowed (Always) and the revision-61 Bot UX opt-ins.
  • A model picker for a remote Bot with a model problem. No remote route sets a Bot's model, so this needs its own protocol change.
  • Load older, removing a queued message and showing every waiting approval need a new revision, so they come in the next stacked PR.

Screenshots

A Studio Bot that wants a folder, has a plan pending and suggested a routine, opened on this Mac.

Before (#907) After
Light
Dark

Scope

A feature plus one host bug fix (PR 3 of the plan).

Verification

  • npm run type-check: clean. eslint on the touched files: clean.
  • test:remote-chat (250), test:peer-hosts (185), test:bots, test:sidebar (260): all pass. aiden-remote-bots.test.ts: 21 pass.
  • New behavioral tests:
    • The real RemoteBotChatView answers an access card, then the plan, by their own ids. Stop plan then sends stop, and the composer waits for the plan.
    • A plan already answered on the host shows the host's message on the card.
    • A routine suggestion is added through the host's route, and a memory line shows.
    • A send shows before the host acknowledges it, and shows once after. A refused send removes the echo and keeps the draft.
    • The reducer maps access and plan frames, clears them on null, and maps memory and routine rows. This replaces two tests that asserted desktops drop these frames.
    • Negotiation asks for each card opt-in alone, and one refusal keeps the others.
    • The routes, the refused bodies and the contract fixture receipts for the three new operations.
    • The re-pair hint shows only for a host that serves Bot sessions without Bot grants.
    • One Bot the contract can't carry is left out of the list. This fails on the base branch.
  • Screenshots come from a temporary Playwright Electron spec under xvfb with mocked peer-host IPC. The spec is not committed.

AI disclosure

Written with Claude Code.

Checklist

  • I tested these changes locally and reviewed the diff myself
  • Related docs / tests are updated where behavior, settings, or contracts changed
  • No unrelated refactors or changes are included

Generated by Claude Code

…here

The desktop now asks the host for bot:cards, bot:access-requests and
bot:plans, each in a call of its own, and answers those cards through
the host's routes, as phones do. A message sent to a remote Bot shows
at once. A Mac paired before Bots could be shared is told to pair
again. On the host, one Bot the Remote contract can't carry is left
out of the list instead of failing it for every device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018VA6REg8PpdXdPfTkkCKZJ
@sambitcreate sambitcreate self-assigned this Nov 24, 2026
…gain

The session read dropped accessRequest and plan, so a reload (after an
error, a resync or an expired plan) lost the card until the next stream
snapshot. A card this Mac can't read is left for the host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018VA6REg8PpdXdPfTkkCKZJ

@pullfrog pullfrog Bot 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.

Important

The paired-desktop routine suggestion flow can falsely confirm that decline feedback was saved.

Reviewed changes Reviewed the full paired-Mac Bot card, response, optimistic-send, host-list resilience, and re-pairing implementation.

  • Capability negotiation and peer writes — Paired desktops independently request the three existing card capabilities and route typed plan, access, and routine responses through the host contract.
  • Remote Bot presentation — Session mapping and the remote chat now render plans, access requests, memory updates, routine proposals, and immediate send echoes using the local Bot surfaces.
  • Host and sidebar resilience — Invalid Bot summaries are omitted individually, while old pairings without Bot grants receive an explicit re-pair explanation.
  • Documentation and coverage — Remote access and Bot guides were updated, with focused behavioral coverage across negotiation, mapping, card actions, sends, and list behavior.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏

Comment thread renderer/main/remote-bot-chat-view.tsx Resolved
…hread-awyxuf-pr3

# Conflicts:
#	.memory/bot-chat-activity.md
#	docs/aiden-on-the-go-remote-access.md
#	renderer/main/remote-bot-chat-view.test.tsx
…n't record a reason

Revision 27's routine-proposal route takes only the decision, so the remote
Bot chat hides the card's "Why not?" after Not now instead of showing
"Noted, thanks." for a reason that was never sent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018VA6REg8PpdXdPfTkkCKZJ

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes Reviewed the session-compatibility and routine-decline fixes, plus the updated stacked-base integration, since the prior Pullfrog review.

  • Preserved remote cards — Kept validated plan and access-request fields through plain session reads and stream snapshots while continuing to discard individually unreadable cards.
  • Removed false decline confirmation — Disabled the unsupported Why not? flow for paired-Mac routine suggestions while preserving Not now and its settled receipt.
  • Extended behavioral coverage and docs — Added focused tests for both fixes and documented the paired-Mac decline behavior.
  • Merged the updated stacked base — Incorporated the host-clock unread-marker changes without regressing this PR’s remote Bot flows.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes Reviewed the first-reply unread-state fix and the updated stacked-base integration since the prior Pullfrog review.

  • Preserved first-reply visibility — Persisted a zero host baseline when listed Bots have no replies yet, so their first later reply becomes unread even after reload.
  • Kept incomplete feeds neutral — Left the baseline unset for an empty Bot list so a feed that has not arrived cannot incorrectly establish read state.
  • Scoped sentinel validation — Accepted zero only for host baselines while continuing to reject it for per-Bot seen timestamps.
  • Updated coverage and documentation — Added focused persistence and first-reply tests and clarified the desktop unread-baseline contract.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏

Copy link
Copy Markdown
Owner Author

The "Desktop tests (renderer-other)" failure on 8504cc6 is in the CLI package step. One test failed: server-visuals.test.mjs › "an installed browser draws a chart offline into a picture and leaves no profile behind". Headless Chrome didn't draw the chart in time ("Not shown: … drawing it failed or took too long"). This PR doesn't touch the CLI visuals code. The same test has failed the same way on #907 and #910. I'll rerun the failed job once when the run's other jobs finish. If it fails again, I'll record it in the PR description as a flaky test.


Generated by Claude Code

Copy link
Copy Markdown
Owner Author

The "iOS build and simulator tests (Xcode 27, non-blocking)" failure on 8504cc6 isn't from this PR. Compared with its base (#907), it changes nothing under ios/ or protocol/, so the iOS app and the shared contract fixtures are the same as on the base. The job is non-blocking, and its results are in the uploaded ios-27-simulator-results artifact of run 45351675942.


Generated by Claude Code

…' into claude/project-thread-awyxuf-pr3

# Conflicts:
#	.memory/bot-chat-activity.md
…t, log a Bot left out for its stored fields, and keep a re-read plan card's revision

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes Reviewed the Bot-list error-classification fix, stable remote-plan revisions, and updated stacked-base integration since the prior Pullfrog review.

  • Preserved client Bot rows — Moved transient summary reads outside the per-Bot projection catch so an operational failure rejects the list, while deterministic contract-invalid stored fields omit and log only that Bot.
  • Stabilized re-read plan cards — Derived remote plan revisions from the bounded card-visible plan fields so unchanged reloads and reconnects retain card state while material plan changes replace it.
  • Extended diagnostics and coverage — Wired fixed Bot-omission diagnostics for desktop and CLI hosts, documented the retention distinction, and added focused behavioral tests for transient failures, safe logging, and plan revision stability.
  • Merged the updated stacked base — Incorporated the latest host-feed signal-cache work without regressing this PR’s paired-Mac Bot flows.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏

…hread-awyxuf-pr3

# Conflicts:
#	.memory/bot-chat-activity.md

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes Reviewed the latest stacked-base integration since the prior Pullfrog review.

  • Preserved first-reply unread state — Carried revision 66’s summarized marker into RemoteBotChoice, allowing a newly listed Bot with no replies to establish the zero baseline that makes its first later reply unread.
  • Verified the integrated behavior — Confirmed the marker reaches markRemoteBotHostListed and ran the focused remote-seen and Bot-sidebar suites, which pass 40/40 tests.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants