Skip to content

feat: independent project creation + canvas filtering #10

@StatPan

Description

@StatPan

Problem or motivation

Fresh 배포 시 HomeScreen이 빈 화면 — 프로젝트가 세션 directory에서 자동 파생되어 세션 없이 프로젝트 생성 불가. Figma처럼 프로젝트를 독립적으로 생성할 수 있어야 함.

추가로, 캔버스에서 activeProjectKey가 저장되지만 실제 필터링이 안 됨 (모든 세션이 표시됨).

Proposed solution

1. Schema + Migration

  • project.directory_key: nullable로 변경
  • project.user_created 컬럼 추가 (0=자동, 1=수동)
  • drizzle/0006_project_hierarchy.sql — rename-recreate 패턴

2. Server (Agentree overlay only — opencode 무관)

  • POST /api/project{ name, directory? } → 프로젝트 생성
  • POST /api/session — optional projectId 파라미터 추가
  • DB: createProject(name, directoryKey?) 함수 추가

3. Client Store

  • rebuildGraph 헬퍼 추출 (9곳 중복 제거 + activeProjectKey 필터링)
  • setActiveProjectKey → 그래프 재빌드 트리거
  • createProject 액션 추가

4. HomeScreen

  • "+ New Project" 버튼 → 이름 입력 → 생성 → 프로젝트 진입
  • 빈 상태에 CTA 버튼

5. Canvas

  • "New Session" 생성 시 activeProjectKeyprojectId로 전달

기존 자동 그룹핑(tree.ts)은 폴백으로 유지.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions