fix(mobile): preserve live content during loading and reconnect - #5652
fix(mobile): preserve live content during loading and reconnect#5652iscekic wants to merge 4 commits into
Conversation
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
Files Reviewed (10 files)
Previous Review Summary (commit b88eafb)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit b88eafb)Status: 1 Issue Found | Recommendation: Address before merge Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
Files Reviewed (10 files)
Reviewed by grok-4.6 · Input: 294.6K · Output: 19K · Cached: 590.5K Review guidance: REVIEW.md from base branch |
|
(bot) BLOCKED: mobile-live-loading-2be5 BLOCKED Final section reportA human must review the retained workflow repair and its five capability failures before a reviewed merge. Required actionReview the staged workflow patch: git -C "/Users/igor/Projects/.worktrees/workflow-source-paths-20260828" diff --cachedReview its preserved failure evidence at Verified delivery stateProduct worktree:
No PR has the human-ready label. Work completed
Acceptance outcomesImplementation and mounted tests cover the planned state matrices and safety fences. Repair evidence and counters
Relevant evidence:
Remaining work after the blocker clearsRetry the account-bearing helper and run fresh preparation. Resource stateAll section-owned recorders, device claims, stack processes, containers, and E2E slots are stopped or released. |
|
(bot) Rejected the Retry remount finding at The conditional
pnpm --filter kilo-app exec vitest run --project mobile-mounted src/components/home/home-screen.mounted.test.tsx --reporter=verboseReview-thread enumeration remains unavailable because the GraphQL rate limit is exhausted. This comment does not waive the thread gate. |
|
(bot) BLOCKED: mobile-live-loading-2be5 BLOCKED Recovery resultThe fresh bundle proves one account-bearing Home opening, but a repeated opening fails to reach Home. Blocking gateRequired gate: complete development admission before native and backend verifier dispatch.
Command: $KILO_WORKFLOW/e2e/session.sh open 7534187C-0893-4290-89FF-8F8D0F72888B home --email=live-a@example.comDo not reuse this device identifier for another round without a fresh owned claim. The warm destination failure needs diagnosis before another authorized runtime recovery. Repair rounds and workflow fixes
No product repair, product takeover, new simplify pass, or translation pass ran in this recovery. Acceptance outcomes
PR state
The supported gate reports the GraphQL rate limit exhausted. Finding dispositionREJECT the Retry remount finding at agent-sessions-section.tsx:164. No other finding was rejected during this recovery. Counters
Evidence
Credential files remain private and separate from these report artifacts. Cleanup and next stepThe owner proof confirms Shutdown, no claim, no recorder, no Appium/WDA listener, and no owned container or network. Next step: diagnose and repair the repeated account-bearing destination failure before resuming runtime verification and delivery gates. |
Summary
useLiveSessionContextsuppliesLiveSessionContextfor authenticated personal or confirmed organization selections;liveSessionContentrequireshasAcceptedSuccessfor emptiness and hides rows after non-retryable errors.AgentSessionsSectionnow acceptsLiveSessionProps(context,sessions); removingbuildRowsalso removes stored-session fallback and keeps the preview limited to three live rows.LiveSessionFeedbackseparates query progress, internet loss, and socket recovery from agent run state, preserving rows and retry focus or offering Profile recovery.Files
apps/mobile/src/components/home/agent-sessions-section.tsx— Source; modified; 346 changed lines. Adds authentication and membership checks plus Personal or organization labels. Keeps readable rows through retryable failures. Separates membership retries from session retries with a submit lock and persistent busy controls. Offers Profile recovery for unavailable selections and non-retryable errors, with permission, not-found, or neutral messages. Announces initial loading and distinguishes Connecting, Reconnecting, and Connection lost, with an independent connection retry when automatic retries stop. Suppresses active progress during paused requests; the global offline banner still owns the offline announcement. Keeps keyed live cards and existing See all navigation; makesHOME_LIVE_SLOT_MIN_CLASSprivate.apps/mobile/src/components/home/agent-sessions-section.test.ts— Test; modified; 343 changed lines. Updates the section test suite.Home now owns one
useLiveAgentSessionsresult, so stored-history loading and failures no longer block the live preview.Pull-to-refresh calls its
refetchinstead of invalidating every active query.HomeScreenkeeps the layout mounted;context.isReadycontrols New coding task, whileaccountReadyallows product choices during membership loading or failure.Files
apps/mobile/src/components/home/home-screen.tsx— Source; modified; 110 changed lines. Passes the live result and context to the section instead of querying stored history. Removes history-dependent errors and whole-screen loading branches. Removes the loading/content fade swaps while retaining layout transitions. Separates action readiness from session requests and narrows pull-to-refresh to live sessions.apps/mobile/src/components/home/home-screen.mounted.test.tsx— Test; modified; 730 changed lines. Updates the mounted Home screen suite.apps/mobile/src/components/home/home-screen.test.ts— Test; modified; 2 changed lines. Updates the Home screen test suite.AgentSessionListScreenadopts the shared content states andLiveSessionFeedback, retaining readable rows during pending requests and retryable failures.context.isReadygates creation; confirmed emptiness uses the inline button, while every other ready state keeps the floating button.Inline failure announcements replace refresh-error toasts without changing history navigation, focused foreground refresh, attention updates, or scroll retention.
Files
apps/mobile/src/components/agents/session-list-screen.tsx— Source; modified; 64 changed lines. Places shared feedback outside the list and uses accepted results to choose loading, empty, error, or rows. Keeps the list mounted during refreshes and reconnects. Extends creation access to pending and error states for ready contexts and adds an accessibility label to the empty-state button. Removes the duplicate refresh-failure toast.apps/mobile/src/components/agents/session-list-screen.mounted.test.tsx— Test; modified; 1,068 changed lines. Updates the mounted live-list suite.ProductChoicesPropsnow requirescontextReadyfor Code Reviewer and Security Agent, so unresolved organization selections cannot open scoped tools.PR Review remains available after account readiness, independent of membership loading or failure, under the existing
FEATURE_FLAG_PR_REVIEW.If neither scoped tools nor PR Review can appear,
ProductChoicesomits Explore; callers must supply the readiness value.Files
apps/mobile/src/components/home/product-choices.tsx— Source; modified; 48 changed lines. Adds the required readiness prop and conditionally shows scoped rows. Keeps the personal and organization routes, the PR Review route, and the existing flag default unchanged.apps/mobile/src/components/home/product-choices.mounted.test.tsx— Test; modified; 4 changed lines. Updates the mounted product-choice suite.The new
agents.sessionList.updatingmessage displays “Updating” when readable rows have an active, unpaused fetch.This distinguishes background query work from connection notices and agent run state.
Only English gains the message; final translations remain pending.
Files
apps/mobile/src/i18n/locales/en.json— Source; modified; 1 added line. Adds the English text for the background-refresh notice.Tests: 5 files modified:
session-list-screen.mounted.test.tsx,agent-sessions-section.test.ts,home-screen.mounted.test.tsx,home-screen.test.ts, andproduct-choices.mounted.test.tsx(2,147 changed lines).Generated: 0 files changed.
Verification
Visual Changes
Visual Changes: N/A
Reviewer Notes
Human steps
Evidence and scope
Kilo-Org/cloud; basemobile-live-loading-2be5-s2, headmobile-live-loading-2be5-s3, commitb88eafb15c5b3920fa4725820dd2e41d5492db20./Users/igor/Projects/.worktrees/mobile-live-loading-2be5.Notes
Runtime verification is pending on the stack tip; this level has focused test coverage only.
Stacked PRs — merge bottom to top. Each level shows only its own diff.
Runtime verification (E2E, user advocacy, simplify) runs on the tip PR over every level.
Every level keeps its own checks, its own bot review, and its own threads; each one is answered on its own PR.
Each level is its own deliverable: it builds and passes its own checks alone.
A finding on a level is repaired on that level, then carried upward with stack.sh forward.
mobile-live-loading-2be5— fix(mobile): serialize development account replacement #5641mobile-live-loading-2be5-s2— fix(mobile): track accepted live query outcomes #5649mobile-live-loading-2be5-s3— fix(mobile): preserve live content during loading and reconnect #5652 ← this PR (tip)