Skip to content

πŸ™Œ OpenHands: AI-Driven Development

Add LLM model to shared conversation view and remove feature flag (#12476)

Tim O'Farrell0176cd966921
diff --git a/frontend/__tests__/components/features/conversation/conversation-name.test.tsx b/frontend/__tests__/components/features/conversation/conversation-name.test.tsx
index cf46a20b1c..887ecef7e1 100644
--- a/frontend/__tests__/components/features/conversation/conversation-name.test.tsx
+++ b/frontend/__tests__/components/features/conversation/conversation-name.test.tsx
@@ -605,10 +605,7 @@ describe("ConversationNameContextMenu", () => {
});
describe("ConversationNameContextMenu - Share Link Functionality", () => {
- const { mockWriteText, featureFlagMock } = vi.hoisted(() => ({
- mockWriteText: vi.fn().mockResolvedValue(undefined),
- featureFlagMock: vi.fn(() => true),
- }));
+ const mockWriteText = vi.fn().mockResolvedValue(undefined);
const mockOnCopyShareLink = vi.fn();
const mockOnTogglePublic = vi.fn();
@@ -621,10 +618,6 @@ describe("ConversationNameContextMenu - Share Link Functionality", () => {
shareUrl: "https://example.com/shared/conversations/test-id",
};
- vi.mock("#/utils/feature-flags", () => ({
- ENABLE_PUBLIC_CONVERSATION_SHARING: () => featureFlagMock(),
- }));
-
vi.mock("#/hooks/mutation/use-update-conversation-public-flag", () => ({
useUpdateConversationPublicFlag: () => ({
mutate: vi.fn(),
@@ -646,7 +639,6 @@ describe("ConversationNameContextMenu - Share Link Functionality", () => {
beforeEach(() => {
mockWriteText.mockClear();
mockDisplaySuccessToast.mockClear();
- featureFlagMock.mockReturnValue(true);
});
afterEach(() => {
@@ -875,25 +867,9 @@ describe("ConversationNameContextMenu - Share Link Functionality", () => {
);
});
- it("should not show share buttons when feature flag is disabled", () => {
- // Arrange
- featureFlagMock.mockReturnValue(false);
-
- renderConversationNameWithRouter();
-
- // Act - try to find share buttons (should not exist even if conversation is public)
- const copyButton = screen.queryByTestId("copy-share-link-button");
- const openButton = screen.queryByTestId("open-share-link-button");
-
- // Assert
- expect(copyButton).not.toBeInTheDocument();
- expect(openButton).not.toBeInTheDocument();
- });
-
- it("should show both copy and open buttons when conversation is public and feature flag is enabled", async () => {
+ it("should show both copy and open buttons when conversation is public", async () => {
// Arrange
const user = userEvent.setup();
- featureFlagMock.mockReturnValue(true);
renderConversationNameWithRouter();
diff --git a/frontend/src/components/features/conversation/conversation-name.tsx b/frontend/src/components/features/conversation/conversation-name.tsx
index d3039cadda..b7a26aad30 100644
--- a/frontend/src/components/features/conversation/conversation-name.tsx
+++ b/frontend/src/components/features/conversation/conversation-name.tsx
@@ -6,7 +6,6 @@ import { useUpdateConversation } from "#/hooks/mutation/use-update-conversation"
import { useConversationNameContextMenu } from "#/hooks/use-conversation-name-context-menu";
import { displaySuccessToast } from "#/utils/custom-toast-handlers";
import { I18nKey } from "#/i18n/declaration";
-import { ENABLE_PUBLIC_CONVERSATION_SHARING } from "#/utils/feature-flags";
import { EllipsisButton } from "../conversation-panel/ellipsis-button";
import { ConversationNameContextMenu } from "./conversation-name-context-menu";
import { SystemMessageModal } from "../conversation-panel/system-message-modal";
@@ -187,19 +186,9 @@ export function ConversationName() {
onDownloadViaVSCode={
shouldShowDownload ? handleDownloadViaVSCode : undefined
}
- onTogglePublic={
- ENABLE_PUBLIC_CONVERSATION_SHARING()
- ? handleTogglePublic
- : undefined
- }
- shareUrl={
- ENABLE_PUBLIC_CONVERSATION_SHARING() ? shareUrl : undefined
- }
- onCopyShareLink={
- ENABLE_PUBLIC_CONVERSATION_SHARING()
- ? handleCopyShareLink
- : undefined
- }
+ onTogglePublic={handleTogglePublic}
+ shareUrl={shareUrl}
+ onCopyShareLink={handleCopyShareLink}
onDownloadConversation={
shouldShowDownloadConversation
? handleDownloadConversation
diff --git a/frontend/src/routes/shared-conversation.tsx b/frontend/src/routes/shared-conversation.tsx
index 7153a79aab..d51ec2e11a 100644
--- a/frontend/src/routes/shared-conversation.tsx
+++ b/frontend/src/routes/shared-conversation.tsx
@@ -80,6 +80,11 @@ export default function SharedConversation() {
{conversation.selected_repository}
</div>
)}
+ {conversation?.llm_model && (
+ <div className="text-sm text-neutral-400">
+ {t(I18nKey.LLM$MODEL)}: {conversation.llm_model}
+ </div>
+ )}
</div>
</div>
</div>
diff --git a/frontend/src/utils/feature-flags.ts b/frontend/src/utils/feature-flags.ts
index cba6d7caf3..0f38a4d7ea 100644
--- a/frontend/src/utils/feature-flags.ts
+++ b/frontend/src/utils/feature-flags.ts
@@ -18,5 +18,3 @@ export const VSCODE_IN_NEW_TAB = () => loadFeatureFlag("VSCODE_IN_NEW_TAB");
export const ENABLE_TRAJECTORY_REPLAY = () =>
loadFeatureFlag("TRAJECTORY_REPLAY");
export const USE_PLANNING_AGENT = () => loadFeatureFlag("USE_PLANNING_AGENT");
-export const ENABLE_PUBLIC_CONVERSATION_SHARING = () =>
- loadFeatureFlag("PUBLIC_CONVERSATION_SHARING");