Improve project/task/sub-task workflows across backend and web

Backend:
- notes.py: add parent_id filter to list_notes()
- routes/notes.py: expose project_id, milestone_id, parent_id, type
  query params on GET /api/notes
- milestones.py: add find_milestone_by_title() (cross-project search)
- tools.py: list_notes project filter + updated_at; list_tasks milestone
  without project; tag_mode default add; fail-fast project resolution

Web frontend:
- TaskEditorView: add sub-tasks section (fetch, toggle, create inline);
  pre-fill projectId/milestoneId/parentId from URL query params on new task
- ProjectView: add + button in Todo kanban column header linking to
  /tasks/new?projectId=X&milestoneId=Y for quick task creation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-02 22:00:44 -05:00
parent 6580d16942
commit 4fd2c915b6
6 changed files with 266 additions and 4 deletions
+5
View File
@@ -71,6 +71,7 @@ async def list_notes(
due_after: date | None = None,
project_id: int | None = None,
milestone_id: int | None = None,
parent_id: int | None = None,
sort: str = "updated_at",
order: str = "desc",
limit: int = 50,
@@ -131,6 +132,10 @@ async def list_notes(
query = query.where(Note.milestone_id == milestone_id)
count_query = count_query.where(Note.milestone_id == milestone_id)
if parent_id is not None:
query = query.where(Note.parent_id == parent_id)
count_query = count_query.where(Note.parent_id == parent_id)
sort_col = getattr(Note, sort, Note.updated_at)
if order == "asc":
query = query.order_by(sort_col.asc())