Skip to content

feat(panel): Chat follows the workspace's chat on the central live layer, and its read loop and cursor are gone - #3928

Merged
luke-agent[bot] merged 1 commit into
mainfrom
luke/chat-live-window
Oct 21, 2026
Merged

luke-agent[bot] merged 1 commit into
mainfrom
luke/chat-live-window

Conversation

@charleslpan

@charleslpan charleslpan commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Part of making workspace chat live over Neon Realtime. On main (#3923 has merged). One change: the window's Chat follows the chat stream, and its read loop and cursor are gone.

What changes

  • The hook follows instead of looping. While Chat is on, use-workspace-chat.ts keeps the listed workspace's codingAgents.chatFollow stream open (feat(host): a workspace's chat is followed over Neon Realtime and streamed to the panels that draw it #3923) and takes in each push whole:
    • the roster, the channels and the messages it holds replace what was held, so a message that leaves the live read (past a channel's newest 200, other than an open ask) goes too
    • a message held newer by touchedSeq is kept, so a push that crosses a write's own answer never sets it back
  • Write overlay kept. What the window wrote, a channel or a message, is laid over each push that may have been read before the write landed. It stays until a push holds it as written, or 30 s have passed since the write was answered.
  • Errors and retries. A chat that couldn't be read, or whose stream ends while it's still followed, shows Try again, which follows it from scratch. A push that arrives after the window let the stream go is dropped.
  • Writes are unchanged.
  • Web tab. The same stream runs in a web tab through its in-process act port. No web-specific code is needed.

The held read is retired in #3933. The service's held route stays for released desktops.

Tests

  • use-workspace-chat.test.ts, rewritten for pushes:
    • following, merging, and an older push not setting anything back
    • failure and Try again
    • switching workspace or account
    • post keys, answers that weren't taken, and reads-to
    • channel writes: a stale push sets nothing back, and the overlay is let go once a push holds the write, or at the next push
  • use-tasks-tab.test.ts: Chat on follows (and Chat off doesn't). The task's Chat tab, the narrow room's rail, and channel links now run on pushes.
  • Checks run one at a time on the stack's top: tsc per touched package, biome, oxlint, knip, discarded-effect, the repository checks, and the affected vitest suites.

To check by hand

With Chat on (Realtime off by default, so the held poll answers within about a second) in the desktop app or a web tab:

  1. Post from another account or an agent. It should appear straight away.
  2. Answer an ask in one window. The other window should update too.

@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 3:37am UTC

Request Review

@luke-agent
luke-agent Bot force-pushed the luke/chat-live-follow branch from 853b29c to eca66d6 Compare October 20, 2026 01:34
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-window branch from 5b6924d to f9c1cb1 Compare October 20, 2026 01:34
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-follow branch from eca66d6 to 719d9b6 Compare October 20, 2026 01:49
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-window branch from f9c1cb1 to be2396d Compare October 20, 2026 01:49
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-window branch from be2396d to 5b25b22 Compare October 20, 2026 03:08
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-follow branch from 719d9b6 to 585cf83 Compare October 20, 2026 03:08
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-follow branch from 585cf83 to 9597028 Compare October 20, 2026 22:07
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-window branch from 5b25b22 to 5b9e977 Compare October 20, 2026 22:07
@luke-agent
luke-agent Bot changed the base branch from luke/chat-live-follow to luke/chat-write-txid-wait October 20, 2026 22:08
@luke-agent luke-agent Bot changed the title feat(desktop): Chat follows the workspace's chat over Neon Realtime, and its read loop and cursor are gone feat(panel): Chat follows the workspace's chat over Neon Realtime, and its read loop and cursor are gone Oct 20, 2026
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-window branch from 5b9e977 to e2e6c26 Compare October 20, 2026 23:29
@luke-agent
luke-agent Bot changed the base branch from luke/chat-write-txid-wait to luke/chat-live-follow October 20, 2026 23:29
@luke-agent luke-agent Bot closed this Oct 20, 2026
@luke-agent luke-agent Bot reopened this Oct 20, 2026
@luke-agent luke-agent Bot changed the title feat(panel): Chat follows the workspace's chat over Neon Realtime, and its read loop and cursor are gone feat(panel): Chat follows the workspace's chat on the central live layer, and its read loop and cursor are gone Oct 20, 2026
@luke-agent
luke-agent Bot marked this pull request as ready for review October 21, 2026 00:12
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-follow branch from 3a8dcc0 to da38953 Compare October 21, 2026 00:14
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-window branch from e2e6c26 to 1ffcb98 Compare October 21, 2026 00:14
devin-ai-integration[bot]

This comment was marked as resolved.

@luke-agent
luke-agent Bot force-pushed the luke/chat-live-window branch from b54316d to d67a50f Compare October 21, 2026 00:52
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-follow branch from 9b720ed to 53705f4 Compare October 21, 2026 00:52
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-follow branch from 53705f4 to ffe6a84 Compare October 21, 2026 01:12
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-window branch from d67a50f to 322a783 Compare October 21, 2026 01:12
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-follow branch from ffe6a84 to b5fa91e Compare October 21, 2026 01:52
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-window branch from 322a783 to f478684 Compare October 21, 2026 01:52
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-window branch from f478684 to 690f134 Compare October 21, 2026 02:22
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-follow branch from b5fa91e to 05bd48a Compare October 21, 2026 02:22
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-follow branch from 05bd48a to a36b6ec Compare October 21, 2026 02:32
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-window branch from 690f134 to ac96522 Compare October 21, 2026 02:32
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-follow branch from a36b6ec to 05a30ee Compare October 21, 2026 02:49
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-window branch from ac96522 to 1bd3521 Compare October 21, 2026 02:49
Base automatically changed from luke/chat-live-follow to main October 21, 2026 03:12
devin-ai-integration[bot]

This comment was marked as resolved.

…yer, and its read loop and cursor are gone

The window's chat no longer loops on the service's held read. While Chat
is on, the window holds the listed workspace's chat stream open on its act
port (codingAgents.chatFollow) and takes in each push whole: the roster,
the channels, and the messages it holds (each channel's newest, and every
open ask), a message held newer by the place it last changed kept, so a
push that crosses a write's own answer never sets a message back. What
the window wrote, a message or a channel, is laid over each push that may
have been read before the write landed, until a push holds it as written
or thirty seconds have passed since it was answered. A chat that could not
be read, or whose stream ended while followed, is let go and says so, with
Try again, which follows it anew; a push heard after the window let a
stream go is dropped. Writes are unchanged.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
@luke-agent
luke-agent Bot force-pushed the luke/chat-live-window branch from 35d7331 to 7fee8fe Compare October 21, 2026 03:33

@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 new potential issue.

Devin Review

@luke-agent
luke-agent Bot added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 1907c87 Oct 21, 2026
13 checks passed
@luke-agent
luke-agent Bot deleted the luke/chat-live-window branch October 21, 2026 03:56

This branch was successfully deployed

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