fix(mobile): keep the KiloClaw tab stable and shape the live-session placeholder - #6705
Conversation
…placeholder Surface: mobile-app Explorer finding: 2 visual defects on android: The bottom navigation renders only three; The LIVE NOW section renders a large bla The user-agent explorer found these 2 while using the app like a user. They are one kind of defect on one platform, so they are ONE item: the pull request must fix and prove every one of them. One must-run scenario per finding: the plan needs 2 musts, one for each finding below. The explorer never edits product code. Evidence (from the device runs): --- Finding 1 of 2: agents-empty: The bottom navigation renders only three tabs (HOME, AGENTS, PROFILE) here and on Profile, while the Home and KiloClaw screens of the same app render four (HOME, KILOCLAW, AGENTS, PROFILE), so the tab bar changes shape from screen to screen. Flow: agents-empty Found on revision: d846cc7 Repro: 1. set this state first: uimode day; battery 74 discharging; reviews 5; credits 18; relaunch; deeplink kiloapp://expo-development-client/?url=http%3A%2F%2Flocalhost%3A20081; resume 2. open the app on emulator-5602 3. reach agents-empty 4. the capture shows the defect named below Observed: The bottom navigation renders only three tabs (HOME, AGENTS, PROFILE) here and on Profile, while the Home and KiloClaw screens of the same app render four (HOME, KILOCLAW, AGENTS, PROFILE), so the tab bar changes shape from screen to screen. Expected: the screen renders without this defect - ~/.local/share/kwf/findings/explorer-2-visual-defects-on-android-the-bottom-navi
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Reviewed the KiloClaw tab latch ( Files Reviewed (5 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
Changelog for users
Changelog for maintainers
apps/mobile/src/lib/hooks/use-kiloclaw-tab-visible.ts— Finding 1 (agents-empty) accepted: a fetched empty instance list removed a tab the persisted answer had already shown, so the bar's shape depended on which screen you were on. The entry now latches on for the session; the fetched answer is still persisted so the next launch hides it.apps/mobile/src/components/home/agent-sessions-section.tsx— Finding 2 (uia2-warm-emulator-5602) accepted: the pending branch drew one full-width grey skeleton block. It now draws a reserved 72px card using the real session row's box.use-kiloclaw-tab-visible.tsand the placeholder geometry inagent-sessions-section.tsx.E2E proof
[e2] Finding 2 loading: the LIVE NOW section shows the designed loading card, not a blank grey block (needs:fault: stall nextjs after the signed-in-home state is restored, then cold-open so… — android: the prescribed cold-open under
fault.sh stall nextjswas live (e2-stall.log: "fault.sh: stalled pids [691707] for 240s") but the section's fetch timed out to the retryable error card rather than staying pending (e2-scene.log: "SCENE e2 OK" then "android.widget.TextView Couldn't load active sessions"), so the designed pending placeholder was captured under a temporary forced pending branch that was then reverted (git status clean, no committed hack) — e2-loading.txt shows the LIVE NOW section in its loading state ('text="LIVE NOW"' and 'text="SEE ALL"') with no "Couldn't load" text…[e4] Finding 2 retryable unhappy: the Home live surface shows its load failure with a working Retry (needs:fault: down nextjs after the signed-in-home state is restored; then `fault.sh up… — android: with nextjs down the Home cold-open shows the live load failure and its Retry (e4-error.log: "SCENE e4 OK", "android.widget.TextView Couldn't load active sessions", "android.widget.Button Retry"), tapping Retry re-fires the request (e2-scene.log:43 "android.widget.Button Retry, busy"), and once the service is restored the surface recovers to content (e4-recovered.txt: 'text="LIVE NOW"' and 'text="Nothing running right now"'), screenshots e4-error.png and e4-recovered.png.
[p2] Finding 2 non-retryable unhappy: the LIVE NOW section shows the permission state with 'Back to profile' — android emulator-5554; fixture: db.sh removed the signed-in member's (857f9ef4-...) organization_memberships row in the w4c-org-pair org 'Acme Corp' (p2-fixture.log) so activeSessions.list returns FORBIDDEN for the org the app holds as its context; after a Home pull-to-refresh the LIVE NOW section digest shows 'Access denied' / "You don't have permission to view this." with the 'Back to profile' control (p2-script.log, still p2.png), and that control navigates to the Profile tab (p2-profile.png); no functional UX defect — the state gives a specific message and one working next action, and the…
[p2] Finding 2 non-retryable unhappy: the LIVE NOW section shows the permission state with 'Back to profile'
[e1] ux-check: placeholder text-line left edge aligns with the loaded row's text left edge and the leading mark's width is unchanged — Loaded row title bounds [87,373][950,419] (e1-scene.log, SCENE e1 OK) and pending-placeholder skeleton lines [87,329][704,357] and [87,375][395,403] and row/placeholder leading marks [40,295][48,437] and [40,295][48,537] (e1-pending.xml, e1-loaded.xml) show the same text left edge x=87 and the same leading-mark x=40 width 8px, so the title does not shift; no UX-DEFECT observed.
[e2] Finding 2 loading: the LIVE NOW section shows the designed loading card, not a blank grey block (needs:fault: stall nextjs after the signed-in-home state is restored, then cold-open so…
E2E proof — log excerpts
/home/igor_kilocode_ai/.local/share/kwf/sections/explorer-2-visual-defects-on-android-the-bottom-navigatio-cee04-9f3d/e2e-mobile-app/e1-scene.log/home/igor_kilocode_ai/.local/share/kwf/sections/explorer-2-visual-defects-on-android-the-bottom-navigatio-cee04-9f3d/e2e-mobile-app/e1tabs-scene.log/home/igor_kilocode_ai/.local/share/kwf/sections/explorer-2-visual-defects-on-android-the-bottom-navigatio-cee04-9f3d/e2e-mobile-app/scripted-e1.logOwner request
[e5] ux-check: LIVE NOW loading state on cold-open Home (android emulator-5606) — Cold-open Home with the session source stalled: the LIVE NOW section renders its reserved card box [37,357][1043,546] holding a leading mark [40,360][48,502] and two text-line shapes [87,394][704,422] / [87,440][395,468], with 'Nothing running right now' count 0 (e5-loading.log from e5-pending.txt); the settled frame keeps the identical card box, so nothing reflows (e5-settled.txt); captures e5-pending.png/e5-settled.png are for the visual reviewer; no UX-DEFECT.
[e6] ux-check: the LIVE NOW loading card keeps the same 72px-min frame and the buttons below stay at the same y — Android emulator-5554: the pending placeholder ViewGroup is [37,292][1043,481] (189 px = 72 dp), identical to the settled empty card's [37,292][1043,481], and 'New coding task' [37,537][1043,653] and 'New task from a picture' [37,671][1043,787] keep the same y in both states (e6-geometry.log, extracted from e6-loaded.txt and e6-loading.txt; capture e6-loading.png), so no vertical jump; the pending branch was held with a temporary hardcode (content='pending', reverted, git clean) because the live stack resolves it sub-second — stalling services only yields the error or empty branch. No…
Follow-ups (not changed here)
Open findings (not fixed here)