Skip to content

MC-37: show all of an agent's running work, and put the link first in Running now - #8

Merged
mmhy2003 merged 8 commits into
developfrom
megoo/MC-37-ui-ux-improvements
Nov 18, 2026
Merged

mmhy2003 merged 8 commits into
developfrom
megoo/MC-37-ui-ux-improvements

Conversation

@mmhy2003

Copy link
Copy Markdown
Owner

MC-37: show all of an agent's running work, and put the link first in "Running now"

What changed

  • Agents pages: an agent now lists every task, chat, question, cron and draft run it is working on, each one a link, newest first.
    • Admin → Agents: the "Current run" column is now "Working on". It shows the newest run, with the rest behind a "+N more" / "Show less" button.
    • My agents: the selected agent gets a "Working on" section. It is hidden while the agent runs nothing.
    • Runs are shown only to the agent's owner and to admins, so a project's agent list does not reveal work in projects a member cannot see.
  • Dashboard → Running now: each row is now two lines. The first line starts with the task, chat or question link, then the title. The second line has the agent, the status and the time.
  • Backend: one shared query (app/agent_runs/running.py) now feeds both the dashboard and the agent lists. AgentOut.runs replaces AdminAgentOut.current_run.
    • A cron run is now in the dashboard scope through its project and links to its cron page. Before, it showed as "Answering a question" with a link to /questions/None.
  • New frontend pieces: lib/runs.ts, components/runs/RunLink.tsx and components/runs/WorkingOn.tsx. api-types.ts was regenerated.

Why

The task asked to show all of an agent's concurrent work instead of only one item, and to put the link before the agent and status on the dashboard. Before this change, a long agent name pushed the link out of view.

Design and plan: docs/superpowers/specs/MC-37-design.md, docs/superpowers/plans/MC-37-plan.md.

How it was tested

  • Frontend: npx tsc --noEmit, npx eslint on the changed files and npm test (Vitest) all pass, 1262/1262.
  • Backend: uv run pytest -n 8 gave 2045 passed and 1 failed. The failure is tests/dashboard/test_speed.py::test_dashboard_answers_under_300ms_with_10k_tasks, a 300 ms timing limit, which took about 0.40 s.
    • It fails the same way on the base commit aeedef6, before any MC-37 change (0.33–0.37 s), so the cause is the test machine (a freshly recovered dev database, high load), not this branch.
  • Not run, to speed up the checks as asked: the Playwright browser tests (parallel.spec.ts was updated to check that two runs at once both show on the Agents page) and the runner's go tests (the runner hasn't changed). Please run the e2e suite before merging if needed.

🤖 Generated with Claude Code

mmhy2003 and others added 8 commits November 17, 2026 20:10
…kind, title and question key (MC-37)

The shared query in agent_runs/running.py describes a run at work now (its kind,
title, question key and link) and will also feed the Agents pages. RunningItem
moves to agent_runs/schemas.py; the Dashboard keeps exposing it under the same name.

A cron run now shows as a cron with a working link, in scope through its project,
instead of a question linking to /questions/None.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r and admins (MC-37)

AgentOut.runs uses the shared running query. Other viewers get an empty list, so the project's agent list does not
reveal work in projects they cannot see. A run in a project the viewer cannot open keeps its text but has no link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on link, on two lines (MC-37)

Line 1 is the link and title, line 2 the agent, status and time. The
agent's name is what shortens, so a long name no longer pushes the link
out of view.

The stage labels, the status text and the ticking clock move to
lib/runs.ts, and RunLink draws what a run works on (a task's key, a
chat's or cron's tag and title, a question's key, a draft as text), so
the Agents pages can reuse them. The API types are regenerated for the
new RunningItem fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…first and the rest behind +N more (MC-37)

The two Agents pages need to show every run an agent is working on. WorkingOn
draws that list from the shared RunLink and run status, with the running time.
Collapsed, it shows the newest run and opens the rest in place behind a
"+N more" button, so the Admin table keeps its rows one height. The open state
lives in the component and is not saved. No run shows a dash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ow many runs are in use (MC-37)

current_run is replaced by runs, which the shared query fills. The admin
endpoint no longer runs its own two queries for the newest task or question
run. The page's "Working on" column shows the newest run as a link, with the
rest behind "+N more", and the status cell says how many runs are in use
("3 of 3 running").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-37)

The agent's card now has a "Working on" section that lists every run the
agent is working on, each with its link and status. The section is hidden
while the agent runs nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The parallel spec already gets one agent running three chats at once. It now
checks that the agent's card on My agents lists all three, each as a link,
and that Admin → Agents shows the newest run and opens the other two behind
"+2 more".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@mmhy2003 mmhy2003 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Verdict: approved

The change matches the approved design (mockup v4) and plan, step for step:

  • Backend: agent_runs/running.py is now the one query for "a run at work now". It covers tasks, chat rounds, questions, crons and drafts, newest first. The Dashboard's running() uses it, and cron runs are now in scope through their project, which fixes the old /questions/None link. AgentOut.runs is filled only for the agent's owner and for admins. A run in a project the viewer can't open keeps its text but loses its link. current_run and its two queries are gone.
  • Frontend: lib/runs.ts, RunLink and WorkingOn are shared. "Running now" rows have two lines with the link first, and the agent's name is what shortens. Admin → Agents shows the newest run with "+N more" / "Show less" (with aria-expanded) and "3 of 3 running" in the Status cell. My agents has a "Working on" section, hidden when the agent runs nothing.
  • Tests: the new backend tests cover the admin list, mine, and project visibility. Vitest covers RunLink, WorkingOn, RunningNow, the Admin page and AgentsTab. The parallel.spec.ts browser test checks both Agents pages with three runs at once.
  • CI: every check passes (backend, frontend, runner ×3, release-tools).

I found nothing that blocks the merge.

@mmhy2003
mmhy2003 merged commit 4770898 into develop Nov 18, 2026
15 of 18 checks passed
@mmhy2003
mmhy2003 deleted the megoo/MC-37-ui-ux-improvements branch November 18, 2026 20:38
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