diff --git a/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/FileBrowserPanelWrapper.tsx b/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/FileBrowserPanelWrapper.tsx index 2f7c7b7d..bc95236c 100644 --- a/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/FileBrowserPanelWrapper.tsx +++ b/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/FileBrowserPanelWrapper.tsx @@ -4,8 +4,7 @@ import { FileBrowserApp } from './FileBrowserApp'; const cwdToPath = (cwd: string) => (cwd === '~' ? '/' : cwd.slice(1)); export const FileBrowserPanelWrapper = () => { - const { cwd, initialFilePath, defaultFileSort } = useWorkspace(); + const { cwd } = useWorkspace(); const basePath = cwdToPath(cwd); - const initialPath = basePath === '/' ? initialFilePath : undefined; - return ; + return ; }; diff --git a/src/workspaces/officerdev/src/components/Workspace/WorkspaceContext.ts b/src/workspaces/officerdev/src/components/Workspace/WorkspaceContext.ts index e6920ba7..77897c3a 100644 --- a/src/workspaces/officerdev/src/components/Workspace/WorkspaceContext.ts +++ b/src/workspaces/officerdev/src/components/Workspace/WorkspaceContext.ts @@ -4,18 +4,11 @@ import type { DropPosition } from './layout-utils'; import type { PanelConfig } from './types'; import type { WorkspaceIdentity } from './workspace-identity'; -export type DefaultFileSort = { - field: 'name' | 'size' | 'type' | 'date'; - direction: 'asc' | 'desc'; -}; - type WorkspaceContextValue = { /** Which dashboard or screen this panel is on. Null in a preview or a settings pane. */ workspace: WorkspaceIdentity | null; cwd: string; root?: string; - initialFilePath?: string; - defaultFileSort?: DefaultFileSort; promptPrefix?: string; // Per-panel app settings, by panel id. A map rather than a getter so a config change re-renders the // panel that owns it — apps read this through `usePanelConfig`, not directly. diff --git a/src/workspaces/officerdev/src/components/Workspace/WorkspaceView.tsx b/src/workspaces/officerdev/src/components/Workspace/WorkspaceView.tsx index daba244f..9d139158 100644 --- a/src/workspaces/officerdev/src/components/Workspace/WorkspaceView.tsx +++ b/src/workspaces/officerdev/src/components/Workspace/WorkspaceView.tsx @@ -4,7 +4,6 @@ import { ResizablePanel, ResizablePanelGroup, ResizableHandle } from '@/componen import { useIsMobile } from 'hooks/useIsMobile'; import { useSessionState } from 'hooks/useSessionState'; import type { LayoutNode, DashboardState, EphemeralPanels, PanelComponents, PanelConfig } from './types'; -import type { DefaultFileSort } from './WorkspaceContext'; import type { DropPosition } from './layout-utils'; import { splitPanel, removePanel, setApp, updateSizes, swapPanels, movePanel, countPanels, setZoom, setPanelConfig, collectPanelConfigs } from './layout-utils'; import { WorkspaceProvider } from './WorkspaceContext'; @@ -17,8 +16,6 @@ type WorkspaceViewProps = { locked?: boolean; cwd?: string; root?: string; - initialFilePath?: string; - defaultFileSort?: DefaultFileSort; promptPrefix?: string; components?: PanelComponents; ephemeral?: EphemeralPanels | null; @@ -28,7 +25,7 @@ type WorkspaceViewProps = { const noop = () => {}; -export const WorkspaceView = ({ workspace, locked, cwd = '~', root, initialFilePath, defaultFileSort, promptPrefix, components, ephemeral, mobilePanelId, onMobilePanelChange }: WorkspaceViewProps) => { +export const WorkspaceView = ({ workspace, locked, cwd = '~', root, promptPrefix, components, ephemeral, mobilePanelId, onMobilePanelChange }: WorkspaceViewProps) => { const { registry } = useAppRegistry(); const isMobile = useIsMobile(); @@ -193,8 +190,6 @@ export const WorkspaceView = ({ workspace, locked, cwd = '~', root, initialFileP workspace: identity, cwd, root, - initialFilePath, - defaultFileSort, promptPrefix, panelConfigs, setPanelConfig: locked ? noop : handleSetPanelConfig, diff --git a/src/workspaces/officerdev/src/components/Workspace/index.ts b/src/workspaces/officerdev/src/components/Workspace/index.ts index 466889cf..4acb5483 100644 --- a/src/workspaces/officerdev/src/components/Workspace/index.ts +++ b/src/workspaces/officerdev/src/components/Workspace/index.ts @@ -27,7 +27,6 @@ export { setPanelConfig, collectPanelConfigs, } from './layout-utils'; -export type { DefaultFileSort } from './WorkspaceContext'; export type { WorkspaceIdentity } from './workspace-identity'; export { parseWorkspaceKey } from './workspace-identity'; export { WorkspaceProvider, useWorkspace } from './WorkspaceContext'; diff --git a/src/workspaces/officerdev/src/index.ts b/src/workspaces/officerdev/src/index.ts index 66e25d6e..3748c0f8 100644 --- a/src/workspaces/officerdev/src/index.ts +++ b/src/workspaces/officerdev/src/index.ts @@ -141,5 +141,4 @@ export type { EphemeralPanels, DropPosition, HomeRoot, - DefaultFileSort, } from './components/Workspace';