From 8d554f133019d5ddcfb8a745b08deeae7d2faeb5 Mon Sep 17 00:00:00 2001 From: Michael Suchacz <203725896+ibetitsmike@users.noreply.github.com> Date: Tue, 2 Jun 2026 11:03:17 +0000 Subject: [PATCH] fix: resolve chat goal rebase issues --- ...l => 000515_chat_goal_persistence.down.sql} | 0 ...sql => 000515_chat_goal_persistence.up.sql} | 0 ...sql => 000515_chat_goal_persistence.up.sql} | 0 site/src/pages/AgentsPage/AgentChatPage.tsx | 2 -- .../AgentsPage/AgentChatPageView.stories.tsx | 2 -- .../src/pages/AgentsPage/AgentChatPageView.tsx | 18 ++++-------------- 6 files changed, 4 insertions(+), 18 deletions(-) rename coderd/database/migrations/{000514_chat_goal_persistence.down.sql => 000515_chat_goal_persistence.down.sql} (100%) rename coderd/database/migrations/{000514_chat_goal_persistence.up.sql => 000515_chat_goal_persistence.up.sql} (100%) rename coderd/database/migrations/testdata/fixtures/{000514_chat_goal_persistence.up.sql => 000515_chat_goal_persistence.up.sql} (100%) diff --git a/coderd/database/migrations/000514_chat_goal_persistence.down.sql b/coderd/database/migrations/000515_chat_goal_persistence.down.sql similarity index 100% rename from coderd/database/migrations/000514_chat_goal_persistence.down.sql rename to coderd/database/migrations/000515_chat_goal_persistence.down.sql diff --git a/coderd/database/migrations/000514_chat_goal_persistence.up.sql b/coderd/database/migrations/000515_chat_goal_persistence.up.sql similarity index 100% rename from coderd/database/migrations/000514_chat_goal_persistence.up.sql rename to coderd/database/migrations/000515_chat_goal_persistence.up.sql diff --git a/coderd/database/migrations/testdata/fixtures/000514_chat_goal_persistence.up.sql b/coderd/database/migrations/testdata/fixtures/000515_chat_goal_persistence.up.sql similarity index 100% rename from coderd/database/migrations/testdata/fixtures/000514_chat_goal_persistence.up.sql rename to coderd/database/migrations/testdata/fixtures/000515_chat_goal_persistence.up.sql diff --git a/site/src/pages/AgentsPage/AgentChatPage.tsx b/site/src/pages/AgentsPage/AgentChatPage.tsx index 1361fb2afe..2feb62573a 100644 --- a/site/src/pages/AgentsPage/AgentChatPage.tsx +++ b/site/src/pages/AgentsPage/AgentChatPage.tsx @@ -1720,8 +1720,6 @@ const AgentChatPage: FC = () => { persistedError={persistedError} isArchived={isArchived} chatOwner={chatOwner} - canUpdateOtherUserChat={canUpdateOtherUserChat} - canUpdateOtherUserChatLoading={canUpdateOtherUserChatLoading} canShareChat={canShareChat} workspace={workspace} workspaceAgent={workspaceAgent} diff --git a/site/src/pages/AgentsPage/AgentChatPageView.stories.tsx b/site/src/pages/AgentsPage/AgentChatPageView.stories.tsx index 1f085e06eb..1d4a94ed9d 100644 --- a/site/src/pages/AgentsPage/AgentChatPageView.stories.tsx +++ b/site/src/pages/AgentsPage/AgentChatPageView.stories.tsx @@ -187,8 +187,6 @@ const StoryAgentChatPageView: FC = ({ editing, ...overrides }) => { >["selectedMCPServerIds"], onMCPSelectionChange: fn(), onMCPAuthComplete: fn(), - canUpdateOtherUserChat: false, - canUpdateOtherUserChatLoading: false, canShareChat: false, ...overrides, store, diff --git a/site/src/pages/AgentsPage/AgentChatPageView.tsx b/site/src/pages/AgentsPage/AgentChatPageView.tsx index 1b02b54121..a473c9cd79 100644 --- a/site/src/pages/AgentsPage/AgentChatPageView.tsx +++ b/site/src/pages/AgentsPage/AgentChatPageView.tsx @@ -103,8 +103,6 @@ interface AgentChatPageViewProps { persistedError: ChatDetailError | undefined; isArchived: boolean; chatOwner: ChatOwnerInfo | undefined; - canUpdateOtherUserChat: boolean; - canUpdateOtherUserChatLoading: boolean; canShareChat: boolean; workspaceAgent?: TypesGen.WorkspaceAgent; workspace?: TypesGen.Workspace; @@ -217,8 +215,6 @@ export const AgentChatPageView: FC = ({ persistedError, isArchived, chatOwner, - canUpdateOtherUserChat, - canUpdateOtherUserChatLoading, canShareChat, workspaceAgent, workspace, @@ -447,16 +443,10 @@ export const AgentChatPageView: FC = ({ const chatOwnerLabel = chatOwner?.name?.trim() || (chatOwnerUsername ? `@${chatOwnerUsername}` : "another user"); - const isOtherUserReadOnly = - !isArchived && - chatOwner !== undefined && - (canUpdateOtherUserChatLoading || !canUpdateOtherUserChat); - const chatOwnerWarning = - !isArchived && chatOwner !== undefined && !canUpdateOtherUserChatLoading - ? canUpdateOtherUserChat - ? `This is not your chat. Prompting here will use ${chatOwnerLabel}'s identity.` - : `This chat is owned by ${chatOwnerLabel}. You have read-only access.` - : undefined; + const isOtherUserReadOnly = !isArchived && chatOwner !== undefined; + const chatOwnerWarning = isOtherUserReadOnly + ? `This chat is owned by ${chatOwnerLabel}. It is read-only.` + : undefined; const topGoal = currentChatGoal(goal); const titleElement = (