feat(mobile): agent interaction prerequisites (presence, inline suggestions, blocking interaction)#4570
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryReviewed the mobile agent-interaction prerequisites (blocking-interaction precedence, composer preservation, CLI-session presence, and inline suggestion cards) across all 10 changed files with high confidence and found no security, correctness, or breaking-change issues in the changed code. Files Reviewed (10 files)
Reviewed by claude-sonnet-5 · Input: 28 · Output: 12.7K · Cached: 717.3K Review guidance: REVIEW.md from base branch |
eshurakov
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prerequisite mobile release reimplementing in-spirit useful parts of closed PR #4545 on latest
main, on top of already-merged PR #4445 (which shipped remote CLI slash commands but leftREMOTE_SESSION_ATTENTION_PUSH_ENABLEDdisabled).useCliSessionPresenceholds/presence/cli-session/{kiloSessionId}only after the route's session data has verifiably loaded and matches, and only while the route is focused and the app is foregrounded.SuggestToolCardrenders interactive accept/dismiss controls only at the exact matching pending/runningsuggesttool call (callId===callID), with a synchronous same-frame action lock, per-action loading state, fixed safe retry copy, and automatic reset on request replacement (viakey={requestId}).getBlockingInteractiongives a pending question priority over a pending permission.Viewwrapper +disabled) during a blocking interaction, so draft text, attachments, and voice-input abort semantics are preserved instead of being unmounted.No push notifications are enabled by this change;
REMOTE_SESSION_ATTENTION_PUSH_ENABLEDis untouched.Changes
apps/mobile/src/components/agents/agent-interaction-policy.ts(+test) — pure question/permission precedence.apps/mobile/src/components/kilo-chat/hooks/use-cli-session-presence.ts(+test) — canonical CLI-session presence subscription and loaded-session resolver.apps/mobile/src/components/agents/suggestion-card-state.ts(+test),suggestion-card.tsx,suggest-tool-card.tsx— inline suggestion presentation, matching, and action-lock state.apps/mobile/src/components/agents/tool-part-renderer.tsx— routessuggesttool parts toSuggestToolCard.apps/mobile/src/components/agents/session-detail-content.tsx— integrates blocking-interaction policy, presence, and the hidden-not-unmounted composer wrapper.Verification
pnpm test(apps/mobile): 121 files / 783 tests passed (14 new tests across 3 new test files; baseline was 118/769).pnpm typecheck,pnpm lint,pnpm check:unused,pnpm format:check: all clean.kiloCLI session against this worktree's local backend):event-servicelogs that opening the CLI session's detail screen subscribes to the exact/presence/cli-session/{kiloSessionId}context, and navigating away unsubscribes.suggesttool card andquestion/permissionblocking states was not deterministically reproducible in this run (requires CLI-side scenario/config outside this project's scope — the local CLI auto-approves permissions and does not emitsuggesttool calls from ordinary prompts). These states are covered by the 14 new automated unit/state tests plus the reviewer's explicit sign-off on lock/matching/error-copy semantics.Non-goals confirmed unchanged
REMOTE_SESSION_ATTENTION_PUSH_ENABLEDand push enablement/presence/cli-session/*namingpnpm-lock.yaml