Skip to content

Sidebar: a Longest wait order for the Agents list #2015

Closed

Description

@OddballGreg

Problem

I answer agents in the order they started to wait for me. The Agents list has two orders today, Workspaces and Activity. Activity puts a blocked agent first and then the newest change (#528). So the agent that has waited longest goes below every agent whose state changed after it, including the ones that still work. With many agents, I scroll to find the agent that I must answer next.

Proposal

Add a Longest wait value to Settings > Appearance > Agents order. This adds no new setting. It is a third value of the Agents order setting, and Workspaces stays the default.

Within each PC, the list sorts agents in this sequence:

  1. Blocked
  2. Done and not yet read
  3. Ready. This includes a finish opened in the web UI, which its row already shows as ready.
  4. Working, including an agent that waits on background work
  5. Unknown

Within each group, the agent with the oldest state_change_seq is first. herdr's order breaks ties. Pinned rows stay first, as in the other orders.

Where

Sidebar and navigation

Where it exists today

herdr's TUI shows a close order in its agents panel when a client sets an agent view with agent.view.set and the sort [{"field": "status", "order": "asc"}, {"field": "state_change_seq", "order": "asc"}]. I set that view through the socket API today. The herdr sidebar then lists blocked, done, idle and working agents, each oldest first. This proposal differs in two ways. An opened finish counts as ready, and Unknown goes last.

herdr's built-in agent_panel_sort = "priority" ranks agents by state in a similar way, but puts the newest change first.

Workarounds and alternatives

  • Today I scroll each group to find the oldest finish.
  • An alternative is for the web UI to follow the agent view that herdr has active, so that a sort set in herdr also applies in the browser. That needs no new value, but herdr has no agent.view.get today.

I have a working implementation in my fork, with unit tests, i18n entries, DESIGN.md and a changelog fragment. A PR would also add Longest wait to the telemetry schema. I can open a PR on top of current main if you agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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