Skip to content

feat(office): derive activity from running Kanban cards#869

Open
ohjy1006kenneth wants to merge 2 commits into
fathah:mainfrom
ohjy1006kenneth:feat/office-kanban-activity
Open

feat(office): derive activity from running Kanban cards#869
ohjy1006kenneth wants to merge 2 commits into
fathah:mainfrom
ohjy1006kenneth:feat/office-kanban-activity

Conversation

@ohjy1006kenneth

@ohjy1006kenneth ohjy1006kenneth commented Jul 22, 2026

Copy link
Copy Markdown

Summary

  • derive Hermes One Office Working status from profiles that own running Kanban cards
  • refresh running-card ownership alongside the existing four-second profile poll without overlapping requests or applying stale profile results, and refresh immediately when the selected profile changes
  • preserve gateway liveness as separate metadata and fall back to the previous gateway-based status when Kanban is unavailable
  • add focused coverage for running-only filtering, assignee normalization, gateway fallback, status transitions, single-flight polling, stale-profile suppression, profile-switch loading recovery, and IPC-rejection draining

Why

A persistent Hermes gateway being online does not mean that its profile is actively working. Conversely, dispatcher-launched Kanban workers can be processing a card without owning a standalone gateway process. This can make Office status misleading, especially in SSH mode when multiple profiles share a Kanban board.

Office now treats a profile as Working when the selected profile's Kanban board contains at least one running card assigned to that profile. Other profiles remain Idle. Gateway state still controls chat availability and remains the compatibility fallback for connection modes where Kanban cannot be queried.

Verification

  • npx vitest run src/renderer/src/screens/Office/Office.statusPolling.test.tsx src/renderer/src/screens/Office/office3d/agents.test.ts — 8 passed
  • npx vitest run --maxWorkers=1 — 173 files passed; 1,827 tests passed; 3 skipped
  • npm run typecheck — passed
  • npm run lint — passed with 0 errors (9 pre-existing warnings outside this change)
  • npm run build — passed
  • git diff --cached --check — passed
  • added-line security scan — no findings

Live acceptance check

Verified against a remote Hermes Agent host where multiple profiles shared one Kanban board and exactly one profile owned a running card:

  • only the assigned profile mapped to Working
  • all unassigned profiles mapped to Idle, even when their gateways were online
  • representative profile contexts resolved the same shared board and running owner

The status refresh uses the existing SSH-capable kanbanListTasks IPC path; no new remote command or privilege surface is introduced.

@greptile-apps

greptile-apps Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR derives Office activity from running Kanban cards. The main changes are:

  • Maps running-card ownership to each Office agent
  • Keeps gateway liveness as fallback metadata
  • Adds single-flight polling and stale-profile result guards
  • Refreshes activity when the selected profile changes
  • Adds focused status-mapping and polling tests

Confidence Score: 5/5

The latest changes appear safe to merge.

  • No new blocking issue meets the follow-up review criteria.
  • The polling changes guard against overlapping requests and stale profile results.

Important Files Changed

Filename Overview
src/renderer/src/screens/Office/Office.tsx Adds profile-aware Kanban polling, request sharing, and stale-result suppression.
src/renderer/src/screens/Office/office3d/agents.ts Maps running task counts to Office agent status while preserving gateway fallback.
src/renderer/src/screens/Office/Office.statusPolling.test.tsx Covers profile changes, request serialization, stale results, and rejected IPC calls.
src/renderer/src/screens/Office/office3d/agents.test.ts Covers activity counting, assignee normalization, fallback behavior, and status changes.
src/renderer/src/screens/Office/office3d/core/types.ts Adds the optional active task count to the Office agent model.

Reviews (2): Last reviewed commit: "test(office): use generic profile fixtur..." | Re-trigger Greptile

Comment thread src/renderer/src/screens/Office/office3d/agents.ts
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.

1 participant