π OpenHands: AI-Driven Development
hotfix(frontend): Update route file names (#7528)
sp.wack1c8ab4d835c6
diff --git a/frontend/__tests__/routes/_oh.app.test.tsx b/frontend/__tests__/routes/_oh.app.test.tsxindex 2467e56fc8..489cb37210 100644--- a/frontend/__tests__/routes/_oh.app.test.tsx+++ b/frontend/__tests__/routes/_oh.app.test.tsx@@ -2,7 +2,7 @@ import { createRoutesStub } from "react-router";import { afterEach, beforeAll, describe, expect, it, vi } from "vitest";import { renderWithProviders } from "test-utils";import { screen, waitFor } from "@testing-library/react";-import App from "#/routes/_oh.app/route";+import App from "#/routes/conversation";import OpenHands from "#/api/open-hands";import * as CustomToast from "#/utils/custom-toast-handlers";diff --git a/frontend/__tests__/routes/_oh.test.tsx b/frontend/__tests__/routes/_oh.test.tsxindex c010831616..2a5ceeca46 100644--- a/frontend/__tests__/routes/_oh.test.tsx+++ b/frontend/__tests__/routes/_oh.test.tsx@@ -3,7 +3,7 @@ import { createRoutesStub } from "react-router";import { screen, waitFor, within } from "@testing-library/react";import { renderWithProviders } from "test-utils";import userEvent from "@testing-library/user-event";-import MainApp from "#/routes/_oh/route";+import MainApp from "#/routes/root-layout";import i18n from "#/i18n";import * as CaptureConsent from "#/utils/handle-capture-consent";import OpenHands from "#/api/open-hands";diff --git a/frontend/__tests__/routes/home.test.tsx b/frontend/__tests__/routes/home.test.tsxindex 486e88c41d..9233f54863 100644--- a/frontend/__tests__/routes/home.test.tsx+++ b/frontend/__tests__/routes/home.test.tsx@@ -4,9 +4,9 @@ import { renderWithProviders } from "test-utils";import userEvent from "@testing-library/user-event";import { screen } from "@testing-library/react";import { AxiosError } from "axios";-import MainApp from "#/routes/_oh/route";+import MainApp from "#/routes/root-layout";import SettingsScreen from "#/routes/settings";-import Home from "#/routes/_oh._index/route";+import Home from "#/routes/home";import OpenHands from "#/api/open-hands";const createAxiosNotFoundErrorObject = () =>diff --git a/frontend/src/routes/_oh.app/hooks/use-handle-runtime-active.ts b/frontend/src/hooks/use-handle-runtime-active.tssimilarity index 100%rename from frontend/src/routes/_oh.app/hooks/use-handle-runtime-active.tsrename to frontend/src/hooks/use-handle-runtime-active.tsdiff --git a/frontend/src/routes/_oh.app/hooks/use-handle-ws-events.ts b/frontend/src/hooks/use-handle-ws-events.tssimilarity index 96%rename from frontend/src/routes/_oh.app/hooks/use-handle-ws-events.tsrename to frontend/src/hooks/use-handle-ws-events.tsindex 0edad03370..1dde00b713 100644--- a/frontend/src/routes/_oh.app/hooks/use-handle-ws-events.ts+++ b/frontend/src/hooks/use-handle-ws-events.ts@@ -5,7 +5,7 @@ import { generateAgentStateChangeEvent } from "#/services/agent-state-service";import { addErrorMessage } from "#/state/chat-slice";import { AgentState } from "#/types/agent-state";import { ErrorObservation } from "#/types/core/observations";-import { useEndSession } from "../../../hooks/use-end-session";+import { useEndSession } from "./use-end-session";import { displayErrorToast } from "#/utils/custom-toast-handlers";interface ServerError {diff --git a/frontend/src/routes.ts b/frontend/src/routes.tsindex 660c33fc32..d03c19291b 100644--- a/frontend/src/routes.ts+++ b/frontend/src/routes.ts@@ -6,17 +6,17 @@ import {} from "@react-router/dev/routes";export default [- layout("routes/_oh/route.tsx", [- index("routes/_oh._index/route.tsx"),+ layout("routes/root-layout.tsx", [+ index("routes/home.tsx"),route("settings", "routes/settings.tsx", [index("routes/account-settings.tsx"),route("billing", "routes/billing.tsx"),]),- route("conversations/:conversationId", "routes/_oh.app/route.tsx", [- index("routes/_oh.app._index/route.tsx"),- route("browser", "routes/_oh.app.browser.tsx"),- route("jupyter", "routes/_oh.app.jupyter.tsx"),- route("served", "routes/app.tsx"),+ route("conversations/:conversationId", "routes/conversation.tsx", [+ index("routes/editor-tab.tsx"),+ route("browser", "routes/browser-tab.tsx"),+ route("jupyter", "routes/jupyter-tab.tsx"),+ route("served", "routes/served-tab.tsx"),]),]),] satisfies RouteConfig;diff --git a/frontend/src/routes/_oh.app.browser.tsx b/frontend/src/routes/browser-tab.tsxsimilarity index 100%rename from frontend/src/routes/_oh.app.browser.tsxrename to frontend/src/routes/browser-tab.tsxdiff --git a/frontend/src/routes/_oh.app/route.tsx b/frontend/src/routes/conversation.tsxsimilarity index 98%rename from frontend/src/routes/_oh.app/route.tsxrename to frontend/src/routes/conversation.tsxindex 13fce1192a..3914c9142e 100644--- a/frontend/src/routes/_oh.app/route.tsx+++ b/frontend/src/routes/conversation.tsx@@ -18,9 +18,9 @@ import GlobeIcon from "#/icons/globe.svg?react";import ListIcon from "#/icons/list-type-number.svg?react";import { clearJupyter } from "#/state/jupyter-slice";import { FilesProvider } from "#/context/files";-import { ChatInterface } from "../../components/features/chat/chat-interface";+import { ChatInterface } from "../components/features/chat/chat-interface";import { WsClientProvider } from "#/context/ws-client-provider";-import { EventHandler } from "./event-handler";+import { EventHandler } from "../wrapper/event-handler";import { useConversationConfig } from "#/hooks/query/use-conversation-config";import { Container } from "#/components/layout/container";import {diff --git a/frontend/src/routes/_oh.app._index/route.tsx b/frontend/src/routes/editor-tab.tsxsimilarity index 100%rename from frontend/src/routes/_oh.app._index/route.tsxrename to frontend/src/routes/editor-tab.tsxdiff --git a/frontend/src/routes/_oh._index/route.tsx b/frontend/src/routes/home.tsxsimilarity index 96%rename from frontend/src/routes/_oh._index/route.tsxrename to frontend/src/routes/home.tsxindex b6d0ea3341..80cf40624a 100644--- a/frontend/src/routes/_oh._index/route.tsx+++ b/frontend/src/routes/home.tsx@@ -5,8 +5,8 @@ import { setReplayJson } from "#/state/initial-query-slice";import { useGitUser } from "#/hooks/query/use-git-user";import { useGitHubAuthUrl } from "#/hooks/use-github-auth-url";import { useConfig } from "#/hooks/query/use-config";+import { ReplaySuggestionBox } from "#/components/features/suggestions/replay-suggestion-box";import { GitRepositoriesSuggestionBox } from "#/components/features/git/git-repositories-suggestion-box";-import { ReplaySuggestionBox } from "../../components/features/suggestions/replay-suggestion-box";import { CodeNotInGitLink } from "#/components/features/git/code-not-in-github-link";import { HeroHeading } from "#/components/shared/hero-heading";import { TaskForm } from "#/components/shared/task-form";diff --git a/frontend/src/routes/_oh.app.jupyter.tsx b/frontend/src/routes/jupyter-tab.tsxsimilarity index 100%rename from frontend/src/routes/_oh.app.jupyter.tsxrename to frontend/src/routes/jupyter-tab.tsxdiff --git a/frontend/src/routes/_oh/route.tsx b/frontend/src/routes/root-layout.tsxsimilarity index 100%rename from frontend/src/routes/_oh/route.tsxrename to frontend/src/routes/root-layout.tsxdiff --git a/frontend/src/routes/app.tsx b/frontend/src/routes/served-tab.tsxsimilarity index 100%rename from frontend/src/routes/app.tsxrename to frontend/src/routes/served-tab.tsxdiff --git a/frontend/src/routes/_oh.app._index/constants.ts b/frontend/src/utils/constants.tssimilarity index 100%rename from frontend/src/routes/_oh.app._index/constants.tsrename to frontend/src/utils/constants.tsdiff --git a/frontend/src/routes/_oh.app/event-handler.tsx b/frontend/src/wrapper/event-handler.tsxsimilarity index 54%rename from frontend/src/routes/_oh.app/event-handler.tsxrename to frontend/src/wrapper/event-handler.tsxindex 440eb704ab..450d570107 100644--- a/frontend/src/routes/_oh.app/event-handler.tsx+++ b/frontend/src/wrapper/event-handler.tsx@@ -1,6 +1,6 @@import React from "react";-import { useHandleWSEvents } from "./hooks/use-handle-ws-events";-import { useHandleRuntimeActive } from "./hooks/use-handle-runtime-active";+import { useHandleWSEvents } from "../hooks/use-handle-ws-events";+import { useHandleRuntimeActive } from "../hooks/use-handle-runtime-active";export function EventHandler({ children }: React.PropsWithChildren) {useHandleWSEvents();