Skip to content

fix(mobile): stabilize agent message UI - #4947

Merged
iscekic merged 6 commits into
mainfrom
chat-message-ui-5edf
Aug 3, 2026
Merged

fix(mobile): stabilize agent message UI#4947
iscekic merged 6 commits into
mainfrom
chat-message-ui-5edf

Conversation

@iscekic

@iscekic iscekic commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What

  • Stabilize a queued user-message badge while an agent response streams, so dequeueing keeps the bubble row height unchanged.
  • Expand the markdown-table sheet close control to a 56pt effective touch target with hitSlop={8} while retaining its 40pt visual size.
  • Add focused component and helper coverage for both fixes.

Why

  • Removing the queued badge during a stream changed a bottom-anchored FlashList row height and caused a hard scroll reposition.
  • The table close target was below Apple's 44pt minimum.

How

  • Track queued message IDs in the parent with render-phase state; hold each ID only for its current stream.
  • Keep the badge row mounted across dequeue and switch it between visible and inaccessible/transparent states.
  • Release held IDs when the stream ends or the session changes.
  • Assert the real table close Pressable has accessibilityLabel="Close table" and hitSlop={8}.

Task 2 — reasoning blocks residual

  • No mobile reasoning change is included. Code tracing shows mobile renders reasoning parts with text and preserves final message.part.updated text.
  • The required live cloud-agent diagnostic could not create a real session: the E2E account has no GitHub integration/repository. This is a cloud-agent setup prerequisite, not evidence for a mobile fix.
  • Human runtime verification should exercise an auto/balanced cloud-agent session that emits reasoning: confirm the collapsed Thought block expands to text and no empty/overlapping chrome remains after completion.
  • The prior diagnostic confirmed the E2E app model selection was Auto Efficient; the reported production configuration is balanced. Routing-dependent differences remain delegated to the assignee.

Verification

  • apps/mobile: pnpm format
  • apps/mobile: pnpm typecheck
  • apps/mobile: pnpm lint
  • apps/mobile: pnpm check:unused
  • apps/mobile: pnpm test — 298 files / 2589 tests passed
  • git diff --check
  • Fresh cumulative implementation review: No findings.
  • E2E: human-e2e — runtime verification delegated to @iscekic

Visual Changes

  • Final static test and code evidence is attached below. A runtime before/after capture is delegated to the human E2E assignee because no live cloud-agent session could be created without GitHub integration/repository setup.

Reasoning diagnostic capture

@iscekic iscekic self-assigned this Aug 1, 2026
Comment thread apps/mobile/src/components/agents/session-detail-content.tsx
Comment thread apps/mobile/src/components/agents/message-bubble.tsx
Comment thread apps/mobile/src/components/agents/markdown-table.test.ts
@kilo-code-bot

kilo-code-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of 6f712d90044a2cf8 found no code changes (the only new commit is an empty retrigger commit), and the three previously raised suggestions were explicitly dispositioned by the author, so no unresolved findings remain.

Notes and assumptions
  • Incremental scope was empty: git diff 6f712d90..044a2cf8 produced no changed files or lines.
  • Prior suggestions on session-detail-content.tsx:121, message-bubble.tsx:116, and markdown-table.test.ts:10 were reviewed as SUGGESTION severity only (never merge-blocking) and were answered with reasoned rejections; they are not carried forward.
  • Runtime verification of the layout-stability fix and the reasoning-block item deferred in the PR description remains delegated to the human E2E assignee; this review is static only, per read-only mode.
Files Reviewed (0 files in incremental scope)

No files changed since the previously reviewed commit 6f712d90. Previously reviewed files:

  • apps/mobile/src/components/agents/markdown-table.test.ts
  • apps/mobile/src/components/agents/markdown-table.tsx
  • apps/mobile/src/components/agents/message-bubble-test-utils.ts
  • apps/mobile/src/components/agents/message-bubble.test.ts
  • apps/mobile/src/components/agents/message-bubble.tsx
  • apps/mobile/src/components/agents/queued-badge-hold.test.ts
  • apps/mobile/src/components/agents/queued-badge-hold.ts
  • apps/mobile/src/components/agents/session-detail-content.tsx
Previous Review Summary (commit 6f712d9)

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

Previous review (commit 6f712d9)

Status: 3 Issues Found | Recommendation: Address before merge

Executive Summary

No correctness or security defects found; the highest-value item is a duplicated empty-set sentinel in session-detail-content.tsx that makes the new render-phase state adjustment fire one unnecessary extra render of the whole session screen per mount/session switch.

Overview

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

SUGGESTION

File Line Issue
apps/mobile/src/components/agents/session-detail-content.tsx 121 Local EMPTY_IDS differs from the sentinel nextHeldQueuedIds returns, so the render-phase update fires once with no state change (extra render on mount and per session switch)
apps/mobile/src/components/agents/message-bubble.tsx 116 Queued badge lost its FadeIn/FadeOut transition; opacity can be animated with Reanimated while keeping the row mounted (per apps/mobile/AGENTS.md)
apps/mobile/src/components/agents/markdown-table.test.ts 10 Whole-module react mock exposes only useState; any additional hook usage will fail with an opaque error. Spread importOriginal()
Notes and assumptions
  • Verified the render-phase state adjustment converges (no infinite render loop): the session-change branch and the nextHeldQueuedIds identity contract both settle after at most two extra passes.
  • Verified hitSlop={8} on the 40pt close control yields the claimed 56pt effective target and stays inside the 56pt modal header row.
  • No memory-leak vectors introduced: heldQueuedIds is bounded by queued message ids and is released on stream end, session change, and unmount; no new timers, subscriptions, or retained closures.
  • Runtime behavior of the layout-stability fix (and the reasoning-block item deferred in the PR description) was not exercised; this review is static only, per read-only mode.
Files Reviewed (8 files)
  • apps/mobile/src/components/agents/markdown-table.test.ts - 1 issue
  • apps/mobile/src/components/agents/markdown-table.tsx - 0 issues
  • apps/mobile/src/components/agents/message-bubble-test-utils.ts - 0 issues
  • apps/mobile/src/components/agents/message-bubble.test.ts - 0 issues
  • apps/mobile/src/components/agents/message-bubble.tsx - 1 issue
  • apps/mobile/src/components/agents/queued-badge-hold.test.ts - 0 issues
  • apps/mobile/src/components/agents/queued-badge-hold.ts - 0 issues
  • apps/mobile/src/components/agents/session-detail-content.tsx - 1 issue

Fix these issues in Kilo Cloud


Reviewed by claude-opus-5 · Input: 22 · Output: 3.8K · Cached: 383.5K

Review guidance: REVIEW.md from base branch main

@iscekic iscekic added the human-ready The PR is ready for human review. label Aug 1, 2026
@iscekic
iscekic merged commit da77435 into main Aug 3, 2026
20 checks passed
@iscekic
iscekic deleted the chat-message-ui-5edf branch August 3, 2026 11:30
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