Skip to content

Add project lobbies for presence and channel lifecycle #17

Closed

Description

@iamnbutler

Project lobbies give presence, notifications and live channel lifecycle across a project's hosts.

Done

The brief auto-name flash on a new channel (studies 25, 26) was dropped as not worth fixing.

Tracked by #5. Migrated from TODO.md — During dogfooding.

Activity

  1. iamnbutler commented on Oct 15, 2026

    @iamnbutler
    ContributorAuthor

    Project lobbies landed in #334, #335, #336 and #337 (merged on main at 3a5d0d1).

    • feat(host): share project IDs between hosts and the app #334: projectId and related helpers moved to @ace/host/protocol. docs/terms.md defines Person, Here, Away and Lifecycle event.
    • feat(directory): add a per-project Lobby cell beside the directory #335: a Lobby Durable Object, one per project, runs in the directory's Worker at /lobbies/<project>. Presence lives only in socket attachments. Lifecycle events have a per-project seq and are kept for 30 days, up to 2,000 per project. An alarm every 5 minutes closes sockets that have been silent for 90 s. Re-arming that alarm is the only steady write: 288 row writes a day per project while a host is connected. Pings and presence write nothing. Each lifecycle event costs about 5 rows over its life.
    • feat(host): show who is here from project lobbies #336: hosts subscribe to the lobby of each of their projects. The app shows who is here, and who is away, in channel-row facepiles and a project facepile. ace serve --loopback hosts stay out of lobbies.
    • feat(host): push channel lifecycle through project lobbies #337: a host pushes create, rename, summarize, archive, resume, move, delete and run-end events through the lobby after each directory publish. While every lobby a host uses is live, its directory poll and heartbeat publish drop from every 30 s to every 5 min.

    Nothing changes until the directory Worker is deployed, and that's your call. Until then, hosts get 404 from /lobbies, retry quietly, and keep today's 30 s directory poll. To deploy, run wrangler deploy once from services/directory. That adds the LOBBY binding and the v2 migration (new_sqlite_classes: ["Lobby"]) and needs no new secrets. First confirm the live Worker's last applied migration tag is still v1.

    Notifications (mentions, read state) are still not built, so this issue stays open.

  2. iamnbutler commented on Oct 15, 2026

    @iamnbutler
    ContributorAuthor

    Verified in the two-Mac study, scenario 25 (Canary 0.0.42, ace-directory-study running main with the Lobby DO).

    • Presence both ways:
      • A sees B ("Here: samechocolixir") beside the project picker and on the talk row.
      • B sees A ("Here: iamnbutler").
      • The viewer is excluded on both sides.
    • Live lifecycle: when A created, renamed and archived a channel, B's sidebar updated before A's chat markers arrived. The rename landed about 11s early and the archive about 14s early, so the updates came through lobby push, not polling.
    • Joining: B joined the directory from Settings with the shared secret.

    Follow-ups:

  3. iamnbutler commented on Oct 15, 2026

    @iamnbutler
    ContributorAuthor

    Rewrote the body to the current state. Presence, lifecycle push and notifications (#255) are done and verified in studies 25 and 25b. What's left is the production directory deploy (the v2 Lobby migration, the user's call) and two minor UI items from the study.

  4. iamnbutler commented on Oct 15, 2026

    @iamnbutler
    ContributorAuthor

    The production directory is already deployed. ace-directory is the Worker that both stable and Canary hosts use. Its migration tag is v2, and it was last deployed at 10:33 UTC today, after #335 (06:21 EDT); nothing has changed in services/directory since. The "study directory" was this same Worker, so no deploy is needed. Only the two small UI items are left.

  5. iamnbutler commented on Oct 15, 2026

    @iamnbutler
    ContributorAuthor

    Done: lobbies, presence, lifecycle and notifications shipped and verified; the archived-tab notice landed in #438. The new-channel auto-name flash was dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions