Skip to content

Bot hand-offs follow-ups: owner answers 2b–6a, Remote rev 38 - #583

Draft
sambitcreate wants to merge 6 commits into
mainfrom
claude/project-thread-oredvh
Draft

sambitcreate wants to merge 6 commits into
mainfrom
claude/project-thread-oredvh

Conversation

@sambitcreate

@sambitcreate sambitcreate commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #559: the owner's answers to its six open questions ("1b 2b 3a 4a 5a 6a", 2026-10-22). Five of them are in this PR; 1b is not.

What changes

  • 6a. A damaged rules.json is kept. When a Bot's rules file can't be read, the next rule change keeps its bytes beside it as rules.json.unreadable (then .2, .3, never over an earlier copy) before writing the new file. Deleting the Bot removes the copies. The Rules alert says where the copy is. (main/services/bot-rules/store.ts, docs/bot-rules.md)
  • 4a. The CLI's legacy pause records a user stop. A turn a pause stops on a CLI host now ends cancelled with cancellationOrigin: "user_stop", as on the Mac; other stops record their own origin. (packages/cli/src/daemon-chats.ts, packages/cli/src/bots.ts)
  • 3a. A paired desktop's Bot list shows Paused and Interrupted. The host feed now sends Bot rows per audience: a desktop holding bot:handoffs reads a paused Bot as paused, every other desktop keeps the revision-35 rows. A change both audiences read alike stays one event. The paired Mac's Bot rows show "Paused" or "Interrupted — tap to resume" in place of the purpose, like local rows. (aiden-remote-host-feed.ts, router, remote-bots-section.tsx)
  • 5a. Remote revision 38: hand-off cards say when they take no note. A card the Bot's password-or-code rule opened carries takesNote: false. The desktop's paired-Mac chat, iOS and Android hold the composer for it ("Enter it yourself, then tap Done.") and answer it without a note, instead of learning from a 400. Revision 37 shipped in no release, so the field needs no opt-in. Fixture botHandoffs.noNoteHandoff, OpenAPI and API docs updated.
  • 2b. The screen-sharing password on Lume's command line stays, documented as an accepted limit in docs/bot-computers.md.
  • 1b (computer sign-in hardening) is not in this PR. The existing behaviour and the warning on the sign-in card are unchanged.

Remote revision

Claims 38 (AIDEN_REMOTE_BOT_HANDOFF_NOTE_CONTRACT_REVISION); main is at 37. Re-claim at merge if main moves. iOS AidenRemotePhase0Tests and the fixture's two contractRevision literals are updated together.

Tests

  • Host feed: per-audience snapshot, replay and dedupe (aiden-remote-host-feed.test.ts); router passes the audience only to holders on a wired host.
  • Desktop: paired Bot status labels (new-chat-targets.test.ts, remote-new-chat-view.test.tsx); no-note card holds the composer and answers bare (remote-bot-chat-view.test.tsx).
  • Protocol and projection: takesNote parser and fixture, credential-rule card projection.
  • iOS (AidenBotContractTests, AidenBotSessionTests) and Android (AidenBotHandoffsContractTest, AidenBotSessionControllerTest) decode takesNote fail-closed and hold the composer. These run in CI only (no Xcode or Android SDK in the cloud container).
  • Rules store: kept copies, refused change keeps nothing, forgetBot removes them. CLI parity: user_stop origin.
  • Locally: aiden-remote-* and peer-* suites (912 pass, excluding aiden-remote-service.test.ts, which needs IPv6), the touched renderer suites, tsc --noEmit, eslint on touched files, and the CLI suite (2 known container-only failures).

Flaky tests seen on this PR

Both on head b2f916c, run 39813515653, outside this PR's code paths:

  • iOS AidenMessageVisualSnapshotLayoutTests.testVisualSnapshotKeepsItsHeightAlongsideAnImageDeck: snapshot rows 0, expected 269 ("the snapshot was squeezed instead of drawn at its own height"), after a simulator (ipc/mig) server died. It also flaked once on Open chat visuals full screen on iOS and Android (Remote revision 35) #514.
  • Electron E2E tests/e2e/inline-visuals.spec.ts:47: after the spec's relaunch the chat showed "This chat couldn't be loaded", and iframe[title="Weekly total"] timed out at scrollIntoViewIfNeeded. It passed on retry and was counted by --fail-on-flaky-tests.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FTLKrZsPKZM2hnxHVxEnak

…places it

The owner chose to keep a copy (question 6): the first change after an
unreadable rules.json writes its bytes to rules.json.unreadable (then .2,
.3, never over an earlier copy). Deleting the Bot removes the copies.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FTLKrZsPKZM2hnxHVxEnak
…on the Mac

The owner chose to match the Mac (question 4). The CLI daemon now keeps the
first stop's origin on the cancelled timeline: user_stop for Stop and Pause,
chat_deletion for a deleted chat and application_shutdown when it stops.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FTLKrZsPKZM2hnxHVxEnak
The host feed now sends Bot rows per audience: a desktop holding
bot:handoffs reads a paused Bot as paused, others keep the revision-35
rows. A change both audiences read alike stays one event. The paired
host's Bot rows show "Paused" or "Interrupted — tap to resume" in place
of the Bot's purpose, as local Bot rows do.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FTLKrZsPKZM2hnxHVxEnak
A card the Bot's password-or-code rule opened now carries
takesNote: false. The desktop's paired-Mac chat, iOS and Android hold the
composer for it ("Enter it yourself, then tap Done.") and answer it
without a note, instead of learning from a 400 that a note was refused.
Revision 37 shipped in no release, so the field needs no opt-in.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FTLKrZsPKZM2hnxHVxEnak
…ne is an accepted limit

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FTLKrZsPKZM2hnxHVxEnak
@sambitcreate sambitcreate changed the title Bot hand-offs follow-ups: owner answers 1b–6a, Remote rev 38 Bot hand-offs follow-ups: owner answers 2b–6a, Remote rev 38 Oct 22, 2026

Copy link
Copy Markdown
Owner Author

iOS build and simulator tests failed on b2f916c in AidenMessageVisualSnapshotLayoutTests.testVisualSnapshotKeepsItsHeightAlongsideAnImageDeck (snapshot rows 0, expected 269; the log also shows a simulator (ipc/mig) server died just before). This PR doesn't touch AidenMessageView or the visual snapshot path; its iOS changes are the Bot hand-off model, chat view composer and their tests. The same test is already recorded as flaky (it failed once on #514 and passed on re-run). No fix exists yet. I'll re-run the failed job once when the rest of the run finishes; a second failure gets treated as real.


Generated by Claude Code

Copy link
Copy Markdown
Owner Author

Electron E2E (2/3) failed on b2f916c because --fail-on-flaky-tests counts tests/e2e/inline-visuals.spec.ts:47 ("a reply draws native and HTML visuals inline…") as flaky: it passed on retry. The first attempt failed after the spec's own relaunch. The reopened window showed "This chat couldn't be loaded", so iframe[title="Weekly total"] never appeared. This PR doesn't touch chat loading, inline visuals or relaunch. Its renderer changes are the paired-Mac Bot list and the remote hand-off composer. No fix exists yet. I'll re-run the failed jobs once when the run finishes, and both flakes are recorded in the PR description.


Generated by Claude Code

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