Skip to content

Show documents someone else creates in the sidebar without a reload - #739

Merged
lavaman131 merged 1 commit into
mainfrom
feat/sidebar-live-documents
Oct 29, 2026
Merged

lavaman131 merged 1 commit into
mainfrom
feat/sidebar-live-documents

Conversation

@lavaman131

Copy link
Copy Markdown
Collaborator

Turning a machine's sharing off stopped every teammate's Planner on it at
once. A teammate whose Planner was replying lost the reply mid-stream, an
open question was cancelled, and a live workflow run was paused, all
because of someone else's click.

Now turning sharing off takes no new teammate documents, and:

  • a teammate's Planner that is idle, or waits only on a paused run, stops
    at once, as before;
  • one that is replying, has a question open, or has a live run keeps going
    until that work finishes, then stops on the next sweep (every 15 s) with
    the same reason, " stopped sharing with teammates";
  • sharing the machine again meanwhile keeps it, with nothing stopped later.

A paused run doesn't hold the Planner: it waits on people for as long as
they take, and stays on the machine to resume if its owner shares it again.

The busy documents are recorded before sharing ends, so no poll in between
moves their Planner. link.busy and attachments.busy say whether an
attached client is replying, asking or running; waiting (used by the idle
rule) is unchanged.

The Machines table shows "Finishing 1 teammate document" under the switch
while this lasts, described to screen readers by the switch, and the phone
view says the same. GET /api/connector/machines reports finishing.

Assistant-model: Claude Opus 5.5 (fast)
Assistant-workflow: inline
Assistant-verification: bun test unit passed: planner-dispatch.test.ts (27 pass) with 3 new cases: an open question, a reply in progress, a live run versus a paused one and sharing again meanwhile; src/harness/remote and src/experiments (219 pass)
Assistant-verification: Chromium E2E passed: bun run e2e e2e/planner-picker.e2e.ts e2e/machines.e2e.ts (15 pass), including hubot's reply in progress while mona stops sharing studio
Assistant-verification: typecheck and lint passed: bun run types and bun run ci
User-preference: When a shared machine stops being shared, a teammate's Planner finishes its current work before it stops
Co-authored-by: Alex Lavaee lavaman131@github.com

A document a teammate created showed in another person's Projects sidebar
only after they reloaded, or up to a minute later. Renames, archives,
restores and deletions by someone else were just as late.

The sidebar socket now carries `sidebar:catalogue`. When a document is
created, renamed, archived, restored or permanently deleted, by a person, the
Planner's drafted title, a question opened as a page, or `create_document`
over MCP, the server publishes it to the repository's topic, which every
sidebar watching that repository already subscribes to. The frame names the
repository and the document but no title, so a socket learns nothing it
couldn't read: the client reads that repository's documents again through the
usual access check, once a burst of changes has been quiet for 250 ms.

- packages/protocol: Sidebar.Catalogue.
- server: announceCatalogue, called from announceChannel (rename, archive,
  restore, question pages, Planner titles), the create route and MCP
  create_document (new onChannelCreated hooks), and permanent deletion.
- web: useSidebarDecisions passes the frame on; SidebarDecisionCounts
  refreshes the project it names.
- AGENTS.md and docs/channels.md describe it.

Assistant-model: Claude Opus 5.5 (fast)
Assistant-workflow: inline
Assistant-verification: Chromium E2E passed: e2e/sidebar-decision-counts.e2e.ts and e2e/document-creation.e2e.ts (28 pass); the new test (another person creates, renames, archives and deletes while the viewer's page never reloads) failed with the client handler disabled and passes with it
Assistant-verification: bun test unit passed: src/mcp src/channels src/socket (198 pass), with a create_document announce test (once, not on a replay)
Assistant-verification: typecheck and lint passed: bun run types and bun run ci
User-preference: A document created by one person should appear on other people's clients without a refresh
Co-authored-by: Alex Lavaee <lavaman131@github.com>
@lavaman131
lavaman131 force-pushed the feat/sidebar-live-documents branch from 499e81a to 6353474 Compare October 29, 2026 05:10
@lavaman131
lavaman131 merged commit 08859eb into main Oct 29, 2026
46 of 48 checks passed
@lavaman131
lavaman131 deleted the feat/sidebar-live-documents branch October 29, 2026 05:32
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