π OpenHands: AI-Driven Development
fix: show agent model metadata by default (#1556)
Yash Raj35fe8ac4c07e
diff --git a/__tests__/components/features/conversation-panel/conversation-card.test.tsx b/__tests__/components/features/conversation-panel/conversation-card.test.tsxindex d73f53c6de..cd4cc361b9 100644--- a/__tests__/components/features/conversation-panel/conversation-card.test.tsx+++ b/__tests__/components/features/conversation-panel/conversation-card.test.tsx@@ -590,10 +590,10 @@ describe("ConversationCard", () => {describe("Agent chip", () => {// The agent chip is gated by the conversation panel's "Agent / model"- // toggle (``showLlmProfiles``), off by default β one control for both ACP and- // OpenHands cards. The renders below pass ``showLlmProfiles`` to exercise- // the chip; the gating itself is covered by the first two tests.- it("hides the chip by default (LLM-model toggle off) for ACP", () => {+ // toggle (``showLlmProfiles``) β one control for both ACP and OpenHands+ // cards. The renders below pass ``showLlmProfiles`` to exercise the chip;+ // the omitted-prop fallback is covered by the first two tests.+ it("hides the chip when showLlmProfiles is omitted for ACP", () => {renderWithProviders(<ConversationCardtitle="Conversation 1"@@ -610,7 +610,7 @@ describe("ConversationCard", () => {).not.toBeInTheDocument();});- it("hides the chip by default (LLM-model toggle off) for OpenHands", () => {+ it("hides the chip when showLlmProfiles is omitted for OpenHands", () => {renderWithProviders(<ConversationCardtitle="Conversation 1"diff --git a/__tests__/stores/conversation-panel-preferences-store.test.ts b/__tests__/stores/conversation-panel-preferences-store.test.tsindex e33e25bc9a..ea6deb9b0f 100644--- a/__tests__/stores/conversation-panel-preferences-store.test.ts+++ b/__tests__/stores/conversation-panel-preferences-store.test.ts@@ -8,11 +8,11 @@ describe("conversation-panel-preferences store", () => {window.localStorage.clear();});- it("defaults to showing older conversations, chronological list, and expected toggles", () => {+ it("defaults to showing older conversations, LLM profiles, chronological list, and expected toggles", () => {const state = useConversationPanelPreferencesStore.getState();expect(state.showOlderConversations).toBe(true);expect(state.showRepoBranchMetadata).toBe(false);- expect(state.showLlmProfiles).toBe(false);+ expect(state.showLlmProfiles).toBe(true);expect(state.organizeMode).toBe("chronological");expect(state.conversationSort).toBe("updated");expect(state.threadScope).toBe("all");@@ -143,10 +143,30 @@ describe("conversation-panel-preferences store", () => {showOlderConversations: false,showRepoBranchMetadata: true,// Filled with defaults for missing fields.- showLlmProfiles: false,+ showLlmProfiles: true,organizeMode: "chronological",conversationSort: "updated",threadScope: "all",});});++ it("preserves an explicitly hidden LLM-profiles preference from persisted storage", async () => {+ window.localStorage.setItem(+ STORAGE_KEY,+ JSON.stringify({+ state: {+ showOlderConversations: true,+ showRepoBranchMetadata: false,+ showLlmProfiles: false,+ },+ version: 0,+ }),+ );++ await useConversationPanelPreferencesStore.persist.rehydrate();++ expect(+ useConversationPanelPreferencesStore.getState().showLlmProfiles,+ ).toBe(false);+ });});diff --git a/src/components/features/conversation-panel/conversation-card/conversation-card-footer.tsx b/src/components/features/conversation-panel/conversation-card/conversation-card-footer.tsxindex 31a7b583fd..d652167a1d 100644--- a/src/components/features/conversation-panel/conversation-card/conversation-card-footer.tsx+++ b/src/components/features/conversation-panel/conversation-card/conversation-card-footer.tsx@@ -29,7 +29,7 @@ interface ConversationCardFooterProps {llmModel?: string | null;/*** Whether to render the agent/model chip. Wired to the conversation- * panel's "LLM model" toggle (off by default); gates the chip uniformly+ * panel's "LLM model" toggle; gates the chip uniformly* for both ACP and OpenHands cards.*/showAgentChip?: boolean;@@ -68,7 +68,7 @@ export function ConversationCardFooter({const isPaused = isExecutionPaused(executionStatus);// Single inline chip per conversation: [brand mark] {model text}. Gated by- // the conversation panel's "LLM model" toggle (off by default) and applied+ // the conversation panel's "LLM model" toggle and applied// uniformly to both kinds β OpenHands shows the logo + ``agent.llm.model``;// ACP shows the provider brand mark + model resolved through PR 730's// adapter chain, falling back to the provider display name when no model isdiff --git a/src/stores/conversation-panel-preferences-store.ts b/src/stores/conversation-panel-preferences-store.tsindex 72f092d699..d51977c447 100644--- a/src/stores/conversation-panel-preferences-store.ts+++ b/src/stores/conversation-panel-preferences-store.ts@@ -51,7 +51,7 @@ type ConversationPanelPreferencesStore = ConversationPanelPreferencesState &const initialState: ConversationPanelPreferencesState = {showOlderConversations: true,showRepoBranchMetadata: false,- showLlmProfiles: false,+ showLlmProfiles: true,showHoverMetadata: true,organizeMode: "chronological",conversationSort: "updated",