feat: move session sharing and collab rooms into a plugin (B12)

This commit is contained in:
LukeGus committed 2026-09-23 23:42:46 -05:00
1 parent 791d8656a1
commit a276f6898c
207 files changed
+35771 -11072

No files matched your search

+1 -22
View File
@@ -27,10 +27,9 @@ import {
Minimize2,
FolderOpen,
PanelRight,
Share2,
} from "lucide-react";
import { tabIcon } from "@/shell/tabUtils";
import { isSessionTabType, isShareableTabType } from "@/shell/tab-registry";
import { isSessionTabType } from "@/shell/tab-registry";
import { isElectron } from "@/lib/electron";
import type { Tab, TabType, SplitMode } from "@/types/ui-types";
import { SPLIT_MODES, PANE_COUNTS } from "@/lib/theme";
@@ -43,11 +42,6 @@ function isConnectionTab(type: TabType): boolean {
return isSessionTabType(type);
}
/** Connection tabs that also offer "Share session". */
function isShareableConnectionTab(type: TabType): boolean {
return isConnectionTab(type) && isShareableTabType(type);
}
export function TabBar({
tabs,
activeTabId,
@@ -63,7 +57,6 @@ export function TabBar({
onRemoveFromSplit,
onRenameTab,
onOpenFileManager,
onOpenShare,
isAppFullscreen,
onToggleAppFullscreen,
rightDockOpen,
@@ -84,7 +77,6 @@ export function TabBar({
onRemoveFromSplit: (tabId: string) => void;
onRenameTab?: (tabId: string, newLabel: string) => void;
onOpenFileManager?: (tabId: string) => void;
onOpenShare?: (tabId: string) => void;
isAppFullscreen: boolean;
onToggleAppFullscreen: () => void;
rightDockOpen?: boolean;
@@ -472,19 +464,6 @@ export function TabBar({
<RefreshCw className="size-3" />
</button>
)}
{isShareableConnectionTab(tab.type) && onOpenShare && (
<button
onPointerDown={(e) => e.stopPropagation()}
onClick={(e) => {
e.stopPropagation();
onOpenShare(tab.id);
}}
title={t("sessionSharing.shareButton")}
className="flex items-center justify-center size-5 md:size-4 rounded-sm transition-colors text-muted-foreground hover:text-foreground hover:bg-muted"
>
<Share2 className="size-3" />
</button>
)}
<button
onPointerDown={(e) => e.stopPropagation()}
onClick={(e) => {
-7
View File
@@ -61,8 +61,6 @@ export interface TabTypeDef {
persistent?: boolean;
singleton?: boolean;
session?: boolean;
/** Whether a session tab offers "Share session". Default true. */
shareable?: boolean;
hostless?: boolean;
restore?: (host: Host) => boolean;
activityTypes?: string[];
@@ -117,11 +115,6 @@ export function isSessionTabType(type: string): boolean {
return CORE_SESSION.has(type) || !!registry.get(type)?.session;
}
/** Whether a session tab of this type offers "Share session". Default true. */
export function isShareableTabType(type: string): boolean {
return registry.get(type)?.shareable !== false;
}
export function isHostlessTabType(type: string): boolean {
return CORE_HOSTLESS.has(type) || !!registry.get(type)?.hostless;
}
-14
View File
@@ -10,7 +10,6 @@ import {
Fingerprint,
Hammer,
ScrollText,
Presentation,
} from "lucide-react";
import { lazy, Suspense } from "react";
import { useTranslation } from "react-i18next";
@@ -28,12 +27,6 @@ import {
} from "@/lib/adaptive-resource-budget";
// Heavy tab surfaces — keep out of the AppShell critical path.
const CollabRoomTab = lazy(() =>
import("@/features/collab/CollabRoomTab").then((m) => ({
default: m.CollabRoomTab,
})),
);
const DashboardTab = lazy(() =>
import("@/dashboard/DashboardTab").then((m) => ({
default: m.DashboardTab,
@@ -129,8 +122,6 @@ export function tabIcon(type: TabType) {
return <Settings className="size-3.5" />;
case "homepage":
return <LayoutGrid className="size-3.5" />;
case "collab":
return <Presentation className="size-3.5" />;
case "termix-id":
return <Fingerprint className="size-3.5" />;
case "session-logs":
@@ -231,11 +222,6 @@ export function renderTabContent(tab: Tab, context: TabRenderContext) {
case "homepage":
return withTabSuspense(<HomepageCanvas />);
case "collab":
return withTabSuspense(
<CollabRoomTab roomId={tab.collabRoomId} isVisible={isVisible} />,
);
case "termix-id":
return withTabSuspense(
<PanelTabFrame>