Repository navigation
feat(site/src/pages/AgentsPage): quieter read-only view for other users' chats - #30483
Conversation
…rs' chats Replace the orange owner banner with a neutral notice inside the composer, drop the editor and all action controls (plus menu, mic, send, pill dismiss buttons) for read-only viewers, outline the composer with the default border, and show a lock icon in the top bar instead of the shared-chat icon. Fixes CODAGT-1355
…ad-only chats The disabled model selector rendered greyed out next to the other context pills. Read-only viewers cannot change the model, so render a plain label that matches the MCP pills instead.
…bar icons Button forces icons to size-icon-sm with p-0.5 inside a size-7 box, so the bare 16px lock rendered larger than its neighbours. Use the same box and glyph sizing.
…ithub.com/coder/coder into tracy/codagt-1355-read-only-chat-composer
… chats Viewers with the share permission (owners, org admins) still saw the share button next to the lock on chats they do not own. Show it only to the chat owner.
DanielleMaywood
left a comment
There was a problem hiding this comment.
Approving although we're making our components even more slop with this change. What I mean is: we're adding an optional prop readOnlyNotice that, when set, hides the editor and controls. It just "feels" wrong. I'm going to noodle on the component architecture a little bit outside of this PR
| <div className="flex items-center gap-2"> | ||
| {!isEmbedded && canShareChat && chat && ( | ||
| {!isEmbedded && isReadOnlyViewer && ( | ||
| // Matches the icon buttons' box and glyph size so it reads as a peer. |
DanielleMaywood
left a comment
There was a problem hiding this comment.
Approving although we're making our components even more slop with this change. What I mean is: we're adding an optional prop readOnlyNotice that, when set, hides the editor and controls. It just "feels" wrong. I'm going to noodle on the component architecture a little bit outside of this PR
…d-only-chat-composer # Conflicts: # site/src/pages/AgentsPage/components/ChatTopBar.tsx
… viewers Restore the existing shared-chat indicator next to the title instead of moving it into the actions area.
I've made some issues (in description) to capture future work. |
When a user opens a chat owned by someone else, the page showed an orange warning band and a full composer whose controls were all disabled. This replaces that with a quieter read-only view.
+, mic, send/stop and thexon workspace, MCP and planning pills are hidden. Model, workspace and MCP pills and the context indicator stay; the model shows as a plain label rather than a disabled picker.The compact view is driven by a new
readOnlyNoticeprop onAgentChatInput, so the new-chat form, which also usesisReadOnly, is unchanged. Sidebar rows and message action rows are out of scope.Fixes CODAGT-1355
Follow-ups (cleanup tracked in CODAGT-1384):
AgentChatInput(replacesreadOnlyNotice).Design decisions
From design review with Tracy:
+, mic, send, and the pillxbuttons. The spinner in the mockup is the existing context indicator, which stays.Verified in Storybook (
AgentChatPageView/OtherUserChatReadOnly): the composer shows the notice, has no editor, its only button is the context indicator, and the orange band is gone. New visual story:AgentChatInput/ReadOnlyNotice.Generated by Coder Agents.