feat(chat): show the user's request decision live in My Chat (core#2636) #2643
Reference in New Issue
Block a user
Delete Branch "feat/2636-decision-chip-in-mychat"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the reported "I click approve, see nothing until I refresh." Responding in the Approvals/Tasks tab updated the tab (toast + row removal) but My Chat — where the user is looking — showed nothing until a reload.
REQUEST_RESPONDEDbroadcast now carriestitle+kind.useChatSocketsurfaces it viaonRequestResponded.Live-only for now (not yet rehydrated from history on reload — the persistence follow-up stays tracked in #2636). Single commit per the merge-queue race learnings in #2641. handlers Go suite green; chat + ChatTab vitest green (323); canvas build green.
Refs core#2636.
🤖 Generated with Claude Code
Clicking Approve/Reject/Done in the Approvals/Tasks tab updated the tab (toast + row removal) but My Chat showed nothing until a reload — the decision lived only in a separate surface. Now the user's own decision appears in My Chat the instant they act. - REQUEST_RESPONDED broadcast carries title + kind so the canvas can render a meaningful line without an extra fetch. - useChatSocket surfaces REQUEST_RESPONDED via onRequestResponded. - ChatTab appends a centered decision chip for the USER's own responses ("You approved 'X'" green / "You rejected 'X'" red); agent-side responses are ignored (not the user's action). Live-only for now (the chip is not yet rehydrated from history on reload — tracked as the persistence follow-up); this fixes the reported "click approve, see nothing until refresh". Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>REQUEST_CHANGES: I found a blocker against the stated behavior.
The backend now broadcasts responder_id, responder_type, title, and kind, but the socket/UI path only forwards status/responderType/title/kind and ChatTab filters solely on responderType == "user". That means any user response broadcast in the same workspace can append a local chip saying "You approved/rejected ..." in another user's My Chat. The feature request is explicitly for the USER's own responses, and showing another user's decision as "You" is both incorrect and a privacy/confusion risk.
Please carry responder_id through useChatSocket and only render the decision chip when it matches the current user/session (or otherwise gate the broadcast to the responding user). Add a test covering a user response from a different responder_id being ignored, plus the matching responder_id being rendered.
APPROVED: Re-reviewed the new head and the prior REQUEST_CHANGES blocker is fixed.
The REQUEST_RESPONDED path now carries responder_id through useChatSocket, and ChatTab gates the decision chip through decisionForChip(): responderType must be user, responderId must be non-empty, and it must match the current session user id. I checked the session fallback against RequestsInbox; both use the same "admin" placeholder and upgrade to sess.user_id, so the single-user path still works while multi-user responses diverge correctly and fail closed.
5-axis review:
Current Gitea statuses still show some contexts in progress and governance checks expected to update after review, but I found no remaining code blocker.