Restore codebase deleted by bad auto-commit e4227cf

Commit e4227cf (a story creation auto-commit) erroneously deleted 175
files from master's tree, likely due to a race condition between
concurrent git operations. This commit re-adds all files from the
working directory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
dave
2026-03-22 19:07:07 +00:00
parent 89f776b978
commit f610ef6046
174 changed files with 84280 additions and 0 deletions
@@ -0,0 +1,116 @@
import type { KeyboardEvent } from "react";
import { ProjectPathInput } from "./ProjectPathInput.tsx";
import { RecentProjectsList } from "./RecentProjectsList.tsx";
export interface RecentProjectMatch {
name: string;
path: string;
}
export interface SelectionScreenProps {
knownProjects: string[];
onOpenProject: (path: string) => void;
onForgetProject: (path: string) => void;
pathInput: string;
homeDir?: string | null;
onPathInputChange: (value: string) => void;
onPathInputKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
isOpening: boolean;
suggestionTail: string;
matchList: RecentProjectMatch[];
selectedMatch: number;
onSelectMatch: (index: number) => void;
onAcceptMatch: (path: string) => void;
onCloseSuggestions: () => void;
completionError: string | null;
currentPartial: string;
}
export function SelectionScreen({
knownProjects,
onOpenProject,
onForgetProject,
pathInput,
homeDir,
onPathInputChange,
onPathInputKeyDown,
isOpening,
suggestionTail,
matchList,
selectedMatch,
onSelectMatch,
onAcceptMatch,
onCloseSuggestions,
completionError,
currentPartial,
}: SelectionScreenProps) {
const resolvedHomeDir = homeDir
? homeDir.endsWith("/")
? homeDir
: `${homeDir}/`
: "";
return (
<div
className="selection-screen"
style={{ padding: "2rem", maxWidth: "800px", margin: "0 auto" }}
>
<h1>Storkit</h1>
<p>Paste or complete a project path to start.</p>
{knownProjects.length > 0 && (
<RecentProjectsList
projects={knownProjects}
onOpenProject={onOpenProject}
onForgetProject={onForgetProject}
/>
)}
<ProjectPathInput
value={pathInput}
onChange={onPathInputChange}
onKeyDown={onPathInputKeyDown}
suggestionTail={suggestionTail}
matchList={matchList}
selectedMatch={selectedMatch}
onSelectMatch={onSelectMatch}
onAcceptMatch={onAcceptMatch}
onCloseSuggestions={onCloseSuggestions}
currentPartial={currentPartial}
/>
<div
style={{
display: "flex",
gap: "8px",
marginTop: "8px",
alignItems: "center",
}}
>
<button
type="button"
onClick={() => onOpenProject(pathInput)}
disabled={isOpening}
>
{isOpening ? "Opening..." : "Open Project"}
</button>
<button
type="button"
onClick={() => {
onPathInputChange(resolvedHomeDir);
onCloseSuggestions();
}}
disabled={isOpening}
>
New Project
</button>
<div style={{ fontSize: "0.85em", color: "#666" }}>
Press Tab to complete the next path segment
</div>
</div>
{completionError && (
<div style={{ color: "red", marginTop: "8px" }}>{completionError}</div>
)}
</div>
);
}