Repository navigation
fix(site/src/pages/AgentsPage): make other-user chats read-only - #25736
Conversation
|
/coder-agents-review |
|
Chat: Review posted | View chat Review historydeep-review v0.5.0 | Round 4 | Last posted: Round 4, 9 findings (5 P3, 4 Nit), COMMENT. Review Finding inventoryFindings
Contested and acknowledgedCRF-8 (Nit, AgentChatPage.stories.tsx:1244) - Missing canShareChat authorization mock
Round logRound 1Panel (Bisky, Hisoka, Mafuuu, Mafu-san, Pariston, Nami, Gon, Leorio). Netero clean. 5 P3, 4 Nit, 2 Note new. 3 dropped. Reviewed against 0c27224..bbd75ff97. Round 2BLOCKED. CRF-8 silent. 8 of 9 posted findings addressed. No review. Round 3Panel (Bisky, Mafuuu, Pariston, Nami, Hisoka, Leorio). Netero clean. CRF-8 contested; panel closed (6/6). All prior fixes verified. 0 new findings. Reviewed against 0c27224..2f8c695. Round 4Panel (Bisky, Mafuuu, Pariston). Head SHA unchanged from R3 (2f8c695). 0 new findings. Approval from R3 stands. Reviewed against 0c27224..2f8c695. About deep-reviewCRF = Coder Review Finding (P0-P4, Nit, Note)
|
|
/coder-agents-review |
There was a problem hiding this comment.
Clean fix that removes a dead authorization check and aligns the frontend with the backend's owner-only contract for message sending. The old canUpdateOtherUserChat path was a lie: the backend 403s all non-owner message submissions regardless of RBAC. Removing the false promise and making non-owner chats uniformly read-only is the right call. Proportional change (net -91 lines), and the panel confirmed the interrupt button is correctly left enabled (RBAC-gated safety operation, not owner-only).
5 P3, 4 Nit. No blockers. The P3s are test gaps (duplicate stories, untested fallback/action paths), a naming concern, and a UX copy regression. All straightforward to address.
"The old UI was a lie. The new code tells the truth: not your chat, read-only." —Hisoka
🤖 This review was automatically generated with Coder Agents.
bbd75ff to
2f8c695
Compare
|
/coder-agents-review |
There was a problem hiding this comment.
8 of 9 findings from Round 1 addressed in 2f8c695. Nice work.
One finding is unaddressed:
CRF-8 (Nit, AgentChatPage.stories.tsx) OtherUserChatReadOnly (renamed from AdminViewingOtherUserChat) still has no canShareChat authorization mock. Since baseChatFields has no parent_chat_id, shouldCheckCanShareChat fires and MSW logs a warning for the unhandled request. The thread was resolved without a code change or response. To unblock the next review round: add the mock, respond explaining why it is unnecessary, or reopen the thread.
🤖 This review was automatically generated with Coder Agents.
|
/coder-agents-review |
There was a problem hiding this comment.
All 9 findings from Round 1 are resolved. CRF-1 through CRF-7 and CRF-9 fixed in 2f8c695. CRF-8 contested and closed by the panel (6/6): buildQueries already provides the canShareChat mock via its embedded buildChatAuthorizationQuery call.
The fix is clean. The dead canUpdateOtherUserChat RBAC path is fully removed. Non-owner chats are uniformly read-only with clear banner text, disabled composer, and suppressed inline actions. Story coverage is thorough: name/username/fallback label paths, inline action suppression with real message fixtures, and the archived+other-user interaction are all tested.
PS. @DanielleMaywood's thread on the ChatOwnerInfo doc comment (line 57) is a style judgment call between author and human reviewer. The comment documents that {} is a valid value and explains the fallback behavior, which is useful given both fields are optional. But the type is small and the fallback logic is one hop away. Either outcome is fine.
"The old UI was a lie. The new code tells the truth: not your chat, read-only." —Hisoka, R1
🤖 This review was automatically generated with Coder Agents.
|
/coder-agents-review |
There was a problem hiding this comment.
Round 4: Head SHA unchanged from R3 (2f8c695). No new commits, no new substantive comments. Panel re-confirmed: 0 new findings. The Round 3 approval stands.
🤖 This review was automatically generated with Coder Agents.
Other-user agent chats showed a banner that implied prompts would run as the owner, but submitting from that view is forbidden.
This updates the banner to identify the chat owner and makes chats owned by another user read-only in the UI by disabling the composer and hiding inline send or edit follow-up actions.