feat(project): click-to-open inbox, 세부 작업 terms, board link copy

- Inbox lists only unread notifications / unchecked mentions; no
  [확인] button: clicking a row marks it (and same-task rows) seen and
  opens the task side panel; picking another row switches the panel and
  removes the previously seen rows; closing removes them too
- Project module wording: 하위 작업 -> 세부 작업, 작업 추가 -> 메인 작업 추가;
  dashboard workload bars "메인 작업" / "세부 작업"
- Meeting: link icon next to 회의록 보드 copies the board URL
- Bump project asset versions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 16:02:58 +09:00
parent 85e91ca882
commit 8045d06362
17 changed files with 379 additions and 308 deletions
+20 -20
View File
@@ -417,9 +417,9 @@ class ProjectStore:
) -> list[dict[str, Any]]:
"""업무 목록.
기본은 최상위 업무만(`parent_task_id IS NULL`) — 하위 업무는 부모 안에서만
기본은 최상위 업무만(`parent_task_id IS NULL`) — 세부 업무는 부모 안에서만
보인다(아사나와 동일, 보드/캘린더/리스트 카드로 따로 뜨지 않는다).
`parent_task_id` 를 주면 그 부모의 하위 업무만 받는다.
`parent_task_id` 를 주면 그 부모의 세부 업무만 받는다.
`project_id` 하나만 지정하고(`include_subprojects=False`, 최상위 조회일
때) `include_links=True`(기본값)이면, 그 프로젝트에 멀티호밍
@@ -487,7 +487,7 @@ class ProjectStore:
)
def list_subtasks_of(self, *, parent_ids: list[int]) -> list[dict[str, Any]]:
"""하위 업무 요약(대시보드 담당자별 집계·업무 목록 패널용) — id·부모·제목·마감일·완료·담당자."""
"""세부 업무 요약(대시보드 담당자별 집계·업무 목록 패널용) — id·부모·제목·마감일·완료·담당자."""
ids = sorted({int(i) for i in parent_ids})
if not ids:
return []
@@ -565,7 +565,7 @@ class ProjectStore:
return [self._serialize(r) for r in rows]
def count_my_open(self, *, assignee_email: str) -> int:
"""사이드바 "내 업무" 배지 — 내가 담당인 미완료 업무 수(하위 업무 포함,
"""사이드바 "내 업무" 배지 — 내가 담당인 미완료 업무 수(세부 업무 포함,
내 업무 화면 목록과 같은 기준)."""
with self._pool.connection() as conn:
row = conn.execute(
@@ -577,7 +577,7 @@ class ProjectStore:
def list_my_tasks(self, *, assignee_email: str, limit: int = 1000) -> list[dict[str, Any]]:
""""내 업무" 화면 전용 — 내가 담당자인 업무를 레벨(최상위/하위) 상관없이
전부 반환한다. 하위 업무 행에는 부모 업무 정보(`parent_title` 등)를 같이
전부 반환한다. 세부 업무 행에는 부모 업무 정보(`parent_title` 등)를 같이
붙여서, 부모가 내 업무가 아니어도(다른 사람 담당) 화면에서 트리로 묶어
보여줄 수 있게 한다.
"""
@@ -643,7 +643,7 @@ class ProjectStore:
with self._pool.connection() as conn:
with conn.transaction():
if parent_task_id is not None:
# 하위 업무는 부모와 같은 프로젝트에 속하고(담당자 선택지 등이
# 세부 업무는 부모와 같은 프로젝트에 속하고(담당자 선택지 등이
# 맞아떨어지게), 보드에는 안 보이므로 세션을 갖지 않는다.
parent = conn.execute(
"SELECT project_id FROM tasks WHERE id = %s", (parent_task_id,)
@@ -652,7 +652,7 @@ class ProjectStore:
raise KeyError(f"상위 작업을 찾을 수 없습니다: {parent_task_id}")
# 권한은 URL 의 project_id 로 검사했으므로, 부모가 다른 프로젝트
# 업무면 거부한다(예전엔 부모 프로젝트로 조용히 바꿔 권한 없는
# 프로젝트에 하위 업무를 만들 수 있었다).
# 프로젝트에 세부 업무를 만들 수 있었다).
if int(parent["project_id"]) != int(project_id):
raise ValueError("상위 작업이 이 프로젝트에 속하지 않습니다.")
stage_id = None
@@ -666,7 +666,7 @@ class ProjectStore:
(project_id,),
).fetchone()
stage_id = st["id"] if st else None
# 담당자 없이 만들면 그 세션의 기본 담당자를 배정(하위 업무는
# 담당자 없이 만들면 그 세션의 기본 담당자를 배정(세부 업무는
# 세션이 없어 해당 없음).
if not assignee and stage_id is not None:
assignee, assignee_name = self._stage_default_assignee(conn, stage_id, project_id)
@@ -711,12 +711,12 @@ class ProjectStore:
def move_subtask(
self, *, task_id: int, parent_task_id: int, actor: str = ""
) -> dict[str, Any]:
"""하위 업무를 다른 상위 업무 밑으로 옮긴다(보드 카드로 드래그).
"""세부 업무를 다른 상위 업무 밑으로 옮긴다(보드 카드로 드래그).
받는 쪽은 보드 카드 = 최상위 업무만 허용한다 — 그래서 자기 자신이나
자기 하위로 옮기는 순환이 생기지 않는다. 같은 프로젝트 안에서만
(하위 업무는 부모와 같은 프로젝트에 속한다 — create_task 와 같은 규칙).
하위 업무의 하위 업무는 그대로 따라간다. 목록 끝(sort_order 최대+1)으로.
(세부 업무는 부모와 같은 프로젝트에 속한다 — create_task 와 같은 규칙).
세부 업무의 세부 업무는 그대로 따라간다. 목록 끝(sort_order 최대+1)으로.
"""
with self._pool.connection() as conn:
with conn.transaction():
@@ -728,7 +728,7 @@ class ProjectStore:
if not sub:
raise KeyError(f"작업을 찾을 수 없습니다: {task_id}")
if sub["parent_task_id"] is None:
raise ValueError("하위 작업만 다른 작업으로 옮길 수 있습니다.")
raise ValueError("세부 작업만 다른 작업으로 옮길 수 있습니다.")
parent = conn.execute(
"SELECT id, project_id, parent_task_id, title FROM tasks WHERE id = %s",
(parent_task_id,),
@@ -736,7 +736,7 @@ class ProjectStore:
if not parent:
raise KeyError(f"상위 작업을 찾을 수 없습니다: {parent_task_id}")
if parent["parent_task_id"] is not None:
raise ValueError("하위 작업 안으로는 옮길 수 없습니다.")
raise ValueError("세부 작업 안으로는 옮길 수 없습니다.")
if int(parent["project_id"]) != int(sub["project_id"]):
raise ValueError("다른 프로젝트의 작업으로는 옮길 수 없습니다.")
if int(parent["id"]) != int(sub["parent_task_id"]):
@@ -839,7 +839,7 @@ class ProjectStore:
newly_completed = True
elif not done and prev.get("completed_at"):
sets.append("completed_at = NULL")
# 직접 완료 토글 — 하위 업무는 세션(칸반 컬럼)이 없어 위 자동 세팅이
# 직접 완료 토글 — 세부 업무는 세션(칸반 컬럼)이 없어 위 자동 세팅이
# 적용되지 않는다. "stage_id" 를 같이 보냈으면 그쪽 판정이 우선한다.
elif "completed" in fields:
if fields["completed"] and not prev.get("completed_at"):
@@ -917,7 +917,7 @@ class ProjectStore:
return payload
def delete_task(self, *, task_id: int, deleted_by: str = "") -> tuple[list[int], int | None]:
"""업무(+하위 업무 CASCADE) 삭제 → (지워진 업무 id 목록, 휴지통 id).
"""업무(+세부 업무 CASCADE) 삭제 → (지워진 업무 id 목록, 휴지통 id).
휴지통 테이블(010)이 있으면 지우기 직전 스냅샷을 같은 트랜잭션에서 남긴다
(스냅샷 저장이 실패하면 삭제도 취소). 없으면 휴지통 id 는 None — 예전처럼
@@ -1007,7 +1007,7 @@ class ProjectStore:
행은 지운다. 복구할 수 없으면 ValueError(사유), 없으면 KeyError.
- 같은 id 의 업무가 이미 있으면 거부(두 번 복구 방지).
- 프로젝트가 지워졌으면 거부. 하위 업무만 지웠던 경우 상위 업무가 없으면 거부.
- 프로젝트가 지워졌으면 거부. 세부 업무만 지웠던 경우 상위 업무가 없으면 거부.
- 세션이 지워졌으면 세션 없이(미지정), 연결/이력 중 지워진 프로젝트를
가리키는 행은 뺀다."""
with self._pool.connection() as conn:
@@ -1486,7 +1486,7 @@ class ProjectStore:
)
def reorder_subtasks(self, *, parent_task_id: int, ordered_ids: list[int]) -> None:
"""작업 팝업의 하위 작업 목록 드래그 재정렬 — 이 상위 작업의 하위 작업만
"""작업 팝업의 세부 작업 목록 드래그 재정렬 — 이 상위 작업의 세부 작업만
0부터 다시 매긴다(목록은 parent_task_id 로 먼저 거른 뒤 sort_order 순)."""
with self._pool.connection() as conn:
conn.execute(
@@ -1818,7 +1818,7 @@ class ProjectStore:
def search_tasks(
self, *, query: str, project_ids: set[int] | None, limit: int = 30,
) -> list[dict[str, Any]]:
"""제목/설명/댓글에 검색어가 들어간 업무(하위 업무 포함).
"""제목/설명/댓글에 검색어가 들어간 업무(세부 업무 포함).
project_ids 가 None 이면 전체(관리자), 아니면 그 프로젝트들만.
설명은 HTML 이라 태그 이름·속성에만 걸린 경우(예: "img")를 걸러내려고
@@ -1865,7 +1865,7 @@ class ProjectStore:
# 마감 알림 (task_reminders, 마이그레이션 008) — reminders.py 가 부른다
# ════════════════════════════════════════════════════════════
def list_open_tasks_due_between(self, *, start: date, end: date) -> list[dict[str, Any]]:
"""미완료 + 마감일이 [start, end] 인 업무(하위 업무 포함) + 팔로워 목록.
"""미완료 + 마감일이 [start, end] 인 업무(세부 업무 포함) + 팔로워 목록.
보관(archived) 프로젝트는 뺀다."""
with self._pool.connection() as conn:
rows = conn.execute(
@@ -1913,7 +1913,7 @@ class ProjectStore:
def task_link_scope(self, *, task_ids: list[int]) -> dict[int, set[int]]:
"""작업 id → 이 작업 또는 그 상위 작업들이 연결(멀티호밍)된 프로젝트 id 집합.
연결된 프로젝트 멤버가 그 작업(과 하위 작업)을 읽기 전용으로 볼 수 있는지 판단한다."""
연결된 프로젝트 멤버가 그 작업(과 세부 작업)을 읽기 전용으로 볼 수 있는지 판단한다."""
ids = sorted({int(i) for i in task_ids})
if not ids:
return {}