Invite an agent into the room: one checkbox, read-only or full - #42
Merged
Conversation
The room header gains an Invite action (wide row and compact menu, every status — a draft room is exactly where brainstorming happens). The dialog asks for agent, optional model, and the one Full checkbox; the server declares each agent's mode support via GET /v1/agents and the dialog renders exactly that — an unsupported read-only combination is greyed with the server's reason, lifted when Full is checked. When the agents endpoint is missing (an older sail), the agent field falls back to free text and the server rules on submit. Refusals hold the dialog open and render the server's words verbatim (the reservation vocabulary on 409, the mode refusal on 400) through a pure mapInviteOutcome; a launch toasts the invited principal and, for a full invite, the snapshot label it paid with. snapshot_created joins EVENT_REGISTRY as a lifecycle row and eventNarration learns data.label, so the full invite's pre-launch snapshot renders in the room timeline the moment it is taken — rollback is one visible step.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spec: sail-room-invite. Sail counterpart: standardapplied/sail#194 (the API, roles, and launch lanes).
The room header gains an Invite action (wide button row and the compact Actions menu, every status — a draft room is exactly where brainstorming happens). The dialog asks for agent, optional model, and the one Full checkbox:
GET /v1/agents) and the dialog renders exactly that: with Full unchecked, an agent without a harness-enforced read-only session is greyed with the server's reason as the option description; checking Full lifts it. No client-side guessing — the reason string is the seam-declared one the launch gate also refuses with.mapInviteOutcome(message — action): the reservation vocabulary on 409, the mode refusal on 400, policy refusals on 403. A launch closes and toasts the invited principal — and, for a full invite, the snapshot label it paid with.snapshot_createdjoinsEVENT_REGISTRYas a lifecycle row andeventNarrationlearnsdata.label, so the full invite's pre-launch snapshot renders in the room timeline the moment it is taken (it arrives with the spec id over SSE). The invite run's presence rides the existing per-spec presence chip.No new dependencies.
bun test(474) andbun run typecheckgreen. Behavior tests:InviteDialog.test.tsx(reported modes + greyed reason, Full lifting the greying, submit payloads, 409 held-open verbatim refusal, endpoint-missing fallback, read-only credential gate),inviteOutcome.test.ts,specTimeline.test.ts(snapshot row + label narration),SpecRoom.test.tsx(livesnapshot_createdrenders as a system row naming the label).