Skip to content

fix(mobile): subagent needs-input, transcript blanking, review transcript truncation, sheet flash - #5646

Merged
iscekic merged 7 commits into
mainfrom
mobile-fixes-w8b
Aug 28, 2026
Merged

fix(mobile): subagent needs-input, transcript blanking, review transcript truncation, sheet flash#5646
iscekic merged 7 commits into
mainfrom
mobile-fixes-w8b

Conversation

@iscekic

@iscekic iscekic commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Mobile defects from the W8-B pass.

  • Subagent needs input: a subagent permission or question arrives on the child session row. The session list emits root rows only, so the raise was dropped. Hoist the child's needs-input status onto its root in UserConnectionDO.aggregateSessions, and broadcast session.status.updated on the root when a child raise appears, settles, or leaves the heartbeat, so clients' sticky attention sets and clears on the explicit event. Not a .kilo/ special case; any subagent prompt had the same gap.
  • Transcript blanking on fast scroll: FlashList draws 250 dp ahead by default. Transcript rows are tall and parse markdown on mount. Raise drawDistance to 1000 dp and give the transcript list item types so a time marker is not recycled into a message bubble. Platform-symmetric; no Android-only code. The removeClippedSubviews workaround for KILO-APP-25 is untouched.
  • Review transcript truncation: the spectator rows and the server session log cut text at 100/200/300 chars. Both renderers wrap, so the cuts only hid content. Removed.
  • In-progress review transcript: the stream replays the whole event log on connect and the spectator committed one render per event. Rows now batch once per tick. The error clears on reconnect (the SDK reports it separately from the first connect). Synthetic events share eventId: 0; they are no longer keyed, so they stop collapsing into one row.
  • White flash on sheet close: RN Modal paints its container white, and Android unmounts children before the slide-out ends. Set backdropColor={colors.background} on every opaque Modal. New oxlint rule rn-modal-backdrop/require-backdrop fails on any <Modal> without transparent or backdropColor.

Not done: rendering the review transcript with the session conversation components. Live events can be folded into StoredMessage with existing SDK helpers, but history needs a new field or procedure (getReviewStreamInfo has no cliSessionId) and a spectator rewrite. Separate PR.

Checks

  • pnpm format && pnpm typecheck && pnpm lint && pnpm check:unused && pnpm test in apps/mobile: green
  • pnpm vitest run src/dos/UserConnectionDO.test.ts + pnpm typecheck in services/session-ingest: green
  • pnpm typecheck in apps/web: green
  • Lint rule verified: fires on the 4 pre-fix Modals, clean after

E2E (local stack, iOS 17 Pro simulator + Pixel 9 API 35 emulator, dark theme)

  • Sheet close (child session sheet and the review transcript sheet), recorded at 30 fps, baseline vs this branch: zero bright frames on iOS in both runs. The flash does not reproduce on the simulator; the fix removes the only white surface and does not regress the close. Android captures of the review screen come back black (screen-capture prevention), so Android is not visually verified.
  • Fast fling on the 60-message paged-history session, baseline vs this branch: no blank frames in either run on the simulator. The blanking does not reproduce there; drawDistance is a plain prefetch change.
  • Subagent needs-input: covered by the DO and mobile unit tests. No local subagent permission scenario exists.
  • In-progress review: no local running-review scenario exists; covered by the mounted tests.

The review spectator rows and the session log cut assistant text,
commands, and errors at fixed lengths. Both renderers wrap text, so the
cuts only hid content.
FlashList draws 250 dp ahead by default. Transcript rows are tall and
parse markdown on mount, so a fast fling showed blank space. Raise the
draw distance to 1000 dp and give the transcript list item types so a
time marker is not recycled into a message bubble.
A react-native Modal paints its container white, and Android unmounts
the children before the slide-out ends. Set backdropColor to the theme
background on every opaque Modal and add an oxlint rule that requires
transparent or backdropColor on each Modal.
A subagent permission or question arrives on the child session row. The
session list emits root rows only, so the raise was dropped. Hoist the
child's needs-input status onto its root in the DO aggregate and in the
mobile heartbeat filter.
@iscekic iscekic self-assigned this Aug 28, 2026
Comment thread apps/mobile/src/lib/active-sessions-live.ts Outdated
@kilo-code-bot

kilo-code-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Hoisted child attention now arrives and clears via root session.status.updated; previous childrenSettled issues are resolved.

Files Reviewed (6 files)
  • apps/mobile/src/lib/active-sessions-live-roots.ts
  • apps/mobile/src/lib/active-sessions-live.test.ts
  • apps/mobile/src/lib/active-sessions-live.ts
  • services/session-ingest/src/dos/UserConnectionDO.test.ts
  • services/session-ingest/src/dos/UserConnectionDO.ts
  • services/session-ingest/src/dos/child-attention.ts
Previous Review Summaries (3 snapshots, latest commit 6ee4bd6)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 6ee4bd6)

Status: 1 Issue Found | Recommendation: Address before merge

Fix these issues in Kilo Cloud

Executive Summary

childrenSettled does not clear a hoisted raise when the child is dropped from the heartbeat, and it skips sticky attention for a root that still has subagents.

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/mobile/src/lib/active-sessions-live-roots.ts 59 childrenSettled misses dropped children and clears a root's own raise
Files Reviewed (3 files)
  • apps/mobile/src/lib/active-sessions-live-roots.ts - 1 issue
  • apps/mobile/src/lib/active-sessions-live.test.ts
  • apps/mobile/src/lib/active-sessions-live.ts

Previous review (commit c28c2fe)

Status: 1 Issue Found | Recommendation: Address before merge

Fix these issues in Kilo Cloud

Executive Summary

Hoisting a subagent question/permission onto the root fights mobile sticky attention, so NEEDS INPUT can stay on the tray after the child resolves.

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/mobile/src/lib/active-sessions-live.ts 113 Hoisted child attention sticks on the root after the child resolves
Files Reviewed (23 files)
  • apps/mobile/.oxlintrc.json
  • apps/mobile/src/components/agents/markdown-table.tsx
  • apps/mobile/src/components/agents/message-details-sheet.mounted.test.tsx
  • apps/mobile/src/components/agents/part-detail-sheet-host.mounted.test.tsx
  • apps/mobile/src/components/agents/part-detail-sheet.mounted.test.tsx
  • apps/mobile/src/components/agents/session-detail-content.tsx
  • apps/mobile/src/components/agents/session-message-list.tsx
  • apps/mobile/src/components/agents/session-page-sheet.mounted.test.tsx
  • apps/mobile/src/components/agents/session-page-sheet.tsx
  • apps/mobile/src/components/agents/session-transcript.ts
  • apps/mobile/src/components/code-reviewer/review-detail-screen.mounted.test.tsx
  • apps/mobile/src/components/code-reviewer/review-spectator-rows.test.ts
  • apps/mobile/src/components/code-reviewer/review-spectator-rows.ts
  • apps/mobile/src/components/code-reviewer/review-spectator-stream.test.ts
  • apps/mobile/src/components/code-reviewer/review-spectator-stream.ts
  • apps/mobile/src/components/code-reviewer/review-spectator.tsx
  • apps/mobile/src/components/image-viewer-modal.tsx
  • apps/mobile/src/lib/active-sessions-live.test.ts
  • apps/mobile/src/lib/active-sessions-live.ts - 1 issue
  • apps/web/src/lib/code-reviews/session-log.ts
  • services/session-ingest/src/dos/UserConnectionDO.test.ts
  • services/session-ingest/src/dos/UserConnectionDO.ts
  • tools/oxlint/rn-modal-backdrop.mjs

Previous review (commit f2cc8c9)

Status: 1 Issue Found | Recommendation: Address before merge

Fix these issues in Kilo Cloud

Executive Summary

Hoisting a subagent question/permission onto the root fights mobile sticky attention, so NEEDS INPUT can stay on the tray after the child resolves.

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/mobile/src/lib/active-sessions-live.ts 113 Hoisted child attention sticks on the root after the child resolves
Files Reviewed (18 files)
  • apps/mobile/.oxlintrc.json
  • apps/mobile/src/components/agents/markdown-table.tsx
  • apps/mobile/src/components/agents/message-details-sheet.mounted.test.tsx
  • apps/mobile/src/components/agents/part-detail-sheet-host.mounted.test.tsx
  • apps/mobile/src/components/agents/part-detail-sheet.mounted.test.tsx
  • apps/mobile/src/components/agents/session-detail-content.tsx
  • apps/mobile/src/components/agents/session-message-list.tsx
  • apps/mobile/src/components/agents/session-page-sheet.mounted.test.tsx
  • apps/mobile/src/components/agents/session-page-sheet.tsx
  • apps/mobile/src/components/agents/session-transcript.ts
  • apps/mobile/src/components/code-reviewer/review-spectator-rows.ts
  • apps/mobile/src/components/image-viewer-modal.tsx
  • apps/mobile/src/lib/active-sessions-live.test.ts
  • apps/mobile/src/lib/active-sessions-live.ts - 1 issue
  • apps/web/src/lib/code-reviews/session-log.ts
  • services/session-ingest/src/dos/UserConnectionDO.test.ts
  • services/session-ingest/src/dos/UserConnectionDO.ts
  • tools/oxlint/rn-modal-backdrop.mjs

Reviewed by grok-4.6 · Input: 120.1K · Output: 20K · Cached: 1.1M

Review guidance: REVIEW.md from base branch main

The stream replays the whole event log on connect and the spectator
committed one render per event. Batch the rows once per tick. Clear the
error on reconnect, which the SDK reports separately from the first
connect. Synthetic events share eventId 0, so do not key them; a shared
key collapsed them into one row.
The heartbeat merge keeps attention sticky, so a hoisted permission stayed
on the root after the child resolved. When a heartbeat lists the root's
children and none waits for input, the live status wins. Move the root
selection into its own module to keep the file under the line limit.
Comment thread apps/mobile/src/lib/active-sessions-live-roots.ts Outdated
…event

Clients keep a needs-input status sticky until an explicit
session.status.updated names the session, so a hoist that only lives in
the aggregate got stuck on the root. The DO now diffs the hoisted status
between heartbeats and broadcasts session.status.updated on the root when
a child raise appears, settles, or leaves the heartbeat. The mobile
heartbeat hoist is removed; the DO owns it.
@iscekic iscekic added the human-ready The PR is ready for human review. label Aug 28, 2026
@iscekic
iscekic merged commit 614e170 into main Aug 28, 2026
24 checks passed
@iscekic
iscekic deleted the mobile-fixes-w8b branch August 28, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-ready The PR is ready for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants