Skip to content

feat(service,host): a task's pages and calls follow over the live layer - #3757

Merged
luke-agent[bot] merged 2 commits into
mainfrom
luke/neon-realtime-task-record
Oct 21, 2026
Merged

luke-agent[bot] merged 2 commits into
mainfrom
luke/neon-realtime-task-record

Conversation

@charleslpan

@charleslpan charleslpan commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

What was asked

Move an open task's pages and calls onto the central live layer (liveRows and the sealed live procedures), the same way #4116 moved the board. The panel then reads them again when their rows move, instead of when a call's activity or end suggests they might have. The board half and the txid confirmation from earlier versions of this PR are dropped.

Service

  • packages/service/src/tasks/task-record-live.ts has two deterministic statements, one per part:
    • pages: each page's newest version number.
    • calls: one row per call that has words, with its closedAt, closeReason, usage, model, last segment seq, and the count of spoken rows the voice wrote for it.
    • Each statement joins member through the task's workspace and is held to taskSeenBy, as boardLiveStatement is.
  • live.taskRecord (GET /api/live/task-record?id=&userId=) sits beside live.taskBoard in contract/live.ts and live-procedures.ts:
    • sameUser guards it.
    • It is not found for a task the account doesn't reach.
    • It is sealed or polled (held past after) as every live read is.
  • client.recordLive(taskId, userId, poll, after).

Host

  • task-record-follow.ts decodes the deliveries and answers the parts each one moved. A move of the pages reads the pages; a move of an ended call's row reads the transcript. A standing call's words read nothing. The first delivery moves every part.
  • In compose-tasks.ts, followBoard's seal, poll, backoff and signed-out handling become one followLive. followBoard and the new followRecord both use it, and openRecord and recordFollow mirror the board's.
  • showActivity no longer reads the pages. callEnded no longer reads the transcript, but it still reads the work and wakes the conversation, once now and once after TRANSCRIPT_SETTLE. The calls mark doesn't move with the turns and journals the Work tab reads, and main's conversation read still parks.
  • There is no act-port procedure. The pages and the transcript are TasksView fields, which reach every window, web tabs included, through the app-state push.

Tests

  • task-record-live.test.ts: each part moves exactly when its held read (listPages, readTranscript) would answer something new, and a stranger reads no rows.
  • live-procedures.test.ts: the record is sealed a part each for the owner, not found for a stranger, and signed out for another account.
  • live-statements.test.ts: both statements call only immutable functions and seal through Neon's Drizzle adapter.
  • compose-tasks.test.ts: the pages are read on their mark and the transcript on an ended call's mark; nothing is read on the call's activity; the call's end reads the work twice; and the subscriptions go when the task is closed.

Checks run locally

pnpm check:affected is optional now, so I ran its pieces:

  • typecheck for features, service and host
  • biome and oxlint on the changed files
  • discarded-effect, knip, and repository-checks.sh
  • vitest for the files above, plus board-follow, live-follow and task-client

@vercel

vercel Bot commented Oct 18, 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 12:01am UTC

Request Review

@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-planning-hold branch from fbe4b51 to fc96193 Compare October 19, 2026 18:52
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-task-record branch from e0432ec to 09c7e53 Compare October 19, 2026 18:52
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-planning-hold branch from fc96193 to 373ae87 Compare October 20, 2026 01:36
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-task-record branch from 09c7e53 to 22139b5 Compare October 20, 2026 01:36
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-planning-hold branch from 373ae87 to 90a213c Compare October 20, 2026 02:06
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-task-record branch from 22139b5 to 2836185 Compare October 20, 2026 02:06
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-planning-hold branch from 90a213c to ce92920 Compare October 20, 2026 02:43
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-task-record branch from 2836185 to 11af552 Compare October 20, 2026 02:45
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-task-record branch from cc26ed9 to cb54b5d Compare October 20, 2026 23:31
@luke-agent luke-agent Bot changed the title feat(service,host): a task's record (board, pages, calls) follows over Neon Realtime feat(service,host): a task's pages and calls follow over the live layer Oct 20, 2026
@luke-agent
luke-agent Bot changed the base branch from luke/neon-realtime-planning-hold to luke/live-same-user October 20, 2026 23:31
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-task-record branch from cb54b5d to bfde059 Compare October 20, 2026 23:32
@luke-agent
luke-agent Bot marked this pull request as ready for review October 20, 2026 23:41
devin-ai-integration[bot]

This comment was marked as resolved.

Base automatically changed from luke/live-same-user to main October 20, 2026 23:55
charleslpan and others added 2 commits October 20, 2026 23:56
The service seals where an open task's pages and calls stand at
GET /api/live/task-record?id=&userId= (live.taskRecord on the oRPC live
contract): one statement a part, each a mark and none of the words it
marks, the pages at their newest version and each call with words by its
end, its metering, its last fragment and the rows the voice wrote for it,
joined through the account's membership of the task's workspace and held to
its GitHub access, as the board's live read is. It is held to `sameUser`,
and polled or sealed as every live read is.

The host follows it as it follows the board, the two sharing one follow's
seal, poll, and backoff: the pages are read again once their mark moves,
and the transcript and the work once an ended call's does. The call's
activity no longer reads the pages, and its end no longer reads the
transcript and the work, though it still wakes the conversation. The record
reaches every window, a web tab's included, through the tasks view.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
… settle

The calls mark moves with the call's own rows, not with the turns and
journals the Work tab reads, so a turn or worker that writes after the call
closed would leave the work stale. The call's end reads the work as main
does, now and again after `TRANSCRIPT_SETTLE`; the record follow reads only
the transcript.

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-task-record branch from f2aca7e to 08a7be1 Compare October 20, 2026 23:57
@luke-agent
luke-agent Bot enabled auto-merge October 20, 2026 23:58
@luke-agent
luke-agent Bot added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 2269a89 Oct 21, 2026
13 checks passed
@luke-agent
luke-agent Bot deleted the luke/neon-realtime-task-record branch October 21, 2026 00:10

This branch was successfully deployed

1 active deployment
Preview — 08a7be17 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