Skip to content

rooms: every FDE has a standing conversation with the project's agent - #134

Merged
udaychandra merged 6 commits into
mainfrom
agent/sail-project-dm
Oct 15, 2026
Merged

udaychandra merged 6 commits into
mainfrom
agent/sail-project-dm

Conversation

@udaychandra

@udaychandra udaychandra commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Spec: sail-project-dm. Pairs with standardapplied/sail#314. There, sail project apply creates each FDE's home room, and GET /v1/projects/{p} names the project's member and the reader's home_room id.

What changes

  • homeRoomOf(rooms, project, id, handle) in rooms.ts finds the viewer's home room. The id comes from sail's home_room, so it is derived in one place, including for handles sail has to fold. The room must also be assigned to the viewer (from whoami.fde), so a room someone else filed under that id is not taken for it.
  • The sidebar shows the home room first, outside every section, labelled with the project's name. It opens ChatRoomPane like any other room without a spec. A project with no home room (an older sail, or a box that never applied the project) shows the sidebar as it is today.
  • A project's first visit opens its home room. A room the viewer chose last time still wins. If whoami or the project read lands after the rooms, a room that was picked automatically gives way to the home room.
  • catalogStore reads each project once per connection with loadProject, through the new gateway.project(name). projectMember and homeRoomId read the result. A failed read is asked again, and reset forgets it. The useProjectMember and useHomeRoomId hooks expose them.
  • The new-room dialog's Agent select starts on the member's agent, else claude-code. The member and the agent list only preset it until the viewer picks one, so a late read never replaces an explicit "No agent". EngageDialog, which now takes project, starts its agent, model and access on the member until the engineer changes one of them.
  • The sentence "The agent joins immediately. There is no rollback point, so undo any damage by hand." is gone. The snapshot checkbox keeps its label.
  • The demo gateway assigns a created room to its creator, as sail does.

Tests

  • rooms.test.ts: the id comes from sail, the room must be the viewer's, and a room filed in another project does not count.
  • RoomList.test.tsx: a late member or agent list leaves "No agent" chosen. This test fails before the fix.
  • RoomsScreen.test.tsx: the first visit, the whoami race, and a remembered choice.
  • catalogStore.test.ts: the member and home room id are read once and forgotten on reset.
  • EngageDialog.test.tsx: the member preset, and a late member never overriding a choice.
  • bun test: 1410 pass. bun run typecheck is clean. The Rust side is unchanged.

The sidebar places the viewer's home room, <project>--<handle>, first under the
project's name and opens it on the project's first visit (also when whoami lands
after the rooms). The new-room and add-an-agent selects start on the project's
member, read from GET /v1/projects/{p}. The add-an-agent dialog no longer warns
that there is no rollback point when the snapshot is unticked.

Spec: sail-project-dm.
…chosen

The viewer's home room id now comes from sail (home_room on GET
/v1/projects/{p}), the one place it is derived, so a handle a room id cannot
carry verbatim still finds its room; the room must also be the viewer's, so a
room someone else filed under that id is not taken for it. The demo gateway
assigns a created room to its creator, as sail does.

Create a room: the project's member and the agent list preset the agent select
only until the viewer picks one, so a late member read no longer turns an
explicit "No agent" into a full-access agent.

Spec: sail-project-dm.
A surface now holds the project it reads (catalogStore.retainProject, the
run-hold pattern), and refreshAll asks again for every held project not yet
read, so a transient failure, or a sign-in change, no longer leaves the home
room unrecognized and the agent selects on their fallback. The folded-handle
fixture follows sail's home--<sha256> id.

Spec: sail-project-dm.
@udaychandra
udaychandra merged commit 0f2cd36 into main Oct 15, 2026
2 checks passed
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