Skip to content

feat(site/src/pages/AgentsPage): quieter read-only view for other users' chats - #30483

Merged
tracyjohnsonux merged 11 commits into
mainfrom
tracy/codagt-1355-read-only-chat-composer
Oct 10, 2026
Merged

tracyjohnsonux merged 11 commits into
mainfrom
tracy/codagt-1355-read-only-chat-composer

Conversation

@tracyjohnsonux

@tracyjohnsonux tracyjohnsonux commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

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.

  • Top bar: no warning band. The share button is shown only to the chat owner, so viewers with share permission (admins) no longer get it. The shared-chat icon by the title is unchanged, and the kebab stays (it holds Copy ID).
  • Composer: the "This chat is owned by X. It is read-only." message moves inside as a neutral info line. The editor is not rendered, so the composer is short, and it gets the default border.
  • Composer controls: +, mic, send/stop and the x on 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 readOnlyNotice prop on AgentChatInput, so the new-chat form, which also uses isReadOnly, is unchanged. Sidebar rows and message action rows are out of scope.

Fixes CODAGT-1355

Follow-ups (cleanup tracked in CODAGT-1384):

  • CODAGT-1385: split the read-only composer out of AgentChatInput (replaces readOnlyNotice).
  • CODAGT-1386: use one viewer-permission check across the chat page.
  • CODAGT-1387: audit read-only treatment for sidebar rows and message actions.
  • CODAGT-1308: read-only viewers still see an enabled "Remove from queue" button (existing).
Design decisions

From design review with Tracy:

  • Remove the red warning band.
  • Remove the share button for non-owners. A lock and then a moved shared icon were tried; the existing shared icon by the title was kept instead.
  • Move the warning message into the chat area.
  • Make the chat area smaller and outline it so it looks different.
  • Remove disabled action buttons in the chat area (only show content the user can interact with): +, mic, send, and the pill x buttons. 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.

…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
@linear-code

linear-code Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

CODAGT-1355

CODAGT-1384

…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.
@tracyjohnsonux
tracyjohnsonux marked this pull request as ready for review October 7, 2026 21:46
@tracyjohnsonux
tracyjohnsonux requested a review from a team as a code owner October 7, 2026 21:46
… 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 DanielleMaywood left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yap

@DanielleMaywood DanielleMaywood left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@tracyjohnsonux

Copy link
Copy Markdown
Collaborator Author

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

I've made some issues (in description) to capture future work.

@tracyjohnsonux
tracyjohnsonux merged commit 8697b91 into main Oct 10, 2026
35 checks passed
@tracyjohnsonux
tracyjohnsonux deleted the tracy/codagt-1355-read-only-chat-composer branch October 10, 2026 00:23
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants