Repository navigation
Instant UI and optimistic updates across desktop Bots, iOS and Android - #576
Conversation
…, optimistic edits The Bots section now shows every action on the next frame and lets main follow: sends echo at once under one request id per submission (kept across a failed retry so nothing double-sends), Retry hides the failed card and reuses one id per failed turn, Resume and Dismiss hide the paused card until main's state says otherwise, reopening a Bot shows its remembered conversation before the fresh snapshot lands, reload keeps the view, and rename, subtitle, avatar and instructions apply to the cache before the save. Create and Start chat list the Bot and open its chat before the list reread and the self-intro (the preset intro is now deferred by the desktop handler), delete drops the row from the cached list at once, the Bot page starts from the list entry, /bots opens the last viewed Bot from a recent cached list, and routines and Advanced saves place their answers in the cache instead of waiting for a reread. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RQjxbg1n4c3xNJRpUaF1WL
…ggles, instant opens iOS keeps the Mac's last /server features per pairing and resolves Bot routes from them while connecting, opens new chats and Bots from the create receipt, flips routine and scheduled toggles at once, clears the Steer/Queue draft as the input leaves (restored on failure), and renames or removes chats in the list and Recents before the Mac answers. Android follows the pairing's refreshed client in an open chat, reads the durable-session gate from saved features, flips routine toggles at once, opens a saved chat deep link without waiting for the connection, clears the run-input draft at once, and settles the Bots home when offline with nothing saved. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RQjxbg1n4c3xNJRpUaF1WL
…notes Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RQjxbg1n4c3xNJRpUaF1WL
…, pairing-bound client Resume and Dismiss drop their request id once main answers, so a blocked Resume can be retried after fixing access. updateBotIdentity rereads the Bot before writing again and rolls back only this Bot's row where the cache still holds the optimistic copy; the Instructions editor closes on confirm and keeps the draft on failure; retried failed turns stay hidden as a set. iOS keeps the optimistic rename list-local, restores a rejected run input under text typed meanwhile, keeps the Bots home unsettled while connecting and flips routine toggles in the Binding setter. Android binds the chat to its pairing identity rather than the instance id and merges a rejected run input the same way. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RQjxbg1n4c3xNJRpUaF1WL
CI failed chatKeepsLoadingWithThePairingsRefreshedClient with only an Assert.java frame. Each step now fails with its own message and source line, and the reread is compared against the error state before the refresh rather than against null. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RQjxbg1n4c3xNJRpUaF1WL
There was a problem hiding this comment.
Caution
Rejected mobile Steer/Queue text can be lost after a client or screen-owner change. Desktop profile edits also have two reproducible save/rollback regressions.
Reviewed changes across desktop Bots, shared creation handling, iOS, Android, tests, and documentation.
- Desktop chat feedback: Pending send echoes, retained retry request IDs, optimistic Resume/Dismiss, and remembered live snapshots.
- Desktop mutations: Optimistic identity edits, cache reconciliation for creation/deletion/routines/access, list-seeded detail queries, and deferred preset introductions.
- Native clients: Saved-feature routing, receipt-first navigation, optimistic toggles and chat-list edits, early run-input draft clearing, and Android client replacement handling.
- Documentation and coverage: The instant-UI plan, design rules, project memory updates, and focused behavioral tests.
Validation: 244 desktop Bot tests and 8 starter tests passed. Two additional call-through probes reproduced the subtitle-clearing and overlapping-rollback findings. Changed Swift sources parse, and iOS release/policy tests pass; native XCTest requires macOS/Xcode. Android tests could not execute: offline resolution reported Plugin [id: 'org.gradle.toolchains.foojay-resolver-convention', version: '1.0.0'] was not found; the online attempt returned Tool 'shell' timed out after 120000ms.
gpt-6.1-sol | 𝕏
There was a problem hiding this comment.
Important
No new issues found in this test-only update. The three findings from the previous review remain unresolved, so this is not an approval.
Reviewed changes in 1d08ff230 since the prior review at d1283c8d9, with the full PR diff read for context.
- Added reconnect diagnostics to identify which connection invariant failed and explicitly verify that
refreshClient()replaces the client object. - Changed error-state validation to compare the post-reconnect error with the pre-reconnect value, rather than require an initially error-free fixture.
Validation: Inspected the changed test and its client-refresh/load paths. The focused Android test could not execute because Gradle configuration failed: Plugin [id: 'org.gradle.toolchains.foojay-resolver-convention', version: '1.0.0'] was not found. No production code changed in this delta.
gpt-6.1-sol | 𝕏
…ble run-input draft Overlapping identity edits now share one edit stack per Bot, so a failed patch drops out without undoing the other edit, whichever answers first. Clearing the Subtitle removes the description from the cache as main does. Steer/Queue on the phones clears the draft on screen but keeps the saved draft until the Mac admits the input, so a rejection after a client or screen change still restores the text. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RQjxbg1n4c3xNJRpUaF1WL
There was a problem hiding this comment.
Important
Two new settlement regressions remain: late admitted mobile input can reappear as an unsent draft, and failed desktop edits can overwrite newer sidebar data.
Reviewed changes in a9e7c930 since the previous review at 1d08ff230, with the full PR diff read for context.
- Replaced Bot edit rollback with a confirmed definition plus pending optimistic patches.
- Corrected subtitle clearing and added profile tests for clearing and overlapping failures.
- Deferred mobile draft persistence until run-input admission on iOS and Android, and updated the implementation plan.
Validation: All 246 focused desktop Bot tests passed, including the 15 profile tests. An independent call-through probe reproduced the stale-sidebar finding. The changed Swift source parses, and iOS release/policy checks pass; native XCTest requires macOS/Xcode. Android chat tests could not configure because Plugin [id: 'org.gradle.toolchains.foojay-resolver-convention', version: '1.0.0'] was not found. Mobile receipt findings were source-traced, not executed natively.
gpt-6.1-sol | 𝕏
…the saved draft A failed identity edit now builds on any newer revision a reread brought while it was in flight and rereads the lists too, so a rename from a phone is not undone in the sidebar. On both phones the draft store retires an admitted Steer/Queue text under the pairing's ownership, so a client or screen change before the receipt cannot offer it again as an unsent draft. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RQjxbg1n4c3xNJRpUaF1WL
There was a problem hiding this comment.
Important
Late mobile admission can now remove text from a newer, independent draft when it shares the submitted prefix.
Reviewed changes in e316661f since the prior review at a9e7c930, with the full PR diff read for context.
- Preserved refreshed Bot definitions during failed optimistic edits and invalidated both detail and list caches after final failure.
- Added retained-ownership draft consumption before mobile screen/client checks, with older-session store tests on iOS and Android.
- Updated implementation documentation to describe the revised rollback and admission behavior.
Validation: All 247 focused desktop Bot tests passed. Changed Swift app/test sources parse, and portable iOS release/policy checks pass. Native XCTest requires macOS/Xcode; Android chat tests could not configure because Plugin [id: 'org.gradle.toolchains.foojay-resolver-convention', version: '1.0.0'] was not found. The mobile finding is source-traced, not a natively executed reproduction.
gpt-6.1-sol | 𝕏
A draft typed and saved after the composer cleared is a different draft, even when it starts with the admitted text; consumeDraft now compares the saved text with the draft the input left from before stripping it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RQjxbg1n4c3xNJRpUaF1WL
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes in 45696ea0 since the prior review at e316661f, with the full PR diff read for context.
- Restricted mobile draft consumption to saved text matching the captured pre-send draft, preserving newer independent drafts that share the admitted prefix.
- Passed the original draft snapshot through both iOS and Android admission paths while retaining settlement before the current-screen/client guard.
- Extended both draft-store tests with newer same-prefix draft preservation and updated the implementation plan.
Validation: Changed Swift app/test sources parse successfully, and portable iOS checks pass (20 Ruby tests, 30 Node tests). Native XCTest requires macOS/Xcode. The focused Android test could not configure because Plugin [id: 'org.gradle.toolchains.foojay-resolver-convention', version: '1.0.0'] was not found; its behavior was source-traced, not executed. Hosted CI on this head was still running when inspected.
gpt-6.1-sol | 𝕏
Hermes review failedHermes could not produce a code-review verdict for this head SHA. Engine: Safe summary: Local logs: |
|
The red "Hermes Review Bot" status on 45696ea is the local review bot's own engine timing out after 32 minutes ( Generated by Claude Code |
Brings in #568 (MCP on pi-mcp, Aiden's connector catalog and Connectors settings) and #576 (instant UI and optimistic updates on desktop Bots, iOS and Android). Conflicts: the test:serial chain is a union (main dropped the plugin catalog tests and plugins:refresh, this branch adds the Bot suites); the Bot chat keeps the hand-off note path beside main's retry with one request id per failed turn, and the person-paused card beside main's hidden interrupted card; the test DOM and chat pane tests keep both sides. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FTLKrZsPKZM2hnxHVxEnak

Requested by sbt · project thread
Summary
Every tap changes the screen before the round trip; the server action starts whenever it starts. This is the write and navigation side of the cache-first loading plan (#516), written up in
docs/plans/instant-ui-optimistic-updates-plan.mdwith the per-surface audit, what landed and what was deferred. No Remote protocol change.Desktop Bots
requestIdper submission, settled when the projected entry (or queued row) with the same text arrives, or 4 s after main confirmed. The id is kept across a retry after an uncertain failure; Try again mints one id per failed row and hides the failed card at once.staleuntil the fresh one lands) instead of a skeleton;reloadkeeps the view; a resubscribe failure shows a red Try again callout over the kept view.bots:createFromPresetanswers before the self-intro is sent.useBotseeds from the cached list;/botsredirects from a list cached within five minutes.iOS
AidenInstallation.serverFeatureskeeps the Mac's last/servertokens per pairing;coordinator.knownServerFeaturesserves them while connecting, so a durable-session Mac never lands on the legacy Bot path.AidenChatDraftStore.consumeDraftthen retires the admitted text under the pairing's ownership (only while the saved draft is still the one it was sent from), and a rejection or unconfirmed send restores the text merged under anything typed since.Android
AidenChatViewModelfollows the pairing's current client (it captured the client once, so Retry after a failed connection stranded the open chat) and rereads the transcript when the pairing gets a new client.coordinator.supportsBotDurableSession()reads the pairing's saved features until/serveranswers (Bot chat route, Bots home, deep links).Deferred (in the plan)
Send while connecting (both phones), phone Steer/Queue pending bubbles, cold-cache transcript skeleton, Android New chat FAB and connecting banner.
Review
Reviewed between steps with an Opus 5.5 medium-effort pass (13 findings applied), then three Pullfrog rounds: subtitle clearing, overlapping failed edits, rejected run input losing its durable copy, failed edits overwriting a phone's newer rename, late admission leaving admitted text as a draft, and a same-prefix newer draft being consumed. All addressed; Pullfrog reports no new issues on the final head. The "Hermes Review Bot" status on the final head is that local bot's own engine timeout, not a finding.
Tests
renderer/main/bots/*.test.tsx,bots-view.test.tsx,bots-home.test.tsx(247/247 incl. four new profile tests),bot-starter.test.ts,handlers/bots.test.ts;tscand eslint clean.AidenRemoteClientTests.testInstallationKeepsTheLastServerFeaturesForGatesWhileConnecting,AidenBotCacheTests.testDraftStoreConsumesAdmittedRunInputFromAnOlderSession(CI only; no Xcode here).AidenChatTest.chatKeepsLoadingWithThePairingsRefreshedClient(fails on the old code),AidenChatTest.testDraftStoreConsumesAdmittedRunInputFromAnOlderSession,AidenRemoteCoordinatorClientTest.botDurableSessionGateReadsThePairingsSavedFeaturesUntilServerAnswers,AidenProductShellTest.testBotsHomeContentStates(CI only; Gradle cannot fetch the Android plugin here).chatKeepsLoadingWithThePairingsRefreshedClientwith only anAssert.java:89frame (run); the test now names each step and compares the post-refresh error state with the pre-refresh one, and it passed on every run since.Docs
docs/plans/instant-ui-optimistic-updates-plan.md(new),docs/plans/README.md,docs/design-guide.md(Loading and optimistic updates),.memory/instant-ui-optimistic-updates.mdand related memory notes.🤖 Generated with Claude Code
https://claude.ai/code/session_01RQjxbg1n4c3xNJRpUaF1WL