Skip to content

refactor(host,desktop): the agent ledger is fed from the live task list, and lists nothing on a clock - #3284

Merged
luke-agent[bot] merged 1 commit into
mainfrom
luke/neon-realtime-agent-notices
Oct 21, 2026
Merged

luke-agent[bot] merged 1 commit into
mainfrom
luke/neon-realtime-agent-notices

Conversation

@charleslpan

@charleslpan charleslpan commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Stack 2 · Task list and automations, piece 4. Stacked on #3276 (luke/neon-realtime-plan-list-host).

What: the agent-notices ledger is fed from the followed task list. The tasks view carries every agent on a task as its task's own list names it (taskAgents, built by taskAgentsOfLiveRows).

Removed:

  • The 30 s watch that re-listed each watched task's agents and re-read each agent with no task.
  • onTaskAgentsMoved, which made every start, end or PR ask TASKS_REFRESH again.
  • observePublished.

A task the list drops now takes its agents and their dots with it.

Tests:

  • A PGlite parity test: taskAgentsOfLiveRows equals each task's own agents endpoint, for the owner and a teammate.
  • agent-notices: with agents coming from the list, nothing is listed on a clock or asked for again, an end the list carries is announced, and a dropped task clears its dots.

@vercel

vercel Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
luke-web Ready Ready Preview Oct 21, 2026 6:03am UTC

Request Review

@luke-agent
luke-agent Bot changed the base branch from main to luke/neon-realtime-plan-list-host October 17, 2026 01:24
@luke-agent luke-agent Bot closed this Oct 17, 2026
@luke-agent luke-agent Bot reopened this Oct 17, 2026
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-plan-list-host branch 2 times, most recently from cbec1c9 to ffb285d Compare October 18, 2026 20:21
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 7e1c3de to 265ae03 Compare October 18, 2026 20:24
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-plan-list-host branch from ffb285d to 8541392 Compare October 18, 2026 21:24
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 265ae03 to 3ee823b Compare October 18, 2026 21:24
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-plan-list-host branch from 8541392 to cd81a2d Compare October 19, 2026 18:52
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 3ee823b to c5b9c64 Compare October 19, 2026 18:52
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-plan-list-host branch from cd81a2d to 7335635 Compare October 20, 2026 02:53
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from c5b9c64 to bbe5c74 Compare October 20, 2026 02:53
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-plan-list-host branch from 7335635 to 3cbca8c Compare October 20, 2026 02:58
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from bbe5c74 to 710d7fa Compare October 20, 2026 02:58
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-plan-list-host branch from 3cbca8c to b02eba7 Compare October 20, 2026 03:39
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 710d7fa to 5d0c06b Compare October 20, 2026 04:02
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-plan-list-host branch 2 times, most recently from ea6243b to bd0ecfa Compare October 20, 2026 22:25
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 5d0c06b to 5a9a34c Compare October 20, 2026 22:25
@luke-agent
luke-agent Bot changed the base branch from luke/neon-realtime-plan-list-host to luke/neon-realtime-task-list-txid-wait October 20, 2026 22:25
@luke-agent luke-agent Bot closed this Oct 20, 2026
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-plan-list-host branch from 65ab8cb to 5b179e4 Compare October 21, 2026 01:08
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 827b2c5 to 3b02702 Compare October 21, 2026 01:08
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-plan-list-host branch from 5b179e4 to b17f29a Compare October 21, 2026 01:23
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 3b02702 to 36b084a Compare October 21, 2026 01:23
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-plan-list-host branch from b17f29a to e30e94a Compare October 21, 2026 05:20
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 36b084a to 98f9329 Compare October 21, 2026 05:20
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 98f9329 to f9bad5a Compare October 21, 2026 05:30
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-plan-list-host branch from e30e94a to f7f40e0 Compare October 21, 2026 05:30
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-plan-list-host branch from f7f40e0 to a10add1 Compare October 21, 2026 05:38
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from f9bad5a to 191addc Compare October 21, 2026 05:38
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-plan-list-host branch from a10add1 to 5676471 Compare October 21, 2026 05:50
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 191addc to b1bab0a Compare October 21, 2026 05:50
Base automatically changed from luke/neon-realtime-plan-list-host to main October 21, 2026 05:56
…st, and lists nothing on a clock

The tasks view carries every agent on a task as its task's own list names it,
which main feeds the notices' ledger from: the thirty-second watch that
listed each watched task's agents and read each agent with no task is gone,
and so is every ask for the list again after an agent's start, end, or pull
request, since the followed list moves by itself. A task the list drops takes
its agents and their dots with it.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from b1bab0a to 7199d3c Compare October 21, 2026 05:58
@luke-agent
luke-agent Bot marked this pull request as ready for review October 21, 2026 05:58
@luke-agent
luke-agent Bot enabled auto-merge October 21, 2026 05:59
@luke-agent
luke-agent Bot added this pull request to the merge queue Oct 21, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

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.

Devin Review found 1 potential issue.

Devin Review

Comment on lines +1089 to +1093
observeFollowed: (agents, taskIds) => {
const held = new Set(taskIds);
forget((agent) => agent.taskId === null || held.has(agent.taskId));
notices.observeAgents(agents);
},

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.

🟡 Archived agents keep unread dots

When an unseen agent is archived, observeFollowed keeps its unread dot because the task still exists. The filtered taskAgents list no longer includes the agent, so its dot remains after archiving.

Learn more

The live list excludes archived agents from taskAgents in taskAgentsOfLiveRows. The ledger retains agents as long as their task ID remains in taskIds; it never removes an agent merely because the list no longer contains that agent. Archiving a finished agent removes it from the live agent list but leaves the plan in the task list, so the archived agent's unread dot persists. An explicit observeTaskGone only handles an entire missing plan.

Example: Agent A finishes while the panel is away and receives an unseen dot. The developer archives A while keeping its plan. The next live list contains that plan but omits A; the ledger still reports A as unseen.

Recommended fix: Reconcile plan agents against the IDs in agents as well as taskIds, removing missing or archived agents and their unseen dots. Account for transient independent Realtime updates of plans and agents before pruning an agent absent from a partial snapshot.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Merged via the queue into main with commit 3a1feba Oct 21, 2026
11 of 13 checks passed
@luke-agent
luke-agent Bot deleted the luke/neon-realtime-agent-notices branch October 21, 2026 06:01

This branch was successfully deployed

1 active deployment
Preview — 7199d3ca Deployed Oct 21, 2026 by vercel[bot]
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