Repository navigation
fix(workspace): a room inlines only its own live work, joined by the chat id it now stamps (#2792) - #2793
Conversation
…chat id it now stamps (#2792) A Workspace room picked its live cards from the Work feed by agent name, so while a participant was marked working, every execution on that agent — a schedule run, a loop turn, a 1:1 thread, another room, an MCP task — rendered as a card in this room. It could not do better: the room turn stamped no source chat on its execution row. The room turn now stamps `source_channel_chat_id = room_id` (the 1:1 thread's shape) under its OWN channel value, `config.ROOM_SOURCE_CHANNEL = "room"`, and `PortalRoom.vue` selects `liveItemsForRoom(feed, roomId, working)`: chat id equals the room, still intersected with the server's `working` list, masked agents excluded. With no row for the room yet the server-derived "thinking…" line renders, never unrelated cards. The rail's Work tab is unchanged. Why not reuse `portal` (the plan review's finding, both reviewers): every reader of that value branches on "this is a 1:1 thread" — `_resolve_portal` would look the room id up as a session, and the voice-reply route would tell a room's delegated child (an `mcp` trigger carrying the inherited stamp) about a speaker control rooms do not have. `room` is in neither map, so parent and child are suppressed by construction; the work projection is the one reader that opts in (`chat_id`, and a room's child classifies `delegated`). Tests: the stamp on a first and a chained wake, no resolver reached for parent or child (spy over every existing resolver), `not_a_channel_turn` for both on the voice route, the projection; and on the frontend the pure rule plus the component's real selection line executed against a feed holding a room row and a foreign row on the same working agent. Fixes #2792 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_018qjDKyEzcQF7ejgLFgv3r4
|
Resolve by running |
|
Resolve by merging |
Mechanical, per the merge-train note on the PR. This branch had never been tested by CI — every run was skipped on the conflict — so the merge is what lets it run for the first time. - src/backend/shared_sessions/service.py — both sides edited the same execute_task(...) call. dev's #2794 added `images=images or None` and hoisted `client_email = getattr(current_user, "email", None)` (:1160); this branch added the #2792 room stamp. Union of both. `source_channel_client` now reads `client_email`, which is the same expression dev hoisted, so the value is unchanged — not a re-decision. - src/frontend/src/components/portal/PortalRoom.vue — import union: liveElapsedSeconds, liveItemsForRoom (this branch), soleStoppableItem (#2795). - docs/memory/learnings.md — routine same-day append; both kept, dev's first. - tests/registry.json — rebuilt from the git stages rather than spliced: dev's 254 entries in dev's order, plus this branch's one new entry (unit/test_2792_room_work_chat_id.py) at its original neighbour position. Diff against dev is exactly those 12 lines. Verified on the merged tree: tests/unit/test_2792_room_work_chat_id.py 11 passed; frontend 134 files / 3025 tests passed, including dev's roomStopWork.spec.js (the #2795 coupling) and both the raw-colour and loading-gate ratchets, with no baseline edits. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
merge-train: four conflicts resolved and pushed to this branchCommit This branch had never been tested by CI.
Verified on the merged tree: Body: Validation notes not fixed — yours to judgeNone blocks the merge; the code is correct and fully consumed end-to-end (a five-mutation battery turned the suite red on every changed line, and the chain
The issue's own flagged hazard was handled correctly: minting 🤖 Generated with Claude Code |
Mechanical. #2816 merged to dev between this branch's first resolution and its merge slot, and both append to docs/memory/learnings.md — the routine same-day collision. Both entries kept, dev's (#2814) first. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
vybe
left a comment
There was a problem hiding this comment.
merge-train 2026-09-15: four conflicts resolved mechanically and verified on the merged tree (11 backend + 3025 frontend); first-ever CI run fully green.
Summary
source_channel_chat_id = room_idunder its own channel value,config.ROOM_SOURCE_CHANNEL = "room", andPortalRoom.vueselects live cards by that chat id (still ∩ the server'sworkinglist). No row for the room yet → the existing server-derived "thinking…" line, never unrelated cards. The rail's Work tab is unchanged.portal. Every reader of that value branches on "this is a 1:1 thread" —_resolve_portalwould look the room id up as a session, and the voice-reply route would tell a room's delegated child (mcptrigger + inherited stamp) about a speaker control rooms do not have (the bug(voice): agents tell Workspace clients the surface is text-only — portal TTS is never advertised, and the channel/portal voice gates disagree #2157 false-claim class).roomis in neither map, so parent and child are suppressed by construction; the work projection is the one reader that opts in.Changes
src/backend/config.py—ROOM_SOURCE_CHANNEL = "room", with the reasoning.src/backend/shared_sessions/service.py—_wake_agentstampssource_channel,source_channel_chat_id,source_channel_client.src/backend/client_portal/work/service.py—_projectexposeschat_idfor room rows;work_kindclassifies a room's delegated childdelegated.src/frontend/src/components/portal/portalWork.js— pureliveItemsForRoom(items, roomId, workingAgents).src/frontend/src/components/portal/PortalRoom.vue— the selection line uses it.docs/memory/feature-flows/workspace-work.md,channel-completion-report.md— the room stamp, theroomvalue, the stated participant-scope residual;docs/memory/learnings.md— one entry on reusing a discriminator value.Test Plan
tests/unit/test_2792_room_work_chat_id.py— the stamp (first + chained wake, no-email principal), no resolver reached for parent or child (spy over every existing resolver),not_a_channel_turnon the voice route for both, the projection (turn →room, child →delegated, Telegram → no chat)src/frontend/tests/unit/roomWorkChatId.spec.js— the AC pin (one room row + one foreign row on the same working agent → exactly one card) and the component's real selection line executed against a stub feed;portalWork.spec.jspin updatedFixes #2792
🤖 Generated with Claude Code
https://claude.ai/code/session_018qjDKyEzcQF7ejgLFgv3r4