Skip to content

feat(mobile): show session id and run target in session context sheet - #6097

Open
iscekic wants to merge 1 commit into
mainfrom
kwf/session-details-id-and-running-on-187b
Open

feat(mobile): show session id and run target in session context sheet#6097
iscekic wants to merge 1 commit into
mainfrom
kwf/session-details-id-and-running-on-187b

Conversation

@iscekic

@iscekic iscekic commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Changelog for users

  • The session context details sheet now names the session and shows its full session id.
  • Tapping the "Copy session ID" row copies the id and confirms the copy in the row; a failed copy shows a could-not-copy message.
  • Closing the session context sheet while copy is pending no longer shows stale copy feedback when the sheet is reopened.
  • A live session's sheet shows a "Run on" row with the same target label the new-session picker shows.
  • The "Run on" row reads "Cloud Agent" for a live cloud session, or " · " for the connected CLI instance that owns the session.
  • A read-only session, or a live CLI session whose instance is not connected, shows no "Run on" row.

Changelog for maintainers

  • copySessionId returns a success boolean for modal callers while preserving the app toast.
  • Shared formatInstanceTarget, cloudAgentTargetLabel, and resolveRunningOnLabel keep picker and sheet target labels consistent.
  • SessionContextSheet requires sessionId, sessionTitle, activeSessionType, and ownerConnectionId; the resolver returns Cloud Agent for cloud sessions, a matched instance label for remote sessions, and null otherwise.
  • Connected-instance lookup runs only for visible remote sheets, caches 30 seconds, reserves the loading row, and makes prop wiring and query gating review points.
  • The copy row keeps the call to action beside feedback, resets on close, ignores late results, and renders above app-root toasts in Android's full-window modal.
  • apps/mobile/src/components/agents/session-context-sheet.tsx:215: accepted — the close reset could race an async copy result; generation cleanup now ignores stale completions.
  • Mounted tests cover sheet states, failed-copy retry, closed and reopened late results, and label resolution; existing copy and picker keys require no catalog changes.
  • New repair capture replaces repair proof for dismiss/reopen and retry; Android captures date to 2026-09-12, with no delayed hook, so forced late completion stays unverified.

E2E proof

scripted-shard3.mp4

[e1] Open the context sheet of a live cloud session: a 'Run on' row shows the Cloud Agent label, identical to the new-session picker — prior/e1c.png

[e1] Open the context sheet of a live cloud session: a 'Run on' row shows the Cloud Agent label, identical to the new-session picker — e2e-mobile-app/e1p.png

[p3] Open the context sheet of a live CLI session: the 'Run on' row shows '<instance name> · <project>' matching the new-session picker; a non-live (read-only) session shows no such row — prior/p3-picker.png

[p3] Open the context sheet of a live CLI session: the 'Run on' row shows '<instance name> · <project>' matching the new-session picker; a non-live (read-only) session shows no such row — prior/p3-readonly.png

[p2] Open the context sheet of a live cloud session: a 'Run on' row shows the Cloud Agent label, identical to the new-session picker — prior/p2-cloud-detail.png

e1-android-states.mp4.trim.mp4
Owner request

Surface: the mobile app (apps/mobile).

In the session context details sheet, add a couple of new labels:

  • the session id, with a copy call to action
  • if the session is live, a "running on" label that uses the same label as the one used in the new session picker

Comment thread apps/mobile/src/components/agents/session-context-sheet.tsx Outdated
@kilo-code-bot

kilo-code-bot Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The incremental diff resolves the prior suggestion: the copy feedback effect now invalidates pending results via copyFeedbackGeneration, so a late copySessionId completion can no longer repaint stale feedback after close or on reopen. No new issues found in the changed lines.

Files Reviewed (3 files)
  • apps/mobile/app.config.ts
  • apps/mobile/src/components/agents/session-context-sheet.mounted.test.tsx
  • apps/mobile/src/components/agents/session-context-sheet.tsx - prior suggestion resolved
Previous Review Summary (commit ef15e3f)

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

Previous review (commit ef15e3f)

Status: 1 Issues Found | Recommendation: Address before merge

Overview

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

SUGGESTION

File Line Issue
apps/mobile/src/components/agents/session-context-sheet.tsx 215 Async copy result can land after the close-reset effect, leaving stale copy feedback on reopen.
Files Reviewed (7 files)
  • apps/mobile/src/components/agents/instance-selector.tsx
  • apps/mobile/src/components/agents/session-context-sheet.mounted.test.tsx
  • apps/mobile/src/components/agents/session-context-sheet.tsx - 1 issue
  • apps/mobile/src/components/agents/session-detail-content.tsx
  • apps/mobile/src/components/agents/session-row-actions.ts
  • apps/mobile/src/lib/instance-target-label.test.ts
  • apps/mobile/src/lib/instance-target-label.ts

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@iscekic
iscekic marked this pull request as draft September 12, 2026 10:32
@iscekic
iscekic force-pushed the kwf/session-details-id-and-running-on-187b branch from 01492ec to 5ef9b01 Compare September 12, 2026 11:57
@iscekic
iscekic marked this pull request as ready for review September 12, 2026 12:08
@iscekic iscekic added the human-ready The PR is ready for human review. label Sep 12, 2026
@iscekic
iscekic requested a review from eshurakov September 12, 2026 12:15
@iscekic iscekic self-assigned this Sep 12, 2026
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.

1 participant