Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the multi conversation UI for all users #6374

Merged
merged 3 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions frontend/__tests__/routes/_oh.app.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { screen, waitFor } from "@testing-library/react";
import toast from "react-hot-toast";
import App from "#/routes/_oh.app/route";
import OpenHands from "#/api/open-hands";
import { MULTI_CONVERSATION_UI } from "#/utils/feature-flags";

describe("App", () => {
const RouteStub = createRoutesStub([
Expand Down Expand Up @@ -35,7 +34,7 @@ describe("App", () => {
await screen.findByTestId("app-route");
});

it.skipIf(!MULTI_CONVERSATION_UI)(
it(
"should call endSession if the user does not have permission to view conversation",
async () => {
const errorToastSpy = vi.spyOn(toast, "error");
Expand Down
19 changes: 8 additions & 11 deletions frontend/src/components/features/sidebar/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { SettingsModal } from "#/components/shared/modals/settings/settings-moda
import { useCurrentSettings } from "#/context/settings-context";
import { useSettings } from "#/hooks/query/use-settings";
import { ConversationPanel } from "../conversation-panel/conversation-panel";
import { MULTI_CONVERSATION_UI } from "#/utils/feature-flags";
import { useEndSession } from "#/hooks/use-end-session";
import { setCurrentAgentState } from "#/state/agent-slice";
import { AgentState } from "#/types/agent-state";
Expand Down Expand Up @@ -78,16 +77,14 @@ export function Sidebar() {
<AllHandsLogoButton onClick={handleEndSession} />
</div>
<ExitProjectButton onClick={handleEndSession} />
{MULTI_CONVERSATION_UI && (
<TooltipButton
testId="toggle-conversation-panel"
tooltip="Conversations"
ariaLabel="Conversations"
onClick={() => setConversationPanelIsOpen((prev) => !prev)}
>
<FaListUl size={22} />
</TooltipButton>
)}
<TooltipButton
testId="toggle-conversation-panel"
tooltip="Conversations"
ariaLabel="Conversations"
onClick={() => setConversationPanelIsOpen((prev) => !prev)}
>
<FaListUl size={22} />
</TooltipButton>
<DocsButton />
</div>

Expand Down
3 changes: 1 addition & 2 deletions frontend/src/routes/_oh.app/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import { useUserConversation } from "#/hooks/query/use-user-conversation";
import { ServedAppLabel } from "#/components/layout/served-app-label";
import { TerminalStatusLabel } from "#/components/features/terminal/terminal-status-label";
import { useSettings } from "#/hooks/query/use-settings";
import { MULTI_CONVERSATION_UI } from "#/utils/feature-flags";
import { clearFiles, clearInitialPrompt } from "#/state/initial-query-slice";
import { RootState } from "#/store";

Expand Down Expand Up @@ -66,7 +65,7 @@ function AppContent() {
);

React.useEffect(() => {
if (MULTI_CONVERSATION_UI && isFetched && !conversation) {
if (isFetched && !conversation) {
toast.error(
"This conversation does not exist, or you do not have permission to access it.",
);
Expand Down
1 change: 0 additions & 1 deletion frontend/src/utils/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ function loadFeatureFlag(
}
}

export const MULTI_CONVERSATION_UI = loadFeatureFlag("MULTI_CONVERSATION_UI");
export const MEMORY_CONDENSER = loadFeatureFlag("MEMORY_CONDENSER");
3 changes: 0 additions & 3 deletions frontend/tests/conversation-panel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ const selectConversationCard = async (page: Page, index: number) => {

test.beforeEach(async ({ page }) => {
await page.goto("/");
await page.evaluate(() => {
localStorage.setItem("FEATURE_MULTI_CONVERSATION_UI", "true");
});
});

test("should only display the create new conversation button when in a conversation", async ({
Expand Down
Loading