feat(mobile): show live session counts in Agents navigation - #5686
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryIncremental review found identical trees since Files Reviewed (0 files)
Previous Review Summaries (3 snapshots, latest commit 3f764cf)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 3f764cf)Status: No Issues Found | Recommendation: Merge Executive SummaryReviewed the i18n plural-family catalog check and locale translations for Agents live counts with high confidence and no remaining defects. Files Reviewed (88 files)
Previous review (commit d40bd35)Status: No Issues Found | Recommendation: Merge Executive SummaryReviewed the incremental Agents live-count test and workflow-invariant updates with high confidence and no remaining defects. Files Reviewed (3 files)
Previous review (commit 06a330d)Status: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (5 files)
Reviewed by grok-4.6 · Input: 85.7K · Output: 4.9K · Cached: 206.7K Review guidance: REVIEW.md from base branch |
Summary
ScreenHeader.eyebrowandtabBarBadgereport positive organization-scoped totals;tabBarAccessibilityLabelincludes the translated total without changing the tab name or position.useLiveAgentSessionssupplies the tab navigator, while the header reuses its existing session list instead of adding another query.Both counts disappear during organization loading, session loading, errors, or empty results, including errors with cached sessions.
Files
apps/mobile/src/app/(app)/(tabs)/_layout.tsx— Source; modified; +15/-1 lines: adds the scoped subscription, guarded badge, and localized accessible total.apps/mobile/src/components/agents/session-list-screen.tsx— Source; modified; +5/-0 lines: supplies the guarded header count from the existing live list.apps/mobile/src/components/agents/agents-tab-badge.mounted.test.tsx— Test; added; +313/-0 lines: introduces mounted tests for the tab badge.apps/mobile/src/components/agents/session-list-screen.mounted.test.tsx— Test; modified; +39/-4 lines: changes the mounted session-list tests.apps/mobile/src/components/quick-chat/quick-chat-screen.mounted.test.tsx— Test; modified; +3/-0 lines: adjusts the mounted Quick Chat tests.dev/local/mobile-workflow.test.ts— Test; modified; +1/-1 lines: adjusts the mobile workflow tests.agents.liveCountsuppliescountinterpolation and locale-specific plural selection for the heading and accessible tab label.English
agents.liveCount_oneandagents.liveCount_otherboth display{{count}} LIVE; 86 translated catalogs add 214 forms, giving 216 forms across 87 catalogs.Existing English messages remain unchanged, and callers need no separate unsuffixed count entry.
Files
apps/mobile/src/i18n/locales/en.json— Source; modified; +2/-0 lines: defines the English singular and plural live-count messages.apps/mobile/src/i18n/agents-live-count.test.ts— Test; added; +29/-0 lines: introduces tests for live-count localization.The catalog validator recognizes plural-family bases in literal
t()andi18n.t()calls whencheckUsageis enabled.englishFamiliesderives these bases from_zero,_one,_two,_few,_many, and_other, removing the need for a duplicate unsuffixed key.Unknown keys still fail; mobile enables usage checks, notifications disable them, and all other catalog checks retain their existing rules.
Files
tools/i18n/check-catalogs.mjs— Source; modified; +1/-1 lines: accepts an English plural family when a literal translation key has no exact entry.tools/i18n/check-catalogs.test.mjs— Test; added; +164/-0 lines: introduces tests for catalog validation.Tests: 6 files changed, with 3 added and 3 modified; 549 insertions and 5 deletions:
agents-tab-badge.mounted.test.tsx,session-list-screen.mounted.test.tsx,quick-chat-screen.mounted.test.tsx,agents-live-count.test.ts,mobile-workflow.test.ts,check-catalogs.test.mjs.Generated: 86 translated
apps/mobile/src/i18n/locales/*.jsoncatalogs, excluding English; all modified, with 300 insertions, 86 deletions, and 214 count forms.Verification
Local end-to-end verification on an iOS simulator, 2026-09-01. Seven of nine checks passed. Two have partial coverage.
This section covers the stack's six PRs together: #5666, #5668, #5677, #5680, #5685, and #5686.
No product bug was found. No product source changed. The worktree stayed clean.
#77537band#481fd3on separate lines.Remotes and locale evidence
The installed CLI 7.5.6 reports no
kind, so every real relay lands under Terminals and the Remotes group is unreachable through it. A stand-in producer therefore attached over the real CLI WebSocket contract (/api/user/cli,instanceSchemainservices/session-ingest/src/types/user-connection-protocol.ts) and heartbeat an instance identity. Everything below the CLI process is the shipped path: the durable object,getConnectedInstances,activeSessions.listInstances, and the picker.Two
kind: 'remote'instances and onekind: 'cli'instance produced:Cloud Agent, thenREMOTESwith both remote rows, thenTERMINALSwith the terminal row.feature/remotes-verify1is 23 code points and rendered asfeature/remotes-veri…, exactly the documented 20-code-point boundary.startedAtrenderedmainalone, with no separator and no date.Started Sep 1, 2026 at 7:51 AM. German renderedGestartet 1. Sept. 2026, 07:51— day-first, German month, 24-hour clock.REMOTESbecameREMOTE-INSTANZENin German.Remotes, ci-runner-eu-west on cloud, and feature/remotes-veri… · Started Sep 1, 2026 at 7:51 AM.instance-picker-row-3c7b01,-fe6b0a, and-377bcdwere byte-identical across both locales, so the identifier does not depend on displayed facts.Run on: ci-runner-eu-west · cloud.Untested condition
The offline banner is driven only by NetInfo device connectivity.
createOfflineBannerStorecommitsonlineas soon as NetInfo reports a connection and runs its HTTP probe only to suppress a false NetInfo offline report (apps/mobile/src/lib/offline-banner-state.ts:67-88). A backend-only outage with the device still online therefore shows no banner by design. A real device-wide outage was not simulated, so that path has no runtime verdict.Setup
mobile-ux-ad6d-s6, simulator iPhone 17 Pro on iOS 26.5.xcrun simctl io <udid> screenshot./Users/igor/Projects/.scratch/local-e2e-ux/.Unrelated observation
After "Allow once" on a tool permission, repeated Back taps did not leave the chat screen; a cold restart restored navigation. Evidence:
/Users/igor/Projects/.scratch/local-e2e-ux/C-back-stuck.png. None of these six PRs touch navigation, and the symptom was not reproduced in a second round. It needs a real CLI relay executing a command to reproduce, so it is recorded here rather than diagnosed.