Repository navigation
feat(agent): add rooms with session mentions and replies - #6925
Merged
Merged
Conversation
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
This was referenced Nov 17, 2026
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.
Summary
Add an independent Rooms workspace for humans and agents to talk in one shared transcript. Ordinary conversations keep their own history, model loop and draft; a Room never starts a model loop.
SessionSendhandles both destinations. Room posts accept structuredmentions(Agent session IDs) andreplyTo(a message in that Room). The post and admitted target queues commit together, each mention returns its own receipt, and the existing steering/queue path wakes the target. Author identity comes from the caller scope. Incoming Room messages give the agent the return address for replying with the same tool; final answers are not automatically echoed into the Room.The ordinary sidebar reveals the Conversations/Rooms switch under a small Show more action below its five primary destinations. Rooms keeps that switch directly beneath New room. Rooms can be created, renamed and deleted; right-click menus provide Room actions and reply/copy on messages, with a reply shortcut appearing on hover or keyboard focus. Conversation and child-session menus use NSH ContextMenu at the pointer and Menu at the ellipsis, sharing their action items. The UI also provides a session picker, reply quotes and removable mention chips. Both editors retain their drafts, including attachments and reply metadata. Room history uses indexed message cursors and the existing subscription mechanism; images and local file previews reuse the existing viewers. There is no legacy compatibility path or separate Room-send tool.
Verification
The PR's original test additions and extensions were removed and rebuilt as five behavior tests, using the existing Host, provider and native UI fixtures:
room_interrupted_send_delivers_each_recipient_once_after_reopen: lose the caller after a committed post, recover the durable receipt, and reopen the Host. Two recipients receive the original text/image once; a duplicate mention does not deliver twice, an unavailable target has its own rejection, and the Room starts no model Run.room_history_pages_and_read_position_survive_new_posts_and_reopen: post across a history page boundary, add a reply while reading, and verify frozen pagination has no loss/duplication/reordering. Reading the old tail leaves the new post unread; the latest read position survives reopening.room_recovered_send_preserves_its_mentions_and_the_newer_draft: close and reopen the client journal with a send in flight. Its frozen mention/reply metadata survives, and completing that send preserves the newer draft.desktop_room_reply_wakes_an_agent_without_mixing_drafts: create a Room through the native UI, post, reply from the message context menu, type@, choose an agent, reopen the window and Room, then send. The provider receives the quoted message and Room return address, itsSessionSendreply is readable in the Room, and the ordinary conversation's unsent draft remains separate.desktop_context_menus_follow_the_pointer_and_manage_rooms: right-click the same row at two positions, dismiss with Escape, rename a conversation, and rename/cancel deletion/delete a Room through the actual menus.All five passed locally after integrating
rust-previewat5eb3cad8c. Two temporary negative controls also failed at their behavior assertions: removing mention deduplication caused duplicate delivery receipts, and dropping reply metadata from draft reads lost the restored reply target. Both mutations were restored before the final passing runs. Fresh native UI declarations and strict TypeScript, formatting, staged ASF headers, Biome on the resolved UI file and diff checks passed; the existing CI suite routing includes both new native UI cases and the native/client tests.The feature's earlier validation also passed strict native TypeScript, SDK declaration generation, changed-TypeScript Biome checks, debug CLI/desktop builds, and focused workbench, ACP and native regressions. This test rewrite changes no product behavior.
Live macOS validation: used an isolated Root and a real Responses provider with
codex/gpt-6.1-sol. A human posted, @ woke the first session, itsSessionSendreply appeared in the Room, a human reply continued the same thread, and that agent then @ mentioned a second session which replied back. After restarting the built app, Room history, reply/mention draft and the ordinary conversation draft were still present. The latest navigation/menu follow-up was also exercised through real macOS mouse and keyboard input in a separate isolated Root: ordinary and Room context menus, prose Copy/Reply, rename, delete cancellation, and reply/mention draft preservation across mode changes. The screenshots below are unedited captures of that follow-up UI test; its two selectable sessions have no model configured and the shown reply remains an unsent draft.The earlier strict native Clippy run stopped at 11 existing diagnostics in untouched files (including the Claude/Codex executors, driver tests and history projection); the full workspace and other desktop platforms were not run.
Migration
Existing client journals need the new draft columns before opening this build. Stop Maka for that Root, then run the one-time Python migration:
python3 migrate_room_drafts.py --root ~/.maka/application/hostThe script preserves drafts, uploads and operation receipts, is safe to rerun, and creates no backups. It was tested against an old-schema journal including a pending send. Fresh Roots need no script. The canonical Room tables use the normal SQL migration.
Standard product installations receive the new Room UI binding through the existing baseline update. Explicit/custom flat deployments that supply the entire workbench configuration must add
rooms: { path: ["conversations-ui"], id: "rooms" }, using their conversations instance path. No frozen application source or hash is rewritten by the migration script.Screenshots
Room mode keeps the Conversations/Rooms switch directly below New room. Reply quotes and selected session mentions stay in the draft:
Right-clicking the message prose opens the reply/copy menu at the pointer:
Room rename/delete actions are in the row context menu and the header ellipsis:
Ordinary navigation reveals the mode switch under Show more; conversation actions also follow the right-click position:
AI use
Codex implemented the contracts, persistence, delivery, native UI, tests and migration script, and performed the local/live validation. The commit carries
Generated-by: Codex.Checklist
Does this PR entail a change in behavior?