Skip to content

feat(mobile): open the agents in one status from the Home card - #7397

Open
maphew wants to merge 4 commits into
Kilo-Org:mainfrom
maphew:feat/mobile-agent-status-filter
Open

maphew wants to merge 4 commits into
Kilo-Org:mainfrom
maphew:feat/mobile-agent-status-filter

Conversation

@maphew

@maphew maphew commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

What this change does

The Home screen shows a "Live now" card. The card lists agent counts by status:

  • Needs input
  • Working
  • Scheduled
  • Idle

Before this change, the counts were not selectable.

After this change, each status row is a button. Tap a row to open the Agents tab. The Agents tab shows only the agents with that status. A bar at the top of the list names the active status filter and the number of agents. Tap the X on the bar to clear the filter and show all agents again.

A zero-count row also opens the list. The list then shows the "No sessions match" state. The Clear action removes the filter.

Why

A user can see that 13 agents are idle. The user cannot find these agents. The user cannot settle them or close the agents that are done.

Closes #7396.

Implementation

  • glanceable-active-card.tsx: each count row is now a Pressable. A new required onPressStatus prop receives the status kind.
  • agent-sessions-section.tsx: onPressStatus switches to the Agents tab and sets a status route parameter. The existing See all action now clears that parameter.
  • live-session-status-filter.ts: new helpers. parseStatusFilterKind validates the parameter. filterSessionsByStatusKind keeps the sessions of one kind.
  • session-status-filter-bar.tsx: new bar that names the active filter and clears it.
  • session-list-screen.tsx: reads the status parameter, filters the live list, and draws the bar.

The status parameter is transient. It is not stored. The user can always clear it.

Tests

  • Unit tests for the parse and filter helpers.
  • The section test checks that a count row opens the Agents tab with the status parameter.
  • The mounted screen test checks the filtered list, the bar, and the Clear actions.

Checks

  • oxfmt is clean on the changed files.
  • oxlint is clean on the changed files.
  • check:i18n, check:plurals, and check:classes pass.
  • The unit and mounted tests for the Home card, the section, and the Agents screen pass. The full Home and Agents suites pass (4926 tests).
  • A second agent did an adversarial review. No blocker remains.

Ready for review.

@maphew
maphew marked this pull request as ready for review October 11, 2026 06:14

/**
* Read the `status` route parameter as one status kind. Returns null for an
* absent, repeated, or unknown value, so a stale or hand-written link never

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Doc comment contradicts the implementation for a repeated parameter

The JSDoc says this "Returns null for an absent, repeated, or unknown value", but the implementation takes the first element of a repeated parameter (value[0]), and the unit test takes the first value of a repeated parameter asserts exactly that. The wording implies a repeated value is rejected, which is not the case, so a reader could wrongly rely on this to reject a hand-written link with a duplicate status param. Consider rewording to state that a repeated parameter uses its first value.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue 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/live-session-status-filter.ts 26 JSDoc says a repeated status param returns null, but the code (and its unit test) takes the first value
Files Reviewed (9 files)
  • apps/mobile/src/components/agents/agents-tab-badge.test-helpers.ts - no issues
  • apps/mobile/src/components/agents/live-session-status-filter.test.ts - no issues
  • apps/mobile/src/components/agents/live-session-status-filter.ts - 1 issue
  • apps/mobile/src/components/agents/session-list-screen.mounted.test.tsx - no issues
  • apps/mobile/src/components/agents/session-list-screen.pull-failure.mounted.test.tsx - no issues
  • apps/mobile/src/components/agents/session-list-screen.tsx - no issues
  • apps/mobile/src/components/agents/session-status-filter-bar.tsx - no issues
  • apps/mobile/src/components/home/agent-sessions-section.test.ts - no issues
  • apps/mobile/src/components/home/agent-sessions-section.tsx - no issues
  • apps/mobile/src/components/home/glanceable-active-card.tsx - no issues

The status filter reuses the same glanceableStatusKind mapping as the Home card counts, so the bar's count and the filtered list stay consistent; the transient status route param is validated on read and cleared via the established setParams({ status: undefined }) pattern. No memory leaks: no new subscriptions or listeners are introduced.

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 98.4K · Output: 15.9K · Cached: 1.3M

Review guidance: REVIEW.md from base branch main

This branch has not been deployed

No deployments
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.

[FEATURE]: Filter agents by status from the Home live card

1 participant