Skip to content

(agents): a stale working job that is not hosted still reads Active and drives the row's activity #767

Closed

Description

@devsuitup

Follow-up of #764 (PR #766). Since #766, a background job can be working/blocked in its file but not hosted (a live interactive descriptor owns its session). Two places still read the file state:

  1. Agents view label vs. grouping. public/agents-view.js:75-79 groups and labels the row from the file state ("Active"), while :515-518 counts it as finished (!agentJobIsLive) and hides it when the Finished filter is off. Expected: a working/blocked job that is not hosted is grouped and labelled as stale/unknown, consistent with the finished count.
  2. Interactive resume in an outside terminal. public/agents-view.js:201-237: when the interactive descriptor is not a PTY owned by Switchboard, the row's activity still picks the stale job (identityJobId / unique-head), so projectBackgroundActivity shows "Liveness unknown" / "Activity unavailable" instead of the descriptor's status. The bg badge is gone (fixed by (agents): a live interactive session is not hosted by a stale working job file (#764) #766); only the activity projection is wrong. Tests in (agents): a live interactive session is not hosted by a stale working job file (#764) #766 cover owned PTYs only.

Reasoned from the code by the #766 review; not reproduced live.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions