Skip to content

feat(mobile): show agent context usage#4536

Merged
iscekic merged 3 commits into
mainfrom
feature/mobile-context-info
Jul 15, 2026
Merged

feat(mobile): show agent context usage#4536
iscekic merged 3 commits into
mainfrom
feature/mobile-context-info

Conversation

@iscekic

@iscekic iscekic commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • show context-window pressure and session cost in agent chat headers
  • add a native context details sheet with exact usage, remaining capacity, runtime model, and provider
  • resolve context capacity for both Cloud Agent Gateway models and live/read-only remote CLI catalogs

Test plan

  • cd apps/mobile && pnpm format && pnpm typecheck && pnpm lint && pnpm check:unused && pnpm test && pnpm format:check
  • cd apps/web && pnpm lint
  • git diff --check
  • iOS E2E: remote CLI header and detail sheet (30,033 / 1,050,000, 3%)
  • iOS E2E: Cloud Agent header and detail sheet (50,000 / 1,000,000, 5%)
  • verified local session-ingest web and CLI WebSockets return 101 Switching Protocols

@iscekic iscekic self-assigned this Jul 14, 2026
Comment thread apps/mobile/src/lib/hooks/use-session-model-options.ts Outdated
Comment thread apps/mobile/src/lib/hooks/use-session-model-options.ts Outdated
Comment thread apps/mobile/src/components/agents/session-detail-content.tsx Outdated
Comment thread apps/mobile/src/components/agents/session-context-sheet.tsx Outdated
@kilo-code-bot

kilo-code-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (9 files)
  • apps/mobile/src/components/agents/context-sheet-mount-state.test.ts
  • apps/mobile/src/components/agents/context-usage-display.test.ts
  • apps/mobile/src/components/agents/context-usage-display.ts
  • apps/mobile/src/components/agents/session-context-sheet.tsx
  • apps/mobile/src/components/agents/session-detail-content.tsx
  • apps/mobile/src/lib/hooks/use-session-model-options.ts
  • apps/mobile/src/lib/session-context-info.test.ts
  • apps/mobile/src/lib/session-context-info.ts
  • apps/mobile/src/lib/use-session-model-options.test.ts
Previous Review Summary (commit 76ef3d3)

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

Previous review (commit 76ef3d3)

Status: 4 Issues Found | Recommendation: Address before merge

Overview

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

WARNING

File Line Issue
apps/mobile/src/lib/hooks/use-session-model-options.ts 272 Gateway models lose the Recommended/All picker grouping
apps/mobile/src/lib/hooks/use-session-model-options.ts 273 Existing Gateway favorites no longer match their persisted IDs
apps/mobile/src/components/agents/session-detail-content.tsx 179 Context sheet can reopen automatically after a session switch
apps/mobile/src/components/agents/session-context-sheet.tsx 69 VoiceOver cannot read the primary context status
Files Reviewed (13 files)
  • apps/mobile/src/components/agents/context-usage-display.test.ts - 0 issues
  • apps/mobile/src/components/agents/context-usage-display.ts - 0 issues
  • apps/mobile/src/components/agents/context-usage-ring.tsx - 0 issues
  • apps/mobile/src/components/agents/session-context-metrics.tsx - 0 issues
  • apps/mobile/src/components/agents/session-context-sheet.tsx - 1 issue
  • apps/mobile/src/components/agents/session-detail-content.tsx - 1 issue
  • apps/mobile/src/lib/hooks/use-available-models.ts - 0 issues
  • apps/mobile/src/lib/hooks/use-session-model-options.ts - 2 issues
  • apps/mobile/src/lib/session-context-info.test.ts - 0 issues
  • apps/mobile/src/lib/session-context-info.ts - 0 issues
  • apps/mobile/src/lib/use-session-model-options.test.ts - 0 issues
  • apps/mobile/vitest.config.ts - 0 issues
  • apps/web/src/lib/cloud-agent-sdk/index.ts - 0 issues

Fix these issues in Kilo Cloud


Reviewed by gpt-5.6-sol · Input: 100.2K · Output: 10.9K · Cached: 864.9K

Review guidance: REVIEW.md from base branch main

@iscekic iscekic merged commit 4e6ad63 into main Jul 15, 2026
19 checks passed
@iscekic iscekic deleted the feature/mobile-context-info branch July 15, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants