refactor: isolate runtime contracts and enforce import boundaries (#6166)
* test: enforce Python import ownership boundaries * test: protect client import boundaries and rehome shared UI contracts * refactor: remove gateway and client dependency inversions * fix: detect dynamic imports in conditional expressions * refactor(tools): keep configuration contracts with their owners * docs: keep design guidance focused on ownership and checks * fix: preserve default threaded turn delivery
This commit is contained in:
1 parent
cd2a863710
commit
328e933d36
162 files changed
+3449
-1888
No files matched your search
@@ -1,39 +1,16 @@
|
||||
import { createContext, useContext, useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore, type ReactNode } from "react";
|
||||
import { useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore, type ReactNode } from "react";
|
||||
import { Loader2, PlugZap } from "lucide-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { groupRemoteProfiles, isCompatibilityError, needsRemoteSetup, type RemoteDirectory } from "@/lib/remote-instances";
|
||||
import { groupRemoteProfiles, isCompatibilityError, needsRemoteSetup } from "@/lib/remote-instances";
|
||||
import { HostCompatibilityDialog } from "./HostCompatibilityDialog";
|
||||
import { RemoteConnectionsPage } from "./RemoteConnectionsPage";
|
||||
import type { HostAnchor } from "./host-bridge";
|
||||
import { ThemeProvider } from "@/hooks/useTheme";
|
||||
import { useHostSessions } from "./useHostSessions";
|
||||
import { HostNavigationContext, HostSwitcher, RemoteHostMenu, type HostPicker } from "./HostSwitcher";
|
||||
import { useSidebarHostBridge } from "./useSidebarHostBridge";
|
||||
import { readPairReturn, subscribePairReturn } from "@/lib/remote-pair-return";
|
||||
import type { HostConnectionState } from "./HostConnectionStatus";
|
||||
|
||||
const RemoteContext = createContext<{
|
||||
available: boolean;
|
||||
localActive: boolean;
|
||||
activeHostId: string | null;
|
||||
hostStates: Record<string, HostConnectionState>;
|
||||
managing: boolean;
|
||||
embeddedManagement?: boolean;
|
||||
reportManagementSurface?: (rect: HostAnchor, theme: "light" | "dark") => void;
|
||||
closeManagement: () => void;
|
||||
selectLocal: () => void;
|
||||
openHostIds: string[];
|
||||
directory: RemoteDirectory | null;
|
||||
directoryError: boolean;
|
||||
refresh: () => Promise<RemoteDirectory>;
|
||||
rename: (id: string, name: string) => Promise<void>;
|
||||
connect: (id: string, stillWanted?: () => boolean) => Promise<void>;
|
||||
disconnect: (id: string) => Promise<void>;
|
||||
remove: (id: string) => Promise<void>;
|
||||
cancel: () => void;
|
||||
} | null>(null);
|
||||
export function useRemoteConnections() { return useContext(RemoteContext); }
|
||||
import { RemoteContext, type HostConnectionState } from "./remote-context";
|
||||
|
||||
/** Keep host views alive; navigation belongs in each view's sidebar, not a second header. */
|
||||
export function RemoteInstances({ children }: { children: ReactNode }) {
|
||||
|
||||
Reference in new issue
Block a user