feat: generic project UI, branding fix, context/artifact separation
Web: - Replace GitHub-specific import with generic public Git URL import - Update project workspace page to use ProjectView shape (name, sources) - Migrate use-project-workspace hook to importPublicGit action - Fix status key needsInput → needs-input Branding: - Correct Zopo/zopo → Zopu/zopu in docs/PRODUCT.md, docs/DESIGN.md, docs/TECH.md Artifacts: - Cut to 8 operational artifacts (removed project/business/design.md) - Update artifact seeds with generic context scaffolding
This commit is contained in:
@@ -17,11 +17,12 @@ export const useProjectWorkspace = () => {
|
||||
const [issueBody, setIssueBody] = useState("");
|
||||
const [pendingAction, setPendingAction] = useState<string | null>(null);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const connectGitHub = useAction(api.projects.connectGitHub);
|
||||
const importPublicGit = useAction(api.projects.importPublicGit);
|
||||
const createIssue = useMutation(api.projectIssues.create);
|
||||
const beginIssue = useMutation(api.projectIssues.begin);
|
||||
const markDispatchFailed = useMutation(api.projectIssues.markDispatchFailed);
|
||||
const activeProjectId = selectedProjectId ?? projects?.[0]?._id ?? null;
|
||||
const activeProjectId =
|
||||
(selectedProjectId ?? (projects?.[0]?.id as unknown as Id<"projects">)) ?? null;
|
||||
const artifacts = useQuery(
|
||||
api.projectArtifacts.list,
|
||||
activeProjectId ? { projectId: activeProjectId } : "skip"
|
||||
@@ -35,8 +36,8 @@ export const useProjectWorkspace = () => {
|
||||
setPendingAction("connect");
|
||||
setError(null);
|
||||
try {
|
||||
const projectId = await connectGitHub({ repository });
|
||||
setSelectedProjectId(projectId);
|
||||
const outcome = await importPublicGit({ repositoryUrl: repository });
|
||||
setSelectedProjectId(outcome.id as unknown as Id<"projects">);
|
||||
setRepository("");
|
||||
} catch (caughtError) {
|
||||
setError(errorMessage(caughtError));
|
||||
@@ -87,9 +88,8 @@ export const useProjectWorkspace = () => {
|
||||
setPendingAction(null);
|
||||
}
|
||||
};
|
||||
|
||||
const selectedProject =
|
||||
projects?.find((project) => project._id === activeProjectId) ?? null;
|
||||
projects?.find((project) => project.id === (activeProjectId as unknown as string)) ?? null;
|
||||
|
||||
return {
|
||||
artifacts,
|
||||
|
||||
Reference in New Issue
Block a user