e434c439c9
- Rename all component files to PascalCase matching exported names - Move components into feature directories (git/, session/, project/, terminal/, workspace/, ui/, layout/) - Rename all page files to PascalCase with Page suffix - Rename all API files to kebab-case - Update all imports across codebase with corrected relative depths - Preserve git history via git mv Quality gates: tsc (pass), eslint (pass), 66/74 tests pass (8 pre-existing failures) Refs: repo-restructure Task 4.4
65 lines
1.5 KiB
TypeScript
65 lines
1.5 KiB
TypeScript
import type { GitRepository } from "../../../types/git-repository";
|
|
import type { GitStatus } from "../../../api/git-repositories";
|
|
import type { ToolType } from "../../../types/tool-type";
|
|
import { FileBrowser } from "./FileBrowser";
|
|
import { CommitPanel } from "../git/CommitPanel";
|
|
import { InstanceList } from "../session/InstanceList";
|
|
|
|
interface WorkspaceSidebarProps {
|
|
projectId: string;
|
|
repoId: string;
|
|
repositories: GitRepository[];
|
|
gitStatus: GitStatus | null;
|
|
toolTypes: ToolType[];
|
|
onRepoChange: (repoId: string) => void;
|
|
onCommit: () => void;
|
|
}
|
|
|
|
export const WorkspaceSidebar = ({
|
|
projectId,
|
|
repoId,
|
|
repositories,
|
|
gitStatus,
|
|
toolTypes,
|
|
onRepoChange,
|
|
onCommit,
|
|
}: WorkspaceSidebarProps) => {
|
|
return (
|
|
<aside className="workspace-sidebar">
|
|
<div className="sidebar-section">
|
|
<label className="form-field">
|
|
Repository
|
|
<select value={repoId} onChange={(e) => onRepoChange(e.target.value)}>
|
|
{repositories.map((repo) => (
|
|
<option key={repo.id} value={repo.id}>
|
|
{repo.name}
|
|
</option>
|
|
))}
|
|
</select>
|
|
</label>
|
|
</div>
|
|
<FileBrowser
|
|
projectId={projectId}
|
|
repoId={repoId}
|
|
gitStatus={gitStatus}
|
|
/>
|
|
{gitStatus && (
|
|
<CommitPanel
|
|
projectId={projectId}
|
|
repoId={repoId}
|
|
modified={gitStatus.modified}
|
|
added={gitStatus.added}
|
|
deleted={gitStatus.deleted}
|
|
untracked={gitStatus.untracked}
|
|
onCommit={onCommit}
|
|
/>
|
|
)}
|
|
<InstanceList
|
|
projectId={projectId}
|
|
repoId={repoId}
|
|
toolTypes={toolTypes}
|
|
/>
|
|
</aside>
|
|
);
|
|
};
|