Skip to content

feat(service,host,panel): a task's version history is pushed from the live layer - #3930

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

vespin-agent[bot] merged 1 commit into
mainfrom
luke/neon-realtime-task-history

Conversation

@charleslpan

@charleslpan charleslpan commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #3919. The newest page of a task's plan version history is now pushed to the window through main's central live layer. The list is no longer re-read on every task-record editedAt while the history is open.

What changed

  • Service. live.taskHistory (GET /api/live/task-history?id=) serves one statement (task-history-live.ts). It reads what listRevisions reads for the newest page:

    • PAGE + 1 revisions, picked by a subquery;
    • joined to user, coding_agent, the call, and the revision a restore brought back;
    • membership as a join.

    It goes through sealedParts, so it is sealed or held-polled. It checks sameUser.

  • Shared label. UNKNOWN_AGENT_LABEL moves to task-wire, so the reader names a missing agent the way the store does.

  • Tests.

    • A PGlite parity test against listRevisions. It covers a call save, an agent save, a developer save, a restore, and a history past one page. A stranger reads nothing.
    • An endpoint test.
    • The immutability and seal tests.
  • Host. client.historyLive, a host follow with tasks.historyChanged, and an eventIterator procedure tasks.historyFollow, the same shape as the pages follow.

  • Window. usePlanHistory reads the newest page once, then takes the stream through the source's followNewest.

    • Older pages stay a one-off service read.
    • The plan template's history follows nothing and reads once.
    • editedAt no longer re-reads the list.
  • Restore wait dropped. There's no transaction-id wait; that work was dropped with feat(host): liveRows hands out a TxWait for a write's transaction (P4) #4230.

Checks run locally

Typecheck, lint, knip and repository-checks all pass. Vitest across the affected areas passes (4257 tests).

Made with Luke

@vercel

vercel Bot commented Oct 19, 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 5:07am UTC

Request Review

@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-inbox-pages branch from 40e3747 to 541a510 Compare October 19, 2026 20:15
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-task-history branch from 6d212a1 to cc26b0a Compare October 19, 2026 20:31
@vespin-agent vespin-agent Bot changed the title feat(service,host): a task's version history follows over Neon Realtime feat(service,host,desktop): a task's version history is pushed from Neon Realtime Oct 19, 2026
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-inbox-pages branch from 541a510 to 9ee1899 Compare October 20, 2026 01:36
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-task-history branch from cc26b0a to a3ba68e Compare October 20, 2026 01:36
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-inbox-pages branch from 9ee1899 to 762af57 Compare October 20, 2026 02:06
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-task-history branch from a3ba68e to 7a2d9b5 Compare October 20, 2026 02:06
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-task-history branch from 7a2d9b5 to fd7965e Compare October 20, 2026 02:36
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-inbox-pages branch 2 times, most recently from d8e3a97 to 25dd475 Compare October 20, 2026 03:16
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-task-history branch from fd7965e to 5e9cabd Compare October 20, 2026 03:16
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-task-history branch from 5e9cabd to a542fd0 Compare October 20, 2026 23:39
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-inbox-pages branch from 25dd475 to 35811de Compare October 20, 2026 23:39
@vespin-agent vespin-agent Bot changed the title feat(service,host,desktop): a task's version history is pushed from Neon Realtime feat(service,host,panel): a task's version history is pushed from the live layer Oct 20, 2026
@vespin-agent
vespin-agent Bot marked this pull request as ready for review October 20, 2026 23:48
devin-ai-integration[bot]

This comment was marked as resolved.

@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-task-history branch from a542fd0 to e2065f9 Compare October 21, 2026 00:11
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-inbox-pages branch from 35811de to 523aa77 Compare October 21, 2026 00:11
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-task-history branch from e2065f9 to 60ba047 Compare October 21, 2026 00:33
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-inbox-pages branch from 523aa77 to 088d5f5 Compare October 21, 2026 00:33
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-inbox-pages branch from 088d5f5 to a86f9f2 Compare October 21, 2026 00:51
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-task-history branch from 60ba047 to 6c179a6 Compare October 21, 2026 00:51
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-inbox-pages branch from a86f9f2 to c714aee Compare October 21, 2026 01:04
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-task-history branch from 6c179a6 to 597b123 Compare October 21, 2026 01:06
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-inbox-pages branch from c714aee to 097c603 Compare October 21, 2026 01:14
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-task-history branch from 597b123 to bc9d750 Compare October 21, 2026 01:15
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-inbox-pages branch from 097c603 to 3763211 Compare October 21, 2026 01:24
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-task-history branch from bc9d750 to 49eb4ba Compare October 21, 2026 01:25
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-inbox-pages branch from 3763211 to 5e08fd8 Compare October 21, 2026 04:54
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-task-history branch from 49eb4ba to aeba228 Compare October 21, 2026 04:56
Base automatically changed from luke/neon-realtime-inbox-pages to main October 21, 2026 05:02
…n Realtime

The service answers one task's newest page of plan history at
live.taskHistory (/api/live/task-history): one deterministic statement that
reads what listRevisions reads for its newest page, one past the page among it
to say whether an older page stands, with the member, the agent, the call and
the revision a restore brought back, under the same rule of who may read it,
sealed or with ?poll=true its rows inline. A PGlite test holds it to
listRevisions as Luke writes on a call, an agent and the developer save, a
revision is restored and the history outgrows a page, and to no rows for a
stranger; the live-statement tests read it for immutability and the Drizzle
seal. UNKNOWN_AGENT_LABEL moves to task-wire, so the reader names an agent
whose row is gone as the store does.

The host follows a plan's newest page of history over liveRows while a window
follows it, tells each change as tasks.historyChanged, and the act port
answers tasks.historyFollow as an eventIterator, as the pages' is. The
version history reads its newest page once and then takes the stream, and no
longer reads it again on every edit of the task; older pages are read from
the service as before, and the plan template's history, which follows
nothing, reads once.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
@vespin-agent
vespin-agent Bot force-pushed the luke/neon-realtime-task-history branch from aeba228 to 606a71e Compare October 21, 2026 05:03
@vespin-agent
vespin-agent Bot enabled auto-merge October 21, 2026 05:04
@vespin-agent
vespin-agent Bot added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 99fe370 Oct 21, 2026
11 of 13 checks passed
@vespin-agent
vespin-agent Bot deleted the luke/neon-realtime-task-history branch October 21, 2026 05:06

This branch was successfully deployed

1 active deployment
Preview — 606a71e2 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